From 447c4354450abd114281d1a2e7444d621e65ed05 Mon Sep 17 00:00:00 2001 From: Bo Anderson Date: Thu, 14 Dec 2023 15:34:15 +0000 Subject: [PATCH] Update all dependencies --- .gitignore | 14 +- Library/.rubocop.yml | 10 +- Library/Homebrew/Gemfile | 8 +- Library/Homebrew/Gemfile.lock | 90 +- Library/Homebrew/brew.sh | 2 - Library/Homebrew/cmd/update.sh | 5 +- Library/Homebrew/dev-cmd/tests.rb | 1 - Library/Homebrew/dev-cmd/typecheck.rb | 18 +- Library/Homebrew/livecheck/livecheck.rb | 4 +- .../Homebrew/sorbet/rbi/gems/.gitattributes | 1 + .../sorbet/rbi/gems/activesupport@6.1.7.6.rbi | 14567 +++- .../sorbet/rbi/gems/addressable@2.8.6.rbi | 1701 + .../Homebrew/sorbet/rbi/gems/ast@2.4.2.rbi | 530 + .../sorbet/rbi/gems/bindata@2.4.15.rbi | 2396 +- .../sorbet/rbi/gems/bootsnap@1.17.0.rbi | 432 + .../sorbet/rbi/gems/byebug@11.1.3.rbi | 20 +- .../sorbet/rbi/gems/coderay@1.1.3.rbi | 2421 + .../sorbet/rbi/gems/commander@4.6.0.rbi | 988 +- .../sorbet/rbi/gems/concurrent-ruby@1.2.2.rbi | 9244 ++- .../sorbet/rbi/gems/diff-lcs@1.5.0.rbi | 898 + .../Homebrew/sorbet/rbi/gems/docile@1.4.0.rbi | 342 +- .../sorbet/rbi/gems/elftools@1.2.0.rbi | 3358 + .../Homebrew/sorbet/rbi/gems/erubi@1.12.0.rbi | 146 + .../Homebrew/sorbet/rbi/gems/hana@1.3.7.rbi | 91 + .../sorbet/rbi/gems/highline@2.0.3.rbi | 3032 +- .../sorbet/rbi/gems/hpricot@0.8.6.rbi | 1140 +- .../Homebrew/sorbet/rbi/gems/i18n@1.14.1.rbi | 1636 + .../sorbet/rbi/gems/json_schemer@2.1.1.rbi | 1515 + .../language_server-protocol@3.17.0.3.rbi | 14237 ++++ .../sorbet/rbi/gems/method_source@1.0.0.rbi | 200 + .../sorbet/rbi/gems/minitest@5.20.0.rbi | 1173 +- .../sorbet/rbi/gems/msgpack@1.7.2.rbi | 154 +- .../sorbet/rbi/gems/mustache@1.1.1.rbi | 808 + .../Homebrew/sorbet/rbi/gems/netrc@0.11.0.rbi | 158 + .../sorbet/rbi/gems/parallel@1.23.0.rbi | 162 + .../sorbet/rbi/gems/parallel_tests@3.13.0.rbi | 95 - .../sorbet/rbi/gems/parallel_tests@4.3.0.rbi | 245 + .../sorbet/rbi/gems/parlour@8.1.0.rbi | 929 +- .../sorbet/rbi/gems/parser@3.2.2.4.rbi | 5687 +- .../sorbet/rbi/gems/patchelf@1.4.0.rbi | 455 + .../Homebrew/sorbet/rbi/gems/plist@3.7.0.rbi | 203 + .../sorbet/rbi/gems/prettier_print@1.2.1.rbi | 951 + .../Homebrew/sorbet/rbi/gems/prism@0.18.0.rbi | 28702 ++++++++ .../Homebrew/sorbet/rbi/gems/pry@0.14.2.rbi | 7703 ++- .../sorbet/rbi/gems/public_suffix@5.0.4.rbi | 790 + .../Homebrew/sorbet/rbi/gems/racc@1.7.3.rbi | 1407 +- .../Homebrew/sorbet/rbi/gems/rack@3.0.8.rbi | 3813 +- .../sorbet/rbi/gems/rainbow@3.1.1.rbi | 246 + .../gems/{rbi@0.0.14.rbi => rbi@0.1.5.rbi} | 1210 +- .../sorbet/rbi/gems/rdiscount@2.2.7.1.rbi | 204 + .../sorbet/rbi/gems/regexp_parser@2.8.3.rbi | 2445 +- .../Homebrew/sorbet/rbi/gems/rexml@3.2.6.rbi | 4088 ++ .../Homebrew/sorbet/rbi/gems/ronn@0.7.3.rbi | 565 + .../sorbet/rbi/gems/rspec-core@3.12.2.rbi | 8462 ++- .../rbi/gems/rspec-expectations@3.12.3.rbi | 6593 +- .../sorbet/rbi/gems/rspec-github@2.4.0.rbi | 77 +- .../sorbet/rbi/gems/rspec-its@1.3.0.rbi | 164 +- .../sorbet/rbi/gems/rspec-mocks@3.12.6.rbi | 3906 +- .../sorbet/rbi/gems/rspec-retry@0.6.2.rbi | 462 +- .../sorbet/rbi/gems/rspec-sorbet@1.9.2.rbi | 84 +- .../sorbet/rbi/gems/rspec-support@3.12.1.rbi | 1144 +- .../Homebrew/sorbet/rbi/gems/rspec@3.12.0.rbi | 52 +- .../rbi/gems/rspec_junit_formatter@0.6.0.rbi | 93 + .../sorbet/rbi/gems/rubocop-ast@1.30.0.rbi | 5534 +- .../rbi/gems/rubocop-capybara@2.18.0.rbi | 210 - .../rbi/gems/rubocop-capybara@2.19.0.rbi | 1125 + .../rbi/gems/rubocop-factory_bot@2.24.0.rbi | 878 + .../rbi/gems/rubocop-performance@1.17.1.rbi | 938 - .../rbi/gems/rubocop-performance@1.19.1.rbi | 3208 + .../sorbet/rbi/gems/rubocop-rails@2.19.1.rbi | 2452 - .../sorbet/rbi/gems/rubocop-rails@2.22.2.rbi | 9137 +++ .../sorbet/rbi/gems/rubocop-rspec@2.20.0.rbi | 2302 - .../sorbet/rbi/gems/rubocop-rspec@2.25.0.rbi | 8164 +++ .../sorbet/rbi/gems/rubocop-sorbet@0.7.6.rbi | 1033 +- .../sorbet/rbi/gems/rubocop@1.50.2.rbi | 14873 ---- .../sorbet/rbi/gems/rubocop@1.59.0.rbi | 57245 ++++++++++++++++ .../sorbet/rbi/gems/ruby-macho@4.0.0.rbi | 3438 +- .../sorbet/rbi/gems/ruby-prof@1.4.3.rbi | 699 +- .../rbi/gems/ruby-progressbar@1.13.0.rbi | 889 +- .../rbi/gems/simplecov-cobertura@2.1.0.rbi | 120 +- .../sorbet/rbi/gems/simplecov-html@0.12.3.rbi | 138 +- .../sorbet/rbi/gems/simplecov@0.22.0.rbi | 1607 +- .../gems/simplecov_json_formatter@0.1.4.rbi | 134 +- .../sorbet/rbi/gems/simpleidn@0.2.1.rbi | 137 + .../Homebrew/sorbet/rbi/gems/spoom@1.1.11.rbi | 1445 - .../Homebrew/sorbet/rbi/gems/spoom@1.2.4.rbi | 3777 + .../sorbet/rbi/gems/stackprof@0.2.25.rbi | 153 + .../sorbet/rbi/gems/syntax_tree@6.2.0.rbi | 23136 +++++++ .../sorbet/rbi/gems/tapioca@0.11.13.rbi | 3504 + .../sorbet/rbi/gems/tapioca@0.7.3.rbi | 1723 - .../Homebrew/sorbet/rbi/gems/thor@1.3.0.rbi | 3401 + .../Homebrew/sorbet/rbi/gems/tzinfo@2.0.6.rbi | 5048 ++ .../Homebrew/sorbet/rbi/gems/unf@0.1.4.rbi | 17 +- .../sorbet/rbi/gems/unf_ext@0.0.9.1.rbi | 2 +- .../rbi/gems/unicode-display_width@2.5.0.rbi | 34 + .../sorbet/rbi/gems/unparser@0.6.4.rbi | 1834 - .../sorbet/rbi/gems/warning@1.3.0.rbi | 128 +- .../sorbet/rbi/gems/yard-sorbet@0.6.1.rbi | 235 - .../sorbet/rbi/gems/yard-sorbet@0.8.1.rbi | 428 + .../Homebrew/sorbet/rbi/gems/yard@0.9.34.rbi | 14172 +++- .../sorbet/rbi/gems/zeitwerk@2.6.12.rbi | 732 +- .../sorbet/rbi/hidden-definitions/hidden.rbi | 1957 +- Library/Homebrew/sorbet/rbi/todo.rbi | 12 - Library/Homebrew/sorbet/rbi/upstream.rbi | 46 - Library/Homebrew/sorbet/tapioca/prerequire.rb | 5 + Library/Homebrew/sorbet/tapioca/require.rb | 3 - Library/Homebrew/test/global_spec.rb | 10 - Library/Homebrew/test/rubocop_spec.rb | 1 - .../spec/shared_context/integration_test.rb | 2 - Library/Homebrew/utils/gems.rb | 9 +- Library/Homebrew/utils/ruby.sh | 3 - .../Homebrew/vendor/bundle/bundler/setup.rb | 37 +- .../lib/types/private/types/void.rb | 34 - .../lib/types/props/pretty_printable.rb | 107 - .../lib/types/types/typed_array.rb | 39 - .../lib/types/types/union.rb | 91 - .../lib/sorbet-runtime.rb | 8 +- .../lib/types/_types.rb | 60 +- .../lib/types/abstract_utils.rb | 0 .../lib/types/boolean.rb | 0 .../lib/types/compatibility_patches.rb | 6 +- .../lib/types/configuration.rb | 0 .../lib/types/enum.rb | 7 +- .../lib/types/generic.rb | 2 + .../lib/types/helpers.rb | 0 .../lib/types/interface_wrapper.rb | 0 .../lib/types/non_forcing_constants.rb | 0 .../lib/types/private/abstract/data.rb | 0 .../lib/types/private/abstract/declare.rb | 17 +- .../lib/types/private/abstract/hooks.rb | 0 .../lib/types/private/abstract/validate.rb | 0 .../lib/types/private/casts.rb | 5 +- .../lib/types/private/class_utils.rb | 19 +- .../lib/types/private/compiler.rb | 0 .../lib/types/private/decl_state.rb | 0 .../lib/types/private/final.rb | 0 .../lib/types/private/methods/_methods.rb | 74 +- .../types/private/methods/call_validation.rb | 109 +- .../private/methods/call_validation_2_6.rb | 128 +- .../private/methods/call_validation_2_7.rb | 128 +- .../lib/types/private/methods/decl_builder.rb | 27 +- .../lib/types/private/methods/modes.rb | 0 .../lib/types/private/methods/signature.rb | 101 +- .../private/methods/signature_validation.rb | 74 +- .../lib/types/private/mixins/mixins.rb | 0 .../lib/types/private/retry.rb | 0 .../lib/types/private/runtime_levels.rb | 19 + .../lib/types/private/sealed.rb | 0 .../lib/types/private/types/not_typed.rb | 2 + .../types/private/types/simple_pair_union.rb | 55 + .../lib/types/private/types/string_holder.rb | 0 .../lib/types/private/types/type_alias.rb | 0 .../lib/types/private/types/void.rb | 40 + .../lib/types/props/_props.rb | 4 +- .../lib/types/props/constructor.rb | 0 .../lib/types/props/custom_type.rb | 4 +- .../lib/types/props/decorator.rb | 73 +- .../lib/types/props/errors.rb | 0 .../types/props/generated_code_validation.rb | 0 .../props/has_lazily_specialized_methods.rb | 4 +- .../lib/types/props/optional.rb | 0 .../lib/types/props/plugin.rb | 0 .../lib/types/props/pretty_printable.rb | 69 + .../lib/types/props/private/apply_default.rb | 0 .../props/private/deserializer_generator.rb | 0 .../lib/types/props/private/parser.rb | 0 .../types/props/private/serde_transform.rb | 0 .../props/private/serializer_generator.rb | 0 .../lib/types/props/private/setter_factory.rb | 2 +- .../lib/types/props/serializable.rb | 26 +- .../lib/types/props/type_validation.rb | 7 +- .../lib/types/props/utils.rb | 0 .../lib/types/props/weak_constructor.rb | 0 .../lib/types/sig.rb | 0 .../lib/types/struct.rb | 4 +- .../lib/types/types/anything.rb | 31 + .../lib/types/types/attached_class.rb | 0 .../lib/types/types/base.rb | 16 +- .../lib/types/types/class_of.rb | 11 + .../lib/types/types/enum.rb | 2 +- .../lib/types/types/fixed_array.rb | 13 + .../lib/types/types/fixed_hash.rb | 22 + .../lib/types/types/intersection.rb | 0 .../lib/types/types/noreturn.rb | 1 - .../lib/types/types/proc.rb | 0 .../lib/types/types/self_type.rb | 0 .../lib/types/types/simple.rb | 31 +- .../lib/types/types/t_enum.rb | 0 .../lib/types/types/type_member.rb | 0 .../lib/types/types/type_parameter.rb | 19 + .../lib/types/types/type_template.rb | 0 .../lib/types/types/type_variable.rb | 0 .../lib/types/types/typed_array.rb | 68 + .../lib/types/types/typed_class.rb | 85 + .../lib/types/types/typed_enumerable.rb | 7 + .../lib/types/types/typed_enumerator.rb | 0 .../lib/types/types/typed_enumerator_chain.rb | 41 + .../lib/types/types/typed_enumerator_lazy.rb | 0 .../lib/types/types/typed_hash.rb | 0 .../lib/types/types/typed_range.rb | 0 .../lib/types/types/typed_set.rb | 0 .../lib/types/types/union.rb | 127 + .../lib/types/types/untyped.rb | 0 .../lib/types/utils.rb | 74 +- 204 files changed, 290468 insertions(+), 29817 deletions(-) create mode 100644 Library/Homebrew/sorbet/rbi/gems/.gitattributes create mode 100644 Library/Homebrew/sorbet/rbi/gems/erubi@1.12.0.rbi create mode 100644 Library/Homebrew/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi create mode 100644 Library/Homebrew/sorbet/rbi/gems/netrc@0.11.0.rbi delete mode 100644 Library/Homebrew/sorbet/rbi/gems/parallel_tests@3.13.0.rbi create mode 100644 Library/Homebrew/sorbet/rbi/gems/parallel_tests@4.3.0.rbi create mode 100644 Library/Homebrew/sorbet/rbi/gems/prettier_print@1.2.1.rbi create mode 100644 Library/Homebrew/sorbet/rbi/gems/prism@0.18.0.rbi rename Library/Homebrew/sorbet/rbi/gems/{rbi@0.0.14.rbi => rbi@0.1.5.rbi} (59%) delete mode 100644 Library/Homebrew/sorbet/rbi/gems/rubocop-capybara@2.18.0.rbi create mode 100644 Library/Homebrew/sorbet/rbi/gems/rubocop-capybara@2.19.0.rbi create mode 100644 Library/Homebrew/sorbet/rbi/gems/rubocop-factory_bot@2.24.0.rbi delete mode 100644 Library/Homebrew/sorbet/rbi/gems/rubocop-performance@1.17.1.rbi create mode 100644 Library/Homebrew/sorbet/rbi/gems/rubocop-performance@1.19.1.rbi delete mode 100644 Library/Homebrew/sorbet/rbi/gems/rubocop-rails@2.19.1.rbi create mode 100644 Library/Homebrew/sorbet/rbi/gems/rubocop-rails@2.22.2.rbi delete mode 100644 Library/Homebrew/sorbet/rbi/gems/rubocop-rspec@2.20.0.rbi create mode 100644 Library/Homebrew/sorbet/rbi/gems/rubocop-rspec@2.25.0.rbi delete mode 100644 Library/Homebrew/sorbet/rbi/gems/rubocop@1.50.2.rbi create mode 100644 Library/Homebrew/sorbet/rbi/gems/rubocop@1.59.0.rbi delete mode 100644 Library/Homebrew/sorbet/rbi/gems/spoom@1.1.11.rbi create mode 100644 Library/Homebrew/sorbet/rbi/gems/spoom@1.2.4.rbi create mode 100644 Library/Homebrew/sorbet/rbi/gems/syntax_tree@6.2.0.rbi create mode 100644 Library/Homebrew/sorbet/rbi/gems/tapioca@0.11.13.rbi delete mode 100644 Library/Homebrew/sorbet/rbi/gems/tapioca@0.7.3.rbi delete mode 100644 Library/Homebrew/sorbet/rbi/gems/unparser@0.6.4.rbi delete mode 100644 Library/Homebrew/sorbet/rbi/gems/yard-sorbet@0.6.1.rbi create mode 100644 Library/Homebrew/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi delete mode 100644 Library/Homebrew/sorbet/rbi/todo.rbi create mode 100644 Library/Homebrew/sorbet/tapioca/prerequire.rb delete mode 100644 Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/sorbet-runtime-0.5.10461/lib/types/private/types/void.rb delete mode 100644 Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/sorbet-runtime-0.5.10461/lib/types/props/pretty_printable.rb delete mode 100644 Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/sorbet-runtime-0.5.10461/lib/types/types/typed_array.rb delete mode 100644 Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/sorbet-runtime-0.5.10461/lib/types/types/union.rb rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/sorbet-runtime.rb (95%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/_types.rb (83%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/abstract_utils.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/boolean.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/compatibility_patches.rb (94%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/configuration.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/enum.rb (98%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/generic.rb (87%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/helpers.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/interface_wrapper.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/non_forcing_constants.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/private/abstract/data.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/private/abstract/declare.rb (75%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/private/abstract/hooks.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/private/abstract/validate.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/private/casts.rb (87%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/private/class_utils.rb (87%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/private/compiler.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/private/decl_state.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/private/final.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/private/methods/_methods.rb (90%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/private/methods/call_validation.rb (66%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/private/methods/call_validation_2_6.rb (90%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/private/methods/call_validation_2_7.rb (90%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/private/methods/decl_builder.rb (87%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/private/methods/modes.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/private/methods/signature.rb (71%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/private/methods/signature_validation.rb (72%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/private/mixins/mixins.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/private/retry.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/private/runtime_levels.rb (76%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/private/sealed.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/private/types/not_typed.rb (91%) create mode 100644 Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/sorbet-runtime-0.5.11155/lib/types/private/types/simple_pair_union.rb rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/private/types/string_holder.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/private/types/type_alias.rb (100%) create mode 100644 Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/sorbet-runtime-0.5.11155/lib/types/private/types/void.rb rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/props/_props.rb (98%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/props/constructor.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/props/custom_type.rb (95%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/props/decorator.rb (92%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/props/errors.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/props/generated_code_validation.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/props/has_lazily_specialized_methods.rb (95%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/props/optional.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/props/plugin.rb (100%) create mode 100644 Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/sorbet-runtime-0.5.11155/lib/types/props/pretty_printable.rb rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/props/private/apply_default.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/props/private/deserializer_generator.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/props/private/parser.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/props/private/serde_transform.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/props/private/serializer_generator.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/props/private/setter_factory.rb (98%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/props/serializable.rb (94%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/props/type_validation.rb (95%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/props/utils.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/props/weak_constructor.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/sig.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/struct.rb (96%) create mode 100644 Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/sorbet-runtime-0.5.11155/lib/types/types/anything.rb rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/types/attached_class.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/types/base.rb (93%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/types/class_of.rb (65%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/types/enum.rb (89%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/types/fixed_array.rb (84%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/types/fixed_hash.rb (71%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/types/intersection.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/types/noreturn.rb (99%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/types/proc.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/types/self_type.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/types/simple.rb (68%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/types/t_enum.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/types/type_member.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/types/type_parameter.rb (53%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/types/type_template.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/types/type_variable.rb (100%) create mode 100644 Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/sorbet-runtime-0.5.11155/lib/types/types/typed_array.rb create mode 100644 Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/sorbet-runtime-0.5.11155/lib/types/types/typed_class.rb rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/types/typed_enumerable.rb (95%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/types/typed_enumerator.rb (100%) create mode 100644 Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/sorbet-runtime-0.5.11155/lib/types/types/typed_enumerator_chain.rb rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/types/typed_enumerator_lazy.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/types/typed_hash.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/types/typed_range.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/types/typed_set.rb (100%) create mode 100644 Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/sorbet-runtime-0.5.11155/lib/types/types/union.rb rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/types/untyped.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/{sorbet-runtime-0.5.10461 => sorbet-runtime-0.5.11155}/lib/types/utils.rb (80%) diff --git a/.gitignore b/.gitignore index eb1ff5afc94258..205be86300c697 100644 --- a/.gitignore +++ b/.gitignore @@ -102,6 +102,7 @@ **/vendor/bundle/ruby/*/gems/diff-lcs-*/ **/vendor/bundle/ruby/*/gems/docile-*/ **/vendor/bundle/ruby/*/gems/ecma-re-validator-*/ +**/vendor/bundle/ruby/*/gems/erubi-*/ **/vendor/bundle/ruby/*/gems/hana-*/ **/vendor/bundle/ruby/*/gems/highline-*/ **/vendor/bundle/ruby/*/gems/hpricot-*/ @@ -109,17 +110,21 @@ **/vendor/bundle/ruby/*/gems/jaro_winkler-*/ **/vendor/bundle/ruby/*/gems/json-*/ **/vendor/bundle/ruby/*/gems/json_schemer-*/ +**/vendor/bundle/ruby/*/gems/language_server-protocol-*/ **/vendor/bundle/ruby/*/gems/method_source-*/ **/vendor/bundle/ruby/*/gems/mini_portile2-*/ **/vendor/bundle/ruby/*/gems/minitest-*/ **/vendor/bundle/ruby/*/gems/msgpack-*/ **/vendor/bundle/ruby/*/gems/mustache-*/ +**/vendor/bundle/ruby/*/gems/netrc-*/ **/vendor/bundle/ruby/*/gems/ntlm-http-*/ **/vendor/bundle/ruby/*/gems/parallel-*/ **/vendor/bundle/ruby/*/gems/parallel_tests-*/ **/vendor/bundle/ruby/*/gems/parlour-*/ **/vendor/bundle/ruby/*/gems/parser-*/ **/vendor/bundle/ruby/*/gems/powerpack-*/ +**/vendor/bundle/ruby/*/gems/prettier_print-*/ +**/vendor/bundle/ruby/*/gems/prism-*/ **/vendor/bundle/ruby/*/gems/psych-*/ **/vendor/bundle/ruby/*/gems/pry-*/ **/vendor/bundle/ruby/*/gems/racc-*/ @@ -140,13 +145,7 @@ **/vendor/bundle/ruby/*/gems/rspec-support-*/ **/vendor/bundle/ruby/*/gems/rspec-sorbet-*/ **/vendor/bundle/ruby/*/gems/rspec-wait-*/ -**/vendor/bundle/ruby/*/gems/rubocop-1*/ -**/vendor/bundle/ruby/*/gems/rubocop-ast-*/ -**/vendor/bundle/ruby/*/gems/rubocop-capybara-*/ -**/vendor/bundle/ruby/*/gems/rubocop-performance-*/ -**/vendor/bundle/ruby/*/gems/rubocop-rails-*/ -**/vendor/bundle/ruby/*/gems/rubocop-rspec-*/ -**/vendor/bundle/ruby/*/gems/rubocop-sorbet-*/ +**/vendor/bundle/ruby/*/gems/rubocop-*/ **/vendor/bundle/ruby/*/gems/ruby-prof-*/ **/vendor/bundle/ruby/*/gems/ruby-progressbar-*/ **/vendor/bundle/ruby/*/gems/simplecov-*/ @@ -158,6 +157,7 @@ **/vendor/bundle/ruby/*/gems/spoom-*/ **/vendor/bundle/ruby/*/gems/stackprof-*/ **/vendor/bundle/ruby/*/gems/strscan-*/ +**/vendor/bundle/ruby/*/gems/syntax_tree-*/ **/vendor/bundle/ruby/*/gems/tapioca-*/ **/vendor/bundle/ruby/*/gems/thor-*/ **/vendor/bundle/ruby/*/gems/tzinfo-*/ diff --git a/Library/.rubocop.yml b/Library/.rubocop.yml index 4c0cec6600403d..baa7d1e2b48855 100644 --- a/Library/.rubocop.yml +++ b/Library/.rubocop.yml @@ -253,8 +253,8 @@ RSpec/DescribeClass: Enabled: false RSpec/FilePath: Enabled: false -# RSpec/SpecFilePathFormat: -# Enabled: false +RSpec/SpecFilePathFormat: + Enabled: false RSpec/StubbedMock: Enabled: false RSpec/SubjectStub: @@ -384,7 +384,7 @@ Style/InvertibleUnlessCondition: # Unset this (prefer `unless a.zero?` over `if a.nonzero?`) :zero?: # Don't require non-standard `exclude?` (for now at least) - it's not available in every file - # :include?: + :include?: # TODO: Enable this cop again once https://github.com/Homebrew/brew/pull/16337#issuecomment-1855668516 is done. # From the RuboCop docs: "NOTE: Regexp and Range literals are frozen objects since Ruby 3.0." @@ -442,8 +442,8 @@ Style/StringMethods: Enabled: true # Treating this the same as Style/MethodCallWithArgsParentheses -# Style/SuperWithArgsParentheses: -# Enabled: false +Style/SuperWithArgsParentheses: + Enabled: false # An array of symbols is more readable than a symbol array # and also allows for easier grepping. diff --git a/Library/Homebrew/Gemfile b/Library/Homebrew/Gemfile index 382ac47d9747ed..c15ae77d6ead05 100644 --- a/Library/Homebrew/Gemfile +++ b/Library/Homebrew/Gemfile @@ -4,10 +4,10 @@ source "https://rubygems.org" # The default case (no envs), should always be a restrictive bound on the lowest supported minor version. # This is the branch that Dependabot will use. -if ENV.fetch("HOMEBREW_USE_RUBY_FROM_PATH", "").empty? && ENV.fetch("HOMEBREW_RUBY3", "").empty? - ruby "~> 2.6.0" +if ENV.fetch("HOMEBREW_USE_RUBY_FROM_PATH", "").empty? + ruby "~> 3.1.0" else - ruby ">= 2.6.0" + ruby ">= 3.1.0" end # disallowed gems (should not be used) @@ -74,7 +74,7 @@ group :audit, :bump_unversioned_casks, :livecheck, optional: true do end # vendored gems (no group) -gem "activesupport" +gem "activesupport", "<7" # we're actively working to remove this: https://github.com/Homebrew/brew/issues/16190 gem "addressable" gem "patchelf" gem "plist" diff --git a/Library/Homebrew/Gemfile.lock b/Library/Homebrew/Gemfile.lock index f60bb8619fa0c2..4821bf8210031e 100644 --- a/Library/Homebrew/Gemfile.lock +++ b/Library/Homebrew/Gemfile.lock @@ -22,6 +22,7 @@ GEM docile (1.4.0) elftools (1.2.0) bindata (~> 2) + erubi (1.12.0) hana (1.3.7) highline (2.0.3) hpricot (0.8.6) @@ -32,12 +33,14 @@ GEM hana (~> 1.3) regexp_parser (~> 2.0) simpleidn (~> 0.2) + language_server-protocol (3.17.0.3) method_source (1.0.0) minitest (5.20.0) msgpack (1.7.2) mustache (1.1.1) + netrc (0.11.0) parallel (1.23.0) - parallel_tests (3.13.0) + parallel_tests (4.3.0) parallel parlour (8.1.0) commander (~> 4.5) @@ -50,6 +53,8 @@ GEM patchelf (1.4.0) elftools (>= 1.2) plist (3.7.0) + prettier_print (1.2.1) + prism (0.19.0) pry (0.14.2) coderay (~> 1.1) method_source (~> 1.0) @@ -57,11 +62,9 @@ GEM racc (1.7.3) rack (3.0.8) rainbow (3.1.1) - rbi (0.0.14) - ast - parser (>= 2.6.4.0) + rbi (0.1.6) + prism (>= 0.18.0, < 0.20) sorbet-runtime (>= 0.5.9204) - unparser rdiscount (2.2.7.1) regexp_parser (2.8.3) rexml (3.2.6) @@ -93,30 +96,35 @@ GEM rspec-support (3.12.1) rspec_junit_formatter (0.6.0) rspec-core (>= 2, < 4, != 2.12.0) - rubocop (1.50.2) + rubocop (1.59.0) json (~> 2.3) + language_server-protocol (>= 3.17.0) parallel (~> 1.10) - parser (>= 3.2.0.0) + parser (>= 3.2.2.4) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.28.0, < 2.0) + rubocop-ast (>= 1.30.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) rubocop-ast (1.30.0) parser (>= 3.2.1.0) - rubocop-capybara (2.18.0) + rubocop-capybara (2.19.0) rubocop (~> 1.41) - rubocop-performance (1.17.1) + rubocop-factory_bot (2.24.0) + rubocop (~> 1.33) + rubocop-performance (1.19.1) rubocop (>= 1.7.0, < 2.0) rubocop-ast (>= 0.4.0) - rubocop-rails (2.19.1) + rubocop-rails (2.22.2) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.33.0, < 2.0) - rubocop-rspec (2.20.0) - rubocop (~> 1.33) + rubocop-ast (>= 1.30.0, < 2.0) + rubocop-rspec (2.25.0) + rubocop (~> 1.40) rubocop-capybara (~> 2.17) + rubocop-factory_bot (~> 2.22) rubocop-sorbet (0.7.6) rubocop (>= 0.90.0) ruby-macho (4.0.0) @@ -133,34 +141,29 @@ GEM simplecov_json_formatter (0.1.4) simpleidn (0.2.1) unf (~> 0.1.4) - sorbet (0.5.10461) - sorbet-static (= 0.5.10461) - sorbet-runtime (0.5.10461) - sorbet-static (0.5.10461-universal-darwin-14) - sorbet-static (0.5.10461-universal-darwin-15) - sorbet-static (0.5.10461-universal-darwin-16) - sorbet-static (0.5.10461-universal-darwin-17) - sorbet-static (0.5.10461-universal-darwin-18) - sorbet-static (0.5.10461-universal-darwin-19) - sorbet-static (0.5.10461-universal-darwin-20) - sorbet-static (0.5.10461-universal-darwin-21) - sorbet-static (0.5.10461-universal-darwin-22) - sorbet-static (0.5.10461-x86_64-linux) - sorbet-static-and-runtime (0.5.10461) - sorbet (= 0.5.10461) - sorbet-runtime (= 0.5.10461) - spoom (1.1.11) - sorbet (>= 0.5.9204) - sorbet-runtime (>= 0.5.9204) + sorbet (0.5.11155) + sorbet-static (= 0.5.11155) + sorbet-runtime (0.5.11155) + sorbet-static (0.5.11155-universal-darwin) + sorbet-static (0.5.11155-x86_64-linux) + sorbet-static-and-runtime (0.5.11155) + sorbet (= 0.5.11155) + sorbet-runtime (= 0.5.11155) + spoom (1.2.4) + erubi (>= 1.10.0) + sorbet-static-and-runtime (>= 0.5.10187) + syntax_tree (>= 6.1.1) thor (>= 0.19.2) stackprof (0.2.25) - tapioca (0.7.3) - bundler (>= 1.17.3) - pry (>= 0.12.2) - rbi (~> 0.0.0, >= 0.0.14) - sorbet-runtime (>= 0.5.9204) - sorbet-static (>= 0.5.9204) - spoom (~> 1.1.0, >= 1.1.11) + syntax_tree (6.2.0) + prettier_print (>= 1.2.0) + tapioca (0.11.13) + bundler (>= 2.2.25) + netrc (>= 0.11.0) + parallel (>= 1.21.0) + rbi (>= 0.1.4, < 0.2) + sorbet-static-and-runtime (>= 0.5.10187) + spoom (~> 1.2.0, >= 1.2.0) thor (>= 1.2.0) yard-sorbet thor (1.3.0) @@ -170,12 +173,9 @@ GEM unf_ext unf_ext (0.0.9.1) unicode-display_width (2.5.0) - unparser (0.6.4) - diff-lcs (~> 1.3) - parser (>= 3.1.0) warning (1.3.0) yard (0.9.34) - yard-sorbet (0.6.1) + yard-sorbet (0.8.1) sorbet-runtime (>= 0.5) yard (>= 0.9) zeitwerk (2.6.12) @@ -188,7 +188,7 @@ PLATFORMS x86_64-linux DEPENDENCIES - activesupport + activesupport (< 7) addressable bootsnap byebug @@ -226,7 +226,7 @@ DEPENDENCIES warning RUBY VERSION - ruby 2.6.10p210 + ruby 3.1.4p223 BUNDLED WITH 2.4.18 diff --git a/Library/Homebrew/brew.sh b/Library/Homebrew/brew.sh index 162e8e135b29b6..9776e871774096 100644 --- a/Library/Homebrew/brew.sh +++ b/Library/Homebrew/brew.sh @@ -358,8 +358,6 @@ auto-update() { # Restore user path as it'll be refiltered by HOMEBREW_BREW_FILE (bin/brew) export PATH=${HOMEBREW_PATH} - unset HOMEBREW_RUBY3 - # exec a new process to set any new environment variables. exec "${HOMEBREW_BREW_FILE}" "$@" fi diff --git a/Library/Homebrew/cmd/update.sh b/Library/Homebrew/cmd/update.sh index 8730c8474ea53e..d9cfb2121394fd 100644 --- a/Library/Homebrew/cmd/update.sh +++ b/Library/Homebrew/cmd/update.sh @@ -893,10 +893,7 @@ EOS [[ ! -f "${HOMEBREW_CACHE}/all_commands_list.txt" ]] || [[ -n "${HOMEBREW_DEVELOPER}" && -z "${HOMEBREW_UPDATE_AUTO}" ]] then - ( - unset HOMEBREW_RUBY3 - brew update-report "$@" - ) + brew update-report "$@" return $? elif [[ -z "${HOMEBREW_UPDATE_AUTO}" && -z "${HOMEBREW_QUIET}" ]] then diff --git a/Library/Homebrew/dev-cmd/tests.rb b/Library/Homebrew/dev-cmd/tests.rb index 100f39d9225b50..d1703667840a60 100644 --- a/Library/Homebrew/dev-cmd/tests.rb +++ b/Library/Homebrew/dev-cmd/tests.rb @@ -208,7 +208,6 @@ def setup_environment!(args) HOMEBREW_CACHE HOMEBREW_LOGS HOMEBREW_TEMP - HOMEBREW_RUBY3 ] allowed_test_env << "HOMEBREW_USE_RUBY_FROM_PATH" if Homebrew::EnvConfig.developer? Homebrew::EnvConfig::ENVS.keys.map(&:to_s).each do |env| diff --git a/Library/Homebrew/dev-cmd/typecheck.rb b/Library/Homebrew/dev-cmd/typecheck.rb index 649dd56d97e17f..46b8395d7509a1 100644 --- a/Library/Homebrew/dev-cmd/typecheck.rb +++ b/Library/Homebrew/dev-cmd/typecheck.rb @@ -46,14 +46,9 @@ def self.typecheck HOMEBREW_LIBRARY_PATH.cd do if update excluded_gems = [ - "did_you_mean", # RBI file is already provided by Sorbet "json", # RBI file is already provided by Sorbet - "sorbet-static-and-runtime", # Unnecessary RBI - remove this entry with Tapioca 0.8 ] - typed_overrides = [ - "msgpack:false", # Investigate removing this with Tapioca 0.8 - ] - tapioca_args = ["--exclude", *excluded_gems, "--typed-overrides", *typed_overrides] + tapioca_args = ["--exclude", *excluded_gems, "--pre", "sorbet/tapioca/prerequire.rb"] tapioca_args << "--all" if args.update_all? ohai "Updating homegrown RBI files..." @@ -63,9 +58,18 @@ def self.typecheck ohai "Updating Tapioca RBI files..." safe_system "bundle", "exec", "tapioca", "gem", *tapioca_args safe_system "bundle", "exec", "parlour" + safe_system({ "RUBYLIB" => "#{HOMEBREW_LIBRARY_PATH}/sorbet/hidden_definitions_hacks" }, "bundle", "exec", "srb", "rbi", "hidden-definitions") - safe_system "bundle", "exec", "tapioca", "todo" + # HACK: we'll phase out hidden-definitions soon + tmp_file = "sorbet/rbi/hidden-definitions/hidden.rbi.tmp" + orig_file = "sorbet/rbi/hidden-definitions/hidden.rbi" + File.open(tmp_file, "w") do |out_file| + File.foreach(orig_file) do |line| + out_file.puts line unless line.include?("def self.new(*args, **arg, &blk); end") + end + end + File.rename(tmp_file, orig_file) if args.suggest_typed? ohai "Bumping Sorbet `typed` sigils..." diff --git a/Library/Homebrew/livecheck/livecheck.rb b/Library/Homebrew/livecheck/livecheck.rb index 3a6aa747686fb5..42eb080e67212a 100644 --- a/Library/Homebrew/livecheck/livecheck.rb +++ b/Library/Homebrew/livecheck/livecheck.rb @@ -51,12 +51,12 @@ module Livecheck rc ].freeze, T::Array[String]) - sig { returns(T::Hash[Class, String]) } + sig { returns(T::Hash[T::Class[T.anything], String]) } def livecheck_strategy_names return T.must(@livecheck_strategy_names) if defined?(@livecheck_strategy_names) # Cache demodulized strategy names, to avoid repeating this work - @livecheck_strategy_names = T.let({}, T.nilable(T::Hash[Class, String])) + @livecheck_strategy_names = T.let({}, T.nilable(T::Hash[T::Class[T.anything], String])) Strategy.constants.sort.each do |const_symbol| constant = Strategy.const_get(const_symbol) next unless constant.is_a?(Class) diff --git a/Library/Homebrew/sorbet/rbi/gems/.gitattributes b/Library/Homebrew/sorbet/rbi/gems/.gitattributes new file mode 100644 index 00000000000000..d9bb82a4de2cf0 --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/gems/.gitattributes @@ -0,0 +1 @@ +**/*.rbi linguist-generated=true diff --git a/Library/Homebrew/sorbet/rbi/gems/activesupport@6.1.7.6.rbi b/Library/Homebrew/sorbet/rbi/gems/activesupport@6.1.7.6.rbi index 306080cd2a7ec3..9de6db63870c1f 100644 --- a/Library/Homebrew/sorbet/rbi/gems/activesupport@6.1.7.6.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/activesupport@6.1.7.6.rbi @@ -4,43 +4,94 @@ # This is an autogenerated file for types exported from the `activesupport` gem. # Please instead update this file by running `bin/tapioca gem activesupport`. -::APPLE_GEM_HOME = T.let(T.unsafe(nil), String) -::RUBY19 = T.let(T.unsafe(nil), TrueClass) -::RUBY_FRAMEWORK = T.let(T.unsafe(nil), TrueClass) -::RUBY_FRAMEWORK_VERSION = T.let(T.unsafe(nil), String) - +# source://activesupport//lib/active_support/lazy_load_hooks.rb#3 module ActiveSupport extend ::ActiveSupport::LazyLoadHooks extend ::ActiveSupport::Autoload + # source://activesupport//lib/active_support/json/decoding.rb#9 def parse_json_times; end + + # source://activesupport//lib/active_support/json/decoding.rb#9 def parse_json_times=(val); end + + # source://activesupport//lib/active_support.rb#89 def test_order; end + + # source://activesupport//lib/active_support.rb#89 def test_order=(val); end class << self + # source://activesupport//lib/active_support.rb#83 def eager_load!; end - def escape_html_entities_in_json(*args, &block); end + + # source://activesupport//lib/active_support/json/encoding.rb#8 + def escape_html_entities_in_json(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/json/encoding.rb#8 def escape_html_entities_in_json=(arg); end + + # Returns the version of the currently loaded Active Support as a Gem::Version. + # + # source://activesupport//lib/active_support/gem_version.rb#5 def gem_version; end - def json_encoder(*args, &block); end + + # source://activesupport//lib/active_support/json/encoding.rb#8 + def json_encoder(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/json/encoding.rb#8 def json_encoder=(arg); end + + # source://activesupport//lib/active_support/json/decoding.rb#9 def parse_json_times; end + + # source://activesupport//lib/active_support/json/decoding.rb#9 def parse_json_times=(val); end + + # source://activesupport//lib/active_support.rb#89 def test_order; end + + # source://activesupport//lib/active_support.rb#89 def test_order=(val); end - def time_precision(*args, &block); end + + # source://activesupport//lib/active_support/json/encoding.rb#8 + def time_precision(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/json/encoding.rb#8 def time_precision=(arg); end + + # source://activesupport//lib/active_support.rb#91 def to_time_preserves_timezone; end + + # source://activesupport//lib/active_support.rb#95 def to_time_preserves_timezone=(value); end - def use_standard_json_time_format(*args, &block); end + + # source://activesupport//lib/active_support/json/encoding.rb#8 + def use_standard_json_time_format(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/json/encoding.rb#8 def use_standard_json_time_format=(arg); end + + # source://activesupport//lib/active_support.rb#99 def utc_to_local_returns_utc_offset_times; end + + # source://activesupport//lib/active_support.rb#103 def utc_to_local_returns_utc_offset_times=(value); end + + # Returns the version of the currently loaded ActiveSupport as a Gem::Version + # + # source://activesupport//lib/active_support/version.rb#7 def version; end end end +# Actionable errors let's you define actions to resolve an error. +# +# To make an error actionable, include the ActiveSupport::ActionableError +# module and invoke the +action+ class macro to define the action. An action +# needs a name and a block to execute. +# +# source://activesupport//lib/active_support/actionable_error.rb#9 module ActiveSupport::ActionableError extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -49,7 +100,10 @@ module ActiveSupport::ActionableError mixes_in_class_methods ::ActiveSupport::ActionableError::ClassMethods class << self + # source://activesupport//lib/active_support/actionable_error.rb#18 def actions(error); end + + # source://activesupport//lib/active_support/actionable_error.rb#27 def dispatch(error, name); end end @@ -66,302 +120,1389 @@ module ActiveSupport::ActionableError end end +# source://activesupport//lib/active_support/actionable_error.rb#33 module ActiveSupport::ActionableError::ClassMethods + # Defines an action that can resolve the error. + # + # class PendingMigrationError < MigrationError + # include ActiveSupport::ActionableError + # + # action "Run pending migrations" do + # ActiveRecord::Tasks::DatabaseTasks.migrate + # end + # end + # + # source://activesupport//lib/active_support/actionable_error.rb#43 def action(name, &block); end end +# source://activesupport//lib/active_support/actionable_error.rb#12 class ActiveSupport::ActionableError::NonActionable < ::StandardError; end +# Wrapping an array in an +ArrayInquirer+ gives a friendlier way to check +# its string-like contents: +# +# variants = ActiveSupport::ArrayInquirer.new([:phone, :tablet]) +# +# variants.phone? # => true +# variants.tablet? # => true +# variants.desktop? # => false +# +# source://activesupport//lib/active_support/array_inquirer.rb#26 class ActiveSupport::ArrayInquirer < ::Array + # Passes each element of +candidates+ collection to ArrayInquirer collection. + # The method returns true if any element from the ArrayInquirer collection + # is equal to the stringified or symbolized form of any element in the +candidates+ collection. + # + # If +candidates+ collection is not given, method returns true. + # + # variants = ActiveSupport::ArrayInquirer.new([:phone, :tablet]) + # + # variants.any? # => true + # variants.any?(:phone, :tablet) # => true + # variants.any?('phone', 'desktop') # => true + # variants.any?(:desktop, :watch) # => false + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/array_inquirer.rb#27 def any?(*candidates); end private + # source://activesupport//lib/active_support/array_inquirer.rb#42 def method_missing(name, *args); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/array_inquirer.rb#38 def respond_to_missing?(name, include_private = T.unsafe(nil)); end end +# Autoload and eager load conveniences for your library. +# +# This module allows you to define autoloads based on +# Rails conventions (i.e. no need to define the path +# it is automatically guessed based on the filename) +# and also define a set of constants that needs to be +# eager loaded: +# +# module MyLib +# extend ActiveSupport::Autoload +# +# autoload :Model +# +# eager_autoload do +# autoload :Cache +# end +# end +# +# Then your library can be eager loaded by simply calling: +# +# MyLib.eager_load! +# +# source://activesupport//lib/active_support/dependencies/autoload.rb#27 module ActiveSupport::Autoload + # source://activesupport//lib/active_support/dependencies/autoload.rb#37 def autoload(const_name, path = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/dependencies/autoload.rb#57 def autoload_at(path); end + + # source://activesupport//lib/active_support/dependencies/autoload.rb#50 def autoload_under(path); end + + # source://activesupport//lib/active_support/dependencies/autoload.rb#75 def autoloads; end + + # source://activesupport//lib/active_support/dependencies/autoload.rb#64 def eager_autoload; end + + # source://activesupport//lib/active_support/dependencies/autoload.rb#71 def eager_load!; end class << self + # source://activesupport//lib/active_support/dependencies/autoload.rb#28 def extended(base); end end end +# Backtraces often include many lines that are not relevant for the context +# under review. This makes it hard to find the signal amongst the backtrace +# noise, and adds debugging time. With a BacktraceCleaner, filters and +# silencers are used to remove the noisy lines, so that only the most relevant +# lines remain. +# +# Filters are used to modify lines of data, while silencers are used to remove +# lines entirely. The typical filter use case is to remove lengthy path +# information from the start of each line, and view file paths relevant to the +# app directory instead of the file system root. The typical silencer use case +# is to exclude the output of a noisy library from the backtrace, so that you +# can focus on the rest. +# +# bc = ActiveSupport::BacktraceCleaner.new +# bc.add_filter { |line| line.gsub(Rails.root.to_s, '') } # strip the Rails.root prefix +# bc.add_silencer { |line| /puma|rubygems/.match?(line) } # skip any lines from puma or rubygems +# bc.clean(exception.backtrace) # perform the cleanup +# +# To reconfigure an existing BacktraceCleaner (like the default one in Rails) +# and show as much data as possible, you can always call +# BacktraceCleaner#remove_silencers!, which will restore the +# backtrace to a pristine state. If you need to reconfigure an existing +# BacktraceCleaner so that it does not filter or modify the paths of any lines +# of the backtrace, you can call BacktraceCleaner#remove_filters! +# These two methods will give you a completely untouched backtrace. +# +# Inspired by the Quiet Backtrace gem by thoughtbot. +# +# source://activesupport//lib/active_support/backtrace_cleaner.rb#31 class ActiveSupport::BacktraceCleaner + # @return [BacktraceCleaner] a new instance of BacktraceCleaner + # + # source://activesupport//lib/active_support/backtrace_cleaner.rb#32 def initialize; end + # Adds a filter from the block provided. Each line in the backtrace will be + # mapped against this filter. + # + # # Will turn "/my/rails/root/app/models/person.rb" into "/app/models/person.rb" + # backtrace_cleaner.add_filter { |line| line.gsub(Rails.root, '') } + # + # source://activesupport//lib/active_support/backtrace_cleaner.rb#60 def add_filter(&block); end + + # Adds a silencer from the block provided. If the silencer returns +true+ + # for a given line, it will be excluded from the clean backtrace. + # + # # Will reject all lines that include the word "puma", like "/gems/puma/server.rb" or "/app/my_puma_server/rb" + # backtrace_cleaner.add_silencer { |line| /puma/.match?(line) } + # + # source://activesupport//lib/active_support/backtrace_cleaner.rb#69 def add_silencer(&block); end + + # Returns the backtrace after all filters and silencers have been run + # against it. Filters run first, then silencers. + # + # source://activesupport//lib/active_support/backtrace_cleaner.rb#41 def clean(backtrace, kind = T.unsafe(nil)); end + + # Returns the backtrace after all filters and silencers have been run + # against it. Filters run first, then silencers. + # + # source://activesupport//lib/active_support/backtrace_cleaner.rb#41 def filter(backtrace, kind = T.unsafe(nil)); end + + # Removes all filters, but leaves in the silencers. Useful if you suddenly + # need to see entire filepaths in the backtrace that you had already + # filtered out. + # + # source://activesupport//lib/active_support/backtrace_cleaner.rb#83 def remove_filters!; end + + # Removes all silencers, but leaves in the filters. Useful if your + # context of debugging suddenly expands as you suspect a bug in one of + # the libraries you use. + # + # source://activesupport//lib/active_support/backtrace_cleaner.rb#76 def remove_silencers!; end private + # source://activesupport//lib/active_support/backtrace_cleaner.rb#90 def add_gem_filter; end + + # source://activesupport//lib/active_support/backtrace_cleaner.rb#99 def add_gem_silencer; end + + # source://activesupport//lib/active_support/backtrace_cleaner.rb#103 def add_stdlib_silencer; end + + # source://activesupport//lib/active_support/backtrace_cleaner.rb#107 def filter_backtrace(backtrace); end + + # source://activesupport//lib/active_support/backtrace_cleaner.rb#123 def noise(backtrace); end + + # source://activesupport//lib/active_support/backtrace_cleaner.rb#115 def silence(backtrace); end end +# source://activesupport//lib/active_support/backtrace_cleaner.rb#88 ActiveSupport::BacktraceCleaner::FORMATTED_GEMS_PATTERN = T.let(T.unsafe(nil), Regexp) +# source://activesupport//lib/active_support/benchmarkable.rb#7 module ActiveSupport::Benchmarkable + # Allows you to measure the execution time of a block in a template and + # records the result to the log. Wrap this block around expensive operations + # or possible bottlenecks to get a time reading for the operation. For + # example, let's say you thought your file processing method was taking too + # long; you could wrap it in a benchmark block. + # + # <% benchmark 'Process data files' do %> + # <%= expensive_files_operation %> + # <% end %> + # + # That would add something like "Process data files (345.2ms)" to the log, + # which you can then use to compare timings when optimizing your code. + # + # You may give an optional logger level (:debug, :info, + # :warn, :error) as the :level option. The + # default logger level value is :info. + # + # <% benchmark 'Low-level files', level: :debug do %> + # <%= lowlevel_files_operation %> + # <% end %> + # + # Finally, you can pass true as the third argument to silence all log + # activity (other than the timing information) from inside the block. This + # is great for boiling down a noisy block to just a single statement that + # produces one log line: + # + # <% benchmark 'Process data files', level: :info, silence: true do %> + # <%= expensive_and_chatty_files_operation %> + # <% end %> + # + # source://activesupport//lib/active_support/benchmarkable.rb#37 def benchmark(message = T.unsafe(nil), options = T.unsafe(nil)); end end +# source://activesupport//lib/active_support/core_ext/big_decimal/conversions.rb#7 module ActiveSupport::BigDecimalWithDefaultFormat + # source://activesupport//lib/active_support/core_ext/big_decimal/conversions.rb#8 def to_s(format = T.unsafe(nil)); end end +# See ActiveSupport::Cache::Store for documentation. +# +# source://activesupport//lib/active_support/cache.rb#16 module ActiveSupport::Cache class << self + # Expands out the +key+ argument into a key that can be used for the + # cache store. Optionally accepts a namespace, and all keys will be + # scoped within that namespace. + # + # If the +key+ argument provided is an array, or responds to +to_a+, then + # each of elements in the array will be turned into parameters/keys and + # concatenated into a single key. For example: + # + # ActiveSupport::Cache.expand_cache_key([:foo, :bar]) # => "foo/bar" + # ActiveSupport::Cache.expand_cache_key([:foo, :bar], "namespace") # => "namespace/foo/bar" + # + # The +key+ argument can also respond to +cache_key+ or +to_param+. + # + # source://activesupport//lib/active_support/cache.rb#89 def expand_cache_key(key, namespace = T.unsafe(nil)); end + + # Creates a new Store object according to the given options. + # + # If no arguments are passed to this method, then a new + # ActiveSupport::Cache::MemoryStore object will be returned. + # + # If you pass a Symbol as the first argument, then a corresponding cache + # store class under the ActiveSupport::Cache namespace will be created. + # For example: + # + # ActiveSupport::Cache.lookup_store(:memory_store) + # # => returns a new ActiveSupport::Cache::MemoryStore object + # + # ActiveSupport::Cache.lookup_store(:mem_cache_store) + # # => returns a new ActiveSupport::Cache::MemCacheStore object + # + # Any additional arguments will be passed to the corresponding cache store + # class's constructor: + # + # ActiveSupport::Cache.lookup_store(:file_store, '/tmp/cache') + # # => same as: ActiveSupport::Cache::FileStore.new('/tmp/cache') + # + # If the first argument is not a Symbol, then it will simply be returned: + # + # ActiveSupport::Cache.lookup_store(MyOwnCacheStore.new) + # # => returns MyOwnCacheStore.new + # + # source://activesupport//lib/active_support/cache.rb#57 def lookup_store(store = T.unsafe(nil), *parameters); end private + # source://activesupport//lib/active_support/cache.rb#101 def retrieve_cache_key(key); end + + # Obtains the specified cache store class, given the name of the +store+. + # Raises an error when the store class cannot be found. + # + # source://activesupport//lib/active_support/cache.rb#113 def retrieve_store_class(store); end end end +# This class is used to represent cache entries. Cache entries have a value, an optional +# expiration time, and an optional version. The expiration time is used to support the :race_condition_ttl option +# on the cache. The version is used to support the :version option on the cache for rejecting +# mismatches. +# +# Since cache entries in most instances will be serialized, the internals of this class are highly optimized +# using short instance variable names that are lazily defined. +# +# source://activesupport//lib/active_support/cache.rb#779 class ActiveSupport::Cache::Entry + # Creates a new cache entry for the specified value. Options supported are + # +:compress+, +:compress_threshold+, +:version+ and +:expires_in+. + # + # @return [Entry] a new instance of Entry + # + # source://activesupport//lib/active_support/cache.rb#786 def initialize(value, compress: T.unsafe(nil), compress_threshold: T.unsafe(nil), version: T.unsafe(nil), expires_in: T.unsafe(nil), **_arg5); end + # Returns the size of the cached value. This could be less than + # value.bytesize if the data is compressed. + # + # source://activesupport//lib/active_support/cache.rb#823 def bytesize; end + + # Duplicates the value in a class. This is used by cache implementations that don't natively + # serialize entries to protect against accidental cache modifications. + # + # source://activesupport//lib/active_support/cache.rb#836 def dup_value!; end + + # Checks if the entry is expired. The +expires_in+ parameter can override + # the value set when the entry was created. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache.rb#805 def expired?; end + + # source://activesupport//lib/active_support/cache.rb#809 def expires_at; end + + # source://activesupport//lib/active_support/cache.rb#813 def expires_at=(value); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache.rb#799 def mismatched?(version); end + + # source://activesupport//lib/active_support/cache.rb#795 def value; end + + # source://activesupport//lib/active_support/cache.rb#780 def version; end private + # source://activesupport//lib/active_support/cache.rb#847 def compress!(compress_threshold); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache.rb#869 def compressed?; end + + # source://activesupport//lib/active_support/cache.rb#873 def uncompress(value); end end +# source://activesupport//lib/active_support/cache.rb#782 ActiveSupport::Cache::Entry::DEFAULT_COMPRESS_LIMIT = T.let(T.unsafe(nil), Integer) +# A cache store implementation which stores everything on the filesystem. +# +# FileStore implements the Strategy::LocalCache strategy which implements +# an in-memory cache inside of a block. +# +# source://activesupport//lib/active_support/cache/file_store.rb#14 class ActiveSupport::Cache::FileStore < ::ActiveSupport::Cache::Store include ::ActiveSupport::Cache::Strategy::LocalCache + # @return [FileStore] a new instance of FileStore + # + # source://activesupport//lib/active_support/cache/file_store.rb#23 def initialize(cache_path, **options); end + # Returns the value of attribute cache_path. + # + # source://activesupport//lib/active_support/cache/file_store.rb#16 def cache_path; end + # Preemptively iterates through all stored keys and removes the ones which have expired. + # + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#104 + def cleanup(**options); end + + # Deletes all items from the cache. In this case it deletes all the entries in the specified + # file store directory except for .keep or .gitkeep. Be careful which directory is specified in your + # config file when using +FileStore+ because everything in that directory will be deleted. + # + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#98 + def clear(**options); end + + # Decrements an already existing integer value that is stored in the cache. + # If the key is not found nothing is done. + # + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#123 + def decrement(name, amount = T.unsafe(nil), **options); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#110 + def delete_matched(matcher, options = T.unsafe(nil)); end + + # Increments an already existing integer value that is stored in the cache. + # If the key is not found nothing is done. + # + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#116 + def increment(name, amount = T.unsafe(nil), **options); end + private + # Delete empty directories in the cache. + # + # source://activesupport//lib/active_support/cache/file_store.rb#154 def delete_empty_directories(dir); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#168 + def delete_entry(key, **options); end + + # Make sure a file path's directories exist. + # + # source://activesupport//lib/active_support/cache/file_store.rb#163 def ensure_cache_path(path); end + + # Translate a file path into a key. + # + # source://activesupport//lib/active_support/cache/file_store.rb#148 def file_path_key(path); end + + # Lock a file for a block so only one process can modify it at a time. + # + # source://activesupport//lib/active_support/cache/file_store.rb#107 def lock_file(file_name, &block); end + + # Modifies the amount of an already existing integer value that is stored in the cache. + # If the key is not found nothing is done. + # + # source://activesupport//lib/active_support/cache/file_store.rb#181 def modify_value(name, amount, options); end + + # Translate a key into a file path. + # + # source://activesupport//lib/active_support/cache/file_store.rb#121 def normalize_key(key, options); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#131 + def read_entry(key, **options); end + + # source://activesupport//lib/active_support/cache/file_store.rb#167 def search_dir(dir, &callback); end + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#158 + def write_entry(key, entry, **options); end + class << self + # Advertise cache versioning support. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache/file_store.rb#29 def supports_cache_versioning?; end end end +# source://activesupport//lib/active_support/cache/file_store.rb#18 ActiveSupport::Cache::FileStore::DIR_FORMATTER = T.let(T.unsafe(nil), String) + +# max filename size on file system is 255, minus room for timestamp, pid, and random characters appended by Tempfile (used by atomic write) +# +# source://activesupport//lib/active_support/cache/file_store.rb#19 ActiveSupport::Cache::FileStore::FILENAME_MAX_SIZE = T.let(T.unsafe(nil), Integer) + +# max is 1024, plus some room +# +# source://activesupport//lib/active_support/cache/file_store.rb#20 ActiveSupport::Cache::FileStore::FILEPATH_MAX_SIZE = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/cache/file_store.rb#21 ActiveSupport::Cache::FileStore::GITKEEP_FILES = T.let(T.unsafe(nil), Array) +# A cache store implementation which stores everything into memory in the +# same process. If you're running multiple Ruby on Rails server processes +# (which is the case if you're using Phusion Passenger or puma clustered mode), +# then this means that Rails server process instances won't be able +# to share cache data with each other and this may not be the most +# appropriate cache in that scenario. +# +# This cache has a bounded size specified by the :size options to the +# initializer (default is 32Mb). When the cache exceeds the allotted size, +# a cleanup will occur which tries to prune the cache down to three quarters +# of the maximum size by removing the least recently used entries. +# +# Unlike other Cache store implementations, MemoryStore does not compress +# values by default. MemoryStore does not benefit from compression as much +# as other Store implementations, as it does not send data over a network. +# However, when compression is enabled, it still pays the full cost of +# compression in terms of cpu use. +# +# MemoryStore is thread-safe. +# +# source://activesupport//lib/active_support/cache/memory_store.rb#26 class ActiveSupport::Cache::MemoryStore < ::ActiveSupport::Cache::Store + # @return [MemoryStore] a new instance of MemoryStore + # + # source://activesupport//lib/active_support/cache/memory_store.rb#44 def initialize(options = T.unsafe(nil)); end + # Preemptively iterates through all stored keys and removes the ones which have expired. + # + # source://activesupport//lib/active_support/cache/memory_store.rb#71 def cleanup(options = T.unsafe(nil)); end + + # Delete all data stored in a given cache store. + # + # source://activesupport//lib/active_support/cache/memory_store.rb#63 def clear(options = T.unsafe(nil)); end + + # Decrement an integer value in the cache. + # + # source://activesupport//lib/active_support/cache/memory_store.rb#113 def decrement(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end + + # Deletes cache entries if the cache key matches a given pattern. + # + # source://activesupport//lib/active_support/cache/memory_store.rb#118 def delete_matched(matcher, options = T.unsafe(nil)); end + + # Increment an integer value in the cache. + # + # source://activesupport//lib/active_support/cache/memory_store.rb#108 def increment(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/cache/memory_store.rb#129 def inspect; end + + # To ensure entries fit within the specified memory prune the cache by removing the least + # recently accessed entries. + # + # source://activesupport//lib/active_support/cache/memory_store.rb#84 def prune(target_size, max_time = T.unsafe(nil)); end + + # Returns true if the cache is currently being pruned. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache/memory_store.rb#103 def pruning?; end + + # Synchronize calls to the cache. This should be called wherever the underlying cache implementation + # is not thread safe. + # + # source://activesupport//lib/active_support/cache/memory_store.rb#135 def synchronize(&block); end private + # source://activesupport//lib/active_support/cache/memory_store.rb#142 def cached_size(key, payload); end + + # source://activesupport//lib/active_support/cache/memory_store.rb#175 def delete_entry(key, **options); end + + # source://activesupport//lib/active_support/cache/memory_store.rb#183 def modify_value(name, amount, options); end + + # source://activesupport//lib/active_support/cache/memory_store.rb#146 def read_entry(key, **options); end + + # source://activesupport//lib/active_support/cache/memory_store.rb#158 def write_entry(key, entry, **options); end class << self + # Advertise cache versioning support. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache/memory_store.rb#58 def supports_cache_versioning?; end end end +# source://activesupport//lib/active_support/cache/memory_store.rb#42 ActiveSupport::Cache::MemoryStore::DEFAULT_CODER = ActiveSupport::Cache::MemoryStore::DupCoder +# source://activesupport//lib/active_support/cache/memory_store.rb#27 module ActiveSupport::Cache::MemoryStore::DupCoder class << self + # source://activesupport//lib/active_support/cache/memory_store.rb#35 def dump(entry); end + + # source://activesupport//lib/active_support/cache/memory_store.rb#29 def load(entry); end end end +# source://activesupport//lib/active_support/cache/memory_store.rb#140 ActiveSupport::Cache::MemoryStore::PER_ENTRY_OVERHEAD = T.let(T.unsafe(nil), Integer) +# source://activesupport//lib/active_support/cache.rb#760 module ActiveSupport::Cache::NullCoder class << self + # source://activesupport//lib/active_support/cache.rb#766 def dump(entry); end + + # source://activesupport//lib/active_support/cache.rb#762 def load(payload); end end end +# A cache store implementation which doesn't actually store anything. Useful in +# development and test environments where you don't want caching turned on but +# need to go through the caching interface. +# +# This cache does implement the local cache strategy, so values will actually +# be cached inside blocks that utilize this strategy. See +# ActiveSupport::Cache::Strategy::LocalCache for more details. +# +# source://activesupport//lib/active_support/cache/null_store.rb#12 class ActiveSupport::Cache::NullStore < ::ActiveSupport::Cache::Store include ::ActiveSupport::Cache::Strategy::LocalCache + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#104 + def cleanup(**options); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#98 + def clear(**options); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#123 + def decrement(name, amount = T.unsafe(nil), **options); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#110 + def delete_matched(matcher, options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#116 + def increment(name, amount = T.unsafe(nil), **options); end + + private + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#168 + def delete_entry(key, **options); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#131 + def read_entry(key, **options); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#158 + def write_entry(key, entry, **options); end + class << self + # Advertise cache versioning support. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache/null_store.rb#16 def supports_cache_versioning?; end end end +# An abstract cache store class. There are multiple cache store +# implementations, each having its own additional features. See the classes +# under the ActiveSupport::Cache module, e.g. +# ActiveSupport::Cache::MemCacheStore. MemCacheStore is currently the most +# popular cache store for large production websites. +# +# Some implementations may not support all methods beyond the basic cache +# methods of +fetch+, +write+, +read+, +exist?+, and +delete+. +# +# ActiveSupport::Cache::Store can store any serializable Ruby object. +# +# cache = ActiveSupport::Cache::MemoryStore.new +# +# cache.read('city') # => nil +# cache.write('city', "Duckburgh") +# cache.read('city') # => "Duckburgh" +# +# Keys are always translated into Strings and are case sensitive. When an +# object is specified as a key and has a +cache_key+ method defined, this +# method will be called to define the key. Otherwise, the +to_param+ +# method will be called. Hashes and Arrays can also be used as keys. The +# elements will be delimited by slashes, and the elements within a Hash +# will be sorted by key so they are consistent. +# +# cache.read('city') == cache.read(:city) # => true +# +# Nil values can be cached. +# +# If your cache is on a shared infrastructure, you can define a namespace +# for your cache entries. If a namespace is defined, it will be prefixed on +# to every key. The namespace can be either a static value or a Proc. If it +# is a Proc, it will be invoked when each key is evaluated so that you can +# use application logic to invalidate keys. +# +# cache.namespace = -> { @last_mod_time } # Set the namespace to a variable +# @last_mod_time = Time.now # Invalidate the entire cache by changing namespace +# +# Cached data larger than 1kB are compressed by default. To turn off +# compression, pass compress: false to the initializer or to +# individual +fetch+ or +write+ method calls. The 1kB compression +# threshold is configurable with the :compress_threshold option, +# specified in bytes. +# +# source://activesupport//lib/active_support/cache.rb#166 class ActiveSupport::Cache::Store + # Creates a new cache. The options will be passed to any write method calls + # except for :namespace which can be used to set the global + # namespace for the cache. + # + # @return [Store] a new instance of Store + # + # source://activesupport//lib/active_support/cache.rb#194 def initialize(options = T.unsafe(nil)); end + # Cleanups the cache by removing expired entries. + # + # Options are passed to the underlying cache implementation. + # + # Some implementations may not support this method. + # + # @raise [NotImplementedError] + # + # source://activesupport//lib/active_support/cache.rb#547 def cleanup(options = T.unsafe(nil)); end + + # Clears the entire cache. Be careful with this method since it could + # affect other processes if shared cache is being used. + # + # The options hash is passed to the underlying cache implementation. + # + # Some implementations may not support this method. + # + # @raise [NotImplementedError] + # + # source://activesupport//lib/active_support/cache.rb#557 def clear(options = T.unsafe(nil)); end + + # Decrements an integer value in the cache. + # + # Options are passed to the underlying cache implementation. + # + # Some implementations may not support this method. + # + # @raise [NotImplementedError] + # + # source://activesupport//lib/active_support/cache.rb#538 def decrement(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end + + # Deletes an entry in the cache. Returns +true+ if an entry is deleted. + # + # Options are passed to the underlying cache implementation. + # + # source://activesupport//lib/active_support/cache.rb#483 def delete(name, options = T.unsafe(nil)); end + + # Deletes all entries with keys matching the pattern. + # + # Options are passed to the underlying cache implementation. + # + # Some implementations may not support this method. + # + # @raise [NotImplementedError] + # + # source://activesupport//lib/active_support/cache.rb#520 def delete_matched(matcher, options = T.unsafe(nil)); end + + # Deletes multiple entries in the cache. + # + # Options are passed to the underlying cache implementation. + # + # source://activesupport//lib/active_support/cache.rb#494 def delete_multi(names, options = T.unsafe(nil)); end + + # Returns +true+ if the cache contains an entry for the given key. + # + # Options are passed to the underlying cache implementation. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache.rb#506 def exist?(name, options = T.unsafe(nil)); end + + # Fetches data from the cache, using the given key. If there is data in + # the cache with the given key, then that data is returned. + # + # If there is no such data in the cache (a cache miss), then +nil+ will be + # returned. However, if a block has been passed, that block will be passed + # the key and executed in the event of a cache miss. The return value of the + # block will be written to the cache under the given cache key, and that + # return value will be returned. + # + # cache.write('today', 'Monday') + # cache.fetch('today') # => "Monday" + # + # cache.fetch('city') # => nil + # cache.fetch('city') do + # 'Duckburgh' + # end + # cache.fetch('city') # => "Duckburgh" + # + # You may also specify additional options via the +options+ argument. + # Setting force: true forces a cache "miss," meaning we treat + # the cache value as missing even if it's present. Passing a block is + # required when +force+ is true so this always results in a cache write. + # + # cache.write('today', 'Monday') + # cache.fetch('today', force: true) { 'Tuesday' } # => 'Tuesday' + # cache.fetch('today', force: true) # => ArgumentError + # + # The +:force+ option is useful when you're calling some other method to + # ask whether you should force a cache write. Otherwise, it's clearer to + # just call Cache#write. + # + # Setting skip_nil: true will not cache nil result: + # + # cache.fetch('foo') { nil } + # cache.fetch('bar', skip_nil: true) { nil } + # cache.exist?('foo') # => true + # cache.exist?('bar') # => false + # + # + # Setting compress: false disables compression of the cache entry. + # + # Setting :expires_in will set an expiration time on the cache. + # All caches support auto-expiring content after a specified number of + # seconds. This value can be specified as an option to the constructor + # (in which case all entries will be affected), or it can be supplied to + # the +fetch+ or +write+ method to effect just one entry. + # + # cache = ActiveSupport::Cache::MemoryStore.new(expires_in: 5.minutes) + # cache.write(key, value, expires_in: 1.minute) # Set a lower value for one entry + # + # Setting :version verifies the cache stored under name + # is of the same version. nil is returned on mismatches despite contents. + # This feature is used to support recyclable cache keys. + # + # Setting :race_condition_ttl is very useful in situations where + # a cache entry is used very frequently and is under heavy load. If a + # cache expires and due to heavy load several different processes will try + # to read data natively and then they all will try to write to cache. To + # avoid that case the first process to find an expired cache entry will + # bump the cache expiration time by the value set in :race_condition_ttl. + # Yes, this process is extending the time for a stale value by another few + # seconds. Because of extended life of the previous cache, other processes + # will continue to use slightly stale data for a just a bit longer. In the + # meantime that first process will go ahead and will write into cache the + # new value. After that all the processes will start getting the new value. + # The key is to keep :race_condition_ttl small. + # + # If the process regenerating the entry errors out, the entry will be + # regenerated after the specified number of seconds. Also note that the + # life of stale cache is extended only if it expired recently. Otherwise + # a new value is generated and :race_condition_ttl does not play + # any role. + # + # # Set all values to expire after one minute. + # cache = ActiveSupport::Cache::MemoryStore.new(expires_in: 1.minute) + # + # cache.write('foo', 'original value') + # val_1 = nil + # val_2 = nil + # sleep 60 + # + # Thread.new do + # val_1 = cache.fetch('foo', race_condition_ttl: 10.seconds) do + # sleep 1 + # 'new value 1' + # end + # end + # + # Thread.new do + # val_2 = cache.fetch('foo', race_condition_ttl: 10.seconds) do + # 'new value 2' + # end + # end + # + # cache.fetch('foo') # => "original value" + # sleep 10 # First thread extended the life of cache by another 10 seconds + # cache.fetch('foo') # => "new value 1" + # val_1 # => "new value 1" + # val_2 # => "original value" + # + # Other options will be handled by the specific cache store implementation. + # Internally, #fetch calls #read_entry, and calls #write_entry on a cache + # miss. +options+ will be passed to the #read and #write calls. + # + # For example, MemCacheStore's #write method supports the +:raw+ + # option, which tells the memcached server to store all values as strings. + # We can use this option with #fetch too: + # + # cache = ActiveSupport::Cache::MemCacheStore.new + # cache.fetch("foo", force: true, raw: true) do + # :bar + # end + # cache.fetch('foo') # => "bar" + # + # source://activesupport//lib/active_support/cache.rb#326 def fetch(name, options = T.unsafe(nil), &block); end + + # Fetches data from the cache, using the given keys. If there is data in + # the cache with the given keys, then that data is returned. Otherwise, + # the supplied block is called for each key for which there was no data, + # and the result will be written to the cache and returned. + # Therefore, you need to pass a block that returns the data to be written + # to the cache. If you do not want to write the cache when the cache is + # not found, use #read_multi. + # + # Returns a hash with the data for each of the names. For example: + # + # cache.write("bim", "bam") + # cache.fetch_multi("bim", "unknown_key") do |key| + # "Fallback value for key: #{key}" + # end + # # => { "bim" => "bam", + # # "unknown_key" => "Fallback value for key: unknown_key" } + # + # Options are passed to the underlying cache implementation. For example: + # + # cache.fetch_multi("fizz", expires_in: 5.seconds) do |key| + # "buzz" + # end + # # => {"fizz"=>"buzz"} + # cache.read("fizz") + # # => "buzz" + # sleep(6) + # cache.read("fizz") + # # => nil + # + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/cache.rb#446 def fetch_multi(*names); end + + # Increments an integer value in the cache. + # + # Options are passed to the underlying cache implementation. + # + # Some implementations may not support this method. + # + # @raise [NotImplementedError] + # + # source://activesupport//lib/active_support/cache.rb#529 def increment(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/cache.rb#169 def logger; end + + # source://activesupport//lib/active_support/cache.rb#169 def logger=(val); end + + # Silences the logger within a block. + # + # source://activesupport//lib/active_support/cache.rb#206 def mute; end + + # Returns the value of attribute options. + # + # source://activesupport//lib/active_support/cache.rb#171 def options; end + + # Reads data from the cache, using the given key. If there is data in + # the cache with the given key, then that data is returned. Otherwise, + # +nil+ is returned. + # + # Note, if data was written with the :expires_in or + # :version options, both of these conditions are applied before + # the data is returned. + # + # Options are passed to the underlying cache implementation. + # + # source://activesupport//lib/active_support/cache.rb#361 def read(name, options = T.unsafe(nil)); end + + # Reads multiple values at once from the cache. Options can be passed + # in the last argument. + # + # Some cache implementation may optimize this method. + # + # Returns a hash mapping the names provided to the values found. + # + # source://activesupport//lib/active_support/cache.rb#394 def read_multi(*names); end + + # Returns the value of attribute silence. + # + # source://activesupport//lib/active_support/cache.rb#171 def silence; end + + # Silences the logger. + # + # source://activesupport//lib/active_support/cache.rb#200 def silence!; end + + # Returns the value of attribute silence. + # + # source://activesupport//lib/active_support/cache.rb#171 def silence?; end + + # Writes the value to the cache, with the key. + # + # Options are passed to the underlying cache implementation. + # + # source://activesupport//lib/active_support/cache.rb#471 def write(name, value, options = T.unsafe(nil)); end + + # Cache Storage API to write multiple values at once. + # + # source://activesupport//lib/active_support/cache.rb#406 def write_multi(hash, options = T.unsafe(nil)); end private + # Deletes an entry from the cache implementation. Subclasses must + # implement this method. + # + # @raise [NotImplementedError] + # + # source://activesupport//lib/active_support/cache.rb#630 def delete_entry(key, **options); end + + # Deletes multiples entries in the cache implementation. Subclasses MAY + # implement this method. + # + # source://activesupport//lib/active_support/cache.rb#636 def delete_multi_entries(entries, **options); end + + # source://activesupport//lib/active_support/cache.rb#597 def deserialize_entry(payload); end + + # Expands key to be a consistent string value. Invokes +cache_key+ if + # object responds to +cache_key+. Otherwise, +to_param+ method will be + # called. If the key is a Hash, then keys will be sorted alphabetically. + # + # source://activesupport//lib/active_support/cache.rb#690 def expanded_key(key); end + + # source://activesupport//lib/active_support/cache.rb#711 def expanded_version(key); end + + # source://activesupport//lib/active_support/cache.rb#745 def get_entry_value(entry, name, options); end + + # source://activesupport//lib/active_support/cache.rb#729 def handle_expired_entry(entry, key, options); end + + # source://activesupport//lib/active_support/cache.rb#719 def instrument(operation, key, options = T.unsafe(nil)); end + + # Adds the namespace defined in the options to a pattern designed to + # match keys. Implementations that support delete_matched should call + # this method to translate a pattern that matches names into one that + # matches namespaced keys. + # + # source://activesupport//lib/active_support/cache.rb#566 def key_matcher(pattern, options); end + + # Merges the default options with ones specific to a method call. + # + # source://activesupport//lib/active_support/cache.rb#641 def merged_options(call_options); end + + # Prefix the key with a namespace string: + # + # namespace_key 'foo', namespace: 'cache' + # # => 'cache:foo' + # + # With a namespace block: + # + # namespace_key 'foo', namespace: -> { 'cache' } + # # => 'cache:foo' + # + # source://activesupport//lib/active_support/cache.rb#668 def namespace_key(key, options = T.unsafe(nil)); end + + # Expands and namespaces the cache key. May be overridden by + # cache stores to do additional normalization. + # + # source://activesupport//lib/active_support/cache.rb#655 def normalize_key(key, options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/cache.rb#707 def normalize_version(key, options = T.unsafe(nil)); end + + # Reads an entry from the cache implementation. Subclasses must implement + # this method. + # + # @raise [NotImplementedError] + # + # source://activesupport//lib/active_support/cache.rb#583 def read_entry(key, **options); end + + # Reads multiple entries from the cache implementation. Subclasses MAY + # implement this method. + # + # source://activesupport//lib/active_support/cache.rb#603 def read_multi_entries(names, **options); end + + # source://activesupport//lib/active_support/cache.rb#750 def save_block_result_to_cache(name, options); end + + # source://activesupport//lib/active_support/cache.rb#593 def serialize_entry(entry); end + + # Writes an entry to the cache implementation. Subclasses must implement + # this method. + # + # @raise [NotImplementedError] + # + # source://activesupport//lib/active_support/cache.rb#589 def write_entry(key, entry, **options); end + + # Writes multiple entries to the cache implementation. Subclasses MAY + # implement this method. + # + # source://activesupport//lib/active_support/cache.rb#622 def write_multi_entries(hash, **options); end class << self + # source://activesupport//lib/active_support/cache.rb#169 def logger; end + + # source://activesupport//lib/active_support/cache.rb#169 def logger=(val); end private + # source://activesupport//lib/active_support/cache.rb#183 def ensure_connection_pool_added!; end + + # source://activesupport//lib/active_support/cache.rb#176 def retrieve_pool_options(options); end end end +# source://activesupport//lib/active_support/cache.rb#167 ActiveSupport::Cache::Store::DEFAULT_CODER = Marshal + +# source://activesupport//lib/active_support/cache.rb#27 module ActiveSupport::Cache::Strategy; end +# Caches that implement LocalCache will be backed by an in-memory cache for the +# duration of a block. Repeated calls to the cache for the same key will hit the +# in-memory cache for faster access. +# +# source://activesupport//lib/active_support/cache/strategy/local_cache.rb#12 module ActiveSupport::Cache::Strategy::LocalCache + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#104 def cleanup(**options); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#98 def clear(**options); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#123 def decrement(name, amount = T.unsafe(nil), **options); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#110 def delete_matched(matcher, options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#116 def increment(name, amount = T.unsafe(nil), **options); end + + # Middleware class can be inserted as a Rack handler to be local cache for the + # duration of request. + # + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#92 def middleware; end + + # Use a local cache for the duration of block. + # + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#86 def with_local_cache; end private + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#193 def bypass_local_cache; end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#168 def delete_entry(key, **options); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#189 def local_cache; end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#185 def local_cache_key; end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#131 def read_entry(key, **options); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#145 def read_multi_entries(keys, **options); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#197 def use_temporary_local_cache(temporary_cache); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#173 def write_cache_value(name, value, **options); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#158 def write_entry(key, entry, **options); end end +# Class for storing and registering the local caches. +# +# source://activesupport//lib/active_support/cache/strategy/local_cache.rb#16 class ActiveSupport::Cache::Strategy::LocalCache::LocalCacheRegistry extend ::ActiveSupport::PerThreadRegistry + # @return [LocalCacheRegistry] a new instance of LocalCacheRegistry + # + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#19 def initialize; end + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#23 def cache_for(local_cache_key); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#27 def set_cache_for(local_cache_key, value); end class << self + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#32 def cache_for(l); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#31 def set_cache_for(l, v); end end end +# Simple memory backed cache. This cache is not thread safe and is intended only +# for serving as a temporary memory cache for a single thread. +# +# source://activesupport//lib/active_support/cache/strategy/local_cache.rb#37 class ActiveSupport::Cache::Strategy::LocalCache::LocalStore < ::ActiveSupport::Cache::Store + # @return [LocalStore] a new instance of LocalStore + # + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#38 def initialize; end + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#48 def clear(options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#73 def delete_entry(key, **options); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#77 def fetch_entry(key, options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#52 def read_entry(key, **options); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#56 def read_multi_entries(keys, **options); end + + # Don't allow synchronizing since it isn't thread safe. + # + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#44 def synchronize; end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#67 def write_entry(key, entry, **options); end end +# -- +# This class wraps up local storage for middlewares. Only the middleware method should +# construct them. +# +# source://activesupport//lib/active_support/cache/strategy/local_cache_middleware.rb#13 class ActiveSupport::Cache::Strategy::LocalCache::Middleware + # @return [Middleware] a new instance of Middleware + # + # source://activesupport//lib/active_support/cache/strategy/local_cache_middleware.rb#16 def initialize(name, local_cache_key); end + # source://activesupport//lib/active_support/cache/strategy/local_cache_middleware.rb#27 def call(env); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache_middleware.rb#14 def local_cache_key; end + + # source://activesupport//lib/active_support/cache/strategy/local_cache_middleware.rb#14 def name; end + + # source://activesupport//lib/active_support/cache/strategy/local_cache_middleware.rb#22 def new(app); end end +# These options mean something to all cache implementations. Individual cache +# implementations may support additional options. +# +# source://activesupport//lib/active_support/cache.rb#25 ActiveSupport::Cache::UNIVERSAL_OPTIONS = T.let(T.unsafe(nil), Array) +# CachingKeyGenerator is a wrapper around KeyGenerator which allows users to avoid +# re-executing the key generation process when it's called using the same salt and +# key_size. +# +# source://activesupport//lib/active_support/key_generator.rb#30 class ActiveSupport::CachingKeyGenerator + # @return [CachingKeyGenerator] a new instance of CachingKeyGenerator + # + # source://activesupport//lib/active_support/key_generator.rb#31 def initialize(key_generator); end + # Returns a derived key suitable for use. + # + # source://activesupport//lib/active_support/key_generator.rb#37 def generate_key(*args); end end +# Callbacks are code hooks that are run at key points in an object's life cycle. +# The typical use case is to have a base class define a set of callbacks +# relevant to the other functionality it supplies, so that subclasses can +# install callbacks that enhance or modify the base functionality without +# needing to override or redefine methods of the base class. +# +# Mixing in this module allows you to define the events in the object's +# life cycle that will support callbacks (via +ClassMethods.define_callbacks+), +# set the instance methods, procs, or callback objects to be called (via +# +ClassMethods.set_callback+), and run the installed callbacks at the +# appropriate times (via +run_callbacks+). +# +# By default callbacks are halted by throwing +:abort+. +# See +ClassMethods.define_callbacks+ for details. +# +# Three kinds of callbacks are supported: before callbacks, run before a +# certain event; after callbacks, run after the event; and around callbacks, +# blocks that surround the event, triggering it when they yield. Callback code +# can be contained in instance methods, procs or lambdas, or callback objects +# that respond to certain predetermined methods. See +ClassMethods.set_callback+ +# for details. +# +# class Record +# include ActiveSupport::Callbacks +# define_callbacks :save +# +# def save +# run_callbacks :save do +# puts "- save" +# end +# end +# end +# +# class PersonRecord < Record +# set_callback :save, :before, :saving_message +# def saving_message +# puts "saving..." +# end +# +# set_callback :save, :after do |object| +# puts "saved" +# end +# end +# +# person = PersonRecord.new +# person.save +# +# Output: +# saving... +# - save +# saved +# +# source://activesupport//lib/active_support/callbacks.rb#62 module ActiveSupport::Callbacks extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -370,10 +1511,39 @@ module ActiveSupport::Callbacks mixes_in_class_methods ::ActiveSupport::Callbacks::ClassMethods mixes_in_class_methods ::ActiveSupport::DescendantsTracker + # Runs the callbacks for the given event. + # + # Calls the before and around callbacks in the order they were set, yields + # the block (if given one), and then runs the after callbacks in reverse + # order. + # + # If the callback chain was halted, returns +false+. Otherwise returns the + # result of the block, +nil+ if no callbacks have been set, or +true+ + # if callbacks have been set but no block is given. + # + # run_callbacks :save do + # save + # end + # + # -- + # + # As this method is used in many places, and often wraps large portions of + # user code, it has an additional design goal of minimizing its impact on + # the visible call stack. An exception from inside a :before or :after + # callback can be as noisy as it likes -- but when control has passed + # smoothly through and into the supplied block, we want as little evidence + # as possible that we were here. + # + # source://activesupport//lib/active_support/callbacks.rb#94 def run_callbacks(kind); end private + # A hook invoked every time a before callback is halted. + # This can be overridden in ActiveSupport::Callbacks implementors in order + # to provide better debugging/logging. + # + # source://activesupport//lib/active_support/callbacks.rb#146 def halted_callback_hook(filter, name); end module GeneratedClassMethods @@ -388,474 +1558,1841 @@ module ActiveSupport::Callbacks end end +# source://activesupport//lib/active_support/callbacks.rb#70 ActiveSupport::Callbacks::CALLBACK_FILTER_TYPES = T.let(T.unsafe(nil), Array) +# A future invocation of user-supplied code (either as a callback, +# or a condition filter). +# +# source://activesupport//lib/active_support/callbacks.rb#387 class ActiveSupport::Callbacks::CallTemplate + # @return [CallTemplate] a new instance of CallTemplate + # + # source://activesupport//lib/active_support/callbacks.rb#388 def initialize(target, method, arguments, block); end + # Return the parts needed to make this call, with the given + # input values. + # + # Returns an array of the form: + # + # [target, block, method, *arguments] + # + # This array can be used as such: + # + # target.send(method, *arguments, &block) + # + # The actual invocation is left up to the caller to minimize + # call stack pollution. + # + # source://activesupport//lib/active_support/callbacks.rb#408 def expand(target, value, block); end + + # Return a lambda that will make this call when given the input + # values, but then return the boolean inverse of that result. + # + # source://activesupport//lib/active_support/callbacks.rb#433 def inverted_lambda; end + + # Return a lambda that will make this call when given the input + # values. + # + # source://activesupport//lib/active_support/callbacks.rb#424 def make_lambda; end class << self + # Filters support: + # + # Symbols:: A method to call. + # Procs:: A proc to call with the object. + # Objects:: An object with a before_foo method on it to call. + # + # All of these objects are converted into a CallTemplate and handled + # the same after this point. + # + # source://activesupport//lib/active_support/callbacks.rb#448 def build(filter, callback); end end end +# source://activesupport//lib/active_support/callbacks.rb#279 class ActiveSupport::Callbacks::Callback + # @return [Callback] a new instance of Callback + # + # source://activesupport//lib/active_support/callbacks.rb#294 def initialize(name, filter, kind, options, chain_config); end + # Wraps code with filter + # + # source://activesupport//lib/active_support/callbacks.rb#333 def apply(callback_sequence); end + + # Returns the value of attribute chain_config. + # + # source://activesupport//lib/active_support/callbacks.rb#292 def chain_config; end + + # source://activesupport//lib/active_support/callbacks.rb#347 def current_scopes; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/callbacks.rb#323 def duplicates?(other); end + + # source://activesupport//lib/active_support/callbacks.rb#304 def filter; end + + # Returns the value of attribute kind. + # + # source://activesupport//lib/active_support/callbacks.rb#291 def kind; end + + # Sets the attribute kind + # + # @param value the value to set the attribute kind to. + # + # source://activesupport//lib/active_support/callbacks.rb#291 def kind=(_arg0); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/callbacks.rb#319 def matches?(_kind, _filter); end + + # source://activesupport//lib/active_support/callbacks.rb#307 def merge_conditional_options(chain, if_option:, unless_option:); end + + # Returns the value of attribute name. + # + # source://activesupport//lib/active_support/callbacks.rb#291 def name; end + + # Sets the attribute name + # + # @param value the value to set the attribute name to. + # + # source://activesupport//lib/active_support/callbacks.rb#291 def name=(_arg0); end + + # source://activesupport//lib/active_support/callbacks.rb#305 def raw_filter; end private + # source://activesupport//lib/active_support/callbacks.rb#355 def check_conditionals(conditionals); end + + # source://activesupport//lib/active_support/callbacks.rb#370 def compute_identifier(filter); end + + # source://activesupport//lib/active_support/callbacks.rb#379 def conditions_lambdas; end class << self + # source://activesupport//lib/active_support/callbacks.rb#280 def build(chain, filter, kind, options); end end end +# source://activesupport//lib/active_support/callbacks.rb#352 ActiveSupport::Callbacks::Callback::EMPTY_ARRAY = T.let(T.unsafe(nil), Array) +# source://activesupport//lib/active_support/callbacks.rb#520 class ActiveSupport::Callbacks::CallbackChain include ::Enumerable + # @return [CallbackChain] a new instance of CallbackChain + # + # source://activesupport//lib/active_support/callbacks.rb#525 def initialize(name, config); end + # source://activesupport//lib/active_support/callbacks.rb#571 def append(*callbacks); end + + # source://activesupport//lib/active_support/callbacks.rb#550 def clear; end + + # source://activesupport//lib/active_support/callbacks.rb#562 def compile; end + + # Returns the value of attribute config. + # + # source://activesupport//lib/active_support/callbacks.rb#523 def config; end + + # source://activesupport//lib/active_support/callbacks.rb#545 def delete(o); end + + # source://activesupport//lib/active_support/callbacks.rb#536 def each(&block); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/callbacks.rb#538 def empty?; end + + # source://activesupport//lib/active_support/callbacks.rb#537 def index(o); end + + # source://activesupport//lib/active_support/callbacks.rb#540 def insert(index, o); end + + # Returns the value of attribute name. + # + # source://activesupport//lib/active_support/callbacks.rb#523 def name; end + + # source://activesupport//lib/active_support/callbacks.rb#575 def prepend(*callbacks); end protected + # Returns the value of attribute chain. + # + # source://activesupport//lib/active_support/callbacks.rb#580 def chain; end private + # source://activesupport//lib/active_support/callbacks.rb#583 def append_one(callback); end + + # source://activesupport//lib/active_support/callbacks.rb#600 def default_terminator; end + + # source://activesupport//lib/active_support/callbacks.rb#556 def initialize_copy(other); end + + # source://activesupport//lib/active_support/callbacks.rb#589 def prepend_one(callback); end + + # source://activesupport//lib/active_support/callbacks.rb#595 def remove_duplicates(callback); end end +# Execute before and after filters in a sequence instead of +# chaining them with nested lambda calls, see: +# https://github.com/rails/rails/issues/18011 +# +# source://activesupport//lib/active_support/callbacks.rb#473 class ActiveSupport::Callbacks::CallbackSequence + # @return [CallbackSequence] a new instance of CallbackSequence + # + # source://activesupport//lib/active_support/callbacks.rb#474 def initialize(nested = T.unsafe(nil), call_template = T.unsafe(nil), user_conditions = T.unsafe(nil)); end + # source://activesupport//lib/active_support/callbacks.rb#488 def after(&after); end + + # source://activesupport//lib/active_support/callbacks.rb#493 def around(call_template, user_conditions); end + + # source://activesupport//lib/active_support/callbacks.rb#483 def before(&before); end + + # source://activesupport//lib/active_support/callbacks.rb#507 def expand_call_template(arg, block); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/callbacks.rb#503 def final?; end + + # source://activesupport//lib/active_support/callbacks.rb#515 def invoke_after(arg); end + + # source://activesupport//lib/active_support/callbacks.rb#511 def invoke_before(arg); end + + # Returns the value of attribute nested. + # + # source://activesupport//lib/active_support/callbacks.rb#501 def nested; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/callbacks.rb#497 def skip?(arg); end end +# source://activesupport//lib/active_support/callbacks.rb#612 module ActiveSupport::Callbacks::ClassMethods + # This is used internally to append, prepend and skip callbacks to the + # CallbackChain. + # + # source://activesupport//lib/active_support/callbacks.rb#622 def __update_callbacks(name); end + + # Define sets of events in the object life cycle that support callbacks. + # + # define_callbacks :validate + # define_callbacks :initialize, :save, :destroy + # + # ===== Options + # + # * :terminator - Determines when a before filter will halt the + # callback chain, preventing following before and around callbacks from + # being called and the event from being triggered. + # This should be a lambda to be executed. + # The current object and the result lambda of the callback will be provided + # to the terminator lambda. + # + # define_callbacks :validate, terminator: ->(target, result_lambda) { result_lambda.call == false } + # + # In this example, if any before validate callbacks returns +false+, + # any successive before and around callback is not executed. + # + # The default terminator halts the chain when a callback throws +:abort+. + # + # * :skip_after_callbacks_if_terminated - Determines if after + # callbacks should be terminated by the :terminator option. By + # default after callbacks are executed no matter if callback chain was + # terminated or not. This option has no effect if :terminator + # option is set to +nil+. + # + # * :scope - Indicates which methods should be executed when an + # object is used as a callback. + # + # class Audit + # def before(caller) + # puts 'Audit: before is called' + # end + # + # def before_save(caller) + # puts 'Audit: before_save is called' + # end + # end + # + # class Account + # include ActiveSupport::Callbacks + # + # define_callbacks :save + # set_callback :save, :before, Audit.new + # + # def save + # run_callbacks :save do + # puts 'save in main' + # end + # end + # end + # + # In the above case whenever you save an account the method + # Audit#before will be called. On the other hand + # + # define_callbacks :save, scope: [:kind, :name] + # + # would trigger Audit#before_save instead. That's constructed + # by calling #{kind}_#{name} on the given instance. In this + # case "kind" is "before" and "name" is "save". In this context +:kind+ + # and +:name+ have special meanings: +:kind+ refers to the kind of + # callback (before/after/around) and +:name+ refers to the method on + # which callbacks are being defined. + # + # A declaration like + # + # define_callbacks :save, scope: [:name] + # + # would call Audit#save. + # + # ===== Notes + # + # +names+ passed to +define_callbacks+ must not end with + # !, ? or =. + # + # Calling +define_callbacks+ multiple times with the same +names+ will + # overwrite previous callbacks registered with +set_callback+. + # + # source://activesupport//lib/active_support/callbacks.rb#812 def define_callbacks(*names); end + + # source://activesupport//lib/active_support/callbacks.rb#613 def normalize_callback_params(filters, block); end + + # Remove all set callbacks for the given event. + # + # source://activesupport//lib/active_support/callbacks.rb#722 def reset_callbacks(name); end + + # Install a callback for the given event. + # + # set_callback :save, :before, :before_method + # set_callback :save, :after, :after_method, if: :condition + # set_callback :save, :around, ->(r, block) { stuff; result = block.call; stuff } + # + # The second argument indicates whether the callback is to be run +:before+, + # +:after+, or +:around+ the event. If omitted, +:before+ is assumed. This + # means the first example above can also be written as: + # + # set_callback :save, :before_method + # + # The callback can be specified as a symbol naming an instance method; as a + # proc, lambda, or block; or as an object that responds to a certain method + # determined by the :scope argument to +define_callbacks+. + # + # If a proc, lambda, or block is given, its body is evaluated in the context + # of the current object. It can also optionally accept the current object as + # an argument. + # + # Before and around callbacks are called in the order that they are set; + # after callbacks are called in the reverse order. + # + # Around callbacks can access the return value from the event, if it + # wasn't halted, from the +yield+ call. + # + # ===== Options + # + # * :if - A symbol or an array of symbols, each naming an instance + # method or a proc; the callback will be called only when they all return + # a true value. + # + # If a proc is given, its body is evaluated in the context of the + # current object. It can also optionally accept the current object as + # an argument. + # * :unless - A symbol or an array of symbols, each naming an + # instance method or a proc; the callback will be called only when they + # all return a false value. + # + # If a proc is given, its body is evaluated in the context of the + # current object. It can also optionally accept the current object as + # an argument. + # * :prepend - If +true+, the callback will be prepended to the + # existing chain rather than appended. + # + # source://activesupport//lib/active_support/callbacks.rb#673 def set_callback(name, *filter_list, &block); end + + # Skip a previously set callback. Like +set_callback+, :if or + # :unless options may be passed in order to control when the + # callback is skipped. + # + # class Writer < Person + # skip_callback :validate, :before, :check_membership, if: -> { age > 18 } + # end + # + # An ArgumentError will be raised if the callback has not + # already been set (unless the :raise option is set to false). + # + # source://activesupport//lib/active_support/callbacks.rb#697 def skip_callback(name, *filter_list, &block); end protected + # source://activesupport//lib/active_support/callbacks.rb#843 def get_callbacks(name); end + + # Ruby 2.6 and newer + # + # source://activesupport//lib/active_support/callbacks.rb#852 def set_callbacks(name, callbacks); end end +# source://activesupport//lib/active_support/callbacks.rb#149 module ActiveSupport::Callbacks::Conditionals; end +# source://activesupport//lib/active_support/callbacks.rb#150 class ActiveSupport::Callbacks::Conditionals::Value + # @return [Value] a new instance of Value + # + # source://activesupport//lib/active_support/callbacks.rb#151 def initialize(&block); end + # source://activesupport//lib/active_support/callbacks.rb#154 def call(target, value); end end +# source://activesupport//lib/active_support/callbacks.rb#158 module ActiveSupport::Callbacks::Filters; end +# source://activesupport//lib/active_support/callbacks.rb#211 class ActiveSupport::Callbacks::Filters::After class << self + # source://activesupport//lib/active_support/callbacks.rb#212 def build(callback_sequence, user_callback, user_conditions, chain_config); end private + # source://activesupport//lib/active_support/callbacks.rb#254 def conditional(callback_sequence, user_callback, user_conditions); end + + # source://activesupport//lib/active_support/callbacks.rb#243 def halting(callback_sequence, user_callback); end + + # source://activesupport//lib/active_support/callbacks.rb#228 def halting_and_conditional(callback_sequence, user_callback, user_conditions); end + + # source://activesupport//lib/active_support/callbacks.rb#268 def simple(callback_sequence, user_callback); end end end +# source://activesupport//lib/active_support/callbacks.rb#161 class ActiveSupport::Callbacks::Filters::Before class << self + # source://activesupport//lib/active_support/callbacks.rb#162 def build(callback_sequence, user_callback, user_conditions, chain_config, filter, name); end private + # source://activesupport//lib/active_support/callbacks.rb#191 def halting(callback_sequence, user_callback, halted_lambda, filter, name); end + + # source://activesupport//lib/active_support/callbacks.rb#172 def halting_and_conditional(callback_sequence, user_callback, user_conditions, halted_lambda, filter, name); end end end +# source://activesupport//lib/active_support/callbacks.rb#159 class ActiveSupport::Callbacks::Filters::Environment < ::Struct + # Returns the value of attribute halted + # + # @return [Object] the current value of halted def halted; end + + # Sets the attribute halted + # + # @param value [Object] the value to set the attribute halted to. + # @return [Object] the newly set value def halted=(_); end + + # Returns the value of attribute target + # + # @return [Object] the current value of target def target; end + + # Sets the attribute target + # + # @param value [Object] the value to set the attribute target to. + # @return [Object] the newly set value def target=(_); end + + # Returns the value of attribute value + # + # @return [Object] the current value of value def value; end + + # Sets the attribute value + # + # @param value [Object] the value to set the attribute value to. + # @return [Object] the newly set value def value=(_); end class << self def [](*_arg0); end def inspect; end + def keyword_init?; end def members; end def new(*_arg0); end end end +# source://activesupport//lib/active_support/core_ext/range/compare_range.rb#4 module ActiveSupport::CompareWithRange + # Extends the default Range#=== to support range comparisons. + # (1..5) === (1..5) # => true + # (1..5) === (2..3) # => true + # (1..5) === (1...6) # => true + # (1..5) === (2..6) # => false + # + # The native Range#=== behavior is untouched. + # ('a'..'f') === ('c') # => true + # (5..9) === (11) # => false + # + # The given range must be fully bounded, with both start and end. + # + # source://activesupport//lib/active_support/core_ext/range/compare_range.rb#16 def ===(value); end + + # Extends the default Range#cover? to support range comparisons. + # (1..5).cover?(1..5) # => true + # (1..5).cover?(2..3) # => true + # (1..5).cover?(1...6) # => true + # (1..5).cover?(2..6) # => false + # + # The native Range#cover? behavior is untouched. + # ('a'..'f').cover?('c') # => true + # (5..9).cover?(11) # => false + # + # The given range must be fully bounded, with both start and end. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/range/compare_range.rb#66 def cover?(value); end + + # Extends the default Range#include? to support range comparisons. + # (1..5).include?(1..5) # => true + # (1..5).include?(2..3) # => true + # (1..5).include?(1...6) # => true + # (1..5).include?(2..6) # => false + # + # The native Range#include? behavior is untouched. + # ('a'..'f').include?('c') # => true + # (5..9).include?(11) # => false + # + # The given range must be fully bounded, with both start and end. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/range/compare_range.rb#41 def include?(value); end end +# A typical module looks like this: +# +# module M +# def self.included(base) +# base.extend ClassMethods +# base.class_eval do +# scope :disabled, -> { where(disabled: true) } +# end +# end +# +# module ClassMethods +# ... +# end +# end +# +# By using ActiveSupport::Concern the above module could instead be +# written as: +# +# require "active_support/concern" +# +# module M +# extend ActiveSupport::Concern +# +# included do +# scope :disabled, -> { where(disabled: true) } +# end +# +# class_methods do +# ... +# end +# end +# +# Moreover, it gracefully handles module dependencies. Given a +Foo+ module +# and a +Bar+ module which depends on the former, we would typically write the +# following: +# +# module Foo +# def self.included(base) +# base.class_eval do +# def self.method_injected_by_foo +# ... +# end +# end +# end +# end +# +# module Bar +# def self.included(base) +# base.method_injected_by_foo +# end +# end +# +# class Host +# include Foo # We need to include this dependency for Bar +# include Bar # Bar is the module that Host really needs +# end +# +# But why should +Host+ care about +Bar+'s dependencies, namely +Foo+? We +# could try to hide these from +Host+ directly including +Foo+ in +Bar+: +# +# module Bar +# include Foo +# def self.included(base) +# base.method_injected_by_foo +# end +# end +# +# class Host +# include Bar +# end +# +# Unfortunately this won't work, since when +Foo+ is included, its base +# is the +Bar+ module, not the +Host+ class. With ActiveSupport::Concern, +# module dependencies are properly resolved: +# +# require "active_support/concern" +# +# module Foo +# extend ActiveSupport::Concern +# included do +# def self.method_injected_by_foo +# ... +# end +# end +# end +# +# module Bar +# extend ActiveSupport::Concern +# include Foo +# +# included do +# self.method_injected_by_foo +# end +# end +# +# class Host +# include Bar # It works, now Bar takes care of its dependencies +# end +# +# === Prepending concerns +# +# Just like include, concerns also support prepend with a corresponding +# prepended do callback. module ClassMethods or class_methods do are +# prepended as well. +# +# prepend is also used for any dependencies. +# +# source://activesupport//lib/active_support/concern.rb#110 module ActiveSupport::Concern + # source://activesupport//lib/active_support/concern.rb#127 def append_features(base); end + + # Define class methods from given block. + # You can define private class methods as well. + # + # module Example + # extend ActiveSupport::Concern + # + # class_methods do + # def foo; puts 'foo'; end + # + # private + # def bar; puts 'bar'; end + # end + # end + # + # class Buzz + # include Example + # end + # + # Buzz.foo # => "foo" + # Buzz.bar # => private method 'bar' called for Buzz:Class(NoMethodError) + # + # source://activesupport//lib/active_support/concern.rb#207 def class_methods(&class_methods_module_definition); end + + # Evaluate given block in context of base class, + # so that you can write class macros here. + # When you define more than one +included+ block, it raises an exception. + # + # source://activesupport//lib/active_support/concern.rb#156 def included(base = T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/concern.rb#140 def prepend_features(base); end + + # Evaluate given block in context of base class, + # so that you can write class macros here. + # When you define more than one +prepended+ block, it raises an exception. + # + # source://activesupport//lib/active_support/concern.rb#173 def prepended(base = T.unsafe(nil), &block); end class << self + # source://activesupport//lib/active_support/concern.rb#123 def extended(base); end end end +# source://activesupport//lib/active_support/concern.rb#111 class ActiveSupport::Concern::MultipleIncludedBlocks < ::StandardError + # @return [MultipleIncludedBlocks] a new instance of MultipleIncludedBlocks + # + # source://activesupport//lib/active_support/concern.rb#112 def initialize; end end +# source://activesupport//lib/active_support/concern.rb#117 class ActiveSupport::Concern::MultiplePrependBlocks < ::StandardError + # @return [MultiplePrependBlocks] a new instance of MultiplePrependBlocks + # + # source://activesupport//lib/active_support/concern.rb#118 def initialize; end end +# source://activesupport//lib/active_support/concurrency/share_lock.rb#7 module ActiveSupport::Concurrency; end +# A share/exclusive lock, otherwise known as a read/write lock. +# +# https://en.wikipedia.org/wiki/Readers%E2%80%93writer_lock +# +# source://activesupport//lib/active_support/concurrency/share_lock.rb#11 class ActiveSupport::Concurrency::ShareLock include ::MonitorMixin + # @return [ShareLock] a new instance of ShareLock + # + # source://activesupport//lib/active_support/concurrency/share_lock.rb#50 def initialize; end + # Execute the supplied block while holding the Exclusive lock. If + # +no_wait+ is set and the lock is not immediately available, + # returns +nil+ without yielding. Otherwise, returns the result of + # the block. + # + # See +start_exclusive+ for other options. + # + # source://activesupport//lib/active_support/concurrency/share_lock.rb#148 def exclusive(purpose: T.unsafe(nil), compatible: T.unsafe(nil), after_compatible: T.unsafe(nil), no_wait: T.unsafe(nil)); end + + # We track Thread objects, instead of just using counters, because + # we need exclusive locks to be reentrant, and we need to be able + # to upgrade share locks to exclusive. + # + # source://activesupport//lib/active_support/concurrency/share_lock.rb#18 def raw_state; end + + # Execute the supplied block while holding the Share lock. + # + # source://activesupport//lib/active_support/concurrency/share_lock.rb#159 def sharing; end + + # Returns false if +no_wait+ is set and the lock is not + # immediately available. Otherwise, returns true after the lock + # has been acquired. + # + # +purpose+ and +compatible+ work together; while this thread is + # waiting for the exclusive lock, it will yield its share (if any) + # to any other attempt whose +purpose+ appears in this attempt's + # +compatible+ list. This allows a "loose" upgrade, which, being + # less strict, prevents some classes of deadlocks. + # + # For many resources, loose upgrades are sufficient: if a thread + # is awaiting a lock, it is not running any other code. With + # +purpose+ matching, it is possible to yield only to other + # threads whose activity will not interfere. + # + # source://activesupport//lib/active_support/concurrency/share_lock.rb#76 def start_exclusive(purpose: T.unsafe(nil), compatible: T.unsafe(nil), no_wait: T.unsafe(nil)); end + + # source://activesupport//lib/active_support/concurrency/share_lock.rb#114 def start_sharing; end + + # Relinquish the exclusive lock. Must only be called by the thread + # that called start_exclusive (and currently holds the lock). + # + # source://activesupport//lib/active_support/concurrency/share_lock.rb#96 def stop_exclusive(compatible: T.unsafe(nil)); end + + # source://activesupport//lib/active_support/concurrency/share_lock.rb#131 def stop_sharing; end + + # Temporarily give up all held Share locks while executing the + # supplied block, allowing any +compatible+ exclusive lock request + # to proceed. + # + # source://activesupport//lib/active_support/concurrency/share_lock.rb#171 def yield_shares(purpose: T.unsafe(nil), compatible: T.unsafe(nil), block_share: T.unsafe(nil)); end private + # Must be called within synchronize + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/concurrency/share_lock.rb#204 def busy_for_exclusive?(purpose); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/concurrency/share_lock.rb#209 def busy_for_sharing?(purpose); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/concurrency/share_lock.rb#214 def eligible_waiters?(compatible); end + + # source://activesupport//lib/active_support/concurrency/share_lock.rb#218 def wait_for(method); end end +# Configurable provides a config method to store and retrieve +# configuration options as an OrderedOptions. +# +# source://activesupport//lib/active_support/configurable.rb#9 module ActiveSupport::Configurable extend ::ActiveSupport::Concern mixes_in_class_methods ::ActiveSupport::Configurable::ClassMethods + # Reads and writes attributes from a configuration OrderedOptions. + # + # require "active_support/configurable" + # + # class User + # include ActiveSupport::Configurable + # end + # + # user = User.new + # + # user.config.allowed_access = true + # user.config.level = 1 + # + # user.config.allowed_access # => true + # user.config.level # => 1 + # + # source://activesupport//lib/active_support/configurable.rb#142 def config; end end +# source://activesupport//lib/active_support/configurable.rb#27 module ActiveSupport::Configurable::ClassMethods + # source://activesupport//lib/active_support/configurable.rb#28 def config; end + + # @yield [config] + # + # source://activesupport//lib/active_support/configurable.rb#37 def configure; end private + # Allows you to add shortcut so that you don't have to refer to attribute + # through config. Also look at the example for config to contrast. + # + # Defines both class and instance config accessors. + # + # class User + # include ActiveSupport::Configurable + # config_accessor :allowed_access + # end + # + # User.allowed_access # => nil + # User.allowed_access = false + # User.allowed_access # => false + # + # user = User.new + # user.allowed_access # => false + # user.allowed_access = true + # user.allowed_access # => true + # + # User.allowed_access # => false + # + # The attribute name must be a valid method name in Ruby. + # + # class User + # include ActiveSupport::Configurable + # config_accessor :"1_Badname" + # end + # # => NameError: invalid config attribute name + # + # To omit the instance writer method, pass instance_writer: false. + # To omit the instance reader method, pass instance_reader: false. + # + # class User + # include ActiveSupport::Configurable + # config_accessor :allowed_access, instance_reader: false, instance_writer: false + # end + # + # User.allowed_access = false + # User.allowed_access # => false + # + # User.new.allowed_access = true # => NoMethodError + # User.new.allowed_access # => NoMethodError + # + # Or pass instance_accessor: false, to omit both instance methods. + # + # class User + # include ActiveSupport::Configurable + # config_accessor :allowed_access, instance_accessor: false + # end + # + # User.allowed_access = false + # User.allowed_access # => false + # + # User.new.allowed_access = true # => NoMethodError + # User.new.allowed_access # => NoMethodError + # + # Also you can pass a block to set up the attribute with a default value. + # + # class User + # include ActiveSupport::Configurable + # config_accessor :hair_colors do + # [:brown, :black, :blonde, :red] + # end + # end + # + # User.hair_colors # => [:brown, :black, :blonde, :red] + # + # source://activesupport//lib/active_support/configurable.rb#107 def config_accessor(*names, instance_reader: T.unsafe(nil), instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil)); end end +# source://activesupport//lib/active_support/configurable.rb#12 class ActiveSupport::Configurable::Configuration < ::ActiveSupport::InheritableOptions + # source://activesupport//lib/active_support/configurable.rb#13 def compile_methods!; end class << self + # Compiles reader methods so we don't have to go through method_missing. + # + # source://activesupport//lib/active_support/configurable.rb#18 def compile_methods!(keys); end end end +# Reads a YAML configuration file, evaluating any ERB, then +# parsing the resulting YAML. +# +# Warns in case of YAML confusing characters, like invisible +# non-breaking spaces. +# +# source://activesupport//lib/active_support/configuration_file.rb#9 class ActiveSupport::ConfigurationFile + # @return [ConfigurationFile] a new instance of ConfigurationFile + # + # source://activesupport//lib/active_support/configuration_file.rb#12 def initialize(content_path); end + # source://activesupport//lib/active_support/configuration_file.rb#21 def parse(context: T.unsafe(nil), **options); end private + # source://activesupport//lib/active_support/configuration_file.rb#35 def read(content_path); end + + # source://activesupport//lib/active_support/configuration_file.rb#46 def render(context); end class << self + # source://activesupport//lib/active_support/configuration_file.rb#17 def parse(content_path, **options); end end end +# source://activesupport//lib/active_support/configuration_file.rb#10 class ActiveSupport::ConfigurationFile::FormatError < ::StandardError; end +# Abstract super class that provides a thread-isolated attributes singleton, which resets automatically +# before and after each request. This allows you to keep all the per-request attributes easily +# available to the whole system. +# +# The following full app-like example demonstrates how to use a Current class to +# facilitate easy access to the global, per-request attributes without passing them deeply +# around everywhere: +# +# # app/models/current.rb +# class Current < ActiveSupport::CurrentAttributes +# attribute :account, :user +# attribute :request_id, :user_agent, :ip_address +# +# resets { Time.zone = nil } +# +# def user=(user) +# super +# self.account = user.account +# Time.zone = user.time_zone +# end +# end +# +# # app/controllers/concerns/authentication.rb +# module Authentication +# extend ActiveSupport::Concern +# +# included do +# before_action :authenticate +# end +# +# private +# def authenticate +# if authenticated_user = User.find_by(id: cookies.encrypted[:user_id]) +# Current.user = authenticated_user +# else +# redirect_to new_session_url +# end +# end +# end +# +# # app/controllers/concerns/set_current_request_details.rb +# module SetCurrentRequestDetails +# extend ActiveSupport::Concern +# +# included do +# before_action do +# Current.request_id = request.uuid +# Current.user_agent = request.user_agent +# Current.ip_address = request.ip +# end +# end +# end +# +# class ApplicationController < ActionController::Base +# include Authentication +# include SetCurrentRequestDetails +# end +# +# class MessagesController < ApplicationController +# def create +# Current.account.messages.create(message_params) +# end +# end +# +# class Message < ApplicationRecord +# belongs_to :creator, default: -> { Current.user } +# after_create { |message| Event.create(record: message) } +# end +# +# class Event < ApplicationRecord +# before_create do +# self.request_id = Current.request_id +# self.user_agent = Current.user_agent +# self.ip_address = Current.ip_address +# end +# end +# +# A word of caution: It's easy to overdo a global singleton like Current and tangle your model as a result. +# Current should only be used for a few, top-level globals, like account, user, and request details. +# The attributes stuck in Current should be used by more or less all actions on all requests. If you start +# sticking controller-specific attributes in there, you're going to create a mess. +# +# source://activesupport//lib/active_support/current_attributes.rb#89 class ActiveSupport::CurrentAttributes include ::ActiveSupport::Callbacks extend ::ActiveSupport::Callbacks::ClassMethods extend ::ActiveSupport::DescendantsTracker + # @return [CurrentAttributes] a new instance of CurrentAttributes + # + # source://activesupport//lib/active_support/current_attributes.rb#172 def initialize; end + # source://activesupport//lib/active_support/callbacks.rb#67 def __callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#67 def __callbacks?; end + + # source://activesupport//lib/active_support/callbacks.rb#835 def _reset_callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#823 def _run_reset_callbacks(&block); end + + # Returns the value of attribute attributes. + # + # source://activesupport//lib/active_support/current_attributes.rb#170 def attributes; end + + # Sets the attribute attributes + # + # @param value the value to set the attribute attributes to. + # + # source://activesupport//lib/active_support/current_attributes.rb#170 def attributes=(_arg0); end + + # Reset all attributes. Should be called before and after actions, when used as a per-request singleton. + # + # source://activesupport//lib/active_support/current_attributes.rb#195 def reset; end + + # Expose one or more attributes within a block. Old values are returned after the block concludes. + # Example demonstrating the common use of needing to set Current attributes outside the request-cycle: + # + # class Chat::PublicationJob < ApplicationJob + # def perform(attributes, room_number, creator) + # Current.set(person: creator) do + # Chat::Publisher.publish(attributes: attributes, room_number: room_number) + # end + # end + # end + # + # source://activesupport//lib/active_support/current_attributes.rb#186 def set(set_attributes); end private + # source://activesupport//lib/active_support/current_attributes.rb#202 def assign_attributes(new_attributes); end + + # source://activesupport//lib/active_support/current_attributes.rb#206 def compute_attributes(keys); end class << self + # source://activesupport//lib/active_support/callbacks.rb#67 def __callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#67 def __callbacks=(value); end + + # source://activesupport//lib/active_support/callbacks.rb#67 def __callbacks?; end + + # source://activesupport//lib/active_support/callbacks.rb#827 def _reset_callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#831 def _reset_callbacks=(value); end + + # Calls this block after #reset is called on the instance. Used for resetting external collaborators, like Time.zone. + # + # source://activesupport//lib/active_support/current_attributes.rb#130 def after_reset(&block); end + + # Declares one or more attributes that will be given both class and instance accessor methods. + # + # source://activesupport//lib/active_support/current_attributes.rb#100 def attribute(*names); end + + # Calls this block before #reset is called on the instance. Used for resetting external collaborators that depend on current values. + # + # source://activesupport//lib/active_support/current_attributes.rb#125 def before_reset(&block); end + + # source://activesupport//lib/active_support/current_attributes.rb#141 def clear_all; end + + # Returns singleton instance for this class in this thread. If none exists, one is created. + # + # source://activesupport//lib/active_support/current_attributes.rb#95 def instance; end - def reset(*args, &block); end + + # source://activesupport//lib/active_support/current_attributes.rb#135 + def reset(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/current_attributes.rb#137 def reset_all; end + + # Calls this block after #reset is called on the instance. Used for resetting external collaborators, like Time.zone. + # + # source://activesupport//lib/active_support/current_attributes.rb#130 def resets(&block); end - def set(*args, &block); end + + # source://activesupport//lib/active_support/current_attributes.rb#135 + def set(*_arg0, **_arg1, &_arg2); end private + # source://activesupport//lib/active_support/current_attributes.rb#151 def current_instances; end + + # source://activesupport//lib/active_support/current_attributes.rb#155 def current_instances_key; end + + # source://activesupport//lib/active_support/current_attributes.rb#147 def generated_attribute_methods; end - def method_missing(name, *args, &block); end + + # source://activesupport//lib/active_support/current_attributes.rb#159 + def method_missing(name, *args, **_arg2, &block); end end end +# source://activesupport//lib/active_support/dependencies/interlock.rb#6 module ActiveSupport::Dependencies extend ::ActiveSupport::Dependencies + # source://activesupport//lib/active_support/dependencies.rb#78 def _eager_load_paths; end + + # source://activesupport//lib/active_support/dependencies.rb#78 def _eager_load_paths=(val); end + + # Attempt to autoload the provided module name by searching for a directory + # matching the expected path suffix. If found, the module is created and + # assigned to +into+'s constants with the name +const_name+. Provided that + # the directory was loaded from a reloadable base path, it is added to the + # set of constants that are to be unloaded. + # + # source://activesupport//lib/active_support/dependencies.rb#499 def autoload_module!(into, const_name, qualified_name, path_suffix); end + + # source://activesupport//lib/active_support/dependencies.rb#73 def autoload_once_paths; end + + # source://activesupport//lib/active_support/dependencies.rb#73 def autoload_once_paths=(val); end + + # source://activesupport//lib/active_support/dependencies.rb#69 def autoload_paths; end + + # source://activesupport//lib/active_support/dependencies.rb#69 def autoload_paths=(val); end + + # Does the provided path_suffix correspond to an autoloadable module? + # Instead of returning a boolean, the autoload base for this module is + # returned. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/dependencies.rb#481 def autoloadable_module?(path_suffix); end + + # Determine if the given constant has been automatically loaded. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/dependencies.rb#677 def autoloaded?(desc); end + + # source://activesupport//lib/active_support/dependencies.rb#83 def autoloaded_constants; end + + # source://activesupport//lib/active_support/dependencies.rb#83 def autoloaded_constants=(val); end + + # source://activesupport//lib/active_support/dependencies.rb#389 def clear; end + + # source://activesupport//lib/active_support/dependencies.rb#185 def constant_watch_stack; end + + # source://activesupport//lib/active_support/dependencies.rb#185 def constant_watch_stack=(val); end + + # Get the reference for class named +name+. + # Raises an exception if referenced class does not exist. + # + # source://activesupport//lib/active_support/dependencies.rb#666 def constantize(name); end + + # source://activesupport//lib/active_support/dependencies.rb#373 def depend_on(file_name, message = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/dependencies.rb#87 def explicitly_unloadable_constants; end + + # source://activesupport//lib/active_support/dependencies.rb#87 def explicitly_unloadable_constants=(val); end + + # source://activesupport//lib/active_support/dependencies.rb#55 def history; end + + # source://activesupport//lib/active_support/dependencies.rb#55 def history=(val); end + + # source://activesupport//lib/active_support/dependencies.rb#358 def hook!; end + + # source://activesupport//lib/active_support/dependencies.rb#25 def interlock; end + + # source://activesupport//lib/active_support/dependencies.rb#25 def interlock=(val); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/dependencies.rb#369 def load?; end + + # Load the file at the provided path. +const_paths+ is a set of qualified + # constant names. When loading the file, Dependencies will watch for the + # addition of these constants. Each that is defined will be marked as + # autoloaded, and will be removed when Dependencies.clear is next called. + # + # If the second parameter is left off, then Dependencies will construct a + # set of names that the file at +path+ may define. See + # +loadable_constants_for_path+ for more details. + # + # source://activesupport//lib/active_support/dependencies.rb#517 def load_file(path, const_paths = T.unsafe(nil)); end + + # Load the constant named +const_name+ which is missing from +from_mod+. If + # it is not possible to load the constant into from_mod, try its parent + # module using +const_missing+. + # + # source://activesupport//lib/active_support/dependencies.rb#540 def load_missing_constant(from_mod, const_name); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/dependencies.rb#488 def load_once_path?(path); end + + # Given +path+, a filesystem path to a ruby file, return an array of + # constant paths which would cause Dependencies to attempt to load this + # file. + # + # source://activesupport//lib/active_support/dependencies.rb#447 def loadable_constants_for_path(path, bases = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/dependencies.rb#58 def loaded; end + + # source://activesupport//lib/active_support/dependencies.rb#58 def loaded=(val); end + + # source://activesupport//lib/active_support/dependencies.rb#61 def loading; end + + # source://activesupport//lib/active_support/dependencies.rb#61 def loading=(val); end + + # source://activesupport//lib/active_support/dependencies.rb#805 def log(message); end + + # source://activesupport//lib/active_support/dependencies.rb#90 def logger; end + + # source://activesupport//lib/active_support/dependencies.rb#90 def logger=(val); end + + # Mark the provided constant name for unloading. This constant will be + # unloaded on each request, not just the next one. + # + # source://activesupport//lib/active_support/dependencies.rb#692 def mark_for_unload(const_desc); end + + # source://activesupport//lib/active_support/dependencies.rb#64 def mechanism; end + + # source://activesupport//lib/active_support/dependencies.rb#64 def mechanism=(val); end + + # Run the provided block and detect the new constants that were loaded during + # its execution. Constants may only be regarded as 'new' once -- so if the + # block calls +new_constants_in+ again, then the constants defined within the + # inner call will not be reported in this one. + # + # If the provided block does not run to completion, and instead raises an + # exception, any new constants are regarded as being only partially defined + # and will be removed immediately. + # + # source://activesupport//lib/active_support/dependencies.rb#710 def new_constants_in(*descs); end + + # Is the provided constant path defined? + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/dependencies.rb#440 def qualified_const_defined?(path); end + + # Returns the constant path for the provided parent and constant name. + # + # source://activesupport//lib/active_support/dependencies.rb#532 def qualified_name_for(mod, name); end + + # Store a reference to a class +klass+. + # + # source://activesupport//lib/active_support/dependencies.rb#660 def reference(klass); end + + # source://activesupport//lib/active_support/dependencies.rb#740 def remove_constant(const); end + + # Remove the constants that have been autoloaded, and those that have been + # marked for unloading. Before each constant is removed a callback is sent + # to its class/module if it implements +before_remove_const+. + # + # The callback implementation should be restricted to cleaning up caches, etc. + # as the environment will be in an inconsistent state, e.g. other constants + # may have already been unloaded and not accessible. + # + # source://activesupport//lib/active_support/dependencies.rb#613 def remove_unloadable_constants!; end + + # source://activesupport//lib/active_support/dependencies.rb#397 def require_or_load(file_name, const_path = T.unsafe(nil)); end + + # Get the reference for class named +name+ if one exists. + # Otherwise returns +nil+. + # + # source://activesupport//lib/active_support/dependencies.rb#672 def safe_constantize(name); end + + # Search for a file in autoload_paths matching the provided suffix. + # + # source://activesupport//lib/active_support/dependencies.rb#468 def search_for_file(path_suffix); end + + # Convert the provided const desc to a qualified constant name (as a string). + # A module, class, symbol, or string may be provided. + # + # source://activesupport//lib/active_support/dependencies.rb#729 def to_constant_name(desc); end + + # source://activesupport//lib/active_support/dependencies.rb#364 def unhook!; end + + # source://activesupport//lib/active_support/dependencies.rb#93 def verbose; end + + # source://activesupport//lib/active_support/dependencies.rb#93 def verbose=(val); end + + # source://activesupport//lib/active_support/dependencies.rb#52 def warnings_on_first_load; end + + # source://activesupport//lib/active_support/dependencies.rb#52 def warnings_on_first_load=(val); end + + # Will the provided constant descriptor be unloaded? + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/dependencies.rb#685 def will_unload?(const_desc); end private + # Returns the original name of a class or module even if `name` has been + # overridden. + # + # source://activesupport//lib/active_support/dependencies.rb#822 def real_mod_name(mod); end + + # source://activesupport//lib/active_support/dependencies.rb#815 def uninitialized_constant(qualified_name, const_name, receiver:); end class << self + # source://activesupport//lib/active_support/dependencies.rb#78 def _eager_load_paths; end + + # source://activesupport//lib/active_support/dependencies.rb#78 def _eager_load_paths=(val); end + + # source://activesupport//lib/active_support/dependencies.rb#73 def autoload_once_paths; end + + # source://activesupport//lib/active_support/dependencies.rb#73 def autoload_once_paths=(val); end + + # source://activesupport//lib/active_support/dependencies.rb#69 def autoload_paths; end + + # source://activesupport//lib/active_support/dependencies.rb#69 def autoload_paths=(val); end + + # source://activesupport//lib/active_support/dependencies.rb#83 def autoloaded_constants; end + + # source://activesupport//lib/active_support/dependencies.rb#83 def autoloaded_constants=(val); end + + # source://activesupport//lib/active_support/dependencies.rb#185 def constant_watch_stack; end + + # source://activesupport//lib/active_support/dependencies.rb#185 def constant_watch_stack=(val); end + + # source://activesupport//lib/active_support/dependencies.rb#87 def explicitly_unloadable_constants; end + + # source://activesupport//lib/active_support/dependencies.rb#87 def explicitly_unloadable_constants=(val); end + + # source://activesupport//lib/active_support/dependencies.rb#55 def history; end + + # source://activesupport//lib/active_support/dependencies.rb#55 def history=(val); end + + # source://activesupport//lib/active_support/dependencies.rb#25 def interlock; end + + # source://activesupport//lib/active_support/dependencies.rb#25 def interlock=(val); end + + # Execute the supplied block while holding an exclusive lock, + # preventing any other thread from being inside a #run_interlock + # block at the same time. + # + # source://activesupport//lib/active_support/dependencies.rb#38 def load_interlock; end + + # source://activesupport//lib/active_support/dependencies.rb#58 def loaded; end + + # source://activesupport//lib/active_support/dependencies.rb#58 def loaded=(val); end + + # source://activesupport//lib/active_support/dependencies.rb#61 def loading; end + + # source://activesupport//lib/active_support/dependencies.rb#61 def loading=(val); end + + # source://activesupport//lib/active_support/dependencies.rb#90 def logger; end + + # source://activesupport//lib/active_support/dependencies.rb#90 def logger=(val); end + + # source://activesupport//lib/active_support/dependencies.rb#64 def mechanism; end + + # source://activesupport//lib/active_support/dependencies.rb#64 def mechanism=(val); end + + # Execute the supplied block without interference from any + # concurrent loads. + # + # source://activesupport//lib/active_support/dependencies.rb#31 def run_interlock; end + + # Execute the supplied block while holding an exclusive lock, + # preventing any other thread from being inside a #run_interlock + # block at the same time. + # + # source://activesupport//lib/active_support/dependencies.rb#45 def unload_interlock; end + + # source://activesupport//lib/active_support/dependencies.rb#93 def verbose; end + + # source://activesupport//lib/active_support/dependencies.rb#93 def verbose=(val); end + + # source://activesupport//lib/active_support/dependencies.rb#52 def warnings_on_first_load; end + + # source://activesupport//lib/active_support/dependencies.rb#52 def warnings_on_first_load=(val); end end end +# Exception file-blaming. +# +# source://activesupport//lib/active_support/dependencies.rb#338 module ActiveSupport::Dependencies::Blamable + # source://activesupport//lib/active_support/dependencies.rb#339 def blame_file!(file); end + + # source://activesupport//lib/active_support/dependencies.rb#343 def blamed_files; end + + # source://activesupport//lib/active_support/dependencies.rb#352 def copy_blame!(exc); end + + # source://activesupport//lib/active_support/dependencies.rb#347 def describe_blame; end end +# source://activesupport//lib/active_support/dependencies.rb#621 class ActiveSupport::Dependencies::ClassCache + # @return [ClassCache] a new instance of ClassCache + # + # source://activesupport//lib/active_support/dependencies.rb#622 def initialize; end + # source://activesupport//lib/active_support/dependencies.rb#634 def [](key); end + + # source://activesupport//lib/active_support/dependencies.rb#652 def clear!; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/dependencies.rb#626 def empty?; end + + # source://activesupport//lib/active_support/dependencies.rb#634 def get(key); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/dependencies.rb#630 def key?(key); end + + # source://activesupport//lib/active_support/dependencies.rb#640 def safe_get(key); end + + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/dependencies.rb#645 def store(klass); end end +# source://activesupport//lib/active_support/dependencies/interlock.rb#7 class ActiveSupport::Dependencies::Interlock + # @return [Interlock] a new instance of Interlock + # + # source://activesupport//lib/active_support/dependencies/interlock.rb#8 def initialize; end + # source://activesupport//lib/active_support/dependencies/interlock.rb#36 def done_running; end + + # source://activesupport//lib/active_support/dependencies/interlock.rb#28 def done_unloading; end + + # source://activesupport//lib/active_support/dependencies/interlock.rb#12 def loading; end + + # source://activesupport//lib/active_support/dependencies/interlock.rb#46 def permit_concurrent_loads; end + + # source://activesupport//lib/active_support/dependencies/interlock.rb#52 def raw_state(&block); end + + # source://activesupport//lib/active_support/dependencies/interlock.rb#40 def running; end + + # source://activesupport//lib/active_support/dependencies/interlock.rb#32 def start_running; end + + # source://activesupport//lib/active_support/dependencies/interlock.rb#24 def start_unloading; end + + # source://activesupport//lib/active_support/dependencies/interlock.rb#18 def unloading; end end +# Object includes this module. +# +# source://activesupport//lib/active_support/dependencies.rb#235 module ActiveSupport::Dependencies::Loadable + # source://activesupport//lib/active_support/dependencies.rb#293 def load_dependency(file); end + + # Warning: This method is obsolete in +:zeitwerk+ mode. In + # +:zeitwerk+ mode semantics match Ruby's and you do not need to be + # defensive with load order. Just refer to classes and modules normally. + # If the constant name is dynamic, camelize if needed, and constantize. + # + # In +:classic+ mode, interprets a file using +mechanism+ and marks its + # defined constants as autoloaded. +file_name+ can be either a string or + # respond to to_path. + # + # In +:classic+ mode, use this method in code that absolutely needs a + # certain constant to be defined at that point. A typical use case is to + # make constant name resolution deterministic for constants with the same + # relative name in different namespaces whose evaluation would depend on + # load order otherwise. + # + # Engines that do not control the mode in which their parent application + # runs should call +require_dependency+ where needed in case the runtime + # mode is +:classic+. + # + # source://activesupport//lib/active_support/dependencies.rb#282 def require_dependency(file_name, message = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/dependencies.rb#258 def require_or_load(file_name); end + + # Mark the given constant as unloadable. Unloadable constants are removed + # each time dependencies are cleared. + # + # Note that marking a constant for unloading need only be done once. Setup + # or init scripts may list each unloadable constant that may need unloading; + # each constant will be removed for every subsequent clear, as opposed to + # for the first clear. + # + # The provided constant descriptor may be a (non-anonymous) module or class, + # or a qualified constant name as a string or symbol. + # + # Returns +true+ if the constant was not previously marked for unloading, + # +false+ otherwise. + # + # source://activesupport//lib/active_support/dependencies.rb#319 def unloadable(const_desc); end private + # source://activesupport//lib/active_support/dependencies.rb#324 def load(file, wrap = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/dependencies.rb#330 def require(file); end class << self + # source://activesupport//lib/active_support/dependencies.rb#236 def exclude_from(base); end + + # source://activesupport//lib/active_support/dependencies.rb#246 def include_into(base); end end end +# Module includes this module. +# +# source://activesupport//lib/active_support/dependencies.rb#188 module ActiveSupport::Dependencies::ModuleConstMissing + # source://activesupport//lib/active_support/dependencies.rb#211 def const_missing(const_name); end + + # We assume that the name of the module reflects the nesting + # (unless it can be proven that is not the case) and the path to the file + # that defines the constant. Anonymous modules cannot follow these + # conventions and therefore we assume that the user wants to refer to a + # top-level constant. + # + # source://activesupport//lib/active_support/dependencies.rb#221 def guess_for_anonymous(const_name); end + + # source://activesupport//lib/active_support/dependencies.rb#229 def unloadable(const_desc = T.unsafe(nil)); end class << self + # source://activesupport//lib/active_support/dependencies.rb#189 def append_features(base); end + + # source://activesupport//lib/active_support/dependencies.rb#199 def exclude_from(base); end + + # source://activesupport//lib/active_support/dependencies.rb#206 def include_into(base); end end end +# source://activesupport//lib/active_support/dependencies.rb#657 ActiveSupport::Dependencies::Reference = T.let(T.unsafe(nil), ActiveSupport::Dependencies::ClassCache) + +# source://activesupport//lib/active_support/dependencies.rb#22 ActiveSupport::Dependencies::UNBOUND_METHOD_MODULE_NAME = T.let(T.unsafe(nil), UnboundMethod) +# The WatchStack keeps a stack of the modules being watched as files are +# loaded. If a file in the process of being loaded (parent.rb) triggers the +# load of another file (child.rb) the stack will ensure that child.rb +# handles the new constants. +# +# If child.rb is being autoloaded, its constants will be added to +# autoloaded_constants. If it was being required, they will be discarded. +# +# This is handled by walking back up the watch stack and adding the constants +# found by child.rb to the list of original constants in parent.rb. +# +# source://activesupport//lib/active_support/dependencies.rb#105 class ActiveSupport::Dependencies::WatchStack include ::Enumerable + # @return [WatchStack] a new instance of WatchStack + # + # source://activesupport//lib/active_support/dependencies.rb#115 def initialize; end + # source://activesupport//lib/active_support/dependencies.rb#120 def each(&block); end + + # Returns a list of new constants found since the last call to + # watch_namespaces. + # + # source://activesupport//lib/active_support/dependencies.rb#130 def new_constants; end + + # Add a set of modules to the watch stack, remembering the initial + # constants. + # + # source://activesupport//lib/active_support/dependencies.rb#167 def watch_namespaces(namespaces); end + + # if parent.rb is autoloaded, the stack will look like [[Object]]. If + # parent.rb then requires namespace/child.rb, the stack will look like + # [[Object], [Namespace]]. + # + # source://activesupport//lib/active_support/dependencies.rb#113 def watching; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/dependencies.rb#124 def watching?; end private + # source://activesupport//lib/active_support/dependencies.rb#179 def pop_modules(modules); end end +# \Deprecation specifies the API used by Rails to deprecate methods, instance +# variables, objects and constants. +# +# source://activesupport//lib/active_support/deprecation.rb#8 class ActiveSupport::Deprecation include ::Singleton include ::ActiveSupport::Deprecation::InstanceDelegator @@ -867,359 +3404,1278 @@ class ActiveSupport::Deprecation extend ::ActiveSupport::Deprecation::InstanceDelegator::ClassMethods extend ::ActiveSupport::Deprecation::InstanceDelegator::OverrideDelegators + # It accepts two parameters on initialization. The first is a version of library + # and the second is a library name. + # + # ActiveSupport::Deprecation.new('2.0', 'MyLibrary') + # + # @return [Deprecation] a new instance of Deprecation + # + # source://activesupport//lib/active_support/deprecation.rb#41 def initialize(deprecation_horizon = T.unsafe(nil), gem_name = T.unsafe(nil)); end + # The version number in which the deprecated behavior will be removed, by default. + # + # source://activesupport//lib/active_support/deprecation.rb#35 def deprecation_horizon; end + + # The version number in which the deprecated behavior will be removed, by default. + # + # source://activesupport//lib/active_support/deprecation.rb#35 def deprecation_horizon=(_arg0); end class << self - def allow(*args, &block); end - def behavior(*args, &block); end + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 + def allow(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 + def behavior(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 def behavior=(arg); end - def debug(*args, &block); end + + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 + def debug(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 def debug=(arg); end - def deprecate_methods(*args, &block); end - def deprecation_horizon(*args, &block); end + + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 + def deprecate_methods(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 + def deprecation_horizon(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 def deprecation_horizon=(arg); end - def disallowed_behavior(*args, &block); end + + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#31 + def deprecation_warning(deprecated_method_name, message = T.unsafe(nil), caller_backtrace = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 + def disallowed_behavior(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 def disallowed_behavior=(arg); end - def disallowed_warnings(*args, &block); end + + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 + def disallowed_warnings(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 def disallowed_warnings=(arg); end - def gem_name(*args, &block); end + + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 + def gem_name(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 def gem_name=(arg); end - def instance; end - def silence(*args, &block); end - def silenced(*args, &block); end + + def new(*_arg0); end + + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 + def silence(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 + def silenced(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 def silenced=(arg); end + + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#26 + def warn(message = T.unsafe(nil), callstack = T.unsafe(nil)); end + + private + + def allocate; end end end +# Behavior module allows to determine how to display deprecation messages. +# You can create a custom behavior or set any from the +DEFAULT_BEHAVIORS+ +# constant. Available behaviors are: +# +# [+raise+] Raise ActiveSupport::DeprecationException. +# [+stderr+] Log all deprecation warnings to $stderr. +# [+log+] Log all deprecation warnings to +Rails.logger+. +# [+notify+] Use +ActiveSupport::Notifications+ to notify +deprecation.rails+. +# [+silence+] Do nothing. +# +# Setting behaviors only affects deprecations that happen after boot time. +# For more information you can read the documentation of the +behavior=+ method. +# +# source://activesupport//lib/active_support/deprecation/behaviors.rb#61 module ActiveSupport::Deprecation::Behavior + # Returns the current behavior or if one isn't set, defaults to +:stderr+. + # + # source://activesupport//lib/active_support/deprecation/behaviors.rb#66 def behavior; end + + # Sets the behavior to the specified value. Can be a single value, array, + # or an object that responds to +call+. + # + # Available behaviors: + # + # [+raise+] Raise ActiveSupport::DeprecationException. + # [+stderr+] Log all deprecation warnings to $stderr. + # [+log+] Log all deprecation warnings to +Rails.logger+. + # [+notify+] Use +ActiveSupport::Notifications+ to notify +deprecation.rails+. + # [+silence+] Do nothing. + # + # Setting behaviors only affects deprecations that happen after boot time. + # Deprecation warnings raised by gems are not affected by this setting + # because they happen before Rails boots up. + # + # ActiveSupport::Deprecation.behavior = :stderr + # ActiveSupport::Deprecation.behavior = [:stderr, :log] + # ActiveSupport::Deprecation.behavior = MyCustomHandler + # ActiveSupport::Deprecation.behavior = ->(message, callstack, deprecation_horizon, gem_name) { + # # custom stuff + # } + # + # source://activesupport//lib/active_support/deprecation/behaviors.rb#96 def behavior=(behavior); end + + # Whether to print a backtrace along with the warning. + # + # source://activesupport//lib/active_support/deprecation/behaviors.rb#63 def debug; end + + # Whether to print a backtrace along with the warning. + # + # source://activesupport//lib/active_support/deprecation/behaviors.rb#63 def debug=(_arg0); end + + # Returns the current behavior for disallowed deprecations or if one isn't set, defaults to +:raise+. + # + # source://activesupport//lib/active_support/deprecation/behaviors.rb#71 def disallowed_behavior; end + + # Sets the behavior for disallowed deprecations (those configured by + # ActiveSupport::Deprecation.disallowed_warnings=) to the specified + # value. As with +behavior=+, this can be a single value, array, or an + # object that responds to +call+. + # + # source://activesupport//lib/active_support/deprecation/behaviors.rb#104 def disallowed_behavior=(behavior); end private + # source://activesupport//lib/active_support/deprecation/behaviors.rb#109 def arity_coerce(behavior); end end +# Default warning behaviors per Rails.env. +# +# source://activesupport//lib/active_support/deprecation/behaviors.rb#13 ActiveSupport::Deprecation::DEFAULT_BEHAVIORS = T.let(T.unsafe(nil), Hash) +# DeprecatedConstantAccessor transforms a constant into a deprecated one by +# hooking +const_missing+. +# +# It takes the names of an old (deprecated) constant and of a new constant +# (both in string form) and optionally a deprecator. The deprecator defaults +# to +ActiveSupport::Deprecator+ if none is specified. +# +# The deprecated constant now returns the same object as the new one rather +# than a proxy object, so it can be used transparently in +rescue+ blocks +# etc. +# +# PLANETS = %w(mercury venus earth mars jupiter saturn uranus neptune pluto) +# +# # (In a later update, the original implementation of `PLANETS` has been removed.) +# +# PLANETS_POST_2006 = %w(mercury venus earth mars jupiter saturn uranus neptune) +# include ActiveSupport::Deprecation::DeprecatedConstantAccessor +# deprecate_constant 'PLANETS', 'PLANETS_POST_2006' +# +# PLANETS.map { |planet| planet.capitalize } +# # => DEPRECATION WARNING: PLANETS is deprecated! Use PLANETS_POST_2006 instead. +# (Backtrace information…) +# ["Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune"] +# +# source://activesupport//lib/active_support/deprecation/constant_accessor.rb#28 module ActiveSupport::Deprecation::DeprecatedConstantAccessor class << self + # @private + # + # source://activesupport//lib/active_support/deprecation/constant_accessor.rb#29 def included(base); end end end +# DeprecatedConstantProxy transforms a constant into a deprecated one. It +# takes the names of an old (deprecated) constant and of a new constant +# (both in string form) and optionally a deprecator. The deprecator defaults +# to +ActiveSupport::Deprecator+ if none is specified. The deprecated constant +# now returns the value of the new one. +# +# PLANETS = %w(mercury venus earth mars jupiter saturn uranus neptune pluto) +# +# # (In a later update, the original implementation of `PLANETS` has been removed.) +# +# PLANETS_POST_2006 = %w(mercury venus earth mars jupiter saturn uranus neptune) +# PLANETS = ActiveSupport::Deprecation::DeprecatedConstantProxy.new('PLANETS', 'PLANETS_POST_2006') +# +# PLANETS.map { |planet| planet.capitalize } +# # => DEPRECATION WARNING: PLANETS is deprecated! Use PLANETS_POST_2006 instead. +# (Backtrace information…) +# ["Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune"] +# +# source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#123 class ActiveSupport::Deprecation::DeprecatedConstantProxy < ::Module + # @return [DeprecatedConstantProxy] a new instance of DeprecatedConstantProxy + # + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#131 def initialize(old_const, new_const, deprecator = T.unsafe(nil), message: T.unsafe(nil)); end + # Returns the class of the new constant. + # + # PLANETS_POST_2006 = %w(mercury venus earth mars jupiter saturn uranus neptune) + # PLANETS = ActiveSupport::Deprecation::DeprecatedConstantProxy.new('PLANETS', 'PLANETS_POST_2006') + # PLANETS.class # => Array + # + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#157 def class; end - def hash(*args, &block); end + + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#150 + def hash(*_arg0, **_arg1, &_arg2); end + + # Don't give a deprecation warning on inspect since test/unit and error + # logs rely on it for diagnostics. + # + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#144 def inspect; end - def instance_methods(*args, &block); end - def name(*args, &block); end - def respond_to?(*args, &block); end + + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#150 + def instance_methods(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#150 + def name(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#150 + def respond_to?(*_arg0, **_arg1, &_arg2); end private + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#166 def const_missing(name); end + + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#171 def method_missing(called, *args, &block); end + + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#162 def target; end class << self + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#124 def new(*args, **options, &block); end end end +# DeprecatedInstanceVariableProxy transforms an instance variable into a +# deprecated one. It takes an instance of a class, a method on that class +# and an instance variable. It optionally takes a deprecator as the last +# argument. The deprecator defaults to +ActiveSupport::Deprecator+ if none +# is specified. +# +# class Example +# def initialize +# @request = ActiveSupport::Deprecation::DeprecatedInstanceVariableProxy.new(self, :request, :@request) +# @_request = :special_request +# end +# +# def request +# @_request +# end +# +# def old_request +# @request +# end +# end +# +# example = Example.new +# # => # +# +# example.old_request.to_s +# # => DEPRECATION WARNING: @request is deprecated! Call request.to_s instead of +# @request.to_s +# (Backtrace information…) +# "special_request" +# +# example.request.to_s +# # => "special_request" +# +# source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#88 class ActiveSupport::Deprecation::DeprecatedInstanceVariableProxy < ::ActiveSupport::Deprecation::DeprecationProxy + # @return [DeprecatedInstanceVariableProxy] a new instance of DeprecatedInstanceVariableProxy + # + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#89 def initialize(instance, method, var = T.unsafe(nil), deprecator = T.unsafe(nil)); end private + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#97 def target; end + + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#101 def warn(callstack, called, args); end end +# DeprecatedObjectProxy transforms an object into a deprecated one. It +# takes an object, a deprecation message and optionally a deprecator. The +# deprecator defaults to +ActiveSupport::Deprecator+ if none is specified. +# +# deprecated_object = ActiveSupport::Deprecation::DeprecatedObjectProxy.new(Object.new, "This object is now deprecated") +# # => # +# +# deprecated_object.to_s +# DEPRECATION WARNING: This object is now deprecated. +# (Backtrace) +# # => "#" +# +# source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#39 class ActiveSupport::Deprecation::DeprecatedObjectProxy < ::ActiveSupport::Deprecation::DeprecationProxy + # @return [DeprecatedObjectProxy] a new instance of DeprecatedObjectProxy + # + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#40 def initialize(object, message, deprecator = T.unsafe(nil)); end private + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#47 def target; end + + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#51 def warn(callstack, called, args); end end +# source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#5 class ActiveSupport::Deprecation::DeprecationProxy + # Don't give a deprecation warning on inspect since test/unit and error + # logs rely on it for diagnostics. + # + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#17 def inspect; end private + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#22 def method_missing(called, *args, &block); end class << self + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#6 def new(*args, &block); end end end +# source://activesupport//lib/active_support/deprecation/disallowed.rb#5 module ActiveSupport::Deprecation::Disallowed + # Returns the configured criteria used to identify deprecation messages + # which should be treated as disallowed. + # + # source://activesupport//lib/active_support/deprecation/disallowed.rb#21 def disallowed_warnings; end + + # Sets the criteria used to identify deprecation messages which should be + # disallowed. Can be an array containing strings, symbols, or regular + # expressions. (Symbols are treated as strings). These are compared against + # the text of the generated deprecation warning. + # + # Additionally the scalar symbol +:all+ may be used to treat all + # deprecations as disallowed. + # + # Deprecations matching a substring or regular expression will be handled + # using the configured +ActiveSupport::Deprecation.disallowed_behavior+ + # rather than +ActiveSupport::Deprecation.behavior+ + # + # source://activesupport//lib/active_support/deprecation/disallowed.rb#17 def disallowed_warnings=(_arg0); end private + # @return [Boolean] + # + # source://activesupport//lib/active_support/deprecation/disallowed.rb#26 def deprecation_disallowed?(message); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/deprecation/disallowed.rb#40 def explicitly_allowed?(message); end end +# source://activesupport//lib/active_support/deprecation/instance_delegator.rb#7 module ActiveSupport::Deprecation::InstanceDelegator mixes_in_class_methods ::ActiveSupport::Deprecation::InstanceDelegator::ClassMethods mixes_in_class_methods ::ActiveSupport::Deprecation::InstanceDelegator::OverrideDelegators class << self + # @private + # + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#8 def included(base); end end end +# source://activesupport//lib/active_support/deprecation/instance_delegator.rb#14 module ActiveSupport::Deprecation::InstanceDelegator::ClassMethods + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#15 def include(included_module); end + + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#20 def method_added(method_name); end end +# source://activesupport//lib/active_support/deprecation/instance_delegator.rb#25 module ActiveSupport::Deprecation::InstanceDelegator::OverrideDelegators + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#31 def deprecation_warning(deprecated_method_name, message = T.unsafe(nil), caller_backtrace = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#26 def warn(message = T.unsafe(nil), callstack = T.unsafe(nil)); end end +# source://activesupport//lib/active_support/deprecation/method_wrappers.rb#8 module ActiveSupport::Deprecation::MethodWrapper + # Declare that a method has been deprecated. + # + # class Fred + # def aaa; end + # def bbb; end + # def ccc; end + # def ddd; end + # def eee; end + # end + # + # Using the default deprecator: + # ActiveSupport::Deprecation.deprecate_methods(Fred, :aaa, bbb: :zzz, ccc: 'use Bar#ccc instead') + # # => Fred + # + # Fred.new.aaa + # # DEPRECATION WARNING: aaa is deprecated and will be removed from Rails 5.1. (called from irb_binding at (irb):10) + # # => nil + # + # Fred.new.bbb + # # DEPRECATION WARNING: bbb is deprecated and will be removed from Rails 5.1 (use zzz instead). (called from irb_binding at (irb):11) + # # => nil + # + # Fred.new.ccc + # # DEPRECATION WARNING: ccc is deprecated and will be removed from Rails 5.1 (use Bar#ccc instead). (called from irb_binding at (irb):12) + # # => nil + # + # Passing in a custom deprecator: + # custom_deprecator = ActiveSupport::Deprecation.new('next-release', 'MyGem') + # ActiveSupport::Deprecation.deprecate_methods(Fred, ddd: :zzz, deprecator: custom_deprecator) + # # => [:ddd] + # + # Fred.new.ddd + # DEPRECATION WARNING: ddd is deprecated and will be removed from MyGem next-release (use zzz instead). (called from irb_binding at (irb):15) + # # => nil + # + # Using a custom deprecator directly: + # custom_deprecator = ActiveSupport::Deprecation.new('next-release', 'MyGem') + # custom_deprecator.deprecate_methods(Fred, eee: :zzz) + # # => [:eee] + # + # Fred.new.eee + # DEPRECATION WARNING: eee is deprecated and will be removed from MyGem next-release (use zzz instead). (called from irb_binding at (irb):18) + # # => nil + # + # source://activesupport//lib/active_support/deprecation/method_wrappers.rb#52 def deprecate_methods(target_module, *method_names); end end +# source://activesupport//lib/active_support/deprecation/reporting.rb#7 module ActiveSupport::Deprecation::Reporting + # Allow previously disallowed deprecation warnings within the block. + # allowed_warnings can be an array containing strings, symbols, or regular + # expressions. (Symbols are treated as strings). These are compared against + # the text of deprecation warning messages generated within the block. + # Matching warnings will be exempt from the rules set by + # +ActiveSupport::Deprecation.disallowed_warnings+ + # + # The optional if: argument accepts a truthy/falsy value or an object that + # responds to .call. If truthy, then matching warnings will be allowed. + # If falsey then the method yields to the block without allowing the warning. + # + # ActiveSupport::Deprecation.disallowed_behavior = :raise + # ActiveSupport::Deprecation.disallowed_warnings = [ + # "something broke" + # ] + # + # ActiveSupport::Deprecation.warn('something broke!') + # # => ActiveSupport::DeprecationException + # + # ActiveSupport::Deprecation.allow ['something broke'] do + # ActiveSupport::Deprecation.warn('something broke!') + # end + # # => nil + # + # ActiveSupport::Deprecation.allow ['something broke'], if: Rails.env.production? do + # ActiveSupport::Deprecation.warn('something broke!') + # end + # # => ActiveSupport::DeprecationException for dev/test, nil for production + # + # source://activesupport//lib/active_support/deprecation/reporting.rb#72 def allow(allowed_warnings = T.unsafe(nil), if: T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/deprecation/reporting.rb#86 def deprecation_warning(deprecated_method_name, message = T.unsafe(nil), caller_backtrace = T.unsafe(nil)); end + + # Name of gem where method is deprecated + # + # source://activesupport//lib/active_support/deprecation/reporting.rb#11 def gem_name; end + + # Name of gem where method is deprecated + # + # source://activesupport//lib/active_support/deprecation/reporting.rb#11 def gem_name=(_arg0); end + + # Silence deprecation warnings within the block. + # + # ActiveSupport::Deprecation.warn('something broke!') + # # => "DEPRECATION WARNING: something broke! (called from your_code.rb:1)" + # + # ActiveSupport::Deprecation.silence do + # ActiveSupport::Deprecation.warn('something broke!') + # end + # # => nil + # + # source://activesupport//lib/active_support/deprecation/reporting.rb#40 def silence(&block); end + + # source://activesupport//lib/active_support/deprecation/reporting.rb#82 def silenced; end + + # Whether to print a message (silent mode) + # + # source://activesupport//lib/active_support/deprecation/reporting.rb#9 def silenced=(_arg0); end + + # Outputs a deprecation warning to the output configured by + # ActiveSupport::Deprecation.behavior. + # + # ActiveSupport::Deprecation.warn('something broke!') + # # => "DEPRECATION WARNING: something broke! (called from your_code.rb:1)" + # + # source://activesupport//lib/active_support/deprecation/reporting.rb#18 def warn(message = T.unsafe(nil), callstack = T.unsafe(nil)); end private + # source://activesupport//lib/active_support/deprecation/reporting.rb#137 def _extract_callstack(callstack); end + + # Outputs a deprecation warning message + # + # deprecated_method_warning(:method_name) + # # => "method_name is deprecated and will be removed from Rails #{deprecation_horizon}" + # deprecated_method_warning(:method_name, :another_method) + # # => "method_name is deprecated and will be removed from Rails #{deprecation_horizon} (use another_method instead)" + # deprecated_method_warning(:method_name, "Optional message") + # # => "method_name is deprecated and will be removed from Rails #{deprecation_horizon} (Optional message)" + # + # source://activesupport//lib/active_support/deprecation/reporting.rb#102 def deprecated_method_warning(method_name, message = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/deprecation/reporting.rb#116 def deprecation_caller_message(callstack); end + + # source://activesupport//lib/active_support/deprecation/reporting.rb#111 def deprecation_message(callstack, message = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/deprecation/reporting.rb#127 def extract_callstack(callstack); end + + # source://activesupport//lib/active_support/deprecation/reporting.rb#152 def ignored_callstack(path); end end +# source://activesupport//lib/active_support/deprecation/reporting.rb#150 ActiveSupport::Deprecation::Reporting::RAILS_GEM_ROOT = T.let(T.unsafe(nil), String) + +# Raised when ActiveSupport::Deprecation::Behavior#behavior is set with :raise. +# You would set :raise, as a behavior to raise errors and proactively report exceptions from deprecations. +# +# source://activesupport//lib/active_support/deprecation/behaviors.rb#8 class ActiveSupport::DeprecationException < ::StandardError; end +# This module provides an internal implementation to track descendants +# which is faster than iterating through ObjectSpace. +# +# source://activesupport//lib/active_support/descendants_tracker.rb#8 module ActiveSupport::DescendantsTracker + # source://activesupport//lib/active_support/descendants_tracker.rb#65 def descendants; end + + # source://activesupport//lib/active_support/descendants_tracker.rb#60 def direct_descendants; end + + # source://activesupport//lib/active_support/descendants_tracker.rb#55 def inherited(base); end + + # source://activesupport//lib/active_support/descendants_tracker.rb#60 def subclasses; end class << self + # source://activesupport//lib/active_support/descendants_tracker.rb#24 def clear; end + + # source://activesupport//lib/active_support/descendants_tracker.rb#18 def descendants(klass); end + + # source://activesupport//lib/active_support/descendants_tracker.rb#12 def direct_descendants(klass); end + + # This is the only method that is not thread safe, but is only ever called + # during the eager loading phase. + # + # source://activesupport//lib/active_support/descendants_tracker.rb#40 def store_inherited(klass, descendant); end + + # source://activesupport//lib/active_support/descendants_tracker.rb#12 def subclasses(klass); end private + # source://activesupport//lib/active_support/descendants_tracker.rb#45 def accumulate_descendants(klass, acc); end end end +# DescendantsArray is an array that contains weak references to classes. +# +# source://activesupport//lib/active_support/descendants_tracker.rb#70 class ActiveSupport::DescendantsTracker::DescendantsArray include ::Enumerable + # @return [DescendantsArray] a new instance of DescendantsArray + # + # source://activesupport//lib/active_support/descendants_tracker.rb#73 def initialize; end + # source://activesupport//lib/active_support/descendants_tracker.rb#81 def <<(klass); end + + # source://activesupport//lib/active_support/descendants_tracker.rb#99 def cleanup!; end + + # source://activesupport//lib/active_support/descendants_tracker.rb#85 def each; end + + # source://activesupport//lib/active_support/descendants_tracker.rb#95 def refs_size; end + + # source://activesupport//lib/active_support/descendants_tracker.rb#103 def reject!; end private + # source://activesupport//lib/active_support/descendants_tracker.rb#77 def initialize_copy(orig); end end +# source://activesupport//lib/active_support/digest.rb#6 class ActiveSupport::Digest class << self + # source://activesupport//lib/active_support/digest.rb#8 def hash_digest_class; end + + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/digest.rb#12 def hash_digest_class=(klass); end + + # source://activesupport//lib/active_support/digest.rb#17 def hexdigest(arg); end end end +# Provides accurate date and time measurements using Date#advance and +# Time#advance, respectively. It mainly supports the methods on Numeric. +# +# 1.month.ago # equivalent to Time.now.advance(months: -1) +# +# source://activesupport//lib/active_support/duration.rb#13 class ActiveSupport::Duration + # @return [Duration] a new instance of Duration + # + # source://activesupport//lib/active_support/duration.rb#213 def initialize(value, parts); end + # Returns the modulo of this Duration by another Duration or Numeric. + # Numeric values are treated as seconds. + # + # source://activesupport//lib/active_support/duration.rb#285 def %(other); end + + # Multiplies this Duration by a Numeric and returns a new Duration. + # + # source://activesupport//lib/active_support/duration.rb#260 def *(other); end + + # Adds another Duration or a Numeric to this Duration. Numeric values + # are treated as seconds. + # + # source://activesupport//lib/active_support/duration.rb#241 def +(other); end + + # source://activesupport//lib/active_support/duration.rb#299 def +@; end + + # Subtracts another Duration or a Numeric from this Duration. Numeric + # values are treated as seconds. + # + # source://activesupport//lib/active_support/duration.rb#255 def -(other); end + + # source://activesupport//lib/active_support/duration.rb#295 def -@; end + + # Divides this Duration by a Numeric and returns a new Duration. + # + # source://activesupport//lib/active_support/duration.rb#271 def /(other); end + + # Compares one Duration with another or a Numeric to this Duration. + # Numeric values are treated as seconds. + # + # source://activesupport//lib/active_support/duration.rb#231 def <=>(other); end + + # Returns +true+ if +other+ is also a Duration instance with the + # same +value+, or if other == value. + # + # source://activesupport//lib/active_support/duration.rb#314 def ==(other); end + + # Calculates a new Time or Date that is as far in the future + # as this Duration represents. + # + # source://activesupport//lib/active_support/duration.rb#409 def after(time = T.unsafe(nil)); end + + # Calculates a new Time or Date that is as far in the past + # as this Duration represents. + # + # source://activesupport//lib/active_support/duration.rb#417 def ago(time = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/duration.rb#432 def as_json(options = T.unsafe(nil)); end + + # Calculates a new Time or Date that is as far in the past + # as this Duration represents. + # + # source://activesupport//lib/active_support/duration.rb#417 def before(time = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/duration.rb#218 def coerce(other); end + + # source://activesupport//lib/active_support/duration.rb#440 def encode_with(coder); end + + # Returns +true+ if +other+ is also a Duration instance, which has the + # same parts as this one. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/duration.rb#399 def eql?(other); end + + # Calculates a new Time or Date that is as far in the future + # as this Duration represents. + # + # source://activesupport//lib/active_support/duration.rb#409 def from_now(time = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/duration.rb#403 def hash; end + + # Returns the amount of days a duration covers as a float + # + # 12.hours.in_days # => 0.5 + # + # source://activesupport//lib/active_support/duration.rb#372 def in_days; end + + # Returns the amount of hours a duration covers as a float + # + # 1.day.in_hours # => 24.0 + # + # source://activesupport//lib/active_support/duration.rb#365 def in_hours; end + + # Returns the amount of minutes a duration covers as a float + # + # 1.day.in_minutes # => 1440.0 + # + # source://activesupport//lib/active_support/duration.rb#358 def in_minutes; end + + # Returns the amount of months a duration covers as a float + # + # 9.weeks.in_months # => 2.07 + # + # source://activesupport//lib/active_support/duration.rb#386 def in_months; end + + # Returns the number of seconds that this Duration represents. + # + # 1.minute.to_i # => 60 + # 1.hour.to_i # => 3600 + # 1.day.to_i # => 86400 + # + # Note that this conversion makes some assumptions about the + # duration of some periods, e.g. months are always 1/12 of year + # and years are 365.2425 days: + # + # # equivalent to (1.year / 12).to_i + # 1.month.to_i # => 2629746 + # + # # equivalent to 365.2425.days.to_i + # 1.year.to_i # => 31556952 + # + # In such cases, Ruby's core + # Date[https://ruby-doc.org/stdlib/libdoc/date/rdoc/Date.html] and + # Time[https://ruby-doc.org/stdlib/libdoc/time/rdoc/Time.html] should be used for precision + # date and time arithmetic. + # + # source://activesupport//lib/active_support/duration.rb#350 def in_seconds; end + + # Returns the amount of weeks a duration covers as a float + # + # 2.months.in_weeks # => 8.696 + # + # source://activesupport//lib/active_support/duration.rb#379 def in_weeks; end + + # Returns the amount of years a duration covers as a float + # + # 30.days.in_years # => 0.082 + # + # source://activesupport//lib/active_support/duration.rb#393 def in_years; end + + # source://activesupport//lib/active_support/duration.rb#436 def init_with(coder); end + + # source://activesupport//lib/active_support/duration.rb#423 def inspect; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/duration.rb#308 def instance_of?(klass); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/duration.rb#303 def is_a?(klass); end + + # Build ISO 8601 Duration string for this duration. + # The +precision+ parameter can be used to limit seconds' precision of duration. + # + # source://activesupport//lib/active_support/duration.rb#446 def iso8601(precision: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/duration.rb#303 def kind_of?(klass); end + + # Returns the value of attribute parts. + # + # source://activesupport//lib/active_support/duration.rb#127 def parts; end + + # Sets the attribute parts + # + # @param value the value to set the attribute parts to. + # + # source://activesupport//lib/active_support/duration.rb#127 def parts=(_arg0); end + + # Calculates a new Time or Date that is as far in the future + # as this Duration represents. + # + # source://activesupport//lib/active_support/duration.rb#409 def since(time = T.unsafe(nil)); end + + # Returns the number of seconds that this Duration represents. + # + # 1.minute.to_i # => 60 + # 1.hour.to_i # => 3600 + # 1.day.to_i # => 86400 + # + # Note that this conversion makes some assumptions about the + # duration of some periods, e.g. months are always 1/12 of year + # and years are 365.2425 days: + # + # # equivalent to (1.year / 12).to_i + # 1.month.to_i # => 2629746 + # + # # equivalent to 365.2425.days.to_i + # 1.year.to_i # => 31556952 + # + # In such cases, Ruby's core + # Date[https://ruby-doc.org/stdlib/libdoc/date/rdoc/Date.html] and + # Time[https://ruby-doc.org/stdlib/libdoc/time/rdoc/Time.html] should be used for precision + # date and time arithmetic. + # + # source://activesupport//lib/active_support/duration.rb#350 def to_i; end + + # Returns the amount of seconds a duration covers as a string. + # For more information check to_i method. + # + # 1.day.to_s # => "86400" + # + # source://activesupport//lib/active_support/duration.rb#326 def to_s; end + + # Calculates a new Time or Date that is as far in the past + # as this Duration represents. + # + # source://activesupport//lib/active_support/duration.rb#417 def until(time = T.unsafe(nil)); end + + # Returns the value of attribute value. + # + # source://activesupport//lib/active_support/duration.rb#127 def value; end + + # Sets the attribute value + # + # @param value the value to set the attribute value to. + # + # source://activesupport//lib/active_support/duration.rb#127 def value=(_arg0); end private + # source://activesupport//lib/active_support/duration.rb#477 def method_missing(method, *args, &block); end + + # @raise [TypeError] + # + # source://activesupport//lib/active_support/duration.rb#481 def raise_type_error(other); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/duration.rb#473 def respond_to_missing?(method, _); end + + # source://activesupport//lib/active_support/duration.rb#451 def sum(sign, time = T.unsafe(nil)); end class << self + # source://activesupport//lib/active_support/duration.rb#143 def ===(other); end + + # Creates a new Duration from a seconds value that is converted + # to the individual parts: + # + # ActiveSupport::Duration.build(31556952).parts # => {:years=>1} + # ActiveSupport::Duration.build(2716146).parts # => {:months=>1, :days=>1} + # + # source://activesupport//lib/active_support/duration.rb#183 def build(value); end + + # source://activesupport//lib/active_support/duration.rb#161 def days(value); end + + # source://activesupport//lib/active_support/duration.rb#157 def hours(value); end + + # source://activesupport//lib/active_support/duration.rb#153 def minutes(value); end + + # source://activesupport//lib/active_support/duration.rb#169 def months(value); end + + # Creates a new Duration from string formatted according to ISO 8601 Duration. + # + # See {ISO 8601}[https://en.wikipedia.org/wiki/ISO_8601#Durations] for more information. + # This method allows negative parts to be present in pattern. + # If invalid string is provided, it will raise +ActiveSupport::Duration::ISO8601Parser::ParsingError+. + # + # source://activesupport//lib/active_support/duration.rb#138 def parse(iso8601duration); end + + # source://activesupport//lib/active_support/duration.rb#149 def seconds(value); end + + # source://activesupport//lib/active_support/duration.rb#165 def weeks(value); end + + # source://activesupport//lib/active_support/duration.rb#173 def years(value); end private + # source://activesupport//lib/active_support/duration.rb#206 def calculate_total_seconds(parts); end end end +# Parses a string formatted according to ISO 8601 Duration into the hash. +# +# See {ISO 8601}[https://en.wikipedia.org/wiki/ISO_8601#Durations] for more information. +# +# This parser allows negative parts to be present in pattern. +# +# source://activesupport//lib/active_support/duration/iso8601_parser.rb#12 class ActiveSupport::Duration::ISO8601Parser + # @return [ISO8601Parser] a new instance of ISO8601Parser + # + # source://activesupport//lib/active_support/duration/iso8601_parser.rb#34 def initialize(string); end + # Returns the value of attribute mode. + # + # source://activesupport//lib/active_support/duration/iso8601_parser.rb#32 def mode; end + + # Sets the attribute mode + # + # @param value the value to set the attribute mode to. + # + # source://activesupport//lib/active_support/duration/iso8601_parser.rb#32 def mode=(_arg0); end + + # source://activesupport//lib/active_support/duration/iso8601_parser.rb#41 def parse!; end + + # Returns the value of attribute parts. + # + # source://activesupport//lib/active_support/duration/iso8601_parser.rb#31 def parts; end + + # Returns the value of attribute scanner. + # + # source://activesupport//lib/active_support/duration/iso8601_parser.rb#31 def scanner; end + + # Returns the value of attribute sign. + # + # source://activesupport//lib/active_support/duration/iso8601_parser.rb#32 def sign; end + + # Sets the attribute sign + # + # @param value the value to set the attribute sign to. + # + # source://activesupport//lib/active_support/duration/iso8601_parser.rb#32 def sign=(_arg0); end private + # @return [Boolean] + # + # source://activesupport//lib/active_support/duration/iso8601_parser.rb#83 def finished?; end + + # Parses number which can be a float with either comma or period. + # + # source://activesupport//lib/active_support/duration/iso8601_parser.rb#88 def number; end + + # @raise [ParsingError] + # + # source://activesupport//lib/active_support/duration/iso8601_parser.rb#96 def raise_parsing_error(reason = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/duration/iso8601_parser.rb#92 def scan(pattern); end + + # Checks for various semantic errors as stated in ISO 8601 standard. + # + # source://activesupport//lib/active_support/duration/iso8601_parser.rb#101 def validate!; end end +# source://activesupport//lib/active_support/duration/iso8601_parser.rb#17 ActiveSupport::Duration::ISO8601Parser::COMMA = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/duration/iso8601_parser.rb#22 ActiveSupport::Duration::ISO8601Parser::DATE_COMPONENT = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/duration/iso8601_parser.rb#28 ActiveSupport::Duration::ISO8601Parser::DATE_COMPONENTS = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/duration/iso8601_parser.rb#20 ActiveSupport::Duration::ISO8601Parser::DATE_MARKER = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/duration/iso8601_parser.rb#25 ActiveSupport::Duration::ISO8601Parser::DATE_TO_PART = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/duration/iso8601_parser.rb#16 ActiveSupport::Duration::ISO8601Parser::PERIOD = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/duration/iso8601_parser.rb#15 ActiveSupport::Duration::ISO8601Parser::PERIOD_OR_COMMA = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/duration/iso8601_parser.rb#13 class ActiveSupport::Duration::ISO8601Parser::ParsingError < ::ArgumentError; end + +# source://activesupport//lib/active_support/duration/iso8601_parser.rb#19 ActiveSupport::Duration::ISO8601Parser::SIGN_MARKER = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/duration/iso8601_parser.rb#23 ActiveSupport::Duration::ISO8601Parser::TIME_COMPONENT = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/duration/iso8601_parser.rb#29 ActiveSupport::Duration::ISO8601Parser::TIME_COMPONENTS = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/duration/iso8601_parser.rb#21 ActiveSupport::Duration::ISO8601Parser::TIME_MARKER = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/duration/iso8601_parser.rb#26 ActiveSupport::Duration::ISO8601Parser::TIME_TO_PART = T.let(T.unsafe(nil), Hash) +# Serializes duration to string according to ISO 8601 Duration format. +# +# source://activesupport//lib/active_support/duration/iso8601_serializer.rb#8 class ActiveSupport::Duration::ISO8601Serializer + # @return [ISO8601Serializer] a new instance of ISO8601Serializer + # + # source://activesupport//lib/active_support/duration/iso8601_serializer.rb#11 def initialize(duration, precision: T.unsafe(nil)); end + # Builds and returns output string. + # + # source://activesupport//lib/active_support/duration/iso8601_serializer.rb#17 def serialize; end private + # Return pair of duration's parts and whole duration sign. + # Parts are summarized (as they can become repetitive due to addition, etc). + # Zero parts are removed as not significant. + # If all parts are negative it will negate all of them and return minus as a sign. + # + # source://activesupport//lib/active_support/duration/iso8601_serializer.rb#41 def normalize; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/duration/iso8601_serializer.rb#54 def week_mixed_with_date?(parts); end end +# source://activesupport//lib/active_support/duration/iso8601_serializer.rb#9 ActiveSupport::Duration::ISO8601Serializer::DATE_COMPONENTS = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/duration.rb#125 ActiveSupport::Duration::PARTS = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/duration.rb#115 ActiveSupport::Duration::PARTS_IN_SECONDS = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/duration.rb#110 ActiveSupport::Duration::SECONDS_PER_DAY = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/duration.rb#109 ActiveSupport::Duration::SECONDS_PER_HOUR = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/duration.rb#108 ActiveSupport::Duration::SECONDS_PER_MINUTE = T.let(T.unsafe(nil), Integer) + +# 1/12 of a gregorian year +# +# source://activesupport//lib/active_support/duration.rb#112 ActiveSupport::Duration::SECONDS_PER_MONTH = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/duration.rb#111 ActiveSupport::Duration::SECONDS_PER_WEEK = T.let(T.unsafe(nil), Integer) + +# length of a gregorian year (365.2425 days) +# +# source://activesupport//lib/active_support/duration.rb#113 ActiveSupport::Duration::SECONDS_PER_YEAR = T.let(T.unsafe(nil), Integer) +# source://activesupport//lib/active_support/duration.rb#14 class ActiveSupport::Duration::Scalar < ::Numeric + # @return [Scalar] a new instance of Scalar + # + # source://activesupport//lib/active_support/duration.rb#18 def initialize(value); end + # source://activesupport//lib/active_support/duration.rb#84 def %(other); end + + # source://activesupport//lib/active_support/duration.rb#65 def *(other); end + + # source://activesupport//lib/active_support/duration.rb#40 def +(other); end + + # source://activesupport//lib/active_support/duration.rb#52 def -(other); end + + # source://activesupport//lib/active_support/duration.rb#26 def -@; end + + # source://activesupport//lib/active_support/duration.rb#76 def /(other); end + + # source://activesupport//lib/active_support/duration.rb#30 def <=>(other); end + + # source://activesupport//lib/active_support/duration.rb#22 def coerce(other); end - def to_f(*args, &block); end - def to_i(*args, &block); end - def to_s(*args, &block); end + + # source://activesupport//lib/active_support/duration.rb#16 + def to_f(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/duration.rb#16 + def to_i(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/duration.rb#16 + def to_s(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute value. + # + # source://activesupport//lib/active_support/duration.rb#15 def value; end private + # source://activesupport//lib/active_support/duration.rb#93 def calculate(op, other); end + + # @raise [TypeError] + # + # source://activesupport//lib/active_support/duration.rb#103 def raise_type_error(other); end end +# source://activesupport//lib/active_support/core_ext/range/each.rb#6 module ActiveSupport::EachTimeWithZone + # source://activesupport//lib/active_support/core_ext/range/each.rb#7 def each(&block); end + + # source://activesupport//lib/active_support/core_ext/range/each.rb#12 def step(n = T.unsafe(nil), &block); end private + # @raise [TypeError] + # + # source://activesupport//lib/active_support/core_ext/range/each.rb#18 def ensure_iteration_allowed; end end +# source://activesupport//lib/active_support/environment_inquirer.rb#6 class ActiveSupport::EnvironmentInquirer < ::ActiveSupport::StringInquirer + # @return [EnvironmentInquirer] a new instance of EnvironmentInquirer + # + # source://activesupport//lib/active_support/environment_inquirer.rb#8 def initialize(env); end def development?; end @@ -1227,1023 +4683,4481 @@ class ActiveSupport::EnvironmentInquirer < ::ActiveSupport::StringInquirer def test?; end end +# source://activesupport//lib/active_support/environment_inquirer.rb#7 ActiveSupport::EnvironmentInquirer::DEFAULT_ENVIRONMENTS = T.let(T.unsafe(nil), Array) +# source://activesupport//lib/active_support/execution_wrapper.rb#7 class ActiveSupport::ExecutionWrapper include ::ActiveSupport::Callbacks extend ::ActiveSupport::Callbacks::ClassMethods extend ::ActiveSupport::DescendantsTracker + # source://activesupport//lib/active_support/callbacks.rb#67 def __callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#67 def __callbacks?; end + + # source://activesupport//lib/active_support/callbacks.rb#835 def _complete_callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#835 def _run_callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#823 def _run_complete_callbacks(&block); end + + # source://activesupport//lib/active_support/callbacks.rb#823 def _run_run_callbacks(&block); end + + # Complete this in-flight execution. This method *must* be called + # exactly once on the result of any call to +run!+. + # + # Where possible, prefer +wrap+. + # + # source://activesupport//lib/active_support/execution_wrapper.rb#121 def complete!; end + + # source://activesupport//lib/active_support/execution_wrapper.rb#112 def run!; end private + # source://activesupport//lib/active_support/execution_wrapper.rb#128 def hook_state; end class << self + # source://activesupport//lib/active_support/callbacks.rb#67 def __callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#67 def __callbacks=(value); end + + # source://activesupport//lib/active_support/callbacks.rb#67 def __callbacks?; end + + # source://activesupport//lib/active_support/callbacks.rb#827 def _complete_callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#831 def _complete_callbacks=(value); end + + # source://activesupport//lib/active_support/callbacks.rb#827 def _run_callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#831 def _run_callbacks=(value); end + + # Returns the value of attribute active. + # + # source://activesupport//lib/active_support/execution_wrapper.rb#98 def active; end + + # Sets the attribute active + # + # @param value the value to set the attribute active to. + # + # source://activesupport//lib/active_support/execution_wrapper.rb#98 def active=(_arg0); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/execution_wrapper.rb#108 def active?; end + + # source://activesupport//lib/active_support/execution_wrapper.rb#101 def inherited(other); end + + # Register an object to be invoked during both the +run+ and + # +complete+ steps. + # + # +hook.complete+ will be passed the value returned from +hook.run+, + # and will only be invoked if +run+ has previously been called. + # (Mostly, this means it won't be invoked if an exception occurs in + # a preceding +to_run+ block; all ordinary +to_complete+ blocks are + # invoked in that situation.) + # + # source://activesupport//lib/active_support/execution_wrapper.rb#50 def register_hook(hook, outer: T.unsafe(nil)); end + + # Run this execution. + # + # Returns an instance, whose +complete!+ method *must* be invoked + # after the work has been performed. + # + # Where possible, prefer +wrap+. + # + # source://activesupport//lib/active_support/execution_wrapper.rb#66 def run!(reset: T.unsafe(nil)); end + + # source://activesupport//lib/active_support/execution_wrapper.rb#21 def to_complete(*args, &block); end + + # source://activesupport//lib/active_support/execution_wrapper.rb#17 def to_run(*args, &block); end + + # Perform the work in the supplied block as an execution. + # + # source://activesupport//lib/active_support/execution_wrapper.rb#86 def wrap; end end end +# source://activesupport//lib/active_support/execution_wrapper.rb#32 class ActiveSupport::ExecutionWrapper::CompleteHook < ::Struct + # source://activesupport//lib/active_support/execution_wrapper.rb#33 def after(target); end + + # source://activesupport//lib/active_support/execution_wrapper.rb#33 def before(target); end + + # Returns the value of attribute hook + # + # @return [Object] the current value of hook def hook; end + + # Sets the attribute hook + # + # @param value [Object] the value to set the attribute hook to. + # @return [Object] the newly set value def hook=(_); end class << self def [](*_arg0); end def inspect; end + def keyword_init?; end def members; end def new(*_arg0); end end end +# source://activesupport//lib/active_support/execution_wrapper.rb#10 ActiveSupport::ExecutionWrapper::Null = T.let(T.unsafe(nil), Object) +# source://activesupport//lib/active_support/execution_wrapper.rb#25 class ActiveSupport::ExecutionWrapper::RunHook < ::Struct + # source://activesupport//lib/active_support/execution_wrapper.rb#26 def before(target); end + + # Returns the value of attribute hook + # + # @return [Object] the current value of hook def hook; end + + # Sets the attribute hook + # + # @param value [Object] the value to set the attribute hook to. + # @return [Object] the newly set value def hook=(_); end class << self def [](*_arg0); end def inspect; end + def keyword_init?; end def members; end def new(*_arg0); end end end +# source://activesupport//lib/active_support/executor.rb#6 class ActiveSupport::Executor < ::ActiveSupport::ExecutionWrapper; end +# FileUpdateChecker specifies the API used by Rails to watch files +# and control reloading. The API depends on four methods: +# +# * +initialize+ which expects two parameters and one block as +# described below. +# +# * +updated?+ which returns a boolean if there were updates in +# the filesystem or not. +# +# * +execute+ which executes the given block on initialization +# and updates the latest watched files and timestamp. +# +# * +execute_if_updated+ which just executes the block if it was updated. +# +# After initialization, a call to +execute_if_updated+ must execute +# the block only if there was really a change in the filesystem. +# +# This class is used by Rails to reload the I18n framework whenever +# they are changed upon a new request. +# +# i18n_reloader = ActiveSupport::FileUpdateChecker.new(paths) do +# I18n.reload! +# end +# +# ActiveSupport::Reloader.to_prepare do +# i18n_reloader.execute_if_updated +# end +# +# source://activesupport//lib/active_support/file_update_checker.rb#33 class ActiveSupport::FileUpdateChecker + # It accepts two parameters on initialization. The first is an array + # of files and the second is an optional hash of directories. The hash must + # have directories as keys and the value is an array of extensions to be + # watched under that directory. + # + # This method must also receive a block that will be called once a path + # changes. The array of files and list of directories cannot be changed + # after FileUpdateChecker has been initialized. + # + # @return [FileUpdateChecker] a new instance of FileUpdateChecker + # + # source://activesupport//lib/active_support/file_update_checker.rb#42 def initialize(files, dirs = T.unsafe(nil), &block); end + # Executes the given block and updates the latest watched files and + # timestamp. + # + # source://activesupport//lib/active_support/file_update_checker.rb#80 def execute; end + + # Execute the block given if updated. + # + # source://activesupport//lib/active_support/file_update_checker.rb#90 def execute_if_updated; end + + # Check if any of the entries were updated. If so, the watched and/or + # updated_at values are cached until the block is executed via +execute+ + # or +execute_if_updated+. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/file_update_checker.rb#61 def updated?; end private + # source://activesupport//lib/active_support/file_update_checker.rb#156 def compile_ext(array); end + + # source://activesupport//lib/active_support/file_update_checker.rb#142 def compile_glob(hash); end + + # source://activesupport//lib/active_support/file_update_checker.rb#152 def escape(key); end + + # This method returns the maximum mtime of the files in +paths+, or +nil+ + # if the array is empty. + # + # Files with a mtime in the future are ignored. Such abnormal situation + # can happen for example if the user changes the clock by hand. It is + # healthy to consider this edge case because with mtimes in the future + # reloading is not triggered. + # + # source://activesupport//lib/active_support/file_update_checker.rb#120 def max_mtime(paths); end + + # source://activesupport//lib/active_support/file_update_checker.rb#109 def updated_at(paths); end + + # source://activesupport//lib/active_support/file_update_checker.rb#101 def watched; end end +# source://activesupport//lib/active_support/fork_tracker.rb#4 module ActiveSupport::ForkTracker class << self + # source://activesupport//lib/active_support/fork_tracker.rb#52 def after_fork(&block); end + + # source://activesupport//lib/active_support/fork_tracker.rb#36 def check!; end + + # source://activesupport//lib/active_support/fork_tracker.rb#43 def hook!; end + + # source://activesupport//lib/active_support/fork_tracker.rb#57 def unregister(callback); end end end +# source://activesupport//lib/active_support/fork_tracker.rb#5 module ActiveSupport::ForkTracker::CoreExt - def fork(*_arg0); end + # source://activesupport//lib/active_support/fork_tracker.rb#6 + def fork(*_arg0, **_arg1); end end +# source://activesupport//lib/active_support/fork_tracker.rb#22 module ActiveSupport::ForkTracker::CoreExtPrivate + include ::ActiveSupport::ForkTracker::CoreExt + private - def fork(*_arg0); end + # source://activesupport//lib/active_support/fork_tracker.rb#26 + def fork(*_arg0, **_arg1); end end +# A convenient wrapper for the zlib standard library that allows +# compression/decompression of strings with gzip. +# +# gzip = ActiveSupport::Gzip.compress('compress me!') +# # => "\x1F\x8B\b\x00o\x8D\xCDO\x00\x03K\xCE\xCF-(J-.V\xC8MU\x04\x00R>n\x83\f\x00\x00\x00" +# +# ActiveSupport::Gzip.decompress(gzip) +# # => "compress me!" +# +# source://activesupport//lib/active_support/gzip.rb#15 module ActiveSupport::Gzip class << self + # Compresses a string using gzip. + # + # source://activesupport//lib/active_support/gzip.rb#30 def compress(source, level = T.unsafe(nil), strategy = T.unsafe(nil)); end + + # Decompresses a gzipped string. + # + # source://activesupport//lib/active_support/gzip.rb#25 def decompress(source); end end end +# source://activesupport//lib/active_support/gzip.rb#16 class ActiveSupport::Gzip::Stream < ::StringIO + # @return [Stream] a new instance of Stream + # + # source://activesupport//lib/active_support/gzip.rb#17 def initialize(*_arg0); end + # source://activesupport//lib/active_support/gzip.rb#21 def close; end end +# Implements a hash where keys :foo and "foo" are considered +# to be the same. +# +# rgb = ActiveSupport::HashWithIndifferentAccess.new +# +# rgb[:black] = '#000000' +# rgb[:black] # => '#000000' +# rgb['black'] # => '#000000' +# +# rgb['white'] = '#FFFFFF' +# rgb[:white] # => '#FFFFFF' +# rgb['white'] # => '#FFFFFF' +# +# Internally symbols are mapped to strings when used as keys in the entire +# writing interface (calling []=, merge, etc). This +# mapping belongs to the public interface. For example, given: +# +# hash = ActiveSupport::HashWithIndifferentAccess.new(a: 1) +# +# You are guaranteed that the key is returned as a string: +# +# hash.keys # => ["a"] +# +# Technically other types of keys are accepted: +# +# hash = ActiveSupport::HashWithIndifferentAccess.new(a: 1) +# hash[0] = 0 +# hash # => {"a"=>1, 0=>0} +# +# but this class is intended for use cases where strings or symbols are the +# expected keys and it is convenient to understand both as the same. For +# example the +params+ hash in Ruby on Rails. +# +# Note that core extensions define Hash#with_indifferent_access: +# +# rgb = { black: '#000000', white: '#FFFFFF' }.with_indifferent_access +# +# which may be handy. +# +# To access this class outside of Rails, require the core extension with: +# +# require "active_support/core_ext/hash/indifferent_access" +# +# which will, in turn, require this file. +# +# source://activesupport//lib/active_support/hash_with_indifferent_access.rb#55 class ActiveSupport::HashWithIndifferentAccess < ::Hash + # @return [HashWithIndifferentAccess] a new instance of HashWithIndifferentAccess + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#68 def initialize(constructor = T.unsafe(nil)); end + # Same as Hash#[] where the key passed as argument can be + # either a string or a symbol: + # + # counters = ActiveSupport::HashWithIndifferentAccess.new + # counters[:foo] = 1 + # + # counters['foo'] # => 1 + # counters[:foo] # => 1 + # counters[:zoo] # => nil + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#164 def [](key); end + + # Assigns a new value to the hash: + # + # hash = ActiveSupport::HashWithIndifferentAccess.new + # hash[:key] = 'value' + # + # This value can be later fetched using either +:key+ or 'key'. + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#94 def []=(key, value); end + + # Same as Hash#assoc where the key passed as argument can be + # either a string or a symbol: + # + # counters = ActiveSupport::HashWithIndifferentAccess.new + # counters[:foo] = 1 + # + # counters.assoc('foo') # => ["foo", 1] + # counters.assoc(:foo) # => ["foo", 1] + # counters.assoc(:zoo) # => nil + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#177 def assoc(key); end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#355 def compact; end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#309 def deep_stringify_keys; end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#307 def deep_stringify_keys!; end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#314 def deep_symbolize_keys; end + + # Same as Hash#default where the key passed as argument can be + # either a string or a symbol: + # + # hash = ActiveSupport::HashWithIndifferentAccess.new(1) + # hash.default # => 1 + # + # hash = ActiveSupport::HashWithIndifferentAccess.new { |hash, key| key } + # hash.default # => nil + # hash.default('foo') # => 'foo' + # hash.default(:foo) # => 'foo' + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#219 def default(*args); end + + # Removes the specified key from the hash. + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#293 def delete(key); end + + # Same as Hash#dig where the key passed as argument can be + # either a string or a symbol: + # + # counters = ActiveSupport::HashWithIndifferentAccess.new + # counters[:foo] = { bar: 1 } + # + # counters.dig('foo', 'bar') # => 1 + # counters.dig(:foo, :bar) # => 1 + # counters.dig(:zoo) # => nil + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#204 def dig(*args); end + + # Returns a shallow copy of the hash. + # + # hash = ActiveSupport::HashWithIndifferentAccess.new({ a: { b: 'b' } }) + # dup = hash.dup + # dup[:a][:c] = 'c' + # + # hash[:a][:c] # => "c" + # dup[:a][:c] # => "c" + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#254 def dup; end + + # Returns a hash with indifferent access that includes everything except given keys. + # hash = { a: "x", b: "y", c: 10 }.with_indifferent_access + # hash.except(:a, "b") # => {c: 10}.with_indifferent_access + # hash # => { a: "x", b: "y", c: 10 }.with_indifferent_access + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#301 def except(*keys); end + + # Returns +true+ so that Array#extract_options! finds members of + # this class. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#56 def extractable_options?; end + + # Same as Hash#fetch where the key passed as argument can be + # either a string or a symbol: + # + # counters = ActiveSupport::HashWithIndifferentAccess.new + # counters[:foo] = 1 + # + # counters.fetch('foo') # => 1 + # counters.fetch(:bar, 0) # => 0 + # counters.fetch(:bar) { |key| 0 } # => 0 + # counters.fetch(:zoo) # => KeyError: key not found: "zoo" + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#191 def fetch(key, *extras); end + + # Returns an array of the values at the specified indices, but also + # raises an exception when one of the keys can't be found. + # + # hash = ActiveSupport::HashWithIndifferentAccess.new + # hash[:a] = 'x' + # hash[:b] = 'y' + # hash.fetch_values('a', 'b') # => ["x", "y"] + # hash.fetch_values('a', 'c') { |key| 'z' } # => ["x", "z"] + # hash.fetch_values('a', 'c') # => KeyError: key not found: "c" + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#242 def fetch_values(*indices, &block); end + + # Checks the hash for a key matching the argument passed in: + # + # hash = ActiveSupport::HashWithIndifferentAccess.new + # hash['key'] = 'value' + # hash.key?(:key) # => true + # hash.key?('key') # => true + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#147 def has_key?(key); end + + # Checks the hash for a key matching the argument passed in: + # + # hash = ActiveSupport::HashWithIndifferentAccess.new + # hash['key'] = 'value' + # hash.key?(:key) # => true + # hash.key?('key') # => true + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#147 def include?(key); end + + # Checks the hash for a key matching the argument passed in: + # + # hash = ActiveSupport::HashWithIndifferentAccess.new + # hash['key'] = 'value' + # hash.key?(:key) # => true + # hash.key?('key') # => true + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#147 def key?(key); end + + # Checks the hash for a key matching the argument passed in: + # + # hash = ActiveSupport::HashWithIndifferentAccess.new + # hash['key'] = 'value' + # hash.key?(:key) # => true + # hash.key?('key') # => true + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#147 def member?(key); end + + # This method has the same semantics of +update+, except it does not + # modify the receiver but rather returns a new hash with indifferent + # access with the result of the merge. + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#263 def merge(*hashes, &block); end + + # Updates the receiver in-place, merging in the hashes passed as arguments: + # + # hash_1 = ActiveSupport::HashWithIndifferentAccess.new + # hash_1[:key] = 'value' + # + # hash_2 = ActiveSupport::HashWithIndifferentAccess.new + # hash_2[:key] = 'New Value!' + # + # hash_1.update(hash_2) # => {"key"=>"New Value!"} + # + # hash = ActiveSupport::HashWithIndifferentAccess.new + # hash.update({ "a" => 1 }, { "b" => 2 }) # => { "a" => 1, "b" => 2 } + # + # The arguments can be either an + # ActiveSupport::HashWithIndifferentAccess or a regular +Hash+. + # In either case the merge respects the semantics of indifferent access. + # + # If the argument is a regular hash with keys +:key+ and "key" only one + # of the values end up in the receiver, but which one is unspecified. + # + # When given a block, the value for duplicated keys will be determined + # by the result of invoking the block with the duplicated key, the value + # in the receiver, and the value in +other_hash+. The rules for duplicated + # keys follow the semantics of indifferent access: + # + # hash_1[:key] = 10 + # hash_2['key'] = 12 + # hash_1.update(hash_2) { |key, old, new| old + new } # => {"key"=>22} + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#128 def merge!(*other_hashes, &block); end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#64 def nested_under_indifferent_access; end + def regular_update(*_arg0); end def regular_writer(_arg0, _arg1); end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#322 def reject(*args, &block); end + + # Replaces the contents of this hash with other_hash. + # + # h = { "a" => 100, "b" => 200 } + # h.replace({ "c" => 300, "d" => 400 }) # => {"c"=>300, "d"=>400} + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#288 def replace(other_hash); end + + # Like +merge+ but the other way around: Merges the receiver into the + # argument and returns a new hash with indifferent access as result: + # + # hash = ActiveSupport::HashWithIndifferentAccess.new + # hash['a'] = nil + # hash.reverse_merge(a: 0, b: 1) # => {"a"=>nil, "b"=>1} + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#273 def reverse_merge(other_hash); end + + # Same semantics as +reverse_merge+ but modifies the receiver in-place. + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#279 def reverse_merge!(other_hash); end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#317 def select(*args, &block); end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#345 def slice(*keys); end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#350 def slice!(*keys); end + + # Assigns a new value to the hash: + # + # hash = ActiveSupport::HashWithIndifferentAccess.new + # hash[:key] = 'value' + # + # This value can be later fetched using either +:key+ or 'key'. + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#94 def store(key, value); end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#308 def stringify_keys; end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#306 def stringify_keys!; end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#312 def symbolize_keys; end + + # Convert to a regular hash with string keys. + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#360 def to_hash; end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#312 def to_options; end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#315 def to_options!; end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#332 def transform_keys(*args, &block); end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#337 def transform_keys!; end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#327 def transform_values(*args, &block); end + + # Updates the receiver in-place, merging in the hashes passed as arguments: + # + # hash_1 = ActiveSupport::HashWithIndifferentAccess.new + # hash_1[:key] = 'value' + # + # hash_2 = ActiveSupport::HashWithIndifferentAccess.new + # hash_2[:key] = 'New Value!' + # + # hash_1.update(hash_2) # => {"key"=>"New Value!"} + # + # hash = ActiveSupport::HashWithIndifferentAccess.new + # hash.update({ "a" => 1 }, { "b" => 2 }) # => { "a" => 1, "b" => 2 } + # + # The arguments can be either an + # ActiveSupport::HashWithIndifferentAccess or a regular +Hash+. + # In either case the merge respects the semantics of indifferent access. + # + # If the argument is a regular hash with keys +:key+ and "key" only one + # of the values end up in the receiver, but which one is unspecified. + # + # When given a block, the value for duplicated keys will be determined + # by the result of invoking the block with the duplicated key, the value + # in the receiver, and the value in +other_hash+. The rules for duplicated + # keys follow the semantics of indifferent access: + # + # hash_1[:key] = 10 + # hash_2['key'] = 12 + # hash_1.update(hash_2) { |key, old, new| old + new } # => {"key"=>22} + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#128 def update(*other_hashes, &block); end + + # Returns an array of the values at the specified indices: + # + # hash = ActiveSupport::HashWithIndifferentAccess.new + # hash[:a] = 'x' + # hash[:b] = 'y' + # hash.values_at('a', 'b') # => ["x", "y"] + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#229 def values_at(*keys); end + + # Like +merge+ but the other way around: Merges the receiver into the + # argument and returns a new hash with indifferent access as result: + # + # hash = ActiveSupport::HashWithIndifferentAccess.new + # hash['a'] = nil + # hash.reverse_merge(a: 0, b: 1) # => {"a"=>nil, "b"=>1} + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#273 def with_defaults(other_hash); end + + # Same semantics as +reverse_merge+ but modifies the receiver in-place. + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#279 def with_defaults!(other_hash); end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#60 def with_indifferent_access; end + + # Returns a hash with indifferent access that includes everything except given keys. + # hash = { a: "x", b: "y", c: 10 }.with_indifferent_access + # hash.except(:a, "b") # => {c: 10}.with_indifferent_access + # hash # => { a: "x", b: "y", c: 10 }.with_indifferent_access + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#301 def without(*keys); end private + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#372 def convert_key(key); end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#381 def convert_value(value, conversion: T.unsafe(nil)); end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#398 def set_defaults(target); end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#406 def update_with_single_argument(other_hash, block); end class << self + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#81 def [](*args); end end end +# source://activesupport//lib/active_support/core_ext/range/include_time_with_zone.rb#7 module ActiveSupport::IncludeTimeWithZone + # Extends the default Range#include? to support ActiveSupport::TimeWithZone. + # + # (1.hour.ago..1.hour.from_now).include?(Time.current) # => true + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/range/include_time_with_zone.rb#12 def include?(value); end end +# The Inflector transforms words from singular to plural, class names to table +# names, modularized class names to ones without, and class names to foreign +# keys. The default inflections for pluralization, singularization, and +# uncountable words are kept in inflections.rb. +# +# The Rails core team has stated patches for the inflections library will not +# be accepted in order to avoid breaking legacy applications which may be +# relying on errant inflections. If you discover an incorrect inflection and +# require it for your application or wish to define rules for languages other +# than English, please correct or add them yourself (explained below). +# +# source://activesupport//lib/active_support/inflector/inflections.rb#7 module ActiveSupport::Inflector extend ::ActiveSupport::Inflector + # Converts strings to UpperCamelCase. + # If the +uppercase_first_letter+ parameter is set to false, then produces + # lowerCamelCase. + # + # Also converts '/' to '::' which is useful for converting + # paths to namespaces. + # + # camelize('active_model') # => "ActiveModel" + # camelize('active_model', false) # => "activeModel" + # camelize('active_model/errors') # => "ActiveModel::Errors" + # camelize('active_model/errors', false) # => "activeModel::Errors" + # + # As a rule of thumb you can think of +camelize+ as the inverse of + # #underscore, though there are cases where that does not hold: + # + # camelize(underscore('SSLError')) # => "SslError" + # + # source://activesupport//lib/active_support/inflector/methods.rb#69 def camelize(term, uppercase_first_letter = T.unsafe(nil)); end + + # Creates a class name from a plural table name like Rails does for table + # names to models. Note that this returns a string and not a Class (To + # convert to an actual class follow +classify+ with #constantize). + # + # classify('ham_and_eggs') # => "HamAndEgg" + # classify('posts') # => "Post" + # + # Singular names are not handled correctly: + # + # classify('calculus') # => "Calculu" + # + # source://activesupport//lib/active_support/inflector/methods.rb#200 def classify(table_name); end + + # Tries to find a constant with the name specified in the argument string. + # + # constantize('Module') # => Module + # constantize('Foo::Bar') # => Foo::Bar + # + # The name is assumed to be the one of a top-level constant, no matter + # whether it starts with "::" or not. No lexical context is taken into + # account: + # + # C = 'outside' + # module M + # C = 'inside' + # C # => 'inside' + # constantize('C') # => 'outside', same as ::C + # end + # + # NameError is raised when the name is not in CamelCase or the constant is + # unknown. + # + # source://activesupport//lib/active_support/inflector/methods.rb#271 def constantize(camel_cased_word); end + + # Replaces underscores with dashes in the string. + # + # dasherize('puni_puni') # => "puni-puni" + # + # source://activesupport//lib/active_support/inflector/methods.rb#208 def dasherize(underscored_word); end + + # Removes the rightmost segment from the constant expression in the string. + # + # deconstantize('Net::HTTP') # => "Net" + # deconstantize('::Net::HTTP') # => "::Net" + # deconstantize('String') # => "" + # deconstantize('::String') # => "" + # deconstantize('') # => "" + # + # See also #demodulize. + # + # source://activesupport//lib/active_support/inflector/methods.rb#238 def deconstantize(path); end + + # Removes the module part from the expression in the string. + # + # demodulize('ActiveSupport::Inflector::Inflections') # => "Inflections" + # demodulize('Inflections') # => "Inflections" + # demodulize('::Inflections') # => "Inflections" + # demodulize('') # => "" + # + # See also #deconstantize. + # + # source://activesupport//lib/active_support/inflector/methods.rb#220 def demodulize(path); end + + # Creates a foreign key name from a class name. + # +separate_class_name_and_id_with_underscore+ sets whether + # the method should put '_' between the name and 'id'. + # + # foreign_key('Message') # => "message_id" + # foreign_key('Message', false) # => "messageid" + # foreign_key('Admin::Post') # => "post_id" + # + # source://activesupport//lib/active_support/inflector/methods.rb#249 def foreign_key(class_name, separate_class_name_and_id_with_underscore = T.unsafe(nil)); end + + # Tweaks an attribute name for display to end users. + # + # Specifically, performs these transformations: + # + # * Applies human inflection rules to the argument. + # * Deletes leading underscores, if any. + # * Removes a "_id" suffix if present. + # * Replaces underscores with spaces, if any. + # * Downcases all words except acronyms. + # * Capitalizes the first word. + # The capitalization of the first word can be turned off by setting the + # +:capitalize+ option to false (default is true). + # + # The trailing '_id' can be kept and capitalized by setting the + # optional parameter +keep_id_suffix+ to true (default is false). + # + # humanize('employee_salary') # => "Employee salary" + # humanize('author_id') # => "Author" + # humanize('author_id', capitalize: false) # => "author" + # humanize('_id') # => "Id" + # humanize('author_id', keep_id_suffix: true) # => "Author Id" + # + # If "SSL" was defined to be an acronym: + # + # humanize('ssl_error') # => "SSL error" + # + # source://activesupport//lib/active_support/inflector/methods.rb#128 def humanize(lower_case_and_underscored_word, capitalize: T.unsafe(nil), keep_id_suffix: T.unsafe(nil)); end + + # Yields a singleton instance of Inflector::Inflections so you can specify + # additional inflector rules. If passed an optional locale, rules for other + # languages can be specified. If not specified, defaults to :en. + # Only rules for English are provided. + # + # ActiveSupport::Inflector.inflections(:en) do |inflect| + # inflect.uncountable 'rails' + # end + # + # source://activesupport//lib/active_support/inflector/inflections.rb#247 def inflections(locale = T.unsafe(nil)); end + + # Returns the suffix that should be added to a number to denote the position + # in an ordered sequence such as 1st, 2nd, 3rd, 4th. + # + # ordinal(1) # => "st" + # ordinal(2) # => "nd" + # ordinal(1002) # => "nd" + # ordinal(1003) # => "rd" + # ordinal(-11) # => "th" + # ordinal(-1021) # => "st" + # + # source://activesupport//lib/active_support/inflector/methods.rb#347 def ordinal(number); end + + # Turns a number into an ordinal string used to denote the position in an + # ordered sequence such as 1st, 2nd, 3rd, 4th. + # + # ordinalize(1) # => "1st" + # ordinalize(2) # => "2nd" + # ordinalize(1002) # => "1002nd" + # ordinalize(1003) # => "1003rd" + # ordinalize(-11) # => "-11th" + # ordinalize(-1021) # => "-1021st" + # + # source://activesupport//lib/active_support/inflector/methods.rb#360 def ordinalize(number); end + + # Replaces special characters in a string so that it may be used as part of + # a 'pretty' URL. + # + # parameterize("Donald E. Knuth") # => "donald-e-knuth" + # parameterize("^très|Jolie-- ") # => "tres-jolie" + # + # To use a custom separator, override the +separator+ argument. + # + # parameterize("Donald E. Knuth", separator: '_') # => "donald_e_knuth" + # parameterize("^très|Jolie__ ", separator: '_') # => "tres_jolie" + # + # To preserve the case of the characters in a string, use the +preserve_case+ argument. + # + # parameterize("Donald E. Knuth", preserve_case: true) # => "Donald-E-Knuth" + # parameterize("^très|Jolie-- ", preserve_case: true) # => "tres-Jolie" + # + # It preserves dashes and underscores unless they are used as separators: + # + # parameterize("^très|Jolie__ ") # => "tres-jolie__" + # parameterize("^très|Jolie-- ", separator: "_") # => "tres_jolie--" + # parameterize("^très_Jolie-- ", separator: ".") # => "tres_jolie--" + # + # If the optional parameter +locale+ is specified, + # the word will be parameterized as a word of that language. + # By default, this parameter is set to nil and it will use + # the configured I18n.locale. + # + # source://activesupport//lib/active_support/inflector/transliterate.rb#121 def parameterize(string, separator: T.unsafe(nil), preserve_case: T.unsafe(nil), locale: T.unsafe(nil)); end + + # Returns the plural form of the word in the string. + # + # If passed an optional +locale+ parameter, the word will be + # pluralized using rules defined for that language. By default, + # this parameter is set to :en. + # + # pluralize('post') # => "posts" + # pluralize('octopus') # => "octopi" + # pluralize('sheep') # => "sheep" + # pluralize('words') # => "words" + # pluralize('CamelOctopus') # => "CamelOctopi" + # pluralize('ley', :es) # => "leyes" + # + # source://activesupport//lib/active_support/inflector/methods.rb#32 def pluralize(word, locale = T.unsafe(nil)); end + + # Tries to find a constant with the name specified in the argument string. + # + # safe_constantize('Module') # => Module + # safe_constantize('Foo::Bar') # => Foo::Bar + # + # The name is assumed to be the one of a top-level constant, no matter + # whether it starts with "::" or not. No lexical context is taken into + # account: + # + # C = 'outside' + # module M + # C = 'inside' + # C # => 'inside' + # safe_constantize('C') # => 'outside', same as ::C + # end + # + # +nil+ is returned when the name is not in CamelCase or the constant (or + # part of it) is unknown. + # + # safe_constantize('blargle') # => nil + # safe_constantize('UnknownModule') # => nil + # safe_constantize('UnknownModule::Foo::Bar') # => nil + # + # source://activesupport//lib/active_support/inflector/methods.rb#328 def safe_constantize(camel_cased_word); end + + # The reverse of #pluralize, returns the singular form of a word in a + # string. + # + # If passed an optional +locale+ parameter, the word will be + # singularized using rules defined for that language. By default, + # this parameter is set to :en. + # + # singularize('posts') # => "post" + # singularize('octopi') # => "octopus" + # singularize('sheep') # => "sheep" + # singularize('word') # => "word" + # singularize('CamelOctopi') # => "CamelOctopus" + # singularize('leyes', :es) # => "ley" + # + # source://activesupport//lib/active_support/inflector/methods.rb#49 def singularize(word, locale = T.unsafe(nil)); end + + # Creates the name of a table like Rails does for models to table names. + # This method uses the #pluralize method on the last word in the string. + # + # tableize('RawScaledScorer') # => "raw_scaled_scorers" + # tableize('ham_and_egg') # => "ham_and_eggs" + # tableize('fancyCategory') # => "fancy_categories" + # + # source://activesupport//lib/active_support/inflector/methods.rb#186 def tableize(class_name); end + + # Capitalizes all the words and replaces some characters in the string to + # create a nicer looking title. +titleize+ is meant for creating pretty + # output. It is not used in the Rails internals. + # + # The trailing '_id','Id'.. can be kept and capitalized by setting the + # optional parameter +keep_id_suffix+ to true. + # By default, this parameter is false. + # + # +titleize+ is also aliased as +titlecase+. + # + # titleize('man from the boondocks') # => "Man From The Boondocks" + # titleize('x-men: the last stand') # => "X Men: The Last Stand" + # titleize('TheManWithoutAPast') # => "The Man Without A Past" + # titleize('raiders_of_the_lost_ark') # => "Raiders Of The Lost Ark" + # titleize('string_ending_with_id', keep_id_suffix: true) # => "String Ending With Id" + # + # source://activesupport//lib/active_support/inflector/methods.rb#174 def titleize(word, keep_id_suffix: T.unsafe(nil)); end + + # Replaces non-ASCII characters with an ASCII approximation, or if none + # exists, a replacement character which defaults to "?". + # + # transliterate('Ærøskøbing') + # # => "AEroskobing" + # + # Default approximations are provided for Western/Latin characters, + # e.g, "ø", "ñ", "é", "ß", etc. + # + # This method is I18n aware, so you can set up custom approximations for a + # locale. This can be useful, for example, to transliterate German's "ü" + # and "ö" to "ue" and "oe", or to add support for transliterating Russian + # to ASCII. + # + # In order to make your custom transliterations available, you must set + # them as the i18n.transliterate.rule i18n key: + # + # # Store the transliterations in locales/de.yml + # i18n: + # transliterate: + # rule: + # ü: "ue" + # ö: "oe" + # + # # Or set them using Ruby + # I18n.backend.store_translations(:de, i18n: { + # transliterate: { + # rule: { + # 'ü' => 'ue', + # 'ö' => 'oe' + # } + # } + # }) + # + # The value for i18n.transliterate.rule can be a simple Hash that + # maps characters to ASCII approximations as shown above, or, for more + # complex requirements, a Proc: + # + # I18n.backend.store_translations(:de, i18n: { + # transliterate: { + # rule: ->(string) { MyTransliterator.transliterate(string) } + # } + # }) + # + # Now you can have different transliterations for each locale: + # + # transliterate('Jürgen', locale: :en) + # # => "Jurgen" + # + # transliterate('Jürgen', locale: :de) + # # => "Juergen" + # + # Transliteration is restricted to UTF-8, US-ASCII and GB18030 strings + # Other encodings will raise an ArgumentError. + # + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/inflector/transliterate.rb#64 def transliterate(string, replacement = T.unsafe(nil), locale: T.unsafe(nil)); end + + # Makes an underscored, lowercase form from the expression in the string. + # + # Changes '::' to '/' to convert namespaces to paths. + # + # underscore('ActiveModel') # => "active_model" + # underscore('ActiveModel::Errors') # => "active_model/errors" + # + # As a rule of thumb you can think of +underscore+ as the inverse of + # #camelize, though there are cases where that does not hold: + # + # camelize(underscore('SSLError')) # => "SslError" + # + # source://activesupport//lib/active_support/inflector/methods.rb#92 def underscore(camel_cased_word); end + + # Converts just the first character to uppercase. + # + # upcase_first('what a Lovely Day') # => "What a Lovely Day" + # upcase_first('w') # => "W" + # upcase_first('') # => "" + # + # source://activesupport//lib/active_support/inflector/methods.rb#155 def upcase_first(string); end private + # Applies inflection rules for +singularize+ and +pluralize+. + # + # If passed an optional +locale+ parameter, the uncountables will be + # found for that locale. + # + # apply_inflections('post', inflections.plurals, :en) # => "posts" + # apply_inflections('posts', inflections.singulars, :en) # => "post" + # + # source://activesupport//lib/active_support/inflector/methods.rb#389 def apply_inflections(word, rules, locale = T.unsafe(nil)); end + + # Mounts a regular expression, returned as a string to ease interpolation, + # that will match part by part the given constant. + # + # const_regexp("Foo::Bar::Baz") # => "Foo(::Bar(::Baz)?)?" + # const_regexp("::") # => "::" + # + # source://activesupport//lib/active_support/inflector/methods.rb#370 def const_regexp(camel_cased_word); end end +# source://activesupport//lib/active_support/inflector/transliterate.rb#8 ActiveSupport::Inflector::ALLOWED_ENCODINGS_FOR_TRANSLITERATE = T.let(T.unsafe(nil), Array) +# A singleton instance of this class is yielded by Inflector.inflections, +# which can then be used to specify additional inflection rules. If passed +# an optional locale, rules for other languages can be specified. The +# default locale is :en. Only rules for English are provided. +# +# ActiveSupport::Inflector.inflections(:en) do |inflect| +# inflect.plural /^(ox)$/i, '\1\2en' +# inflect.singular /^(ox)en/i, '\1' +# +# inflect.irregular 'octopus', 'octopi' +# +# inflect.uncountable 'equipment' +# end +# +# New rules are added at the top. So in the example above, the irregular +# rule for octopus will now be the first of the pluralization and +# singularization rules that is runs. This guarantees that your rules run +# before any of the rules that may already have been loaded. +# +# source://activesupport//lib/active_support/inflector/inflections.rb#28 class ActiveSupport::Inflector::Inflections + # @return [Inflections] a new instance of Inflections + # + # source://activesupport//lib/active_support/inflector/inflections.rb#71 def initialize; end + # Specifies a new acronym. An acronym must be specified as it will appear + # in a camelized string. An underscore string that contains the acronym + # will retain the acronym when passed to +camelize+, +humanize+, or + # +titleize+. A camelized string that contains the acronym will maintain + # the acronym when titleized or humanized, and will convert the acronym + # into a non-delimited single lowercase word when passed to +underscore+. + # + # acronym 'HTML' + # titleize 'html' # => 'HTML' + # camelize 'html' # => 'HTML' + # underscore 'MyHTML' # => 'my_html' + # + # The acronym, however, must occur as a delimited unit and not be part of + # another word for conversions to recognize it: + # + # acronym 'HTTP' + # camelize 'my_http_delimited' # => 'MyHTTPDelimited' + # camelize 'https' # => 'Https', not 'HTTPs' + # underscore 'HTTPS' # => 'http_s', not 'https' + # + # acronym 'HTTPS' + # camelize 'https' # => 'HTTPS' + # underscore 'HTTPS' # => 'https' + # + # Note: Acronyms that are passed to +pluralize+ will no longer be + # recognized, since the acronym will not occur as a delimited unit in the + # pluralized result. To work around this, you must specify the pluralized + # form as an acronym as well: + # + # acronym 'API' + # camelize(pluralize('api')) # => 'Apis' + # + # acronym 'APIs' + # camelize(pluralize('api')) # => 'APIs' + # + # +acronym+ may be used to specify any word that contains an acronym or + # otherwise needs to maintain a non-standard capitalization. The only + # restriction is that the word must begin with a capital letter. + # + # acronym 'RESTful' + # underscore 'RESTful' # => 'restful' + # underscore 'RESTfulController' # => 'restful_controller' + # titleize 'RESTfulController' # => 'RESTful Controller' + # camelize 'restful' # => 'RESTful' + # camelize 'restful_controller' # => 'RESTfulController' + # + # acronym 'McDonald' + # underscore 'McDonald' # => 'mcdonald' + # camelize 'mcdonald' # => 'McDonald' + # + # source://activesupport//lib/active_support/inflector/inflections.rb#133 def acronym(word); end + + # Returns the value of attribute acronyms. + # + # source://activesupport//lib/active_support/inflector/inflections.rb#67 def acronyms; end + + # source://activesupport//lib/active_support/inflector/inflections.rb#69 def acronyms_camelize_regex; end + + # source://activesupport//lib/active_support/inflector/inflections.rb#69 def acronyms_underscore_regex; end + + # Clears the loaded inflections within a given scope (default is + # :all). Give the scope as a symbol of the inflection type, the + # options are: :plurals, :singulars, :uncountables, + # :humans. + # + # clear :all + # clear :plurals + # + # source://activesupport//lib/active_support/inflector/inflections.rb#222 def clear(scope = T.unsafe(nil)); end + + # Specifies a humanized form of a string by a regular expression rule or + # by a string mapping. When using a regular expression based replacement, + # the normal humanize formatting is called after the replacement. When a + # string is used, the human form should be specified as desired (example: + # 'The name', not 'the_name'). + # + # human /_cnt$/i, '\1_count' + # human 'legacy_col_person_name', 'Name' + # + # source://activesupport//lib/active_support/inflector/inflections.rb#211 def human(rule, replacement); end + + # Returns the value of attribute humans. + # + # source://activesupport//lib/active_support/inflector/inflections.rb#67 def humans; end + + # Specifies a new irregular that applies to both pluralization and + # singularization at the same time. This can only be used for strings, not + # regular expressions. You simply pass the irregular in singular and + # plural form. + # + # irregular 'octopus', 'octopi' + # irregular 'person', 'people' + # + # source://activesupport//lib/active_support/inflector/inflections.rb#165 def irregular(singular, plural); end + + # Specifies a new pluralization rule and its replacement. The rule can + # either be a string or a regular expression. The replacement should + # always be a string that may include references to the matched data from + # the rule. + # + # source://activesupport//lib/active_support/inflector/inflections.rb#142 def plural(rule, replacement); end + + # Returns the value of attribute plurals. + # + # source://activesupport//lib/active_support/inflector/inflections.rb#67 def plurals; end + + # Specifies a new singularization rule and its replacement. The rule can + # either be a string or a regular expression. The replacement should + # always be a string that may include references to the matched data from + # the rule. + # + # source://activesupport//lib/active_support/inflector/inflections.rb#152 def singular(rule, replacement); end + + # Returns the value of attribute singulars. + # + # source://activesupport//lib/active_support/inflector/inflections.rb#67 def singulars; end + + # Specifies words that are uncountable and should not be inflected. + # + # uncountable 'money' + # uncountable 'money', 'information' + # uncountable %w( money information rice ) + # + # source://activesupport//lib/active_support/inflector/inflections.rb#199 def uncountable(*words); end + + # Returns the value of attribute uncountables. + # + # source://activesupport//lib/active_support/inflector/inflections.rb#67 def uncountables; end private + # source://activesupport//lib/active_support/inflector/inflections.rb#232 def define_acronym_regex_patterns; end + + # Private, for the test suite. + # + # source://activesupport//lib/active_support/inflector/inflections.rb#77 def initialize_dup(orig); end class << self + # source://activesupport//lib/active_support/inflector/inflections.rb#63 def instance(locale = T.unsafe(nil)); end end end +# source://activesupport//lib/active_support/inflector/inflections.rb#31 class ActiveSupport::Inflector::Inflections::Uncountables < ::Array + # @return [Uncountables] a new instance of Uncountables + # + # source://activesupport//lib/active_support/inflector/inflections.rb#32 def initialize; end + # source://activesupport//lib/active_support/inflector/inflections.rb#42 def <<(*word); end + + # source://activesupport//lib/active_support/inflector/inflections.rb#46 def add(words); end + + # source://activesupport//lib/active_support/inflector/inflections.rb#37 def delete(entry); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/inflector/inflections.rb#53 def uncountable?(str); end private + # source://activesupport//lib/active_support/inflector/inflections.rb#58 def to_regex(string); end end +# +InheritableOptions+ provides a constructor to build an +OrderedOptions+ +# hash inherited from another hash. +# +# Use this if you already have some hash and you want to create a new one based on it. +# +# h = ActiveSupport::InheritableOptions.new({ girl: 'Mary', boy: 'John' }) +# h.girl # => 'Mary' +# h.boy # => 'John' +# +# source://activesupport//lib/active_support/ordered_options.rb#79 class ActiveSupport::InheritableOptions < ::ActiveSupport::OrderedOptions + # @return [InheritableOptions] a new instance of InheritableOptions + # + # source://activesupport//lib/active_support/ordered_options.rb#80 def initialize(parent = T.unsafe(nil)); end + # source://activesupport//lib/active_support/ordered_options.rb#91 def inheritable_copy; end end +# source://activesupport//lib/active_support/json/decoding.rb#11 module ActiveSupport::JSON class << self + # Parses a JSON string (JavaScript Object Notation) into a hash. + # See http://www.json.org for more info. + # + # ActiveSupport::JSON.decode("{\"team\":\"rails\",\"players\":\"36\"}") + # => {"team" => "rails", "players" => "36"} + # + # source://activesupport//lib/active_support/json/decoding.rb#22 def decode(json); end + + # Dumps objects in JSON (JavaScript Object Notation). + # See http://www.json.org for more info. + # + # ActiveSupport::JSON.encode({ team: 'rails', players: '36' }) + # # => "{\"team\":\"rails\",\"players\":\"36\"}" + # + # source://activesupport//lib/active_support/json/encoding.rb#21 def encode(value, options = T.unsafe(nil)); end + + # Returns the class of the error that will be raised when there is an + # error in decoding JSON. Using this method means you won't directly + # depend on the ActiveSupport's JSON implementation, in case it changes + # in the future. + # + # begin + # obj = ActiveSupport::JSON.decode(some_string) + # rescue ActiveSupport::JSON.parse_error + # Rails.logger.warn("Attempted to decode invalid JSON: #{some_string}") + # end + # + # source://activesupport//lib/active_support/json/decoding.rb#42 def parse_error; end private + # source://activesupport//lib/active_support/json/decoding.rb#47 def convert_dates_from(data); end end end +# source://activesupport//lib/active_support/json/decoding.rb#14 ActiveSupport::JSON::DATETIME_REGEX = T.let(T.unsafe(nil), Regexp) + +# matches YAML-formatted dates +# +# source://activesupport//lib/active_support/json/decoding.rb#13 ActiveSupport::JSON::DATE_REGEX = T.let(T.unsafe(nil), Regexp) +# source://activesupport//lib/active_support/json/encoding.rb#25 module ActiveSupport::JSON::Encoding class << self + # If true, encode >, <, & as escaped unicode sequences (e.g. > as \u003e) + # as a safety measure. + # + # source://activesupport//lib/active_support/json/encoding.rb#121 def escape_html_entities_in_json; end + + # If true, encode >, <, & as escaped unicode sequences (e.g. > as \u003e) + # as a safety measure. + # + # source://activesupport//lib/active_support/json/encoding.rb#121 def escape_html_entities_in_json=(_arg0); end + + # Sets the encoder used by Rails to encode Ruby objects into JSON strings + # in +Object#to_json+ and +ActiveSupport::JSON.encode+. + # + # source://activesupport//lib/active_support/json/encoding.rb#129 def json_encoder; end + + # Sets the encoder used by Rails to encode Ruby objects into JSON strings + # in +Object#to_json+ and +ActiveSupport::JSON.encode+. + # + # source://activesupport//lib/active_support/json/encoding.rb#129 def json_encoder=(_arg0); end + + # Sets the precision of encoded time values. + # Defaults to 3 (equivalent to millisecond precision) + # + # source://activesupport//lib/active_support/json/encoding.rb#125 def time_precision; end + + # Sets the precision of encoded time values. + # Defaults to 3 (equivalent to millisecond precision) + # + # source://activesupport//lib/active_support/json/encoding.rb#125 def time_precision=(_arg0); end + + # If true, use ISO 8601 format for dates and times. Otherwise, fall back + # to the Active Support legacy format. + # + # source://activesupport//lib/active_support/json/encoding.rb#117 def use_standard_json_time_format; end + + # If true, use ISO 8601 format for dates and times. Otherwise, fall back + # to the Active Support legacy format. + # + # source://activesupport//lib/active_support/json/encoding.rb#117 def use_standard_json_time_format=(_arg0); end end end +# source://activesupport//lib/active_support/json/encoding.rb#26 class ActiveSupport::JSON::Encoding::JSONGemEncoder + # @return [JSONGemEncoder] a new instance of JSONGemEncoder + # + # source://activesupport//lib/active_support/json/encoding.rb#29 def initialize(options = T.unsafe(nil)); end + # Encode the given object into a JSON string + # + # source://activesupport//lib/active_support/json/encoding.rb#34 def encode(value); end + + # Returns the value of attribute options. + # + # source://activesupport//lib/active_support/json/encoding.rb#27 def options; end private + # Convert an object into a "JSON-ready" representation composed of + # primitives like Hash, Array, String, Numeric, + # and +true+/+false+/+nil+. + # Recursively calls #as_json to the object to recursively build a + # fully JSON-ready object. + # + # This allows developers to implement #as_json without having to + # worry about what base types of objects they are allowed to return + # or having to remember to call #as_json recursively. + # + # Note: the +options+ hash passed to +object.to_json+ is only passed + # to +object.as_json+, not any of this method's recursive +#as_json+ + # calls. + # + # source://activesupport//lib/active_support/json/encoding.rb#89 def jsonify(value); end + + # Encode a "jsonified" Ruby data structure using the JSON gem + # + # source://activesupport//lib/active_support/json/encoding.rb#109 def stringify(jsonified); end end +# Rails does more escaping than the JSON gem natively does (we +# escape \u2028 and \u2029 and optionally >, <, & to work around +# certain browser problems). +# +# source://activesupport//lib/active_support/json/encoding.rb#42 ActiveSupport::JSON::Encoding::JSONGemEncoder::ESCAPED_CHARS = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/json/encoding.rb#51 ActiveSupport::JSON::Encoding::JSONGemEncoder::ESCAPE_REGEX_WITHOUT_HTML_ENTITIES = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/json/encoding.rb#50 ActiveSupport::JSON::Encoding::JSONGemEncoder::ESCAPE_REGEX_WITH_HTML_ENTITIES = T.let(T.unsafe(nil), Regexp) +# This class wraps all the strings we see and does the extra escaping +# +# source://activesupport//lib/active_support/json/encoding.rb#54 class ActiveSupport::JSON::Encoding::JSONGemEncoder::EscapedString < ::String + # source://activesupport//lib/active_support/json/encoding.rb#55 def to_json(*_arg0); end + + # source://activesupport//lib/active_support/json/encoding.rb#67 def to_s; end end +# KeyGenerator is a simple wrapper around OpenSSL's implementation of PBKDF2. +# It can be used to derive a number of keys for various purposes from a given secret. +# This lets Rails applications have a single secure secret, but avoid reusing that +# key in multiple incompatible contexts. +# +# source://activesupport//lib/active_support/key_generator.rb#11 class ActiveSupport::KeyGenerator + # @return [KeyGenerator] a new instance of KeyGenerator + # + # source://activesupport//lib/active_support/key_generator.rb#12 def initialize(secret, options = T.unsafe(nil)); end + # Returns a derived key suitable for use. The default key_size is chosen + # to be compatible with the default settings of ActiveSupport::MessageVerifier. + # i.e. OpenSSL::Digest::SHA1#block_length + # + # source://activesupport//lib/active_support/key_generator.rb#22 def generate_key(salt, key_size = T.unsafe(nil)); end end +# lazy_load_hooks allows Rails to lazily load a lot of components and thus +# making the app boot faster. Because of this feature now there is no need to +# require ActiveRecord::Base at boot time purely to apply +# configuration. Instead a hook is registered that applies configuration once +# ActiveRecord::Base is loaded. Here ActiveRecord::Base is +# used as example but this feature can be applied elsewhere too. +# +# Here is an example where +on_load+ method is called to register a hook. +# +# initializer 'active_record.initialize_timezone' do +# ActiveSupport.on_load(:active_record) do +# self.time_zone_aware_attributes = true +# self.default_timezone = :utc +# end +# end +# +# When the entirety of +ActiveRecord::Base+ has been +# evaluated then +run_load_hooks+ is invoked. The very last line of +# +ActiveRecord::Base+ is: +# +# ActiveSupport.run_load_hooks(:active_record, ActiveRecord::Base) +# +# source://activesupport//lib/active_support/lazy_load_hooks.rb#25 module ActiveSupport::LazyLoadHooks + # Declares a block that will be executed when a Rails component is fully + # loaded. + # + # Options: + # + # * :yield - Yields the object that run_load_hooks to +block+. + # * :run_once - Given +block+ will run only once. + # + # source://activesupport//lib/active_support/lazy_load_hooks.rb#41 def on_load(name, options = T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/lazy_load_hooks.rb#49 def run_load_hooks(name, base = T.unsafe(nil)); end private + # source://activesupport//lib/active_support/lazy_load_hooks.rb#65 def execute_hook(name, base, options, block); end + + # source://activesupport//lib/active_support/lazy_load_hooks.rb#57 def with_execution_control(name, block, once); end class << self + # source://activesupport//lib/active_support/lazy_load_hooks.rb#26 def extended(base); end end end +# ActiveSupport::LogSubscriber is an object set to consume +# ActiveSupport::Notifications with the sole purpose of logging them. +# The log subscriber dispatches notifications to a registered object based +# on its given namespace. +# +# An example would be Active Record log subscriber responsible for logging +# queries: +# +# module ActiveRecord +# class LogSubscriber < ActiveSupport::LogSubscriber +# def sql(event) +# info "#{event.payload[:name]} (#{event.duration}) #{event.payload[:sql]}" +# end +# end +# end +# +# And it's finally registered as: +# +# ActiveRecord::LogSubscriber.attach_to :active_record +# +# Since we need to know all instance methods before attaching the log +# subscriber, the line above should be called after your +# ActiveRecord::LogSubscriber definition. +# +# A logger also needs to be set with ActiveRecord::LogSubscriber.logger=. +# This is assigned automatically in a Rails environment. +# +# After configured, whenever a "sql.active_record" notification is published, +# it will properly dispatch the event +# (ActiveSupport::Notifications::Event) to the sql method. +# +# Being an ActiveSupport::Notifications consumer, +# ActiveSupport::LogSubscriber exposes a simple interface to check if +# instrumented code raises an exception. It is common to log a different +# message in case of an error, and this can be achieved by extending +# the previous example: +# +# module ActiveRecord +# class LogSubscriber < ActiveSupport::LogSubscriber +# def sql(event) +# exception = event.payload[:exception] +# +# if exception +# exception_object = event.payload[:exception_object] +# +# error "[ERROR] #{event.payload[:name]}: #{exception.join(', ')} " \ +# "(#{exception_object.backtrace.first})" +# else +# # standard logger code +# end +# end +# end +# end +# +# Log subscriber also has some helpers to deal with logging and automatically +# flushes all logs when the request finishes +# (via action_dispatch.callback notification) in a Rails environment. +# +# source://activesupport//lib/active_support/log_subscriber.rb#66 class ActiveSupport::LogSubscriber < ::ActiveSupport::Subscriber + # source://activesupport//lib/active_support/log_subscriber.rb#80 def colorize_logging; end + + # source://activesupport//lib/active_support/log_subscriber.rb#80 def colorize_logging=(val); end + + # source://activesupport//lib/active_support/log_subscriber.rb#125 def debug(progname = T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/log_subscriber.rb#125 def error(progname = T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/log_subscriber.rb#125 def fatal(progname = T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/log_subscriber.rb#114 def finish(name, id, payload); end + + # source://activesupport//lib/active_support/log_subscriber.rb#125 def info(progname = T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/log_subscriber.rb#106 def logger; end + + # source://activesupport//lib/active_support/log_subscriber.rb#110 def start(name, id, payload); end + + # source://activesupport//lib/active_support/log_subscriber.rb#125 def unknown(progname = T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/log_subscriber.rb#125 def warn(progname = T.unsafe(nil), &block); end private + # Set color by using a symbol or one of the defined constants. If a third + # option is set to +true+, it also adds bold to the string. This is based + # on the Highline implementation and will automatically append CLEAR to the + # end of the returned String. + # + # source://activesupport//lib/active_support/log_subscriber.rb#135 def color(text, color, bold = T.unsafe(nil)); end class << self + # source://activesupport//lib/active_support/log_subscriber.rb#80 def colorize_logging; end + + # source://activesupport//lib/active_support/log_subscriber.rb#80 def colorize_logging=(val); end + + # Flush all log_subscribers' logger. + # + # source://activesupport//lib/active_support/log_subscriber.rb#96 def flush_all!; end + + # source://activesupport//lib/active_support/log_subscriber.rb#91 def log_subscribers; end + + # source://activesupport//lib/active_support/log_subscriber.rb#83 def logger; end + + # Sets the attribute logger + # + # @param value the value to set the attribute logger to. + # + # source://activesupport//lib/active_support/log_subscriber.rb#89 def logger=(_arg0); end private + # source://activesupport//lib/active_support/log_subscriber.rb#101 def fetch_public_methods(subscriber, inherit_all); end end end +# Colors +# +# source://activesupport//lib/active_support/log_subscriber.rb#71 ActiveSupport::LogSubscriber::BLACK = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/log_subscriber.rb#75 ActiveSupport::LogSubscriber::BLUE = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/log_subscriber.rb#68 ActiveSupport::LogSubscriber::BOLD = T.let(T.unsafe(nil), String) + +# Embed in a String to clear all previous ANSI sequences. +# +# source://activesupport//lib/active_support/log_subscriber.rb#67 ActiveSupport::LogSubscriber::CLEAR = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/log_subscriber.rb#77 ActiveSupport::LogSubscriber::CYAN = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/log_subscriber.rb#73 ActiveSupport::LogSubscriber::GREEN = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/log_subscriber.rb#76 ActiveSupport::LogSubscriber::MAGENTA = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/log_subscriber.rb#72 ActiveSupport::LogSubscriber::RED = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/log_subscriber.rb#78 ActiveSupport::LogSubscriber::WHITE = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/log_subscriber.rb#74 ActiveSupport::LogSubscriber::YELLOW = T.let(T.unsafe(nil), String) +# source://activesupport//lib/active_support/logger.rb#8 class ActiveSupport::Logger < ::Logger include ::ActiveSupport::LoggerSilence include ::ActiveSupport::LoggerThreadSafeLevel + # @return [Logger] a new instance of Logger + # + # source://activesupport//lib/active_support/logger.rb#80 def initialize(*args, **kwargs); end + # source://activesupport//lib/active_support/logger_silence.rb#12 def silencer; end + + # source://activesupport//lib/active_support/logger_silence.rb#12 def silencer=(val); end class << self + # Broadcasts logs to multiple loggers. + # + # source://activesupport//lib/active_support/logger.rb#23 def broadcast(logger); end + + # source://activesupport//lib/active_support/logger_thread_safe_level.rb#13 def local_levels; end + + # source://activesupport//lib/active_support/logger_thread_safe_level.rb#13 def local_levels=(val); end + + # Returns true if the logger destination matches one of the sources + # + # logger = Logger.new(STDOUT) + # ActiveSupport::Logger.logger_outputs_to?(logger, STDOUT) + # # => true + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/logger.rb#16 def logger_outputs_to?(logger, *sources); end + + # source://activesupport//lib/active_support/logger_silence.rb#12 def silencer; end + + # source://activesupport//lib/active_support/logger_silence.rb#12 def silencer=(val); end end end +# Simple formatter which only displays the message. +# +# source://activesupport//lib/active_support/logger.rb#87 class ActiveSupport::Logger::SimpleFormatter < ::Logger::Formatter + # This method is invoked when a log event occurs + # + # source://activesupport//lib/active_support/logger.rb#88 def call(severity, timestamp, progname, msg); end end +# source://activesupport//lib/active_support/logger_silence.rb#8 module ActiveSupport::LoggerSilence extend ::ActiveSupport::Concern include ::ActiveSupport::LoggerThreadSafeLevel + # Silences the logger for the duration of the block. + # + # source://activesupport//lib/active_support/logger_silence.rb#17 def silence(severity = T.unsafe(nil)); end end +# source://activesupport//lib/active_support/logger_thread_safe_level.rb#9 module ActiveSupport::LoggerThreadSafeLevel extend ::ActiveSupport::Concern + # Redefined to check severity against #level, and thus the thread-local level, rather than +@level+. + # FIXME: Remove when the minimum Ruby version supports overriding Logger#level. + # + # source://activesupport//lib/active_support/logger_thread_safe_level.rb#59 def add(severity, message = T.unsafe(nil), progname = T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/logger_thread_safe_level.rb#18 def debug?; end + + # source://activesupport//lib/active_support/logger_thread_safe_level.rb#18 def error?; end + + # source://activesupport//lib/active_support/logger_thread_safe_level.rb#18 def fatal?; end + + # source://activesupport//lib/active_support/logger_thread_safe_level.rb#18 def info?; end + + # source://activesupport//lib/active_support/logger_thread_safe_level.rb#45 def level; end + + # source://activesupport//lib/active_support/logger_thread_safe_level.rb#28 def local_level; end + + # source://activesupport//lib/active_support/logger_thread_safe_level.rb#32 def local_level=(level); end + + # source://activesupport//lib/active_support/logger_thread_safe_level.rb#24 def local_log_id; end + + # Change the thread-local level for the duration of the given block. + # + # source://activesupport//lib/active_support/logger_thread_safe_level.rb#50 def log_at(level); end + + # source://activesupport//lib/active_support/logger_thread_safe_level.rb#18 def unknown?; end + + # source://activesupport//lib/active_support/logger_thread_safe_level.rb#18 def warn?; end end +# source://activesupport//lib/active_support/core_ext/marshal.rb#6 module ActiveSupport::MarshalWithAutoloading + # source://activesupport//lib/active_support/core_ext/marshal.rb#7 def load(source, proc = T.unsafe(nil)); end end +# MessageEncryptor is a simple way to encrypt values which get stored +# somewhere you don't trust. +# +# The cipher text and initialization vector are base64 encoded and returned +# to you. +# +# This can be used in situations similar to the MessageVerifier, but +# where you don't want users to be able to determine the value of the payload. +# +# len = ActiveSupport::MessageEncryptor.key_len +# salt = SecureRandom.random_bytes(len) +# key = ActiveSupport::KeyGenerator.new('password').generate_key(salt, len) # => "\x89\xE0\x156\xAC..." +# crypt = ActiveSupport::MessageEncryptor.new(key) # => # +# encrypted_data = crypt.encrypt_and_sign('my secret data') # => "NlFBTTMwOUV5UlA1QlNEN2xkY2d6eThYWWh..." +# crypt.decrypt_and_verify(encrypted_data) # => "my secret data" +# +# === Confining messages to a specific purpose +# +# By default any message can be used throughout your app. But they can also be +# confined to a specific +:purpose+. +# +# token = crypt.encrypt_and_sign("this is the chair", purpose: :login) +# +# Then that same purpose must be passed when verifying to get the data back out: +# +# crypt.decrypt_and_verify(token, purpose: :login) # => "this is the chair" +# crypt.decrypt_and_verify(token, purpose: :shipping) # => nil +# crypt.decrypt_and_verify(token) # => nil +# +# Likewise, if a message has no purpose it won't be returned when verifying with +# a specific purpose. +# +# token = crypt.encrypt_and_sign("the conversation is lively") +# crypt.decrypt_and_verify(token, purpose: :scare_tactics) # => nil +# crypt.decrypt_and_verify(token) # => "the conversation is lively" +# +# === Making messages expire +# +# By default messages last forever and verifying one year from now will still +# return the original value. But messages can be set to expire at a given +# time with +:expires_in+ or +:expires_at+. +# +# crypt.encrypt_and_sign(parcel, expires_in: 1.month) +# crypt.encrypt_and_sign(doowad, expires_at: Time.now.end_of_year) +# +# Then the messages can be verified and returned up to the expire time. +# Thereafter, verifying returns +nil+. +# +# === Rotating keys +# +# MessageEncryptor also supports rotating out old configurations by falling +# back to a stack of encryptors. Call +rotate+ to build and add an encryptor +# so +decrypt_and_verify+ will also try the fallback. +# +# By default any rotated encryptors use the values of the primary +# encryptor unless specified otherwise. +# +# You'd give your encryptor the new defaults: +# +# crypt = ActiveSupport::MessageEncryptor.new(@secret, cipher: "aes-256-gcm") +# +# Then gradually rotate the old values out by adding them as fallbacks. Any message +# generated with the old values will then work until the rotation is removed. +# +# crypt.rotate old_secret # Fallback to an old secret instead of @secret. +# crypt.rotate cipher: "aes-256-cbc" # Fallback to an old cipher instead of aes-256-gcm. +# +# Though if both the secret and the cipher was changed at the same time, +# the above should be combined into: +# +# crypt.rotate old_secret, cipher: "aes-256-cbc" +# +# source://activesupport//lib/active_support/message_encryptor.rb#81 class ActiveSupport::MessageEncryptor include ::ActiveSupport::Messages::Rotator include ::ActiveSupport::Messages::Rotator::Encryptor + # Initialize a new MessageEncryptor. +secret+ must be at least as long as + # the cipher key size. For the default 'aes-256-gcm' cipher, this is 256 + # bits. If you are using a user-entered secret, you can generate a suitable + # key by using ActiveSupport::KeyGenerator or a similar key + # derivation function. + # + # First additional parameter is used as the signature key for +MessageVerifier+. + # This allows you to specify keys to encrypt and sign data. + # + # ActiveSupport::MessageEncryptor.new('secret', 'signature_secret') + # + # Options: + # * :cipher - Cipher to use. Can be any cipher returned by + # OpenSSL::Cipher.ciphers. Default is 'aes-256-gcm'. + # * :digest - String of digest to use for signing. Default is + # +SHA1+. Ignored when using an AEAD cipher like 'aes-256-gcm'. + # * :serializer - Object serializer to use. Default is +Marshal+. + # + # @return [MessageEncryptor] a new instance of MessageEncryptor + # + # source://activesupport//lib/active_support/messages/rotator.rb#6 + def initialize(*secrets, on_rotation: T.unsafe(nil), **options); end + + # Decrypt and verify a message. We need to verify the message in order to + # avoid padding attacks. Reference: https://www.limited-entropy.com/padding-oracle-attacks/. + # + # source://activesupport//lib/active_support/messages/rotator.rb#21 + def decrypt_and_verify(*args, on_rotation: T.unsafe(nil), **options); end + + # Encrypt and sign a message. We need to sign the message in order to avoid + # padding attacks. Reference: https://www.limited-entropy.com/padding-oracle-attacks/. + # + # source://activesupport//lib/active_support/message_encryptor.rb#147 def encrypt_and_sign(value, expires_at: T.unsafe(nil), expires_in: T.unsafe(nil), purpose: T.unsafe(nil)); end private + # source://activesupport//lib/active_support/message_encryptor.rb#180 def _decrypt(encrypted_message, purpose); end + + # source://activesupport//lib/active_support/message_encryptor.rb#163 def _encrypt(value, **metadata_options); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/message_encryptor.rb#212 def aead_mode?; end + + # source://activesupport//lib/active_support/message_encryptor.rb#206 def new_cipher; end + + # source://activesupport//lib/active_support/message_encryptor.rb#216 def resolve_verifier; end + + # Returns the value of attribute verifier. + # + # source://activesupport//lib/active_support/message_encryptor.rb#210 def verifier; end class << self + # source://activesupport//lib/active_support/message_encryptor.rb#87 def default_cipher; end + + # Given a cipher, returns the key length of the cipher to help generate the key of desired size + # + # source://activesupport//lib/active_support/message_encryptor.rb#158 def key_len(cipher = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/message_encryptor.rb#84 def use_authenticated_message_encryption; end + + # source://activesupport//lib/active_support/message_encryptor.rb#84 def use_authenticated_message_encryption=(val); end end end +# source://activesupport//lib/active_support/message_encryptor.rb#116 class ActiveSupport::MessageEncryptor::InvalidMessage < ::StandardError; end +# source://activesupport//lib/active_support/message_encryptor.rb#96 module ActiveSupport::MessageEncryptor::NullSerializer class << self + # source://activesupport//lib/active_support/message_encryptor.rb#101 def dump(value); end + + # source://activesupport//lib/active_support/message_encryptor.rb#97 def load(value); end end end +# source://activesupport//lib/active_support/message_encryptor.rb#106 module ActiveSupport::MessageEncryptor::NullVerifier class << self + # source://activesupport//lib/active_support/message_encryptor.rb#111 def generate(value); end + + # source://activesupport//lib/active_support/message_encryptor.rb#107 def verify(value); end end end +# source://activesupport//lib/active_support/message_encryptor.rb#117 ActiveSupport::MessageEncryptor::OpenSSLCipherError = OpenSSL::Cipher::CipherError +# +MessageVerifier+ makes it easy to generate and verify messages which are +# signed to prevent tampering. +# +# This is useful for cases like remember-me tokens and auto-unsubscribe links +# where the session store isn't suitable or available. +# +# Remember Me: +# cookies[:remember_me] = @verifier.generate([@user.id, 2.weeks.from_now]) +# +# In the authentication filter: +# +# id, time = @verifier.verify(cookies[:remember_me]) +# if Time.now < time +# self.current_user = User.find(id) +# end +# +# By default it uses Marshal to serialize the message. If you want to use +# another serialization method, you can set the serializer in the options +# hash upon initialization: +# +# @verifier = ActiveSupport::MessageVerifier.new('s3Krit', serializer: YAML) +# +# +MessageVerifier+ creates HMAC signatures using SHA1 hash algorithm by default. +# If you want to use a different hash algorithm, you can change it by providing +# +:digest+ key as an option while initializing the verifier: +# +# @verifier = ActiveSupport::MessageVerifier.new('s3Krit', digest: 'SHA256') +# +# === Confining messages to a specific purpose +# +# By default any message can be used throughout your app. But they can also be +# confined to a specific +:purpose+. +# +# token = @verifier.generate("this is the chair", purpose: :login) +# +# Then that same purpose must be passed when verifying to get the data back out: +# +# @verifier.verified(token, purpose: :login) # => "this is the chair" +# @verifier.verified(token, purpose: :shipping) # => nil +# @verifier.verified(token) # => nil +# +# @verifier.verify(token, purpose: :login) # => "this is the chair" +# @verifier.verify(token, purpose: :shipping) # => ActiveSupport::MessageVerifier::InvalidSignature +# @verifier.verify(token) # => ActiveSupport::MessageVerifier::InvalidSignature +# +# Likewise, if a message has no purpose it won't be returned when verifying with +# a specific purpose. +# +# token = @verifier.generate("the conversation is lively") +# @verifier.verified(token, purpose: :scare_tactics) # => nil +# @verifier.verified(token) # => "the conversation is lively" +# +# @verifier.verify(token, purpose: :scare_tactics) # => ActiveSupport::MessageVerifier::InvalidSignature +# @verifier.verify(token) # => "the conversation is lively" +# +# === Making messages expire +# +# By default messages last forever and verifying one year from now will still +# return the original value. But messages can be set to expire at a given +# time with +:expires_in+ or +:expires_at+. +# +# @verifier.generate(parcel, expires_in: 1.month) +# @verifier.generate(doowad, expires_at: Time.now.end_of_year) +# +# Then the messages can be verified and returned up to the expire time. +# Thereafter, the +verified+ method returns +nil+ while +verify+ raises +# ActiveSupport::MessageVerifier::InvalidSignature. +# +# === Rotating keys +# +# MessageVerifier also supports rotating out old configurations by falling +# back to a stack of verifiers. Call +rotate+ to build and add a verifier to +# so either +verified+ or +verify+ will also try verifying with the fallback. +# +# By default any rotated verifiers use the values of the primary +# verifier unless specified otherwise. +# +# You'd give your verifier the new defaults: +# +# verifier = ActiveSupport::MessageVerifier.new(@secret, digest: "SHA512", serializer: JSON) +# +# Then gradually rotate the old values out by adding them as fallbacks. Any message +# generated with the old values will then work until the rotation is removed. +# +# verifier.rotate old_secret # Fallback to an old secret instead of @secret. +# verifier.rotate digest: "SHA256" # Fallback to an old digest instead of SHA512. +# verifier.rotate serializer: Marshal # Fallback to an old serializer instead of JSON. +# +# Though the above would most likely be combined into one rotation: +# +# verifier.rotate old_secret, digest: "SHA256", serializer: Marshal +# +# source://activesupport//lib/active_support/message_verifier.rb#101 class ActiveSupport::MessageVerifier include ::ActiveSupport::Messages::Rotator include ::ActiveSupport::Messages::Rotator::Verifier + # @raise [ArgumentError] + # @return [MessageVerifier] a new instance of MessageVerifier + # + # source://activesupport//lib/active_support/messages/rotator.rb#6 + def initialize(*secrets, on_rotation: T.unsafe(nil), **options); end + + # Generates a signed message for the provided value. + # + # The message is signed with the +MessageVerifier+'s secret. + # Returns Base64-encoded message joined with the generated signature. + # + # verifier = ActiveSupport::MessageVerifier.new 's3Krit' + # verifier.generate 'a private message' # => "BAhJIhRwcml2YXRlLW1lc3NhZ2UGOgZFVA==--e2d724331ebdee96a10fb99b089508d1c72bd772" + # + # source://activesupport//lib/active_support/message_verifier.rb#186 def generate(value, expires_at: T.unsafe(nil), expires_in: T.unsafe(nil), purpose: T.unsafe(nil)); end + + # Checks if a signed message could have been generated by signing an object + # with the +MessageVerifier+'s secret. + # + # verifier = ActiveSupport::MessageVerifier.new 's3Krit' + # signed_message = verifier.generate 'a private message' + # verifier.valid_message?(signed_message) # => true + # + # tampered_message = signed_message.chop # editing the message invalidates the signature + # verifier.valid_message?(tampered_message) # => false + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/message_verifier.rb#122 def valid_message?(signed_message); end + + # Decodes the signed message using the +MessageVerifier+'s secret. + # + # verifier = ActiveSupport::MessageVerifier.new 's3Krit' + # + # signed_message = verifier.generate 'a private message' + # verifier.verified(signed_message) # => 'a private message' + # + # Returns +nil+ if the message was not signed with the same secret. + # + # other_verifier = ActiveSupport::MessageVerifier.new 'd1ff3r3nt-s3Krit' + # other_verifier.verified(signed_message) # => nil + # + # Returns +nil+ if the message is not Base64-encoded. + # + # invalid_message = "f--46a0120593880c733a53b6dad75b42ddc1c8996d" + # verifier.verified(invalid_message) # => nil + # + # Raises any error raised while decoding the signed message. + # + # incompatible_message = "test--dad7b06c94abba8d46a15fafaef56c327665d5ff" + # verifier.verified(incompatible_message) # => TypeError: incompatible marshal file format + # + # source://activesupport//lib/active_support/messages/rotator.rb#36 + def verified(*args, on_rotation: T.unsafe(nil), **options); end + + # Decodes the signed message using the +MessageVerifier+'s secret. + # + # verifier = ActiveSupport::MessageVerifier.new 's3Krit' + # signed_message = verifier.generate 'a private message' + # + # verifier.verify(signed_message) # => 'a private message' + # + # Raises +InvalidSignature+ if the message was not signed with the same + # secret or was not Base64-encoded. + # + # other_verifier = ActiveSupport::MessageVerifier.new 'd1ff3r3nt-s3Krit' + # other_verifier.verify(signed_message) # => ActiveSupport::MessageVerifier::InvalidSignature + # + # source://activesupport//lib/active_support/message_verifier.rb#175 def verify(*args, **options); end private + # source://activesupport//lib/active_support/message_verifier.rb#196 def decode(data); end + + # source://activesupport//lib/active_support/message_verifier.rb#192 def encode(data); end + + # source://activesupport//lib/active_support/message_verifier.rb#200 def generate_digest(data); end end +# source://activesupport//lib/active_support/message_verifier.rb#104 class ActiveSupport::MessageVerifier::InvalidSignature < ::StandardError; end + +# source://activesupport//lib/active_support/messages/rotator.rb#4 module ActiveSupport::Messages; end +# source://activesupport//lib/active_support/messages/metadata.rb#7 class ActiveSupport::Messages::Metadata + # @return [Metadata] a new instance of Metadata + # + # source://activesupport//lib/active_support/messages/metadata.rb#8 def initialize(message, expires_at = T.unsafe(nil), purpose = T.unsafe(nil)); end + # source://activesupport//lib/active_support/messages/metadata.rb#13 def as_json(options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/messages/metadata.rb#58 def verify(purpose); end private + # @return [Boolean] + # + # source://activesupport//lib/active_support/messages/metadata.rb#67 def fresh?; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/messages/metadata.rb#63 def match?(purpose); end + + # source://activesupport//lib/active_support/messages/metadata.rb#71 def parse_expires_at(expires_at); end class << self + # source://activesupport//lib/active_support/messages/metadata.rb#26 def verify(message, purpose); end + + # source://activesupport//lib/active_support/messages/metadata.rb#18 def wrap(message, expires_at: T.unsafe(nil), expires_in: T.unsafe(nil), purpose: T.unsafe(nil)); end private + # source://activesupport//lib/active_support/messages/metadata.rb#53 def decode(message); end + + # source://activesupport//lib/active_support/messages/metadata.rb#49 def encode(message); end + + # source://activesupport//lib/active_support/messages/metadata.rb#39 def extract_metadata(message); end + + # source://activesupport//lib/active_support/messages/metadata.rb#31 def pick_expiry(expires_at, expires_in); end end end +# source://activesupport//lib/active_support/messages/rotator.rb#5 module ActiveSupport::Messages::Rotator + # source://activesupport//lib/active_support/messages/rotator.rb#6 def initialize(*secrets, on_rotation: T.unsafe(nil), **options); end + # source://activesupport//lib/active_support/messages/rotator.rb#14 def rotate(*secrets, **options); end private + # source://activesupport//lib/active_support/messages/rotator.rb#47 def run_rotations(on_rotation); end end +# source://activesupport//lib/active_support/messages/rotator.rb#18 module ActiveSupport::Messages::Rotator::Encryptor include ::ActiveSupport::Messages::Rotator + # source://activesupport//lib/active_support/messages/rotator.rb#21 def decrypt_and_verify(*args, on_rotation: T.unsafe(nil), **options); end private + # source://activesupport//lib/active_support/messages/rotator.rb#28 def build_rotation(secret = T.unsafe(nil), sign_secret = T.unsafe(nil), options); end end +# source://activesupport//lib/active_support/messages/rotator.rb#33 module ActiveSupport::Messages::Rotator::Verifier include ::ActiveSupport::Messages::Rotator + # source://activesupport//lib/active_support/messages/rotator.rb#36 def verified(*args, on_rotation: T.unsafe(nil), **options); end private + # source://activesupport//lib/active_support/messages/rotator.rb#41 def build_rotation(secret = T.unsafe(nil), options); end end +# source://activesupport//lib/active_support/multibyte.rb#4 module ActiveSupport::Multibyte class << self + # Returns the current proxy class. + # + # source://activesupport//lib/active_support/multibyte.rb#19 def proxy_class; end + + # The proxy class returned when calling mb_chars. You can use this accessor + # to configure your own proxy class so you can support other encodings. See + # the ActiveSupport::Multibyte::Chars implementation for an example how to + # do this. + # + # ActiveSupport::Multibyte.proxy_class = CharsForUTF32 + # + # source://activesupport//lib/active_support/multibyte.rb#14 def proxy_class=(klass); end end end +# Chars enables you to work transparently with UTF-8 encoding in the Ruby +# String class without having extensive knowledge about the encoding. A +# Chars object accepts a string upon initialization and proxies String +# methods in an encoding safe manner. All the normal String methods are also +# implemented on the proxy. +# +# String methods are proxied through the Chars object, and can be accessed +# through the +mb_chars+ method. Methods which would normally return a +# String object now return a Chars object so methods can be chained. +# +# 'The Perfect String '.mb_chars.downcase.strip +# # => # +# +# Chars objects are perfectly interchangeable with String objects as long as +# no explicit class checks are made. If certain methods do explicitly check +# the class, call +to_s+ before you pass chars objects to them. +# +# bad.explicit_checking_method 'T'.mb_chars.downcase.to_s +# +# The default Chars implementation assumes that the encoding of the string +# is UTF-8, if you want to handle different encodings you can write your own +# multibyte string handler and configure it through +# ActiveSupport::Multibyte.proxy_class. +# +# class CharsForUTF32 +# def size +# @wrapped_string.size / 4 +# end +# +# def self.accepts?(string) +# string.length % 4 == 0 +# end +# end +# +# ActiveSupport::Multibyte.proxy_class = CharsForUTF32 +# +# source://activesupport//lib/active_support/multibyte/chars.rb#46 class ActiveSupport::Multibyte::Chars include ::Comparable + # Creates a new Chars instance by wrapping _string_. + # + # @return [Chars] a new instance of Chars + # + # source://activesupport//lib/active_support/multibyte/chars.rb#55 def initialize(string); end - def <=>(*args, &block); end - def =~(*args, &block); end - def acts_like_string?(*args, &block); end + # source://activesupport//lib/active_support/multibyte/chars.rb#52 + def <=>(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/multibyte/chars.rb#52 + def =~(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/multibyte/chars.rb#52 + def acts_like_string?(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/multibyte/chars.rb#160 def as_json(options = T.unsafe(nil)); end + + # Performs composition on all the characters. + # + # 'é'.length # => 3 + # 'é'.mb_chars.compose.to_s.length # => 2 + # + # source://activesupport//lib/active_support/multibyte/chars.rb#139 def compose; end + + # Performs canonical decomposition on all the characters. + # + # 'é'.length # => 2 + # 'é'.mb_chars.decompose.to_s.length # => 3 + # + # source://activesupport//lib/active_support/multibyte/chars.rb#131 def decompose; end + + # Returns the number of grapheme clusters in the string. + # + # 'क्षि'.mb_chars.length # => 4 + # 'क्षि'.mb_chars.grapheme_length # => 3 + # + # source://activesupport//lib/active_support/multibyte/chars.rb#147 def grapheme_length; end + + # Limits the byte size of the string to a number of bytes without breaking + # characters. Usable when the storage for a string is limited for some + # reason. + # + # 'こんにちは'.mb_chars.limit(7).to_s # => "こん" + # + # source://activesupport//lib/active_support/multibyte/chars.rb#114 def limit(limit); end - def match?(*args, &block); end + + # source://activesupport//lib/active_support/multibyte/chars.rb#52 + def match?(*_arg0, **_arg1, &_arg2); end + + # Forward all undefined methods to the wrapped string. + # + # source://activesupport//lib/active_support/multibyte/chars.rb#61 def method_missing(method, *args, &block); end + + # Reverses all characters in the string. + # + # 'Café'.mb_chars.reverse.to_s # => 'éfaC' + # + # source://activesupport//lib/active_support/multibyte/chars.rb#105 def reverse; end + + # source://activesupport//lib/active_support/multibyte/chars.rb#165 def reverse!(*args); end + + # Works like String#slice!, but returns an instance of + # Chars, or +nil+ if the string was not modified. The string will not be + # modified if the range given is out of bounds + # + # string = 'Welcome' + # string.mb_chars.slice!(3) # => # + # string # => 'Welome' + # string.mb_chars.slice!(0..3) # => # + # string # => 'me' + # + # source://activesupport//lib/active_support/multibyte/chars.rb#95 def slice!(*args); end + + # Works just like String#split, with the exception that the items + # in the resulting list are Chars instances instead of String. This makes + # chaining methods easier. + # + # 'Café périferôl'.mb_chars.split(/é/).map { |part| part.upcase.to_s } # => ["CAF", " P", "RIFERÔL"] + # + # source://activesupport//lib/active_support/multibyte/chars.rb#82 def split(*args); end + + # Replaces all ISO-8859-1 or CP1252 characters by their UTF-8 equivalent + # resulting in a valid UTF-8 string. + # + # Passing +true+ will forcibly tidy all bytes, assuming that the string's + # encoding is entirely CP1252 or ISO-8859-1. + # + # source://activesupport//lib/active_support/multibyte/chars.rb#156 def tidy_bytes(force = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/multibyte/chars.rb#165 def tidy_bytes!(*args); end + + # Capitalizes the first letter of every word, when possible. + # + # "ÉL QUE SE ENTERÓ".mb_chars.titleize.to_s # => "Él Que Se Enteró" + # "日本語".mb_chars.titleize.to_s # => "日本語" + # + # source://activesupport//lib/active_support/multibyte/chars.rb#122 def titlecase; end + + # Capitalizes the first letter of every word, when possible. + # + # "ÉL QUE SE ENTERÓ".mb_chars.titleize.to_s # => "Él Que Se Enteró" + # "日本語".mb_chars.titleize.to_s # => "日本語" + # + # source://activesupport//lib/active_support/multibyte/chars.rb#122 def titleize; end + + # Returns the value of attribute wrapped_string. + # + # source://activesupport//lib/active_support/multibyte/chars.rb#48 def to_s; end + + # Returns the value of attribute wrapped_string. + # + # source://activesupport//lib/active_support/multibyte/chars.rb#48 def to_str; end + + # Returns the value of attribute wrapped_string. + # + # source://activesupport//lib/active_support/multibyte/chars.rb#48 def wrapped_string; end private + # source://activesupport//lib/active_support/multibyte/chars.rb#172 def chars(string); end + + # Returns +true+ if _obj_ responds to the given method. Private methods + # are included in the search only if the optional second parameter + # evaluates to +true+. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/multibyte/chars.rb#73 def respond_to_missing?(method, include_private); end end +# source://activesupport//lib/active_support/multibyte/unicode.rb#5 module ActiveSupport::Multibyte::Unicode extend ::ActiveSupport::Multibyte::Unicode + # Compose decomposed characters to the composed form. + # + # source://activesupport//lib/active_support/multibyte/unicode.rb#33 def compose(codepoints); end + + # Decompose composed characters to the decomposed form. + # + # source://activesupport//lib/active_support/multibyte/unicode.rb#24 def decompose(type, codepoints); end + + # source://activesupport//lib/active_support/multibyte/unicode.rb#11 def default_normalization_form; end + + # source://activesupport//lib/active_support/multibyte/unicode.rb#17 def default_normalization_form=(_); end + + # Replaces all ISO-8859-1 or CP1252 characters by their UTF-8 equivalent + # resulting in a valid UTF-8 string. + # + # Passing +true+ will forcibly tidy all bytes, assuming that the string's + # encoding is entirely CP1252 or ISO-8859-1. + # + # source://activesupport//lib/active_support/multibyte/unicode.rb#44 def tidy_bytes(string, force = T.unsafe(nil)); end private + # source://activesupport//lib/active_support/multibyte/unicode.rb#77 def recode_windows1252_chars(string); end end +# The Unicode version that is supported by the implementation +# +# source://activesupport//lib/active_support/multibyte/unicode.rb#9 ActiveSupport::Multibyte::Unicode::UNICODE_VERSION = T.let(T.unsafe(nil), String) +# = Notifications +# +# ActiveSupport::Notifications provides an instrumentation API for +# Ruby. +# +# == Instrumenters +# +# To instrument an event you just need to do: +# +# ActiveSupport::Notifications.instrument('render', extra: :information) do +# render plain: 'Foo' +# end +# +# That first executes the block and then notifies all subscribers once done. +# +# In the example above +render+ is the name of the event, and the rest is called +# the _payload_. The payload is a mechanism that allows instrumenters to pass +# extra information to subscribers. Payloads consist of a hash whose contents +# are arbitrary and generally depend on the event. +# +# == Subscribers +# +# You can consume those events and the information they provide by registering +# a subscriber. +# +# ActiveSupport::Notifications.subscribe('render') do |name, start, finish, id, payload| +# name # => String, name of the event (such as 'render' from above) +# start # => Time, when the instrumented block started execution +# finish # => Time, when the instrumented block ended execution +# id # => String, unique ID for the instrumenter that fired the event +# payload # => Hash, the payload +# end +# +# Here, the +start+ and +finish+ values represent wall-clock time. If you are +# concerned about accuracy, you can register a monotonic subscriber. +# +# ActiveSupport::Notifications.monotonic_subscribe('render') do |name, start, finish, id, payload| +# name # => String, name of the event (such as 'render' from above) +# start # => Monotonic time, when the instrumented block started execution +# finish # => Monotonic time, when the instrumented block ended execution +# id # => String, unique ID for the instrumenter that fired the event +# payload # => Hash, the payload +# end +# +# The +start+ and +finish+ values above represent monotonic time. +# +# For instance, let's store all "render" events in an array: +# +# events = [] +# +# ActiveSupport::Notifications.subscribe('render') do |*args| +# events << ActiveSupport::Notifications::Event.new(*args) +# end +# +# That code returns right away, you are just subscribing to "render" events. +# The block is saved and will be called whenever someone instruments "render": +# +# ActiveSupport::Notifications.instrument('render', extra: :information) do +# render plain: 'Foo' +# end +# +# event = events.first +# event.name # => "render" +# event.duration # => 10 (in milliseconds) +# event.payload # => { extra: :information } +# +# The block in the subscribe call gets the name of the event, start +# timestamp, end timestamp, a string with a unique identifier for that event's instrumenter +# (something like "535801666f04d0298cd6"), and a hash with the payload, in +# that order. +# +# If an exception happens during that particular instrumentation the payload will +# have a key :exception with an array of two elements as value: a string with +# the name of the exception class, and the exception message. +# The :exception_object key of the payload will have the exception +# itself as the value: +# +# event.payload[:exception] # => ["ArgumentError", "Invalid value"] +# event.payload[:exception_object] # => # +# +# As the earlier example depicts, the class ActiveSupport::Notifications::Event +# is able to take the arguments as they come and provide an object-oriented +# interface to that data. +# +# It is also possible to pass an object which responds to call method +# as the second parameter to the subscribe method instead of a block: +# +# module ActionController +# class PageRequest +# def call(name, started, finished, unique_id, payload) +# Rails.logger.debug ['notification:', name, started, finished, unique_id, payload].join(' ') +# end +# end +# end +# +# ActiveSupport::Notifications.subscribe('process_action.action_controller', ActionController::PageRequest.new) +# +# resulting in the following output within the logs including a hash with the payload: +# +# notification: process_action.action_controller 2012-04-13 01:08:35 +0300 2012-04-13 01:08:35 +0300 af358ed7fab884532ec7 { +# controller: "Devise::SessionsController", +# action: "new", +# params: {"action"=>"new", "controller"=>"devise/sessions"}, +# format: :html, +# method: "GET", +# path: "/login/sign_in", +# status: 200, +# view_runtime: 279.3080806732178, +# db_runtime: 40.053 +# } +# +# You can also subscribe to all events whose name matches a certain regexp: +# +# ActiveSupport::Notifications.subscribe(/render/) do |*args| +# ... +# end +# +# and even pass no argument to subscribe, in which case you are subscribing +# to all events. +# +# == Temporary Subscriptions +# +# Sometimes you do not want to subscribe to an event for the entire life of +# the application. There are two ways to unsubscribe. +# +# WARNING: The instrumentation framework is designed for long-running subscribers, +# use this feature sparingly because it wipes some internal caches and that has +# a negative impact on performance. +# +# === Subscribe While a Block Runs +# +# You can subscribe to some event temporarily while some block runs. For +# example, in +# +# callback = lambda {|*args| ... } +# ActiveSupport::Notifications.subscribed(callback, "sql.active_record") do +# ... +# end +# +# the callback will be called for all "sql.active_record" events instrumented +# during the execution of the block. The callback is unsubscribed automatically +# after that. +# +# To record +started+ and +finished+ values with monotonic time, +# specify the optional :monotonic option to the +# subscribed method. The :monotonic option is set +# to +false+ by default. +# +# callback = lambda {|name, started, finished, unique_id, payload| ... } +# ActiveSupport::Notifications.subscribed(callback, "sql.active_record", monotonic: true) do +# ... +# end +# +# === Manual Unsubscription +# +# The +subscribe+ method returns a subscriber object: +# +# subscriber = ActiveSupport::Notifications.subscribe("render") do |*args| +# ... +# end +# +# To prevent that block from being called anymore, just unsubscribe passing +# that reference: +# +# ActiveSupport::Notifications.unsubscribe(subscriber) +# +# You can also unsubscribe by passing the name of the subscriber object. Note +# that this will unsubscribe all subscriptions with the given name: +# +# ActiveSupport::Notifications.unsubscribe("render") +# +# Subscribers using a regexp or other pattern-matching object will remain subscribed +# to all events that match their original pattern, unless those events match a string +# passed to +unsubscribe+: +# +# subscriber = ActiveSupport::Notifications.subscribe(/render/) { } +# ActiveSupport::Notifications.unsubscribe('render_template.action_view') +# subscriber.matches?('render_template.action_view') # => false +# subscriber.matches?('render_partial.action_view') # => true +# +# == Default Queue +# +# Notifications ships with a queue implementation that consumes and publishes events +# to all log subscribers. You can use any queue implementation you want. +# +# source://activesupport//lib/active_support/notifications/instrumenter.rb#6 module ActiveSupport::Notifications class << self + # source://activesupport//lib/active_support/notifications.rb#201 def instrument(name, payload = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/notifications.rb#253 def instrumenter; end + + # source://activesupport//lib/active_support/notifications.rb#238 def monotonic_subscribe(pattern = T.unsafe(nil), callback = T.unsafe(nil), &block); end + + # Returns the value of attribute notifier. + # + # source://activesupport//lib/active_support/notifications.rb#195 def notifier; end + + # Sets the attribute notifier + # + # @param value the value to set the attribute notifier to. + # + # source://activesupport//lib/active_support/notifications.rb#195 def notifier=(_arg0); end + + # source://activesupport//lib/active_support/notifications.rb#197 def publish(name, *args); end + + # Subscribe to a given event name with the passed +block+. + # + # You can subscribe to events by passing a String to match exact event + # names, or by passing a Regexp to match all events that match a pattern. + # + # ActiveSupport::Notifications.subscribe(/render/) do |*args| + # @event = ActiveSupport::Notifications::Event.new(*args) + # end + # + # The +block+ will receive five parameters with information about the event: + # + # ActiveSupport::Notifications.subscribe('render') do |name, start, finish, id, payload| + # name # => String, name of the event (such as 'render' from above) + # start # => Time, when the instrumented block started execution + # finish # => Time, when the instrumented block ended execution + # id # => String, unique ID for the instrumenter that fired the event + # payload # => Hash, the payload + # end + # + # If the block passed to the method only takes one parameter, + # it will yield an event object to the block: + # + # ActiveSupport::Notifications.subscribe(/render/) do |event| + # @event = event + # end + # + # source://activesupport//lib/active_support/notifications.rb#234 def subscribe(pattern = T.unsafe(nil), callback = T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/notifications.rb#242 def subscribed(callback, pattern = T.unsafe(nil), monotonic: T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/notifications.rb#249 def unsubscribe(subscriber_or_name); end end end +# source://activesupport//lib/active_support/notifications/instrumenter.rb#54 class ActiveSupport::Notifications::Event + # @return [Event] a new instance of Event + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#58 def initialize(name, start, ending, transaction_id, payload); end + # source://activesupport//lib/active_support/notifications/instrumenter.rb#119 def <<(event); end + + # Returns the number of allocations made since the call to +start!+ and + # the call to +finish!+ + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#99 def allocations; end + + # Returns the value of attribute children. + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#55 def children; end + + # Returns the CPU time (in milliseconds) passed since the call to + # +start!+ and the call to +finish!+ + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#87 def cpu_time; end + + # Returns the difference in milliseconds between when the execution of the + # event started and when it ended. + # + # ActiveSupport::Notifications.subscribe('wait') do |*args| + # @event = ActiveSupport::Notifications::Event.new(*args) + # end + # + # ActiveSupport::Notifications.instrument('wait') do + # sleep 1 + # end + # + # @event.duration # => 1000.138 + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#115 def duration; end + + # Returns the value of attribute end. + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#55 def end; end + + # Record information at the time this event finishes + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#79 def finish!; end + + # Returns the idle time time (in milliseconds) passed since the call to + # +start!+ and the call to +finish!+ + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#93 def idle_time; end + + # Returns the value of attribute name. + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#55 def name; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#123 def parent_of?(event); end + + # Returns the value of attribute payload. + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#56 def payload; end + + # Sets the attribute payload + # + # @param value the value to set the attribute payload to. + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#56 def payload=(_arg0); end + + # Record information at the time this event starts + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#72 def start!; end + + # Returns the value of attribute time. + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#55 def time; end + + # Returns the value of attribute transaction_id. + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#55 def transaction_id; end private + # source://activesupport//lib/active_support/notifications/instrumenter.rb#128 def now; end + + # source://activesupport//lib/active_support/notifications/instrumenter.rb#149 def now_allocations; end + + # source://activesupport//lib/active_support/notifications/instrumenter.rb#139 def now_cpu; end end +# This is a default queue implementation that ships with Notifications. +# It just pushes events to all registered log subscribers. +# +# This class is thread safe. All methods are reentrant. +# +# source://activesupport//lib/active_support/notifications/fanout.rb#14 class ActiveSupport::Notifications::Fanout include ::Mutex_m + # @return [Fanout] a new instance of Fanout + # + # source://activesupport//lib/active_support/notifications/fanout.rb#17 def initialize; end + # source://activesupport//lib/active_support/notifications/fanout.rb#62 def finish(name, id, payload, listeners = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#70 def listeners_for(name); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/notifications/fanout.rb#79 def listening?(name); end + + # source://mutex_m/0.1.1/mutex_m.rb#93 def lock; end + + # source://mutex_m/0.1.1/mutex_m.rb#83 def locked?; end + + # source://activesupport//lib/active_support/notifications/fanout.rb#66 def publish(name, *args); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#58 def start(name, id, payload); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#24 def subscribe(pattern = T.unsafe(nil), callable = T.unsafe(nil), monotonic: T.unsafe(nil), &block); end + + # source://mutex_m/0.1.1/mutex_m.rb#78 def synchronize(&block); end + + # source://mutex_m/0.1.1/mutex_m.rb#88 def try_lock; end + + # source://mutex_m/0.1.1/mutex_m.rb#98 def unlock; end + + # source://activesupport//lib/active_support/notifications/fanout.rb#38 def unsubscribe(subscriber_or_name); end + + # This is a sync queue, so there is no waiting. + # + # source://activesupport//lib/active_support/notifications/fanout.rb#84 def wait; end end +# source://activesupport//lib/active_support/notifications/fanout.rb#87 module ActiveSupport::Notifications::Fanout::Subscribers class << self + # source://activesupport//lib/active_support/notifications/fanout.rb#88 def new(pattern, listener, monotonic); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#107 def wrap_all(pattern, subscriber); end end end +# source://activesupport//lib/active_support/notifications/fanout.rb#229 class ActiveSupport::Notifications::Fanout::Subscribers::AllMessages + # @return [AllMessages] a new instance of AllMessages + # + # source://activesupport//lib/active_support/notifications/fanout.rb#230 def initialize(delegate); end + # source://activesupport//lib/active_support/notifications/fanout.rb#238 def finish(name, id, payload); end + def matches?(_arg0); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#242 def publish(name, *args); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#234 def start(name, id, payload); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/notifications/fanout.rb#246 def subscribed_to?(name); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#250 def unsubscribe!(*_arg0); end end +# source://activesupport//lib/active_support/notifications/fanout.rb#207 class ActiveSupport::Notifications::Fanout::Subscribers::EventObject < ::ActiveSupport::Notifications::Fanout::Subscribers::Evented + # source://activesupport//lib/active_support/notifications/fanout.rb#215 def finish(name, id, payload); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#208 def start(name, id, payload); end private + # source://activesupport//lib/active_support/notifications/fanout.rb#224 def build_event(name, id, payload); end end +# source://activesupport//lib/active_support/notifications/fanout.rb#137 class ActiveSupport::Notifications::Fanout::Subscribers::Evented + # @return [Evented] a new instance of Evented + # + # source://activesupport//lib/active_support/notifications/fanout.rb#140 def initialize(pattern, delegate); end + # source://activesupport//lib/active_support/notifications/fanout.rb#156 def finish(name, id, payload); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/notifications/fanout.rb#164 def matches?(name); end + + # Returns the value of attribute pattern. + # + # source://activesupport//lib/active_support/notifications/fanout.rb#138 def pattern; end + + # source://activesupport//lib/active_support/notifications/fanout.rb#146 def publish(name, *args); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#152 def start(name, id, payload); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/notifications/fanout.rb#160 def subscribed_to?(name); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#168 def unsubscribe!(name); end end +# source://activesupport//lib/active_support/notifications/fanout.rb#115 class ActiveSupport::Notifications::Fanout::Subscribers::Matcher + # @return [Matcher] a new instance of Matcher + # + # source://activesupport//lib/active_support/notifications/fanout.rb#123 def initialize(pattern); end + # source://activesupport//lib/active_support/notifications/fanout.rb#132 def ===(name); end + + # Returns the value of attribute exclusions. + # + # source://activesupport//lib/active_support/notifications/fanout.rb#116 def exclusions; end + + # Returns the value of attribute pattern. + # + # source://activesupport//lib/active_support/notifications/fanout.rb#116 def pattern; end + + # source://activesupport//lib/active_support/notifications/fanout.rb#128 def unsubscribe!(name); end class << self + # source://activesupport//lib/active_support/notifications/fanout.rb#118 def wrap(pattern); end end end +# source://activesupport//lib/active_support/notifications/fanout.rb#190 class ActiveSupport::Notifications::Fanout::Subscribers::MonotonicTimed < ::ActiveSupport::Notifications::Fanout::Subscribers::Evented + # source://activesupport//lib/active_support/notifications/fanout.rb#200 def finish(name, id, payload); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#191 def publish(name, *args); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#195 def start(name, id, payload); end end +# source://activesupport//lib/active_support/notifications/fanout.rb#173 class ActiveSupport::Notifications::Fanout::Subscribers::Timed < ::ActiveSupport::Notifications::Fanout::Subscribers::Evented + # source://activesupport//lib/active_support/notifications/fanout.rb#183 def finish(name, id, payload); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#174 def publish(name, *args); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#178 def start(name, id, payload); end end +# This class is a registry which holds all of the +Instrumenter+ objects +# in a particular thread local. To access the +Instrumenter+ object for a +# particular +notifier+, you can call the following method: +# +# InstrumentationRegistry.instrumenter_for(notifier) +# +# The instrumenters for multiple notifiers are held in a single instance of +# this class. +# +# source://activesupport//lib/active_support/notifications.rb#266 class ActiveSupport::Notifications::InstrumentationRegistry extend ::ActiveSupport::PerThreadRegistry + # @return [InstrumentationRegistry] a new instance of InstrumentationRegistry + # + # source://activesupport//lib/active_support/notifications.rb#269 def initialize; end + # source://activesupport//lib/active_support/notifications.rb#273 def instrumenter_for(notifier); end end +# Instrumenters are stored in a thread local. +# +# source://activesupport//lib/active_support/notifications/instrumenter.rb#8 class ActiveSupport::Notifications::Instrumenter + # @return [Instrumenter] a new instance of Instrumenter + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#11 def initialize(notifier); end + # Send a finish notification with +name+ and +payload+. + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#40 def finish(name, payload); end + + # source://activesupport//lib/active_support/notifications/instrumenter.rb#44 def finish_with_state(listeners_state, name, payload); end + + # Returns the value of attribute id. + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#9 def id; end + + # Given a block, instrument it by measuring the time taken to execute + # and publish it. Without a block, simply send a message via the + # notifier. Notice that events get sent even if an error occurs in the + # passed-in block. + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#20 def instrument(name, payload = T.unsafe(nil)); end + + # Send a start notification with +name+ and +payload+. + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#35 def start(name, payload); end private + # source://activesupport//lib/active_support/notifications/instrumenter.rb#49 def unique_id; end end +# source://activesupport//lib/active_support/number_helper.rb#4 module ActiveSupport::NumberHelper extend ::ActiveSupport::Autoload extend ::ActiveSupport::NumberHelper + # Formats a +number+ into a currency string (e.g., $13.65). You + # can customize the format in the +options+ hash. + # + # The currency unit and number formatting of the current locale will be used + # unless otherwise specified in the provided options. No currency conversion + # is performed. If the user is given a way to change their locale, they will + # also be able to change the relative value of the currency displayed with + # this helper. If your application will ever support multiple locales, you + # may want to specify a constant :locale option or consider + # using a library capable of currency conversion. + # + # ==== Options + # + # * :locale - Sets the locale to be used for formatting + # (defaults to current locale). + # * :precision - Sets the level of precision (defaults + # to 2). + # * :round_mode - Determine how rounding is performed + # (defaults to :default. See BigDecimal::mode) + # * :unit - Sets the denomination of the currency + # (defaults to "$"). + # * :separator - Sets the separator between the units + # (defaults to "."). + # * :delimiter - Sets the thousands delimiter (defaults + # to ","). + # * :format - Sets the format for non-negative numbers + # (defaults to "%u%n"). Fields are %u for the + # currency, and %n for the number. + # * :negative_format - Sets the format for negative + # numbers (defaults to prepending a hyphen to the formatted + # number given by :format). Accepts the same fields + # than :format, except %n is here the + # absolute value of the number. + # * :strip_insignificant_zeros - If +true+ removes + # insignificant zeros after the decimal separator (defaults to + # +false+). + # + # ==== Examples + # + # number_to_currency(1234567890.50) # => "$1,234,567,890.50" + # number_to_currency(1234567890.506) # => "$1,234,567,890.51" + # number_to_currency(1234567890.506, precision: 3) # => "$1,234,567,890.506" + # number_to_currency(1234567890.506, locale: :fr) # => "1 234 567 890,51 €" + # number_to_currency('123a456') # => "$123a456" + # + # number_to_currency("123a456", raise: true) # => InvalidNumberError + # + # number_to_currency(-0.456789, precision: 0) + # # => "$0" + # number_to_currency(-1234567890.50, negative_format: '(%u%n)') + # # => "($1,234,567,890.50)" + # number_to_currency(1234567890.50, unit: '£', separator: ',', delimiter: '') + # # => "£1234567890,50" + # number_to_currency(1234567890.50, unit: '£', separator: ',', delimiter: '', format: '%n %u') + # # => "1234567890,50 £" + # number_to_currency(1234567890.50, strip_insignificant_zeros: true) + # # => "$1,234,567,890.5" + # number_to_currency(1234567890.50, precision: 0, round_mode: :up) + # # => "$1,234,567,891" + # + # source://activesupport//lib/active_support/number_helper.rb#116 def number_to_currency(number, options = T.unsafe(nil)); end + + # Formats a +number+ with grouped thousands using +delimiter+ + # (e.g., 12,324). You can customize the format in the +options+ + # hash. + # + # ==== Options + # + # * :locale - Sets the locale to be used for formatting + # (defaults to current locale). + # * :delimiter - Sets the thousands delimiter (defaults + # to ","). + # * :separator - Sets the separator between the + # fractional and integer digits (defaults to "."). + # * :delimiter_pattern - Sets a custom regular expression used for + # deriving the placement of delimiter. Helpful when using currency formats + # like INR. + # + # ==== Examples + # + # number_to_delimited(12345678) # => "12,345,678" + # number_to_delimited('123456') # => "123,456" + # number_to_delimited(12345678.05) # => "12,345,678.05" + # number_to_delimited(12345678, delimiter: '.') # => "12.345.678" + # number_to_delimited(12345678, delimiter: ',') # => "12,345,678" + # number_to_delimited(12345678.05, separator: ' ') # => "12,345,678 05" + # number_to_delimited(12345678.05, locale: :fr) # => "12 345 678,05" + # number_to_delimited('112a') # => "112a" + # number_to_delimited(98765432.98, delimiter: ' ', separator: ',') + # # => "98 765 432,98" + # number_to_delimited("123456.78", + # delimiter_pattern: /(\d+?)(?=(\d\d)+(\d)(?!\d))/) + # # => "1,23,456.78" + # + # source://activesupport//lib/active_support/number_helper.rb#191 def number_to_delimited(number, options = T.unsafe(nil)); end + + # Pretty prints (formats and approximates) a number in a way it + # is more readable by humans (e.g.: 1200000000 becomes "1.2 + # Billion"). This is useful for numbers that can get very large + # (and too hard to read). + # + # See number_to_human_size if you want to print a file + # size. + # + # You can also define your own unit-quantifier names if you want + # to use other decimal units (e.g.: 1500 becomes "1.5 + # kilometers", 0.150 becomes "150 milliliters", etc). You may + # define a wide range of unit quantifiers, even fractional ones + # (centi, deci, mili, etc). + # + # ==== Options + # + # * :locale - Sets the locale to be used for formatting + # (defaults to current locale). + # * :precision - Sets the precision of the number + # (defaults to 3). + # * :round_mode - Determine how rounding is performed + # (defaults to :default. See BigDecimal::mode) + # * :significant - If +true+, precision will be the number + # of significant_digits. If +false+, the number of fractional + # digits (defaults to +true+) + # * :separator - Sets the separator between the + # fractional and integer digits (defaults to "."). + # * :delimiter - Sets the thousands delimiter (defaults + # to ""). + # * :strip_insignificant_zeros - If +true+ removes + # insignificant zeros after the decimal separator (defaults to + # +true+) + # * :units - A Hash of unit quantifier names. Or a + # string containing an i18n scope where to find this hash. It + # might have the following keys: + # * *integers*: :unit, :ten, + # :hundred, :thousand, :million, + # :billion, :trillion, + # :quadrillion + # * *fractionals*: :deci, :centi, + # :mili, :micro, :nano, + # :pico, :femto + # * :format - Sets the format of the output string + # (defaults to "%n %u"). The field types are: + # * %u - The quantifier (ex.: 'thousand') + # * %n - The number + # + # ==== Examples + # + # number_to_human(123) # => "123" + # number_to_human(1234) # => "1.23 Thousand" + # number_to_human(12345) # => "12.3 Thousand" + # number_to_human(1234567) # => "1.23 Million" + # number_to_human(1234567890) # => "1.23 Billion" + # number_to_human(1234567890123) # => "1.23 Trillion" + # number_to_human(1234567890123456) # => "1.23 Quadrillion" + # number_to_human(1234567890123456789) # => "1230 Quadrillion" + # number_to_human(489939, precision: 2) # => "490 Thousand" + # number_to_human(489939, precision: 4) # => "489.9 Thousand" + # number_to_human(489939, precision: 2 + # , round_mode: :down) # => "480 Thousand" + # number_to_human(1234567, precision: 4, + # significant: false) # => "1.2346 Million" + # number_to_human(1234567, precision: 1, + # separator: ',', + # significant: false) # => "1,2 Million" + # + # number_to_human(500000000, precision: 5) # => "500 Million" + # number_to_human(12345012345, significant: false) # => "12.345 Billion" + # + # Non-significant zeros after the decimal separator are stripped + # out by default (set :strip_insignificant_zeros to + # +false+ to change that): + # + # number_to_human(12.00001) # => "12" + # number_to_human(12.00001, strip_insignificant_zeros: false) # => "12.0" + # + # ==== Custom Unit Quantifiers + # + # You can also use your own custom unit quantifiers: + # number_to_human(500000, units: { unit: 'ml', thousand: 'lt' }) # => "500 lt" + # + # If in your I18n locale you have: + # + # distance: + # centi: + # one: "centimeter" + # other: "centimeters" + # unit: + # one: "meter" + # other: "meters" + # thousand: + # one: "kilometer" + # other: "kilometers" + # billion: "gazillion-distance" + # + # Then you could do: + # + # number_to_human(543934, units: :distance) # => "544 kilometers" + # number_to_human(54393498, units: :distance) # => "54400 kilometers" + # number_to_human(54393498000, units: :distance) # => "54.4 gazillion-distance" + # number_to_human(343, units: :distance, precision: 1) # => "300 meters" + # number_to_human(1, units: :distance) # => "1 meter" + # number_to_human(0.34, units: :distance) # => "34 centimeters" + # + # source://activesupport//lib/active_support/number_helper.rb#393 def number_to_human(number, options = T.unsafe(nil)); end + + # Formats the bytes in +number+ into a more understandable + # representation (e.g., giving it 1500 yields 1.46 KB). This + # method is useful for reporting file sizes to users. You can + # customize the format in the +options+ hash. + # + # See number_to_human if you want to pretty-print a + # generic number. + # + # ==== Options + # + # * :locale - Sets the locale to be used for formatting + # (defaults to current locale). + # * :precision - Sets the precision of the number + # (defaults to 3). + # * :round_mode - Determine how rounding is performed + # (defaults to :default. See BigDecimal::mode) + # * :significant - If +true+, precision will be the number + # of significant_digits. If +false+, the number of fractional + # digits (defaults to +true+) + # * :separator - Sets the separator between the + # fractional and integer digits (defaults to "."). + # * :delimiter - Sets the thousands delimiter (defaults + # to ""). + # * :strip_insignificant_zeros - If +true+ removes + # insignificant zeros after the decimal separator (defaults to + # +true+) + # + # ==== Examples + # + # number_to_human_size(123) # => "123 Bytes" + # number_to_human_size(1234) # => "1.21 KB" + # number_to_human_size(12345) # => "12.1 KB" + # number_to_human_size(1234567) # => "1.18 MB" + # number_to_human_size(1234567890) # => "1.15 GB" + # number_to_human_size(1234567890123) # => "1.12 TB" + # number_to_human_size(1234567890123456) # => "1.1 PB" + # number_to_human_size(1234567890123456789) # => "1.07 EB" + # number_to_human_size(1234567, precision: 2) # => "1.2 MB" + # number_to_human_size(483989, precision: 2) # => "470 KB" + # number_to_human_size(483989, precision: 2, round_mode: :up) # => "480 KB" + # number_to_human_size(1234567, precision: 2, separator: ',') # => "1,2 MB" + # number_to_human_size(1234567890123, precision: 5) # => "1.1228 TB" + # number_to_human_size(524288000, precision: 5) # => "500 MB" + # + # source://activesupport//lib/active_support/number_helper.rb#285 def number_to_human_size(number, options = T.unsafe(nil)); end + + # Formats a +number+ as a percentage string (e.g., 65%). You can + # customize the format in the +options+ hash. + # + # ==== Options + # + # * :locale - Sets the locale to be used for formatting + # (defaults to current locale). + # * :precision - Sets the precision of the number + # (defaults to 3). Keeps the number's precision if +nil+. + # * :round_mode - Determine how rounding is performed + # (defaults to :default. See BigDecimal::mode) + # * :significant - If +true+, precision will be the number + # of significant_digits. If +false+, the number of fractional + # digits (defaults to +false+). + # * :separator - Sets the separator between the + # fractional and integer digits (defaults to "."). + # * :delimiter - Sets the thousands delimiter (defaults + # to ""). + # * :strip_insignificant_zeros - If +true+ removes + # insignificant zeros after the decimal separator (defaults to + # +false+). + # * :format - Specifies the format of the percentage + # string The number field is %n (defaults to "%n%"). + # + # ==== Examples + # + # number_to_percentage(100) # => "100.000%" + # number_to_percentage('98') # => "98.000%" + # number_to_percentage(100, precision: 0) # => "100%" + # number_to_percentage(1000, delimiter: '.', separator: ',') # => "1.000,000%" + # number_to_percentage(302.24398923423, precision: 5) # => "302.24399%" + # number_to_percentage(1000, locale: :fr) # => "1000,000%" + # number_to_percentage(1000, precision: nil) # => "1000%" + # number_to_percentage('98a') # => "98a%" + # number_to_percentage(100, format: '%n %') # => "100.000 %" + # number_to_percentage(302.24398923423, precision: 5, round_mode: :down) # => "302.24398%" + # + # source://activesupport//lib/active_support/number_helper.rb#156 def number_to_percentage(number, options = T.unsafe(nil)); end + + # Formats a +number+ into a phone number (US by default e.g., (555) + # 123-9876). You can customize the format in the +options+ hash. + # + # ==== Options + # + # * :area_code - Adds parentheses around the area code. + # * :delimiter - Specifies the delimiter to use + # (defaults to "-"). + # * :extension - Specifies an extension to add to the + # end of the generated number. + # * :country_code - Sets the country code for the phone + # number. + # * :pattern - Specifies how the number is divided into three + # groups with the custom regexp to override the default format. + # ==== Examples + # + # number_to_phone(5551234) # => "555-1234" + # number_to_phone('5551234') # => "555-1234" + # number_to_phone(1235551234) # => "123-555-1234" + # number_to_phone(1235551234, area_code: true) # => "(123) 555-1234" + # number_to_phone(1235551234, delimiter: ' ') # => "123 555 1234" + # number_to_phone(1235551234, area_code: true, extension: 555) # => "(123) 555-1234 x 555" + # number_to_phone(1235551234, country_code: 1) # => "+1-123-555-1234" + # number_to_phone('123a456') # => "123a456" + # + # number_to_phone(1235551234, country_code: 1, extension: 1343, delimiter: '.') + # # => "+1.123.555.1234 x 1343" + # + # number_to_phone(75561234567, pattern: /(\d{1,4})(\d{4})(\d{4})$/, area_code: true) + # # => "(755) 6123-4567" + # number_to_phone(13312345678, pattern: /(\d{3})(\d{4})(\d{4})$/) + # # => "133-1234-5678" + # + # source://activesupport//lib/active_support/number_helper.rb#53 def number_to_phone(number, options = T.unsafe(nil)); end + + # Formats a +number+ with the specified level of + # :precision (e.g., 112.32 has a precision of 2 if + # +:significant+ is +false+, and 5 if +:significant+ is +true+). + # You can customize the format in the +options+ hash. + # + # ==== Options + # + # * :locale - Sets the locale to be used for formatting + # (defaults to current locale). + # * :precision - Sets the precision of the number + # (defaults to 3). Keeps the number's precision if +nil+. + # * :round_mode - Determine how rounding is performed + # (defaults to :default. See BigDecimal::mode) + # * :significant - If +true+, precision will be the number + # of significant_digits. If +false+, the number of fractional + # digits (defaults to +false+). + # * :separator - Sets the separator between the + # fractional and integer digits (defaults to "."). + # * :delimiter - Sets the thousands delimiter (defaults + # to ""). + # * :strip_insignificant_zeros - If +true+ removes + # insignificant zeros after the decimal separator (defaults to + # +false+). + # + # ==== Examples + # + # number_to_rounded(111.2345) # => "111.235" + # number_to_rounded(111.2345, precision: 2) # => "111.23" + # number_to_rounded(13, precision: 5) # => "13.00000" + # number_to_rounded(389.32314, precision: 0) # => "389" + # number_to_rounded(111.2345, significant: true) # => "111" + # number_to_rounded(111.2345, precision: 1, significant: true) # => "100" + # number_to_rounded(13, precision: 5, significant: true) # => "13.000" + # number_to_rounded(13, precision: nil) # => "13" + # number_to_rounded(389.32314, precision: 0, round_mode: :up) # => "390" + # number_to_rounded(111.234, locale: :fr) # => "111,234" + # + # number_to_rounded(13, precision: 5, significant: true, strip_insignificant_zeros: true) + # # => "13" + # + # number_to_rounded(389.32314, precision: 4, significant: true) # => "389.3" + # number_to_rounded(1111.2345, precision: 2, separator: ',', delimiter: '.') + # # => "1.111,23" + # + # source://activesupport//lib/active_support/number_helper.rb#238 def number_to_rounded(number, options = T.unsafe(nil)); end end +# source://activesupport//lib/active_support/number_helper/number_converter.rb#11 class ActiveSupport::NumberHelper::NumberConverter + # @return [NumberConverter] a new instance of NumberConverter + # + # source://activesupport//lib/active_support/number_helper/number_converter.rb#123 def initialize(number, options); end + # source://activesupport//lib/active_support/number_helper/number_converter.rb#128 def execute; end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 def namespace; end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 def namespace=(_arg0); end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 def namespace?; end + + # Returns the value of attribute number. + # + # source://activesupport//lib/active_support/number_helper/number_converter.rb#18 def number; end + + # Returns the value of attribute opts. + # + # source://activesupport//lib/active_support/number_helper/number_converter.rb#18 def opts; end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#16 def validate_float; end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#16 def validate_float=(_arg0); end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#16 def validate_float?; end private + # source://activesupport//lib/active_support/number_helper/number_converter.rb#147 def default_format_options; end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#172 def default_value(key); end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#143 def format_options; end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#153 def i18n_format_options; end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#139 def options; end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#168 def translate_in_locale(key, **i18n_options); end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#164 def translate_number_value_with_default(key, **i18n_options); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/number_helper/number_converter.rb#176 def valid_float?; end class << self + # source://activesupport//lib/active_support/number_helper/number_converter.rb#119 def convert(number, options); end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 def namespace; end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 def namespace=(value); end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 def namespace?; end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#16 def validate_float; end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#16 def validate_float=(value); end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#16 def validate_float?; end end end +# source://activesupport//lib/active_support/number_helper/number_converter.rb#20 ActiveSupport::NumberHelper::NumberConverter::DEFAULTS = T.let(T.unsafe(nil), Hash) +# source://activesupport//lib/active_support/number_helper/number_to_currency_converter.rb#7 class ActiveSupport::NumberHelper::NumberToCurrencyConverter < ::ActiveSupport::NumberHelper::NumberConverter + # source://activesupport//lib/active_support/number_helper/number_to_currency_converter.rb#10 def convert; end private + # source://activesupport//lib/active_support/number_helper/number_to_currency_converter.rb#33 def i18n_opts; end + + # source://activesupport//lib/active_support/number_helper/number_to_currency_converter.rb#24 def options; end class << self + # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 def namespace; end end end +# source://activesupport//lib/active_support/number_helper/number_to_delimited_converter.rb#7 class ActiveSupport::NumberHelper::NumberToDelimitedConverter < ::ActiveSupport::NumberHelper::NumberConverter + # source://activesupport//lib/active_support/number_helper/number_to_delimited_converter.rb#12 def convert; end private + # source://activesupport//lib/active_support/number_helper/number_to_delimited_converter.rb#25 def delimiter_pattern; end + + # source://activesupport//lib/active_support/number_helper/number_to_delimited_converter.rb#17 def parts; end class << self + # source://activesupport//lib/active_support/number_helper/number_converter.rb#16 def validate_float; end end end +# source://activesupport//lib/active_support/number_helper/number_to_delimited_converter.rb#10 ActiveSupport::NumberHelper::NumberToDelimitedConverter::DEFAULT_DELIMITER_REGEX = T.let(T.unsafe(nil), Regexp) +# source://activesupport//lib/active_support/number_helper/number_to_human_converter.rb#7 class ActiveSupport::NumberHelper::NumberToHumanConverter < ::ActiveSupport::NumberHelper::NumberConverter + # source://activesupport//lib/active_support/number_helper/number_to_human_converter.rb#15 def convert; end private + # source://activesupport//lib/active_support/number_helper/number_to_human_converter.rb#50 def calculate_exponent(units); end + + # source://activesupport//lib/active_support/number_helper/number_to_human_converter.rb#38 def determine_unit(units, exponent); end + + # source://activesupport//lib/active_support/number_helper/number_to_human_converter.rb#34 def format; end + + # source://activesupport//lib/active_support/number_helper/number_to_human_converter.rb#55 def unit_exponents(units); end class << self + # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 def namespace; end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#16 def validate_float; end end end +# source://activesupport//lib/active_support/number_helper/number_to_human_converter.rb#8 ActiveSupport::NumberHelper::NumberToHumanConverter::DECIMAL_UNITS = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/number_helper/number_to_human_converter.rb#10 ActiveSupport::NumberHelper::NumberToHumanConverter::INVERTED_DECIMAL_UNITS = T.let(T.unsafe(nil), Hash) +# source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#7 class ActiveSupport::NumberHelper::NumberToHumanSizeConverter < ::ActiveSupport::NumberHelper::NumberConverter + # source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#13 def convert; end private + # source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#55 def base; end + + # source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#31 def conversion_format; end + + # source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#44 def exponent; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#51 def smaller_than_base?; end + + # source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#39 def storage_unit_key; end + + # source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#35 def unit; end class << self + # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 def namespace; end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#16 def validate_float; end end end +# source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#8 ActiveSupport::NumberHelper::NumberToHumanSizeConverter::STORAGE_UNITS = T.let(T.unsafe(nil), Array) +# source://activesupport//lib/active_support/number_helper/number_to_percentage_converter.rb#7 class ActiveSupport::NumberHelper::NumberToPercentageConverter < ::ActiveSupport::NumberHelper::NumberConverter + # source://activesupport//lib/active_support/number_helper/number_to_percentage_converter.rb#10 def convert; end class << self + # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 def namespace; end end end +# source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#7 class ActiveSupport::NumberHelper::NumberToPhoneConverter < ::ActiveSupport::NumberHelper::NumberConverter + # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#8 def convert; end private + # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#15 def convert_to_phone_number(number); end + + # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#23 def convert_with_area_code(number); end + + # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#30 def convert_without_area_code(number); end + + # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#46 def country_code(code); end + + # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#42 def delimiter; end + + # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#50 def phone_ext(ext); end + + # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#54 def regexp_pattern(default_pattern); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#38 def start_with_delimiter?(number); end end +# source://activesupport//lib/active_support/number_helper/number_to_rounded_converter.rb#7 class ActiveSupport::NumberHelper::NumberToRoundedConverter < ::ActiveSupport::NumberHelper::NumberConverter + # source://activesupport//lib/active_support/number_helper/number_to_rounded_converter.rb#11 def convert; end private + # source://activesupport//lib/active_support/number_helper/number_to_rounded_converter.rb#49 def format_number(number); end + + # source://activesupport//lib/active_support/number_helper/number_to_rounded_converter.rb#45 def strip_insignificant_zeros; end class << self + # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 def namespace; end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#16 def validate_float; end end end +# source://activesupport//lib/active_support/number_helper/rounding_helper.rb#5 class ActiveSupport::NumberHelper::RoundingHelper + # @return [RoundingHelper] a new instance of RoundingHelper + # + # source://activesupport//lib/active_support/number_helper/rounding_helper.rb#8 def initialize(options); end + # source://activesupport//lib/active_support/number_helper/rounding_helper.rb#20 def digit_count(number); end + + # Returns the value of attribute options. + # + # source://activesupport//lib/active_support/number_helper/rounding_helper.rb#6 def options; end + + # source://activesupport//lib/active_support/number_helper/rounding_helper.rb#12 def round(number); end private + # source://activesupport//lib/active_support/number_helper/rounding_helper.rb#37 def absolute_precision(number); end + + # source://activesupport//lib/active_support/number_helper/rounding_helper.rb#26 def convert_to_decimal(number); end + + # source://activesupport//lib/active_support/number_helper/rounding_helper.rb#45 def significant; end end +# source://activesupport//lib/active_support/core_ext/numeric/conversions.rb#7 module ActiveSupport::NumericWithFormat + # Provides options for converting numbers into formatted strings. + # Options are provided for phone numbers, currency, percentage, + # precision, positional notation, file size and pretty printing. + # + # ==== Options + # + # For details on which formats use which options, see ActiveSupport::NumberHelper + # + # ==== Examples + # + # Phone Numbers: + # 5551234.to_s(:phone) # => "555-1234" + # 1235551234.to_s(:phone) # => "123-555-1234" + # 1235551234.to_s(:phone, area_code: true) # => "(123) 555-1234" + # 1235551234.to_s(:phone, delimiter: ' ') # => "123 555 1234" + # 1235551234.to_s(:phone, area_code: true, extension: 555) # => "(123) 555-1234 x 555" + # 1235551234.to_s(:phone, country_code: 1) # => "+1-123-555-1234" + # 1235551234.to_s(:phone, country_code: 1, extension: 1343, delimiter: '.') + # # => "+1.123.555.1234 x 1343" + # + # Currency: + # 1234567890.50.to_s(:currency) # => "$1,234,567,890.50" + # 1234567890.506.to_s(:currency) # => "$1,234,567,890.51" + # 1234567890.506.to_s(:currency, precision: 3) # => "$1,234,567,890.506" + # 1234567890.506.to_s(:currency, round_mode: :down) # => "$1,234,567,890.50" + # 1234567890.506.to_s(:currency, locale: :fr) # => "1 234 567 890,51 €" + # -1234567890.50.to_s(:currency, negative_format: '(%u%n)') + # # => "($1,234,567,890.50)" + # 1234567890.50.to_s(:currency, unit: '£', separator: ',', delimiter: '') + # # => "£1234567890,50" + # 1234567890.50.to_s(:currency, unit: '£', separator: ',', delimiter: '', format: '%n %u') + # # => "1234567890,50 £" + # + # Percentage: + # 100.to_s(:percentage) # => "100.000%" + # 100.to_s(:percentage, precision: 0) # => "100%" + # 1000.to_s(:percentage, delimiter: '.', separator: ',') # => "1.000,000%" + # 302.24398923423.to_s(:percentage, precision: 5) # => "302.24399%" + # 302.24398923423.to_s(:percentage, round_mode: :down) # => "302.243%" + # 1000.to_s(:percentage, locale: :fr) # => "1 000,000%" + # 100.to_s(:percentage, format: '%n %') # => "100.000 %" + # + # Delimited: + # 12345678.to_s(:delimited) # => "12,345,678" + # 12345678.05.to_s(:delimited) # => "12,345,678.05" + # 12345678.to_s(:delimited, delimiter: '.') # => "12.345.678" + # 12345678.to_s(:delimited, delimiter: ',') # => "12,345,678" + # 12345678.05.to_s(:delimited, separator: ' ') # => "12,345,678 05" + # 12345678.05.to_s(:delimited, locale: :fr) # => "12 345 678,05" + # 98765432.98.to_s(:delimited, delimiter: ' ', separator: ',') + # # => "98 765 432,98" + # + # Rounded: + # 111.2345.to_s(:rounded) # => "111.235" + # 111.2345.to_s(:rounded, precision: 2) # => "111.23" + # 111.2345.to_s(:rounded, precision: 2, round_mode: :up) # => "111.24" + # 13.to_s(:rounded, precision: 5) # => "13.00000" + # 389.32314.to_s(:rounded, precision: 0) # => "389" + # 111.2345.to_s(:rounded, significant: true) # => "111" + # 111.2345.to_s(:rounded, precision: 1, significant: true) # => "100" + # 13.to_s(:rounded, precision: 5, significant: true) # => "13.000" + # 111.234.to_s(:rounded, locale: :fr) # => "111,234" + # 13.to_s(:rounded, precision: 5, significant: true, strip_insignificant_zeros: true) + # # => "13" + # 389.32314.to_s(:rounded, precision: 4, significant: true) # => "389.3" + # 1111.2345.to_s(:rounded, precision: 2, separator: ',', delimiter: '.') + # # => "1.111,23" + # + # Human-friendly size in Bytes: + # 123.to_s(:human_size) # => "123 Bytes" + # 1234.to_s(:human_size) # => "1.21 KB" + # 12345.to_s(:human_size) # => "12.1 KB" + # 1234567.to_s(:human_size) # => "1.18 MB" + # 1234567890.to_s(:human_size) # => "1.15 GB" + # 1234567890123.to_s(:human_size) # => "1.12 TB" + # 1234567890123456.to_s(:human_size) # => "1.1 PB" + # 1234567890123456789.to_s(:human_size) # => "1.07 EB" + # 1234567.to_s(:human_size, precision: 2) # => "1.2 MB" + # 1234567.to_s(:human_size, precision: 2, round_mode: :up) # => "1.3 MB" + # 483989.to_s(:human_size, precision: 2) # => "470 KB" + # 1234567.to_s(:human_size, precision: 2, separator: ',') # => "1,2 MB" + # 1234567890123.to_s(:human_size, precision: 5) # => "1.1228 TB" + # 524288000.to_s(:human_size, precision: 5) # => "500 MB" + # + # Human-friendly format: + # 123.to_s(:human) # => "123" + # 1234.to_s(:human) # => "1.23 Thousand" + # 12345.to_s(:human) # => "12.3 Thousand" + # 1234567.to_s(:human) # => "1.23 Million" + # 1234567890.to_s(:human) # => "1.23 Billion" + # 1234567890123.to_s(:human) # => "1.23 Trillion" + # 1234567890123456.to_s(:human) # => "1.23 Quadrillion" + # 1234567890123456789.to_s(:human) # => "1230 Quadrillion" + # 489939.to_s(:human, precision: 2) # => "490 Thousand" + # 489939.to_s(:human, precision: 2, round_mode: :down) # => "480 Thousand" + # 489939.to_s(:human, precision: 4) # => "489.9 Thousand" + # 1234567.to_s(:human, precision: 4, + # significant: false) # => "1.2346 Million" + # 1234567.to_s(:human, precision: 1, + # separator: ',', + # significant: false) # => "1,2 Million" + # + # source://activesupport//lib/active_support/core_ext/numeric/conversions.rb#109 def to_s(format = T.unsafe(nil), options = T.unsafe(nil)); end end +# source://activesupport//lib/active_support/option_merger.rb#7 class ActiveSupport::OptionMerger + # @return [OptionMerger] a new instance of OptionMerger + # + # source://activesupport//lib/active_support/option_merger.rb#12 def initialize(context, options); end private + # source://activesupport//lib/active_support/option_merger.rb#32 def invoke_method(method, arguments, options, &block); end + + # source://activesupport//lib/active_support/option_merger.rb#17 def method_missing(method, *arguments, &block); end end +# DEPRECATED: ActiveSupport::OrderedHash implements a hash that preserves +# insertion order. +# +# oh = ActiveSupport::OrderedHash.new +# oh[:a] = 1 +# oh[:b] = 2 +# oh.keys # => [:a, :b], this order is guaranteed +# +# Also, maps the +omap+ feature for YAML files +# (See https://yaml.org/type/omap.html) to support ordered items +# when loading from yaml. +# +# ActiveSupport::OrderedHash is namespaced to prevent conflicts +# with other implementations. +# +# source://activesupport//lib/active_support/ordered_hash.rb#24 class ActiveSupport::OrderedHash < ::Hash + # source://activesupport//lib/active_support/ordered_hash.rb#29 def encode_with(coder); end + + # Returns true to make sure that this hash is extractable via Array#extract_options! + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/ordered_hash.rb#46 def extractable_options?; end + + # source://activesupport//lib/active_support/ordered_hash.rb#41 def nested_under_indifferent_access; end + + # source://activesupport//lib/active_support/ordered_hash.rb#37 def reject(*args, &block); end + + # source://activesupport//lib/active_support/ordered_hash.rb#33 def select(*args, &block); end + + # source://activesupport//lib/active_support/ordered_hash.rb#25 def to_yaml_type; end end +# +OrderedOptions+ inherits from +Hash+ and provides dynamic accessor methods. +# +# With a +Hash+, key-value pairs are typically managed like this: +# +# h = {} +# h[:boy] = 'John' +# h[:girl] = 'Mary' +# h[:boy] # => 'John' +# h[:girl] # => 'Mary' +# h[:dog] # => nil +# +# Using +OrderedOptions+, the above code can be written as: +# +# h = ActiveSupport::OrderedOptions.new +# h.boy = 'John' +# h.girl = 'Mary' +# h.boy # => 'John' +# h.girl # => 'Mary' +# h.dog # => nil +# +# To raise an exception when the value is blank, append a +# bang to the key name, like: +# +# h.dog! # => raises KeyError: :dog is blank +# +# source://activesupport//lib/active_support/ordered_options.rb#31 class ActiveSupport::OrderedOptions < ::Hash + # source://activesupport//lib/active_support/ordered_options.rb#39 def [](key); end + + # source://activesupport//lib/active_support/ordered_options.rb#35 def []=(key, value); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/ordered_options.rb#62 def extractable_options?; end + + # source://activesupport//lib/active_support/ordered_options.rb#66 def inspect; end + + # source://activesupport//lib/active_support/ordered_options.rb#43 def method_missing(name, *args); end protected + # preserve the original #[] method def _get(_arg0); end private + # @return [Boolean] + # + # source://activesupport//lib/active_support/ordered_options.rb#58 def respond_to_missing?(name, include_private); end end +# NOTE: This approach has been deprecated for end-user code in favor of {thread_mattr_accessor}[rdoc-ref:Module#thread_mattr_accessor] and friends. +# Please use that approach instead. +# +# This module is used to encapsulate access to thread local variables. +# +# Instead of polluting the thread locals namespace: +# +# Thread.current[:connection_handler] +# +# you define a class that extends this module: +# +# module ActiveRecord +# class RuntimeRegistry +# extend ActiveSupport::PerThreadRegistry +# +# attr_accessor :connection_handler +# end +# end +# +# and invoke the declared instance accessors as class methods. So +# +# ActiveRecord::RuntimeRegistry.connection_handler = connection_handler +# +# sets a connection handler local to the current thread, and +# +# ActiveRecord::RuntimeRegistry.connection_handler +# +# returns a connection handler local to the current thread. +# +# This feature is accomplished by instantiating the class and storing the +# instance as a thread local keyed by the class name. In the example above +# a key "ActiveRecord::RuntimeRegistry" is stored in Thread.current. +# The class methods proxy to said thread local instance. +# +# If the class has an initializer, it must accept no arguments. +# +# source://activesupport//lib/active_support/per_thread_registry.rb#41 module ActiveSupport::PerThreadRegistry + # source://activesupport//lib/active_support/per_thread_registry.rb#46 def instance; end private - def method_missing(name, *args, &block); end + # source://activesupport//lib/active_support/per_thread_registry.rb#51 + def method_missing(name, *args, **_arg2, &block); end class << self + # @private + # + # source://activesupport//lib/active_support/per_thread_registry.rb#42 def extended(object); end end end +# A class with no predefined methods that behaves similarly to Builder's +# BlankSlate. Used for proxy classes. +# +# source://activesupport//lib/active_support/proxy_object.rb#6 class ActiveSupport::ProxyObject < ::BasicObject + # Let ActiveSupport::ProxyObject at least raise exceptions. + # + # source://activesupport//lib/active_support/proxy_object.rb#11 def raise(*args); end end +# source://activesupport//lib/active_support/core_ext/range/conversions.rb#4 module ActiveSupport::RangeWithFormat + # Convert range to a formatted string. See RANGE_FORMATS for predefined formats. + # + # range = (1..100) # => 1..100 + # + # range.to_s # => "1..100" + # range.to_s(:db) # => "BETWEEN '1' AND '100'" + # + # == Adding your own range formats to to_s + # You can add your own formats to the Range::RANGE_FORMATS hash. + # Use the format name as the hash key and a Proc instance. + # + # # config/initializers/range_formats.rb + # Range::RANGE_FORMATS[:short] = ->(start, stop) { "Between #{start.to_s(:db)} and #{stop.to_s(:db)}" } + # + # source://activesupport//lib/active_support/core_ext/range/conversions.rb#28 def to_default_s(format = T.unsafe(nil)); end + + # Convert range to a formatted string. See RANGE_FORMATS for predefined formats. + # + # range = (1..100) # => 1..100 + # + # range.to_s # => "1..100" + # range.to_s(:db) # => "BETWEEN '1' AND '100'" + # + # == Adding your own range formats to to_s + # You can add your own formats to the Range::RANGE_FORMATS hash. + # Use the format name as the hash key and a Proc instance. + # + # # config/initializers/range_formats.rb + # Range::RANGE_FORMATS[:short] = ->(start, stop) { "Between #{start.to_s(:db)} and #{stop.to_s(:db)}" } + # + # source://activesupport//lib/active_support/core_ext/range/conversions.rb#28 def to_formatted_s(format = T.unsafe(nil)); end + + # Convert range to a formatted string. See RANGE_FORMATS for predefined formats. + # + # range = (1..100) # => 1..100 + # + # range.to_s # => "1..100" + # range.to_s(:db) # => "BETWEEN '1' AND '100'" + # + # == Adding your own range formats to to_s + # You can add your own formats to the Range::RANGE_FORMATS hash. + # Use the format name as the hash key and a Proc instance. + # + # # config/initializers/range_formats.rb + # Range::RANGE_FORMATS[:short] = ->(start, stop) { "Between #{start.to_s(:db)} and #{stop.to_s(:db)}" } + # + # source://activesupport//lib/active_support/core_ext/range/conversions.rb#28 def to_s(format = T.unsafe(nil)); end end +# source://activesupport//lib/active_support/core_ext/range/conversions.rb#5 ActiveSupport::RangeWithFormat::RANGE_FORMATS = T.let(T.unsafe(nil), Hash) +# -- +# This class defines several callbacks: +# +# to_prepare -- Run once at application startup, and also from +# +to_run+. +# +# to_run -- Run before a work run that is reloading. If +# +reload_classes_only_on_change+ is true (the default), the class +# unload will have already occurred. +# +# to_complete -- Run after a work run that has reloaded. If +# +reload_classes_only_on_change+ is false, the class unload will +# have occurred after the work run, but before this callback. +# +# before_class_unload -- Run immediately before the classes are +# unloaded. +# +# after_class_unload -- Run immediately after the classes are +# unloaded. +# +# source://activesupport//lib/active_support/reloader.rb#27 class ActiveSupport::Reloader < ::ActiveSupport::ExecutionWrapper + # @return [Reloader] a new instance of Reloader + # + # source://activesupport//lib/active_support/reloader.rb#91 def initialize; end + # source://activesupport//lib/active_support/callbacks.rb#835 def _class_unload_callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#835 def _prepare_callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#823 def _run_class_unload_callbacks(&block); end + + # source://activesupport//lib/active_support/callbacks.rb#823 def _run_prepare_callbacks(&block); end + + # source://activesupport//lib/active_support/reloader.rb#77 def check; end + + # source://activesupport//lib/active_support/reloader.rb#77 def check=(_arg0); end + + # source://activesupport//lib/active_support/reloader.rb#77 def check?; end + + # source://activesupport//lib/active_support/reloader.rb#118 def class_unload!(&block); end + + # source://activesupport//lib/active_support/reloader.rb#123 def complete!; end + + # source://activesupport//lib/active_support/reloader.rb#76 def executor; end + + # source://activesupport//lib/active_support/reloader.rb#76 def executor=(_arg0); end + + # source://activesupport//lib/active_support/reloader.rb#76 def executor?; end + + # Release the unload lock if it has been previously obtained + # + # source://activesupport//lib/active_support/reloader.rb#106 def release_unload_lock!; end + + # Acquire the ActiveSupport::Dependencies::Interlock unload lock, + # ensuring it will be released automatically + # + # source://activesupport//lib/active_support/reloader.rb#98 def require_unload_lock!; end + + # source://activesupport//lib/active_support/reloader.rb#113 def run!; end class << self + # source://activesupport//lib/active_support/callbacks.rb#67 def __callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#827 def _class_unload_callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#831 def _class_unload_callbacks=(value); end + + # source://activesupport//lib/active_support/callbacks.rb#827 def _prepare_callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#831 def _prepare_callbacks=(value); end + + # Registers a callback that will run immediately after the classes are unloaded. + # + # source://activesupport//lib/active_support/reloader.rb#43 def after_class_unload(*args, &block); end + + # Registers a callback that will run immediately before the classes are unloaded. + # + # source://activesupport//lib/active_support/reloader.rb#38 def before_class_unload(*args, &block); end + + # source://activesupport//lib/active_support/reloader.rb#77 def check; end + + # source://activesupport//lib/active_support/reloader.rb#79 def check!; end + + # source://activesupport//lib/active_support/reloader.rb#77 def check=(value); end + + # source://activesupport//lib/active_support/reloader.rb#77 def check?; end + + # source://activesupport//lib/active_support/reloader.rb#76 def executor; end + + # source://activesupport//lib/active_support/reloader.rb#76 def executor=(value); end + + # source://activesupport//lib/active_support/reloader.rb#76 def executor?; end + + # source://activesupport//lib/active_support/reloader.rb#87 def prepare!; end + + # Initiate a manual reload + # + # source://activesupport//lib/active_support/reloader.rb#50 def reload!; end + + # source://activesupport//lib/active_support/reloader.rb#83 def reloaded!; end + + # source://activesupport//lib/active_support/reloader.rb#61 def run!(reset: T.unsafe(nil)); end + + # Registers a callback that will run once at application startup and every time the code is reloaded. + # + # source://activesupport//lib/active_support/reloader.rb#33 def to_prepare(*args, &block); end + + # Run the supplied block as a work unit, reloading code as needed + # + # source://activesupport//lib/active_support/reloader.rb#70 def wrap; end end end +# Rescuable module adds support for easier exception handling. +# +# source://activesupport//lib/active_support/rescuable.rb#9 module ActiveSupport::Rescuable extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -2251,7 +9165,16 @@ module ActiveSupport::Rescuable mixes_in_class_methods GeneratedClassMethods mixes_in_class_methods ::ActiveSupport::Rescuable::ClassMethods + # Internal handler lookup. Delegates to class method. Some libraries call + # this directly, so keeping it around for compatibility. + # + # source://activesupport//lib/active_support/rescuable.rb#170 def handler_for_rescue(exception); end + + # Delegates to the class method, but uses the instance as the subject for + # rescue_from handlers (method calls, instance_exec blocks). + # + # source://activesupport//lib/active_support/rescuable.rb#164 def rescue_with_handler(exception); end module GeneratedClassMethods @@ -2267,202 +9190,637 @@ module ActiveSupport::Rescuable end end +# source://activesupport//lib/active_support/rescuable.rb#16 module ActiveSupport::Rescuable::ClassMethods + # source://activesupport//lib/active_support/rescuable.rb#103 def handler_for_rescue(exception, object: T.unsafe(nil)); end + + # Registers exception classes with a handler to be called by rescue_with_handler. + # + # rescue_from receives a series of exception classes or class + # names, and an exception handler specified by a trailing :with + # option containing the name of a method or a Proc object. Alternatively, a block + # can be given as the handler. + # + # Handlers that take one argument will be called with the exception, so + # that the exception can be inspected when dealing with it. + # + # Handlers are inherited. They are searched from right to left, from + # bottom to top, and up the hierarchy. The handler of the first class for + # which exception.is_a?(klass) holds true is the one invoked, if + # any. + # + # class ApplicationController < ActionController::Base + # rescue_from User::NotAuthorized, with: :deny_access # self defined exception + # rescue_from ActiveRecord::RecordInvalid, with: :show_errors + # + # rescue_from 'MyAppError::Base' do |exception| + # render xml: exception, status: 500 + # end + # + # private + # def deny_access + # ... + # end + # + # def show_errors(exception) + # exception.record.new_record? ? ... + # end + # end + # + # Exceptions raised inside exception handlers are not propagated up. + # + # source://activesupport//lib/active_support/rescuable.rb#51 def rescue_from(*klasses, with: T.unsafe(nil), &block); end + + # Matches an exception to a handler based on the exception class. + # + # If no handler matches the exception, check for a handler matching the + # (optional) exception.cause. If no handler matches the exception or its + # cause, this returns +nil+, so you can deal with unhandled exceptions. + # Be sure to re-raise unhandled exceptions if this is what you expect. + # + # begin + # … + # rescue => exception + # rescue_with_handler(exception) || raise + # end + # + # Returns the exception if it was handled and +nil+ if it was not. + # + # source://activesupport//lib/active_support/rescuable.rb#88 def rescue_with_handler(exception, object: T.unsafe(nil), visited_exceptions: T.unsafe(nil)); end private + # source://activesupport//lib/active_support/rescuable.rb#137 def constantize_rescue_handler_class(class_or_name); end + + # source://activesupport//lib/active_support/rescuable.rb#122 def find_rescue_handler(exception); end end +# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#162 class ActiveSupport::SafeBuffer < ::String + # @return [SafeBuffer] a new instance of SafeBuffer + # + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#200 def initialize(str = T.unsafe(nil)); end + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#254 def %(args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#247 def *(*_arg0); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#243 def +(other); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#214 def <<(value); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#181 def [](*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#235 def []=(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#219 def bytesplice(*args, value); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#284 def capitalize(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#288 def capitalize!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#284 def chomp(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#288 def chomp!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#284 def chop(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#288 def chop!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#210 def clone_empty; end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#214 def concat(value); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#284 def delete(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#288 def delete!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#284 def delete_prefix(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#288 def delete_prefix!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#284 def delete_suffix(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#288 def delete_suffix!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#284 def downcase(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#288 def downcase!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#277 def encode_with(coder); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#299 def gsub(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#310 def gsub!(*args, &block); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#265 def html_safe?; end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#223 def insert(index, value); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#284 def lstrip(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#288 def lstrip!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#284 def next(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#288 def next!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#227 def prepend(value); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#231 def replace(value); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#284 def reverse(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#288 def reverse!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#284 def rstrip(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#288 def rstrip!(*args); end + + # @raise [SafeConcatError] + # + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#195 def safe_concat(value); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#284 def scrub(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#288 def scrub!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#284 def slice(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#288 def slice!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#284 def squeeze(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#288 def squeeze!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#284 def strip(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#288 def strip!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#299 def sub(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#310 def sub!(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#284 def succ(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#288 def succ!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#284 def swapcase(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#288 def swapcase!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#273 def to_param; end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#269 def to_s; end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#284 def tr(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#288 def tr!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#284 def tr_s(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#288 def tr_s!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#284 def unicode_normalize(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#288 def unicode_normalize!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#284 def upcase(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#288 def upcase!(*args); end private + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#326 def html_escape_interpolated_argument(arg); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#205 def initialize_copy(other); end + def original_concat(*_arg0); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#330 def set_block_back_references(block, match_data); end end +# Raised when ActiveSupport::SafeBuffer#safe_concat is called on unsafe buffers. +# +# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#175 class ActiveSupport::SafeBuffer::SafeConcatError < ::StandardError + # @return [SafeConcatError] a new instance of SafeConcatError + # + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#176 def initialize; end end +# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#163 ActiveSupport::SafeBuffer::UNSAFE_STRING_METHODS = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#169 ActiveSupport::SafeBuffer::UNSAFE_STRING_METHODS_WITH_BACKREF = T.let(T.unsafe(nil), Array) +# The ActiveSupport::SecureCompareRotator is a wrapper around +ActiveSupport::SecurityUtils.secure_compare+ +# and allows you to rotate a previously defined value to a new one. +# +# It can be used as follow: +# +# rotator = ActiveSupport::SecureCompareRotator.new('new_production_value') +# rotator.rotate('previous_production_value') +# rotator.secure_compare!('previous_production_value') +# +# One real use case example would be to rotate a basic auth credentials: +# +# class MyController < ApplicationController +# def authenticate_request +# rotator = ActiveSupport::SecureComparerotator.new('new_password') +# rotator.rotate('old_password') +# +# authenticate_or_request_with_http_basic do |username, password| +# rotator.secure_compare!(password) +# rescue ActiveSupport::SecureCompareRotator::InvalidMatch +# false +# end +# end +# end +# +# source://activesupport//lib/active_support/secure_compare_rotator.rb#30 class ActiveSupport::SecureCompareRotator include ::ActiveSupport::Messages::Rotator include ::ActiveSupport::SecurityUtils + # @return [SecureCompareRotator] a new instance of SecureCompareRotator + # + # source://activesupport//lib/active_support/messages/rotator.rb#6 + def initialize(*secrets, on_rotation: T.unsafe(nil), **options); end + + # source://activesupport//lib/active_support/secure_compare_rotator.rb#40 def secure_compare!(other_value, on_rotation: T.unsafe(nil)); end private + # source://activesupport//lib/active_support/secure_compare_rotator.rb#47 def build_rotation(previous_value, _options); end end +# source://activesupport//lib/active_support/secure_compare_rotator.rb#34 class ActiveSupport::SecureCompareRotator::InvalidMatch < ::StandardError; end +# source://activesupport//lib/active_support/security_utils.rb#4 module ActiveSupport::SecurityUtils private + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/security_utils.rb#11 def fixed_length_secure_compare(a, b); end + + # Secure string comparison for strings of variable length. + # + # While a timing attack would not be able to discern the content of + # a secret compared via secure_compare, it is possible to determine + # the secret length. This should be considered when using secure_compare + # to compare weak, short secrets to user input. + # + # source://activesupport//lib/active_support/security_utils.rb#33 def secure_compare(a, b); end class << self + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/security_utils.rb#11 def fixed_length_secure_compare(a, b); end + + # Secure string comparison for strings of variable length. + # + # While a timing attack would not be able to discern the content of + # a secret compared via secure_compare, it is possible to determine + # the secret length. This should be considered when using secure_compare + # to compare weak, short secrets to user input. + # + # source://activesupport//lib/active_support/security_utils.rb#33 def secure_compare(a, b); end end end +# Wrapping a string in this class gives you a prettier way to test +# for equality. The value returned by Rails.env is wrapped +# in a StringInquirer object, so instead of calling this: +# +# Rails.env == 'production' +# +# you can call this: +# +# Rails.env.production? +# +# == Instantiating a new StringInquirer +# +# vehicle = ActiveSupport::StringInquirer.new('car') +# vehicle.car? # => true +# vehicle.bike? # => false +# +# source://activesupport//lib/active_support/string_inquirer.rb#21 class ActiveSupport::StringInquirer < ::String private + # source://activesupport//lib/active_support/string_inquirer.rb#27 def method_missing(method_name, *arguments); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/string_inquirer.rb#23 def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end end +# ActiveSupport::Subscriber is an object set to consume +# ActiveSupport::Notifications. The subscriber dispatches notifications to +# a registered object based on its given namespace. +# +# An example would be an Active Record subscriber responsible for collecting +# statistics about queries: +# +# module ActiveRecord +# class StatsSubscriber < ActiveSupport::Subscriber +# attach_to :active_record +# +# def sql(event) +# Statsd.timing("sql.#{event.payload[:name]}", event.duration) +# end +# end +# end +# +# After configured, whenever a "sql.active_record" notification is published, +# it will properly dispatch the event (ActiveSupport::Notifications::Event) to +# the +sql+ method. +# +# We can detach a subscriber as well: +# +# ActiveRecord::StatsSubscriber.detach_from(:active_record) +# +# source://activesupport//lib/active_support/subscriber.rb#31 class ActiveSupport::Subscriber + # @return [Subscriber] a new instance of Subscriber + # + # source://activesupport//lib/active_support/subscriber.rb#129 def initialize; end + # source://activesupport//lib/active_support/subscriber.rb#144 def finish(name, id, payload); end + + # source://activesupport//lib/active_support/subscriber.rb#127 def patterns; end + + # source://activesupport//lib/active_support/subscriber.rb#135 def start(name, id, payload); end private + # source://activesupport//lib/active_support/subscriber.rb#154 def event_stack; end class << self + # Attach the subscriber to a namespace. + # + # source://activesupport//lib/active_support/subscriber.rb#34 def attach_to(namespace, subscriber = T.unsafe(nil), notifier = T.unsafe(nil), inherit_all: T.unsafe(nil)); end + + # Detach the subscriber from a namespace. + # + # source://activesupport//lib/active_support/subscriber.rb#49 def detach_from(namespace, notifier = T.unsafe(nil)); end + + # Adds event subscribers for all new methods added to the class. + # + # source://activesupport//lib/active_support/subscriber.rb#68 def method_added(event); end + + # source://activesupport//lib/active_support/subscriber.rb#77 def subscribers; end private + # source://activesupport//lib/active_support/subscriber.rb#84 def add_event_subscriber(event); end + + # source://activesupport//lib/active_support/subscriber.rb#122 def fetch_public_methods(subscriber, inherit_all); end + + # source://activesupport//lib/active_support/subscriber.rb#106 def find_attached_subscriber; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/subscriber.rb#110 def invalid_event?(event); end + + # Returns the value of attribute namespace. + # + # source://activesupport//lib/active_support/subscriber.rb#82 def namespace; end + + # Returns the value of attribute notifier. + # + # source://activesupport//lib/active_support/subscriber.rb#82 def notifier; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/subscriber.rb#118 def pattern_subscribed?(pattern); end + + # source://activesupport//lib/active_support/subscriber.rb#114 def prepare_pattern(event); end + + # source://activesupport//lib/active_support/subscriber.rb#95 def remove_event_subscriber(event); end + + # Returns the value of attribute subscriber. + # + # source://activesupport//lib/active_support/subscriber.rb#82 def subscriber; end end end +# This is a registry for all the event stacks kept for subscribers. +# +# See the documentation of ActiveSupport::PerThreadRegistry +# for further details. +# +# source://activesupport//lib/active_support/subscriber.rb#163 class ActiveSupport::SubscriberQueueRegistry extend ::ActiveSupport::PerThreadRegistry + # @return [SubscriberQueueRegistry] a new instance of SubscriberQueueRegistry + # + # source://activesupport//lib/active_support/subscriber.rb#166 def initialize; end + # source://activesupport//lib/active_support/subscriber.rb#170 def get_queue(queue_key); end end +# Wraps any standard Logger object to provide tagging capabilities. +# +# May be called with a block: +# +# logger = ActiveSupport::TaggedLogging.new(Logger.new(STDOUT)) +# logger.tagged('BCX') { logger.info 'Stuff' } # Logs "[BCX] Stuff" +# logger.tagged('BCX', "Jason") { logger.info 'Stuff' } # Logs "[BCX] [Jason] Stuff" +# logger.tagged('BCX') { logger.tagged('Jason') { logger.info 'Stuff' } } # Logs "[BCX] [Jason] Stuff" +# +# If called without a block, a new logger will be returned with applied tags: +# +# logger = ActiveSupport::TaggedLogging.new(Logger.new(STDOUT)) +# logger.tagged("BCX").info "Stuff" # Logs "[BCX] Stuff" +# logger.tagged("BCX", "Jason").info "Stuff" # Logs "[BCX] [Jason] Stuff" +# logger.tagged("BCX").tagged("Jason").info "Stuff" # Logs "[BCX] [Jason] Stuff" +# +# This is used by the default Rails.logger as configured by Railties to make +# it easy to stamp log lines with subdomains, request ids, and anything else +# to aid debugging of multi-user production applications. +# +# source://activesupport//lib/active_support/tagged_logging.rb#28 module ActiveSupport::TaggedLogging - def clear_tags!(*args, &block); end + # source://activesupport//lib/active_support/tagged_logging.rb#95 + def clear_tags!(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/tagged_logging.rb#108 def flush; end - def pop_tags(*args, &block); end - def push_tags(*args, &block); end + + # source://activesupport//lib/active_support/tagged_logging.rb#95 + def pop_tags(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/tagged_logging.rb#95 + def push_tags(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/tagged_logging.rb#97 def tagged(*tags); end class << self + # source://activesupport//lib/active_support/tagged_logging.rb#81 def new(logger); end end end +# source://activesupport//lib/active_support/tagged_logging.rb#29 module ActiveSupport::TaggedLogging::Formatter + # This method is invoked when a log event occurs. + # + # source://activesupport//lib/active_support/tagged_logging.rb#31 def call(severity, timestamp, progname, msg); end + + # source://activesupport//lib/active_support/tagged_logging.rb#53 def clear_tags!; end + + # source://activesupport//lib/active_support/tagged_logging.rb#57 def current_tags; end + + # source://activesupport//lib/active_support/tagged_logging.rb#49 def pop_tags(size = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/tagged_logging.rb#42 def push_tags(*tags); end + + # source://activesupport//lib/active_support/tagged_logging.rb#35 def tagged(*tags); end + + # source://activesupport//lib/active_support/tagged_logging.rb#63 def tags_text; end end +# source://activesupport//lib/active_support/tagged_logging.rb#73 module ActiveSupport::TaggedLogging::LocalTagStorage + # Returns the value of attribute current_tags. + # + # source://activesupport//lib/active_support/tagged_logging.rb#74 def current_tags; end + + # Sets the attribute current_tags + # + # @param value the value to set the attribute current_tags to. + # + # source://activesupport//lib/active_support/tagged_logging.rb#74 def current_tags=(_arg0); end class << self + # @private + # + # source://activesupport//lib/active_support/tagged_logging.rb#76 def extended(base); end end end +# source://activesupport//lib/active_support/test_case.rb#18 class ActiveSupport::TestCase < ::Minitest::Test include ::ActiveSupport::Testing::SetupAndTeardown include ::ActiveSupport::Testing::TaggedLogging @@ -2476,89 +9834,456 @@ class ActiveSupport::TestCase < ::Minitest::Test extend ::ActiveSupport::Testing::SetupAndTeardown::ClassMethods extend ::ActiveSupport::Testing::Declarative + # source://activesupport//lib/active_support/callbacks.rb#67 def __callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#67 def __callbacks?; end + + # source://activesupport//lib/active_support/callbacks.rb#823 def _run_setup_callbacks(&block); end + + # source://activesupport//lib/active_support/callbacks.rb#823 def _run_teardown_callbacks(&block); end + + # source://activesupport//lib/active_support/callbacks.rb#835 def _setup_callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#835 def _teardown_callbacks; end + + # source://minitest/5.20.0/lib/minitest/assertions.rb#735 def assert_no_match(matcher, obj, msg = T.unsafe(nil)); end + + # source://minitest/5.20.0/lib/minitest/assertions.rb#664 def assert_not_empty(obj, msg = T.unsafe(nil)); end + + # source://minitest/5.20.0/lib/minitest/assertions.rb#675 def assert_not_equal(exp, act, msg = T.unsafe(nil)); end + + # source://minitest/5.20.0/lib/minitest/assertions.rb#687 def assert_not_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end + + # source://minitest/5.20.0/lib/minitest/assertions.rb#699 def assert_not_in_epsilon(a, b, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end + + # source://minitest/5.20.0/lib/minitest/assertions.rb#706 def assert_not_includes(collection, obj, msg = T.unsafe(nil)); end + + # source://minitest/5.20.0/lib/minitest/assertions.rb#717 def assert_not_instance_of(cls, obj, msg = T.unsafe(nil)); end + + # source://minitest/5.20.0/lib/minitest/assertions.rb#727 def assert_not_kind_of(cls, obj, msg = T.unsafe(nil)); end + + # source://minitest/5.20.0/lib/minitest/assertions.rb#745 def assert_not_nil(obj, msg = T.unsafe(nil)); end + + # source://minitest/5.20.0/lib/minitest/assertions.rb#780 def assert_not_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end + + # source://minitest/5.20.0/lib/minitest/assertions.rb#803 def assert_not_predicate(o1, op, msg = T.unsafe(nil)); end + + # source://minitest/5.20.0/lib/minitest/assertions.rb#811 def assert_not_respond_to(obj, meth, msg = T.unsafe(nil)); end + + # source://minitest/5.20.0/lib/minitest/assertions.rb#820 def assert_not_same(exp, act, msg = T.unsafe(nil)); end + + # test/unit backwards compatibility methods + # + # source://minitest/5.20.0/lib/minitest/assertions.rb#422 def assert_raise(*exp); end + + # source://activesupport//lib/active_support/testing/file_fixtures.rb#20 def file_fixture_path; end + + # source://activesupport//lib/active_support/testing/file_fixtures.rb#20 def file_fixture_path?; end + + # source://minitest/5.20.0/lib/minitest.rb#307 def method_name; end class << self + # source://activesupport//lib/active_support/callbacks.rb#67 def __callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#67 def __callbacks=(value); end + + # source://activesupport//lib/active_support/callbacks.rb#67 def __callbacks?; end + + # source://activesupport//lib/active_support/callbacks.rb#827 def _setup_callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#831 def _setup_callbacks=(value); end + + # source://activesupport//lib/active_support/callbacks.rb#827 def _teardown_callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#831 def _teardown_callbacks=(value); end + + # source://activesupport//lib/active_support/testing/file_fixtures.rb#20 def file_fixture_path; end + + # source://activesupport//lib/active_support/testing/file_fixtures.rb#20 def file_fixture_path=(value); end + + # source://activesupport//lib/active_support/testing/file_fixtures.rb#20 def file_fixture_path?; end + + # Parallelizes the test suite. + # + # Takes a +workers+ argument that controls how many times the process + # is forked. For each process a new database will be created suffixed + # with the worker number. + # + # test-database-0 + # test-database-1 + # + # If ENV["PARALLEL_WORKERS"] is set the workers argument will be ignored + # and the environment variable will be used instead. This is useful for CI + # environments, or other environments where you may need more workers than + # you do for local testing. + # + # If the number of workers is set to +1+ or fewer, the tests will not be + # parallelized. + # + # If +workers+ is set to +:number_of_processors+, the number of workers will be + # set to the actual core count on the machine you are on. + # + # The default parallelization method is to fork processes. If you'd like to + # use threads instead you can pass with: :threads to the +parallelize+ + # method. Note the threaded parallelization does not create multiple + # database and will not work with system tests at this time. + # + # parallelize(workers: :number_of_processors, with: :threads) + # + # The threaded parallelization uses minitest's parallel executor directly. + # The processes parallelization uses a Ruby DRb server. + # + # source://activesupport//lib/active_support/test_case.rb#74 def parallelize(workers: T.unsafe(nil), with: T.unsafe(nil)); end + + # Set up hook for parallel testing. This can be used if you have multiple + # databases or any behavior that needs to be run after the process is forked + # but before the tests run. + # + # Note: this feature is not available with the threaded parallelization. + # + # In your +test_helper.rb+ add the following: + # + # class ActiveSupport::TestCase + # parallelize_setup do + # # create databases + # end + # end + # + # source://activesupport//lib/active_support/test_case.rb#109 def parallelize_setup(&block); end + + # Clean up hook for parallel testing. This can be used to drop databases + # if your app uses multiple write/read databases or other clean up before + # the tests finish. This runs before the forked process is closed. + # + # Note: this feature is not available with the threaded parallelization. + # + # In your +test_helper.rb+ add the following: + # + # class ActiveSupport::TestCase + # parallelize_teardown do + # # drop databases + # end + # end + # + # source://activesupport//lib/active_support/test_case.rb#128 def parallelize_teardown(&block); end + + # Returns the order in which test cases are run. + # + # ActiveSupport::TestCase.test_order # => :random + # + # Possible values are +:random+, +:parallel+, +:alpha+, +:sorted+. + # Defaults to +:random+. + # + # source://activesupport//lib/active_support/test_case.rb#41 def test_order; end + + # Sets the order in which test cases are run. + # + # ActiveSupport::TestCase.test_order = :random # => :random + # + # Valid values are: + # * +:random+ (to run tests in random order) + # * +:parallel+ (to run tests in parallel) + # * +:sorted+ (to run tests alphabetically by method name) + # * +:alpha+ (equivalent to +:sorted+) + # + # source://activesupport//lib/active_support/test_case.rb#31 def test_order=(new_order); end end end +# source://activesupport//lib/active_support/test_case.rb#19 ActiveSupport::TestCase::Assertion = Minitest::Assertion + +# source://activesupport//lib/active_support/testing/tagged_logging.rb#4 module ActiveSupport::Testing; end +# source://activesupport//lib/active_support/testing/assertions.rb#7 module ActiveSupport::Testing::Assertions + # Assertion that the result of evaluating an expression is changed before + # and after invoking the passed in block. + # + # assert_changes 'Status.all_good?' do + # post :create, params: { status: { ok: false } } + # end + # + # You can pass the block as a string to be evaluated in the context of + # the block. A lambda can be passed for the block as well. + # + # assert_changes -> { Status.all_good? } do + # post :create, params: { status: { ok: false } } + # end + # + # The assertion is useful to test side effects. The passed block can be + # anything that can be converted to string with #to_s. + # + # assert_changes :@object do + # @object = 42 + # end + # + # The keyword arguments :from and :to can be given to specify the + # expected initial value and the expected value after the block was + # executed. + # + # assert_changes :@object, from: nil, to: :foo do + # @object = :foo + # end + # + # An error message can be specified. + # + # assert_changes -> { Status.all_good? }, 'Expected the status to be bad' do + # post :create, params: { status: { incident: true } } + # end + # + # source://activesupport//lib/active_support/testing/assertions.rb#175 def assert_changes(expression, message = T.unsafe(nil), from: T.unsafe(nil), to: T.unsafe(nil), &block); end + + # Test numeric difference between the return value of an expression as a + # result of what is evaluated in the yielded block. + # + # assert_difference 'Article.count' do + # post :create, params: { article: {...} } + # end + # + # An arbitrary expression is passed in and evaluated. + # + # assert_difference 'Article.last.comments(:reload).size' do + # post :create, params: { comment: {...} } + # end + # + # An arbitrary positive or negative difference can be specified. + # The default is 1. + # + # assert_difference 'Article.count', -1 do + # post :delete, params: { id: ... } + # end + # + # An array of expressions can also be passed in and evaluated. + # + # assert_difference [ 'Article.count', 'Post.count' ], 2 do + # post :create, params: { article: {...} } + # end + # + # A hash of expressions/numeric differences can also be passed in and evaluated. + # + # assert_difference ->{ Article.count } => 1, ->{ Notification.count } => 2 do + # post :create, params: { article: {...} } + # end + # + # A lambda or a list of lambdas can be passed in and evaluated: + # + # assert_difference ->{ Article.count }, 2 do + # post :create, params: { article: {...} } + # end + # + # assert_difference [->{ Article.count }, ->{ Post.count }], 2 do + # post :create, params: { article: {...} } + # end + # + # An error message can be specified. + # + # assert_difference 'Article.count', -1, 'An Article should be destroyed' do + # post :delete, params: { id: ... } + # end + # + # source://activesupport//lib/active_support/testing/assertions.rb#86 def assert_difference(expression, *args, &block); end + + # Assertion that the result of evaluating an expression is not changed before + # and after invoking the passed in block. + # + # assert_no_changes 'Status.all_good?' do + # post :create, params: { status: { ok: true } } + # end + # + # An error message can be specified. + # + # assert_no_changes -> { Status.all_good? }, 'Expected the status to be good' do + # post :create, params: { status: { ok: false } } + # end + # + # source://activesupport//lib/active_support/testing/assertions.rb#215 def assert_no_changes(expression, message = T.unsafe(nil), &block); end + + # Assertion that the numeric result of evaluating an expression is not + # changed before and after invoking the passed in block. + # + # assert_no_difference 'Article.count' do + # post :create, params: { article: invalid_attributes } + # end + # + # A lambda can be passed in and evaluated. + # + # assert_no_difference -> { Article.count } do + # post :create, params: { article: invalid_attributes } + # end + # + # An error message can be specified. + # + # assert_no_difference 'Article.count', 'An Article should not be created' do + # post :create, params: { article: invalid_attributes } + # end + # + # An array of expressions can also be passed in and evaluated. + # + # assert_no_difference [ 'Article.count', -> { Post.count } ] do + # post :create, params: { article: invalid_attributes } + # end + # + # source://activesupport//lib/active_support/testing/assertions.rb#137 def assert_no_difference(expression, message = T.unsafe(nil), &block); end + + # Asserts that an expression is not truthy. Passes if object is + # +nil+ or +false+. "Truthy" means "considered true in a conditional" + # like if foo. + # + # assert_not nil # => true + # assert_not false # => true + # assert_not 'foo' # => Expected "foo" to be nil or false + # + # An error message can be specified. + # + # assert_not foo, 'foo should be false' + # + # source://activesupport//lib/active_support/testing/assertions.rb#21 def assert_not(object, message = T.unsafe(nil)); end + + # Assertion that the block should not raise an exception. + # + # Passes if evaluated code in the yielded block raises no exception. + # + # assert_nothing_raised do + # perform_service(param: 'no_exception') + # end + # + # source://activesupport//lib/active_support/testing/assertions.rb#33 def assert_nothing_raised; end end +# source://activesupport//lib/active_support/testing/assertions.rb#8 ActiveSupport::Testing::Assertions::UNTRACKED = T.let(T.unsafe(nil), Object) +# Resolves a constant from a minitest spec name. +# +# Given the following spec-style test: +# +# describe WidgetsController, :index do +# describe "authenticated user" do +# describe "returns widgets" do +# it "has a controller that exists" do +# assert_kind_of WidgetsController, @controller +# end +# end +# end +# end +# +# The test will have the following name: +# +# "WidgetsController::index::authenticated user::returns widgets" +# +# The constant WidgetsController can be resolved from the name. +# The following code will resolve the constant: +# +# controller = determine_constant_from_test_name(name) do |constant| +# Class === constant && constant < ::ActionController::Metal +# end +# +# source://activesupport//lib/active_support/testing/constant_lookup.rb#32 module ActiveSupport::Testing::ConstantLookup extend ::ActiveSupport::Concern mixes_in_class_methods ::ActiveSupport::Testing::ConstantLookup::ClassMethods end +# source://activesupport//lib/active_support/testing/constant_lookup.rb#35 module ActiveSupport::Testing::ConstantLookup::ClassMethods + # source://activesupport//lib/active_support/testing/constant_lookup.rb#36 def determine_constant_from_test_name(test_name); end end +# source://activesupport//lib/active_support/testing/declarative.rb#5 module ActiveSupport::Testing::Declarative + # Helper to define a test method using a String. Under the hood, it replaces + # spaces with underscores and defines the test method. + # + # test "verify something" do + # ... + # end + # + # source://activesupport//lib/active_support/testing/declarative.rb#13 def test(name, &block); end end +# source://activesupport//lib/active_support/testing/deprecation.rb#7 module ActiveSupport::Testing::Deprecation + # source://activesupport//lib/active_support/testing/deprecation.rb#8 def assert_deprecated(match = T.unsafe(nil), deprecator = T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/testing/deprecation.rb#18 def assert_not_deprecated(deprecator = T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/testing/deprecation.rb#24 def collect_deprecations(deprecator = T.unsafe(nil)); end end +# Adds simple access to sample files called file fixtures. +# File fixtures are normal files stored in +# ActiveSupport::TestCase.file_fixture_path. +# +# File fixtures are represented as +Pathname+ objects. +# This makes it easy to extract specific information: +# +# file_fixture("example.txt").read # get the file's content +# file_fixture("example.mp3").size # get the file size +# +# source://activesupport//lib/active_support/testing/file_fixtures.rb#16 module ActiveSupport::Testing::FileFixtures extend ::ActiveSupport::Concern include GeneratedInstanceMethods mixes_in_class_methods GeneratedClassMethods + # Returns a +Pathname+ to the fixture file named +fixture_name+. + # + # Raises +ArgumentError+ if +fixture_name+ can't be found. + # + # source://activesupport//lib/active_support/testing/file_fixtures.rb#26 def file_fixture(fixture_name); end module GeneratedClassMethods @@ -2573,814 +10298,4576 @@ module ActiveSupport::Testing::FileFixtures end end +# source://activesupport//lib/active_support/testing/isolation.rb#5 module ActiveSupport::Testing::Isolation include ::ActiveSupport::Testing::Isolation::Forking + # source://activesupport//lib/active_support/testing/isolation.rb#18 def run; end class << self + # @return [Boolean] + # + # source://activesupport//lib/active_support/testing/isolation.rb#14 def forking_env?; end + + # source://activesupport//lib/active_support/testing/isolation.rb#8 def included(klass); end end end +# source://activesupport//lib/active_support/testing/isolation.rb#26 module ActiveSupport::Testing::Isolation::Forking + # source://activesupport//lib/active_support/testing/isolation.rb#27 def run_in_isolation(&blk); end end +# source://activesupport//lib/active_support/testing/isolation.rb#63 module ActiveSupport::Testing::Isolation::Subprocess + # Crazy H4X to get this working in windows / jruby with + # no forking. + # + # source://activesupport//lib/active_support/testing/isolation.rb#68 def run_in_isolation(&blk); end end +# source://activesupport//lib/active_support/testing/isolation.rb#64 ActiveSupport::Testing::Isolation::Subprocess::ORIG_ARGV = T.let(T.unsafe(nil), Array) +# source://activesupport//lib/active_support/testing/parallelization/server.rb#8 class ActiveSupport::Testing::Parallelization + # @return [Parallelization] a new instance of Parallelization + # + # source://activesupport//lib/active_support/testing/parallelization.rb#28 def initialize(worker_count); end + # source://activesupport//lib/active_support/testing/parallelization.rb#41 def <<(work); end + + # source://activesupport//lib/active_support/testing/parallelization.rb#18 def after_fork_hooks; end + + # source://activesupport//lib/active_support/testing/parallelization.rb#26 def run_cleanup_hooks; end + + # source://activesupport//lib/active_support/testing/parallelization.rb#45 def shutdown; end + + # source://activesupport//lib/active_support/testing/parallelization.rb#35 def start; end class << self + # source://activesupport//lib/active_support/testing/parallelization.rb#14 def after_fork_hook(&blk); end + + # source://activesupport//lib/active_support/testing/parallelization.rb#18 def after_fork_hooks; end + + # source://activesupport//lib/active_support/testing/parallelization.rb#22 def run_cleanup_hook(&blk); end + + # source://activesupport//lib/active_support/testing/parallelization.rb#26 def run_cleanup_hooks; end end end +# source://activesupport//lib/active_support/testing/parallelization/server.rb#9 class ActiveSupport::Testing::Parallelization::Server include ::DRb::DRbUndumped + # @return [Server] a new instance of Server + # + # source://activesupport//lib/active_support/testing/parallelization/server.rb#12 def initialize; end + # source://activesupport//lib/active_support/testing/parallelization/server.rb#28 def <<(o); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/testing/parallelization/server.rb#48 def active_workers?; end + + # source://activesupport//lib/active_support/testing/parallelization/server.rb#33 def pop; end + + # @raise [DRb::DRbConnError] + # + # source://activesupport//lib/active_support/testing/parallelization/server.rb#18 def record(reporter, result); end + + # source://activesupport//lib/active_support/testing/parallelization/server.rb#52 def shutdown; end + + # source://activesupport//lib/active_support/testing/parallelization/server.rb#40 def start_worker(worker_id); end + + # source://activesupport//lib/active_support/testing/parallelization/server.rb#44 def stop_worker(worker_id); end end +# source://activesupport//lib/active_support/testing/parallelization/worker.rb#6 class ActiveSupport::Testing::Parallelization::Worker + # @return [Worker] a new instance of Worker + # + # source://activesupport//lib/active_support/testing/parallelization/worker.rb#7 def initialize(number, url); end + # source://activesupport//lib/active_support/testing/parallelization/worker.rb#77 def after_fork; end + + # source://activesupport//lib/active_support/testing/parallelization/worker.rb#42 def perform_job(job); end + + # source://activesupport//lib/active_support/testing/parallelization/worker.rb#83 def run_cleanup; end + + # source://activesupport//lib/active_support/testing/parallelization/worker.rb#56 def safe_record(reporter, result); end + + # source://activesupport//lib/active_support/testing/parallelization/worker.rb#14 def start; end + + # source://activesupport//lib/active_support/testing/parallelization/worker.rb#36 def work_from_queue; end private + # source://activesupport//lib/active_support/testing/parallelization/worker.rb#90 def add_setup_exception(result); end + + # source://activesupport//lib/active_support/testing/parallelization/worker.rb#94 def set_process_title(status); end end +# Adds support for +setup+ and +teardown+ callbacks. +# These callbacks serve as a replacement to overwriting the +# #setup and #teardown methods of your TestCase. +# +# class ExampleTest < ActiveSupport::TestCase +# setup do +# # ... +# end +# +# teardown do +# # ... +# end +# end +# +# source://activesupport//lib/active_support/testing/setup_and_teardown.rb#20 module ActiveSupport::Testing::SetupAndTeardown + # source://activesupport//lib/active_support/testing/setup_and_teardown.rb#44 def after_teardown; end + + # source://activesupport//lib/active_support/testing/setup_and_teardown.rb#39 def before_setup; end class << self + # source://activesupport//lib/active_support/testing/setup_and_teardown.rb#21 def prepended(klass); end end end +# source://activesupport//lib/active_support/testing/setup_and_teardown.rb#27 module ActiveSupport::Testing::SetupAndTeardown::ClassMethods + # Add a callback, which runs before TestCase#setup. + # + # source://activesupport//lib/active_support/testing/setup_and_teardown.rb#29 def setup(*args, &block); end + + # Add a callback, which runs after TestCase#teardown. + # + # source://activesupport//lib/active_support/testing/setup_and_teardown.rb#34 def teardown(*args, &block); end end +# Manages stubs for TimeHelpers +# +# source://activesupport//lib/active_support/testing/time_helpers.rb#10 class ActiveSupport::Testing::SimpleStubs + # @return [SimpleStubs] a new instance of SimpleStubs + # + # source://activesupport//lib/active_support/testing/time_helpers.rb#13 def initialize; end + # Stubs object.method_name with the given block + # If the method is already stubbed, remove that stub + # so that removing this stub will restore the original implementation. + # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 + # target = Time.zone.local(2004, 11, 24, 1, 4, 44) + # simple_stubs.stub_object(Time, :now) { at(target.to_i) } + # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 + # + # source://activesupport//lib/active_support/testing/time_helpers.rb#24 def stub_object(object, method_name, &block); end + + # Returns true if any stubs are set, false if there are none + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/testing/time_helpers.rb#54 def stubbed?; end + + # Returns the Stub for object#method_name + # (nil if it is not stubbed) + # + # source://activesupport//lib/active_support/testing/time_helpers.rb#49 def stubbing(object, method_name); end + + # Remove all object-method stubs held by this instance + # + # source://activesupport//lib/active_support/testing/time_helpers.rb#38 def unstub_all!; end private + # Restores the original object.method described by the Stub + # + # source://activesupport//lib/active_support/testing/time_helpers.rb#60 def unstub_object(stub); end end +# source://activesupport//lib/active_support/testing/time_helpers.rb#11 class ActiveSupport::Testing::SimpleStubs::Stub < ::Struct + # Returns the value of attribute method_name + # + # @return [Object] the current value of method_name def method_name; end + + # Sets the attribute method_name + # + # @param value [Object] the value to set the attribute method_name to. + # @return [Object] the newly set value def method_name=(_); end + + # Returns the value of attribute object + # + # @return [Object] the current value of object def object; end + + # Sets the attribute object + # + # @param value [Object] the value to set the attribute object to. + # @return [Object] the newly set value def object=(_); end + + # Returns the value of attribute original_method + # + # @return [Object] the current value of original_method def original_method; end + + # Sets the attribute original_method + # + # @param value [Object] the value to set the attribute original_method to. + # @return [Object] the newly set value def original_method=(_); end class << self def [](*_arg0); end def inspect; end + def keyword_init?; end def members; end def new(*_arg0); end end end +# Logs a "PostsControllerTest: test name" heading before each test to +# make test.log easier to search and follow along with. +# +# source://activesupport//lib/active_support/testing/tagged_logging.rb#7 module ActiveSupport::Testing::TaggedLogging + # source://activesupport//lib/active_support/testing/tagged_logging.rb#10 def before_setup; end + + # source://activesupport//lib/active_support/testing/tagged_logging.rb#8 def tagged_logger=(_arg0); end private + # source://activesupport//lib/active_support/testing/tagged_logging.rb#22 def tagged_logger; end end +# Contains helpers that help you test passage of time. +# +# source://activesupport//lib/active_support/testing/time_helpers.rb#69 module ActiveSupport::Testing::TimeHelpers + # source://activesupport//lib/active_support/testing/time_helpers.rb#70 def after_teardown; end + + # Calls +travel_to+ with +Time.now+. + # + # Time.current # => Sun, 09 Jul 2017 15:34:49 EST -05:00 + # freeze_time + # sleep(1) + # Time.current # => Sun, 09 Jul 2017 15:34:49 EST -05:00 + # + # This method also accepts a block, which will return the current time back to its original + # state at the end of the block: + # + # Time.current # => Sun, 09 Jul 2017 15:34:49 EST -05:00 + # freeze_time do + # sleep(1) + # User.create.created_at # => Sun, 09 Jul 2017 15:34:49 EST -05:00 + # end + # Time.current # => Sun, 09 Jul 2017 15:34:50 EST -05:00 + # + # source://activesupport//lib/active_support/testing/time_helpers.rb#225 def freeze_time(&block); end + + # Changes current time to the time in the future or in the past by a given time difference by + # stubbing +Time.now+, +Date.today+, and +DateTime.now+. The stubs are automatically removed + # at the end of the test. + # + # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 + # travel 1.day + # Time.current # => Sun, 10 Nov 2013 15:34:49 EST -05:00 + # Date.current # => Sun, 10 Nov 2013 + # DateTime.current # => Sun, 10 Nov 2013 15:34:49 -0500 + # + # This method also accepts a block, which will return the current time back to its original + # state at the end of the block: + # + # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 + # travel 1.day do + # User.create.created_at # => Sun, 10 Nov 2013 15:34:49 EST -05:00 + # end + # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 + # + # source://activesupport//lib/active_support/testing/time_helpers.rb#93 def travel(duration, &block); end + + # Returns the current time back to its original state, by removing the stubs added by + # +travel+, +travel_to+, and +freeze_time+. + # + # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 + # + # travel_to Time.zone.local(2004, 11, 24, 1, 4, 44) + # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 + # + # travel_back + # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 + # + # This method also accepts a block, which brings the stubs back at the end of the block: + # + # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 + # + # travel_to Time.zone.local(2004, 11, 24, 1, 4, 44) + # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 + # + # travel_back do + # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 + # end + # + # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 + # + # source://activesupport//lib/active_support/testing/time_helpers.rb#199 def travel_back; end + + # Changes current time to the given time by stubbing +Time.now+, + # +Date.today+, and +DateTime.now+ to return the time or date passed into this method. + # The stubs are automatically removed at the end of the test. + # + # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 + # travel_to Time.zone.local(2004, 11, 24, 1, 4, 44) + # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 + # Date.current # => Wed, 24 Nov 2004 + # DateTime.current # => Wed, 24 Nov 2004 01:04:44 -0500 + # + # Dates are taken as their timestamp at the beginning of the day in the + # application time zone. Time.current returns said timestamp, + # and Time.now its equivalent in the system time zone. Similarly, + # Date.current returns a date equal to the argument, and + # Date.today the date according to Time.now, which may + # be different. (Note that you rarely want to deal with Time.now, + # or Date.today, in order to honor the application time zone + # please always use Time.current and Date.current.) + # + # Note that the usec for the time passed will be set to 0 to prevent rounding + # errors with external services, like MySQL (which will round instead of floor, + # leading to off-by-one-second errors). + # + # This method also accepts a block, which will return the current time back to its original + # state at the end of the block: + # + # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 + # travel_to Time.zone.local(2004, 11, 24, 1, 4, 44) do + # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 + # end + # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 + # + # source://activesupport//lib/active_support/testing/time_helpers.rb#128 def travel_to(date_or_time); end + + # Returns the current time back to its original state, by removing the stubs added by + # +travel+, +travel_to+, and +freeze_time+. + # + # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 + # + # travel_to Time.zone.local(2004, 11, 24, 1, 4, 44) + # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 + # + # travel_back + # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 + # + # This method also accepts a block, which brings the stubs back at the end of the block: + # + # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 + # + # travel_to Time.zone.local(2004, 11, 24, 1, 4, 44) + # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 + # + # travel_back do + # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 + # end + # + # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 + # + # source://activesupport//lib/active_support/testing/time_helpers.rb#199 def unfreeze_time; end private + # source://activesupport//lib/active_support/testing/time_helpers.rb#230 def simple_stubs; end end +# A Time-like class that can represent a time in any time zone. Necessary +# because standard Ruby Time instances are limited to UTC and the +# system's ENV['TZ'] zone. +# +# You shouldn't ever need to create a TimeWithZone instance directly via +new+. +# Instead use methods +local+, +parse+, +at+ and +now+ on TimeZone instances, +# and +in_time_zone+ on Time and DateTime instances. +# +# Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' +# Time.zone.local(2007, 2, 10, 15, 30, 45) # => Sat, 10 Feb 2007 15:30:45.000000000 EST -05:00 +# Time.zone.parse('2007-02-10 15:30:45') # => Sat, 10 Feb 2007 15:30:45.000000000 EST -05:00 +# Time.zone.at(1171139445) # => Sat, 10 Feb 2007 15:30:45.000000000 EST -05:00 +# Time.zone.now # => Sun, 18 May 2008 13:07:55.754107581 EDT -04:00 +# Time.utc(2007, 2, 10, 20, 30, 45).in_time_zone # => Sat, 10 Feb 2007 15:30:45.000000000 EST -05:00 +# +# See Time and TimeZone for further documentation of these methods. +# +# TimeWithZone instances implement the same API as Ruby Time instances, so +# that Time and TimeWithZone instances are interchangeable. +# +# t = Time.zone.now # => Sun, 18 May 2008 13:27:25.031505668 EDT -04:00 +# t.hour # => 13 +# t.dst? # => true +# t.utc_offset # => -14400 +# t.zone # => "EDT" +# t.to_s(:rfc822) # => "Sun, 18 May 2008 13:27:25 -0400" +# t + 1.day # => Mon, 19 May 2008 13:27:25.031505668 EDT -04:00 +# t.beginning_of_year # => Tue, 01 Jan 2008 00:00:00.000000000 EST -05:00 +# t > Time.utc(1999) # => true +# t.is_a?(Time) # => true +# t.is_a?(ActiveSupport::TimeWithZone) # => true +# +# source://activesupport//lib/active_support/time_with_zone.rb#40 class ActiveSupport::TimeWithZone include ::DateAndTime::Compatibility include ::Comparable + # @return [TimeWithZone] a new instance of TimeWithZone + # + # source://activesupport//lib/active_support/time_with_zone.rb#52 def initialize(utc_time, time_zone, local_time = T.unsafe(nil), period = T.unsafe(nil)); end + # Adds an interval of time to the current object's time and returns that + # value as a new TimeWithZone object. + # + # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' + # now = Time.zone.now # => Sun, 02 Nov 2014 01:26:28.725182881 EDT -04:00 + # now + 1000 # => Sun, 02 Nov 2014 01:43:08.725182881 EDT -04:00 + # + # If we're adding a Duration of variable length (i.e., years, months, days), + # move forward from #time, otherwise move forward from #utc, for accuracy + # when moving across DST boundaries. + # + # For instance, a time + 24.hours will advance exactly 24 hours, while a + # time + 1.day will advance 23-25 hours, depending on the day. + # + # now + 24.hours # => Mon, 03 Nov 2014 00:26:28.725182881 EST -05:00 + # now + 1.day # => Mon, 03 Nov 2014 01:26:28.725182881 EST -05:00 + # + # source://activesupport//lib/active_support/time_with_zone.rb#292 def +(other); end + + # Subtracts an interval of time and returns a new TimeWithZone object unless + # the other value +acts_like?+ time. Then it will return a Float of the difference + # between the two times that represents the difference between the current + # object's time and the +other+ time. + # + # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' + # now = Time.zone.now # => Mon, 03 Nov 2014 00:26:28.725182881 EST -05:00 + # now - 1000 # => Mon, 03 Nov 2014 00:09:48.725182881 EST -05:00 + # + # If subtracting a Duration of variable length (i.e., years, months, days), + # move backward from #time, otherwise move backward from #utc, for accuracy + # when moving across DST boundaries. + # + # For instance, a time - 24.hours will go subtract exactly 24 hours, while a + # time - 1.day will subtract 23-25 hours, depending on the day. + # + # now - 24.hours # => Sun, 02 Nov 2014 01:26:28.725182881 EDT -04:00 + # now - 1.day # => Sun, 02 Nov 2014 00:26:28.725182881 EDT -04:00 + # + # If both the TimeWithZone object and the other value act like Time, a Float + # will be returned. + # + # Time.zone.now - 1.day.ago # => 86399.999967 + # + # source://activesupport//lib/active_support/time_with_zone.rb#327 def -(other); end + + # Use the time in UTC for comparisons. + # + # source://activesupport//lib/active_support/time_with_zone.rb#225 def <=>(other); end + + # So that +self+ acts_like?(:time). + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#488 def acts_like_time?; end + + # Uses Date to provide precise Time calculations for years, months, and days + # according to the proleptic Gregorian calendar. The result is returned as a + # new TimeWithZone object. + # + # The +options+ parameter takes a hash with any of these keys: + # :years, :months, :weeks, :days, + # :hours, :minutes, :seconds. + # + # If advancing by a value of variable length (i.e., years, weeks, months, + # days), move forward from #time, otherwise move forward from #utc, for + # accuracy when moving across DST boundaries. + # + # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' + # now = Time.zone.now # => Sun, 02 Nov 2014 01:26:28.558049687 EDT -04:00 + # now.advance(seconds: 1) # => Sun, 02 Nov 2014 01:26:29.558049687 EDT -04:00 + # now.advance(minutes: 1) # => Sun, 02 Nov 2014 01:27:28.558049687 EDT -04:00 + # now.advance(hours: 1) # => Sun, 02 Nov 2014 01:26:28.558049687 EST -05:00 + # now.advance(days: 1) # => Mon, 03 Nov 2014 01:26:28.558049687 EST -05:00 + # now.advance(weeks: 1) # => Sun, 09 Nov 2014 01:26:28.558049687 EST -05:00 + # now.advance(months: 1) # => Tue, 02 Dec 2014 01:26:28.558049687 EST -05:00 + # now.advance(years: 1) # => Mon, 02 Nov 2015 01:26:28.558049687 EST -05:00 + # + # source://activesupport//lib/active_support/time_with_zone.rb#416 def advance(options); end + def after?(_arg0); end + + # Subtracts an interval of time from the current object's time and returns + # the result as a new TimeWithZone object. + # + # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' + # now = Time.zone.now # => Mon, 03 Nov 2014 00:26:28.725182881 EST -05:00 + # now.ago(1000) # => Mon, 03 Nov 2014 00:09:48.725182881 EST -05:00 + # + # If we're subtracting a Duration of variable length (i.e., years, months, + # days), move backward from #time, otherwise move backward from #utc, for + # accuracy when moving across DST boundaries. + # + # For instance, time.ago(24.hours) will move back exactly 24 hours, + # while time.ago(1.day) will move back 23-25 hours, depending on + # the day. + # + # now.ago(24.hours) # => Sun, 02 Nov 2014 01:26:28.725182881 EDT -04:00 + # now.ago(1.day) # => Sun, 02 Nov 2014 00:26:28.725182881 EDT -04:00 + # + # source://activesupport//lib/active_support/time_with_zone.rb#355 def ago(other); end + + # Coerces time to a string for JSON encoding. The default format is ISO 8601. + # You can get %Y/%m/%d %H:%M:%S +offset style by setting + # ActiveSupport::JSON::Encoding.use_standard_json_time_format + # to +false+. + # + # # With ActiveSupport::JSON::Encoding.use_standard_json_time_format = true + # Time.utc(2005,2,1,15,15,10).in_time_zone("Hawaii").to_json + # # => "2005-02-01T05:15:10.000-10:00" + # + # # With ActiveSupport::JSON::Encoding.use_standard_json_time_format = false + # Time.utc(2005,2,1,15,15,10).in_time_zone("Hawaii").to_json + # # => "2005/02/01 05:15:10 -1000" + # + # source://activesupport//lib/active_support/time_with_zone.rb#167 def as_json(options = T.unsafe(nil)); end + def before?(_arg0); end + + # Returns true if the current object's time is within the specified + # +min+ and +max+ time. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#233 def between?(min, max); end + + # An instance of ActiveSupport::TimeWithZone is never blank + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#499 def blank?; end + + # Returns a new +ActiveSupport::TimeWithZone+ where one or more of the elements have + # been changed according to the +options+ parameter. The time options (:hour, + # :min, :sec, :usec, :nsec) reset cascadingly, + # so if only the hour is passed, then minute, sec, usec and nsec is set to 0. If the + # hour and minute is passed, then sec, usec and nsec is set to 0. The +options+ + # parameter takes a hash with any of these keys: :year, :month, + # :day, :hour, :min, :sec, :usec, + # :nsec, :offset, :zone. Pass either :usec + # or :nsec, not both. Similarly, pass either :zone or + # :offset, not both. + # + # t = Time.zone.now # => Fri, 14 Apr 2017 11:45:15.116992711 EST -05:00 + # t.change(year: 2020) # => Tue, 14 Apr 2020 11:45:15.116992711 EST -05:00 + # t.change(hour: 12) # => Fri, 14 Apr 2017 12:00:00.116992711 EST -05:00 + # t.change(min: 30) # => Fri, 14 Apr 2017 11:30:00.116992711 EST -05:00 + # t.change(offset: "-10:00") # => Fri, 14 Apr 2017 11:45:15.116992711 HST -10:00 + # t.change(zone: "Hawaii") # => Fri, 14 Apr 2017 11:45:15.116992711 HST -10:00 + # + # source://activesupport//lib/active_support/time_with_zone.rb#376 def change(options); end + + # Returns a Time instance of the simultaneous time in the UTC timezone. + # + # source://activesupport//lib/active_support/time_with_zone.rb#64 def comparable_time; end + + # source://activesupport//lib/active_support/time_with_zone.rb#428 def day; end + + # Returns true if the current time is within Daylight Savings Time for the + # specified time zone. + # + # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' + # Time.zone.parse("2012-5-30").dst? # => true + # Time.zone.parse("2012-11-30").dst? # => false + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#95 def dst?; end + + # source://activesupport//lib/active_support/time_with_zone.rb#179 def encode_with(coder); end + + # Returns +true+ if +other+ is equal to current object. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#268 def eql?(other); end + + # Returns a formatted string of the offset from UTC, or an alternative + # string if the time zone is already UTC. + # + # Time.zone = 'Eastern Time (US & Canada)' # => "Eastern Time (US & Canada)" + # Time.zone.now.formatted_offset(true) # => "-05:00" + # Time.zone.now.formatted_offset(false) # => "-0500" + # Time.zone = 'UTC' # => "UTC" + # Time.zone.now.formatted_offset(true, "0") # => "0" + # + # source://activesupport//lib/active_support/time_with_zone.rb#126 def formatted_offset(colon = T.unsafe(nil), alternate_utc_string = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/time_with_zone.rb#503 def freeze; end + + # Returns true if the current object's time is in the future. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#263 def future?; end + + # Returns a Time instance of the simultaneous time in the UTC timezone. + # + # source://activesupport//lib/active_support/time_with_zone.rb#64 def getgm; end + + # Returns a Time instance of the simultaneous time in the system timezone. + # + # source://activesupport//lib/active_support/time_with_zone.rb#84 def getlocal(utc_offset = T.unsafe(nil)); end + + # Returns a Time instance of the simultaneous time in the UTC timezone. + # + # source://activesupport//lib/active_support/time_with_zone.rb#64 def getutc; end + + # Returns true if the current time zone is set to UTC. + # + # Time.zone = 'UTC' # => 'UTC' + # Time.zone.now.utc? # => true + # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' + # Time.zone.now.utc? # => false + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#106 def gmt?; end + + # Returns the offset from current time to UTC time in seconds. + # + # source://activesupport//lib/active_support/time_with_zone.rb#112 def gmt_offset; end + + # Returns a Time instance of the simultaneous time in the UTC timezone. + # + # source://activesupport//lib/active_support/time_with_zone.rb#64 def gmtime; end + + # Returns the offset from current time to UTC time in seconds. + # + # source://activesupport//lib/active_support/time_with_zone.rb#112 def gmtoff; end + + # source://activesupport//lib/active_support/time_with_zone.rb#272 def hash; end + + # source://activesupport//lib/active_support/time_with_zone.rb#428 def hour; end + + # Returns a string of the object's date and time in the format used by + # HTTP requests. + # + # Time.zone.now.httpdate # => "Tue, 01 Jan 2013 04:39:43 GMT" + # + # source://activesupport//lib/active_support/time_with_zone.rb#188 def httpdate; end + + # Adds an interval of time to the current object's time and returns that + # value as a new TimeWithZone object. + # + # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' + # now = Time.zone.now # => Sun, 02 Nov 2014 01:26:28.725182881 EDT -04:00 + # now + 1000 # => Sun, 02 Nov 2014 01:43:08.725182881 EDT -04:00 + # + # If we're adding a Duration of variable length (i.e., years, months, days), + # move forward from #time, otherwise move forward from #utc, for accuracy + # when moving across DST boundaries. + # + # For instance, a time + 24.hours will advance exactly 24 hours, while a + # time + 1.day will advance 23-25 hours, depending on the day. + # + # now + 24.hours # => Mon, 03 Nov 2014 00:26:28.725182881 EST -05:00 + # now + 1.day # => Mon, 03 Nov 2014 01:26:28.725182881 EST -05:00 + # + # source://activesupport//lib/active_support/time_with_zone.rb#292 def in(other); end + + # Returns the simultaneous time in Time.zone, or the specified zone. + # + # source://activesupport//lib/active_support/time_with_zone.rb#78 def in_time_zone(new_zone = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/time_with_zone.rb#175 def init_with(coder); end + + # Returns a string of the object's date, time, zone, and offset from UTC. + # + # Time.zone.now.inspect # => "Thu, 04 Dec 2014 11:00:25.624541392 EST -05:00" + # + # source://activesupport//lib/active_support/time_with_zone.rb#141 def inspect; end + + # Say we're a Time to thwart type checking. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#493 def is_a?(klass); end + + # Returns true if the current time is within Daylight Savings Time for the + # specified time zone. + # + # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' + # Time.zone.parse("2012-5-30").dst? # => true + # Time.zone.parse("2012-11-30").dst? # => false + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#95 def isdst; end + + # Returns a string of the object's date and time in the ISO 8601 standard + # format. + # + # Time.zone.now.xmlschema # => "2014-12-04T11:02:37-05:00" + # + # source://activesupport//lib/active_support/time_with_zone.rb#149 def iso8601(fraction_digits = T.unsafe(nil)); end + + # Say we're a Time to thwart type checking. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#493 def kind_of?(klass); end + + # Returns a Time instance of the simultaneous time in the system timezone. + # + # source://activesupport//lib/active_support/time_with_zone.rb#84 def localtime(utc_offset = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/time_with_zone.rb#509 def marshal_dump; end + + # source://activesupport//lib/active_support/time_with_zone.rb#513 def marshal_load(variables); end + + # source://activesupport//lib/active_support/time_with_zone.rb#428 def mday; end + + # Send the missing method to +time+ instance, and wrap result in a new + # TimeWithZone with the existing +time_zone+. + # + # source://activesupport//lib/active_support/time_with_zone.rb#534 def method_missing(sym, *args, &block); end + + # source://activesupport//lib/active_support/time_with_zone.rb#428 def min; end + + # source://activesupport//lib/active_support/time_with_zone.rb#428 def mon; end + + # source://activesupport//lib/active_support/time_with_zone.rb#428 def month; end + + # Returns true if the current object's time falls within + # the next day (tomorrow). + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#250 def next_day?; end + + # source://activesupport//lib/active_support/time_with_zone.rb#428 def nsec; end + + # Returns true if the current object's time is in the past. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#238 def past?; end + + # Returns the underlying TZInfo::TimezonePeriod. + # + # source://activesupport//lib/active_support/time_with_zone.rb#73 def period; end + + # Returns true if the current object's time falls within + # the previous day (yesterday). + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#257 def prev_day?; end + + # respond_to_missing? is not called in some cases, such as when type conversion is + # performed with Kernel#String + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#519 def respond_to?(sym, include_priv = T.unsafe(nil)); end + + # Returns a string of the object's date and time in the RFC 2822 standard + # format. + # + # Time.zone.now.rfc2822 # => "Tue, 01 Jan 2013 04:51:39 +0000" + # + # source://activesupport//lib/active_support/time_with_zone.rb#196 def rfc2822; end + + # Returns a string of the object's date and time in the ISO 8601 standard + # format. + # + # Time.zone.now.xmlschema # => "2014-12-04T11:02:37-05:00" + # + # source://activesupport//lib/active_support/time_with_zone.rb#149 def rfc3339(fraction_digits = T.unsafe(nil)); end + + # Returns a string of the object's date and time in the RFC 2822 standard + # format. + # + # Time.zone.now.rfc2822 # => "Tue, 01 Jan 2013 04:51:39 +0000" + # + # source://activesupport//lib/active_support/time_with_zone.rb#196 def rfc822; end + + # source://activesupport//lib/active_support/time_with_zone.rb#428 def sec; end + + # Adds an interval of time to the current object's time and returns that + # value as a new TimeWithZone object. + # + # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' + # now = Time.zone.now # => Sun, 02 Nov 2014 01:26:28.725182881 EDT -04:00 + # now + 1000 # => Sun, 02 Nov 2014 01:43:08.725182881 EDT -04:00 + # + # If we're adding a Duration of variable length (i.e., years, months, days), + # move forward from #time, otherwise move forward from #utc, for accuracy + # when moving across DST boundaries. + # + # For instance, a time + 24.hours will advance exactly 24 hours, while a + # time + 1.day will advance 23-25 hours, depending on the day. + # + # now + 24.hours # => Mon, 03 Nov 2014 00:26:28.725182881 EST -05:00 + # now + 1.day # => Mon, 03 Nov 2014 01:26:28.725182881 EST -05:00 + # + # source://activesupport//lib/active_support/time_with_zone.rb#292 def since(other); end + + # Replaces %Z directive with +zone before passing to Time#strftime, + # so that zone information is correct. + # + # source://activesupport//lib/active_support/time_with_zone.rb#219 def strftime(format); end + + # Returns a Time instance that represents the time in +time_zone+. + # + # source://activesupport//lib/active_support/time_with_zone.rb#59 def time; end + + # Returns the value of attribute time_zone. + # + # source://activesupport//lib/active_support/time_with_zone.rb#50 def time_zone; end + + # Returns Array of parts of Time in sequence of + # [seconds, minutes, hours, day, month, year, weekday, yearday, dst?, zone]. + # + # now = Time.zone.now # => Tue, 18 Aug 2015 02:29:27.485278555 UTC +00:00 + # now.to_a # => [27, 29, 2, 18, 8, 2015, 2, 230, false, "UTC"] + # + # source://activesupport//lib/active_support/time_with_zone.rb#439 def to_a; end + + # source://activesupport//lib/active_support/time_with_zone.rb#428 def to_date; end + + # Returns an instance of DateTime with the timezone's UTC offset + # + # Time.zone.now.to_datetime # => Tue, 18 Aug 2015 02:32:20 +0000 + # Time.current.in_time_zone('Hawaii').to_datetime # => Mon, 17 Aug 2015 16:32:20 -1000 + # + # source://activesupport//lib/active_support/time_with_zone.rb#472 def to_datetime; end + + # Returns the object's date and time as a floating point number of seconds + # since the Epoch (January 1, 1970 00:00 UTC). + # + # Time.zone.now.to_f # => 1417709320.285418 + # + # source://activesupport//lib/active_support/time_with_zone.rb#447 def to_f; end + + # Returns a string of the object's date and time. + # Accepts an optional format: + # * :default - default value, mimics Ruby Time#to_s format. + # * :db - format outputs time in UTC :db time. See Time#to_formatted_s(:db). + # * Any key in Time::DATE_FORMATS can be used. See active_support/core_ext/time/conversions.rb. + # + # source://activesupport//lib/active_support/time_with_zone.rb#206 def to_formatted_s(format = T.unsafe(nil)); end + + # Returns the object's date and time as an integer number of seconds + # since the Epoch (January 1, 1970 00:00 UTC). + # + # Time.zone.now.to_i # => 1417709320 + # + # source://activesupport//lib/active_support/time_with_zone.rb#455 def to_i; end + + # Returns the object's date and time as a rational number of seconds + # since the Epoch (January 1, 1970 00:00 UTC). + # + # Time.zone.now.to_r # => (708854548642709/500000) + # + # source://activesupport//lib/active_support/time_with_zone.rb#464 def to_r; end + + # Returns a string of the object's date and time. + # Accepts an optional format: + # * :default - default value, mimics Ruby Time#to_s format. + # * :db - format outputs time in UTC :db time. See Time#to_formatted_s(:db). + # * Any key in Time::DATE_FORMATS can be used. See active_support/core_ext/time/conversions.rb. + # + # source://activesupport//lib/active_support/time_with_zone.rb#206 def to_s(format = T.unsafe(nil)); end + + # Returns an instance of +Time+, either with the same UTC offset + # as +self+ or in the local system timezone depending on the setting + # of +ActiveSupport.to_time_preserves_timezone+. + # + # source://activesupport//lib/active_support/time_with_zone.rb#479 def to_time; end + + # Returns true if the current object's time falls within + # the current day. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#244 def today?; end + + # Returns true if the current object's time falls within + # the next day (tomorrow). + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#250 def tomorrow?; end + + # Returns the object's date and time as an integer number of seconds + # since the Epoch (January 1, 1970 00:00 UTC). + # + # Time.zone.now.to_i # => 1417709320 + # + # source://activesupport//lib/active_support/time_with_zone.rb#455 def tv_sec; end + + # source://activesupport//lib/active_support/time_with_zone.rb#428 def usec; end + + # Returns a Time instance of the simultaneous time in the UTC timezone. + # + # source://activesupport//lib/active_support/time_with_zone.rb#64 def utc; end + + # Returns true if the current time zone is set to UTC. + # + # Time.zone = 'UTC' # => 'UTC' + # Time.zone.now.utc? # => true + # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' + # Time.zone.now.utc? # => false + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#106 def utc?; end + + # Returns the offset from current time to UTC time in seconds. + # + # source://activesupport//lib/active_support/time_with_zone.rb#112 def utc_offset; end + + # source://activesupport//lib/active_support/time_with_zone.rb#428 def wday; end + + # Returns a string of the object's date and time in the ISO 8601 standard + # format. + # + # Time.zone.now.xmlschema # => "2014-12-04T11:02:37-05:00" + # + # source://activesupport//lib/active_support/time_with_zone.rb#149 def xmlschema(fraction_digits = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/time_with_zone.rb#428 def yday; end + + # source://activesupport//lib/active_support/time_with_zone.rb#428 def year; end + + # Returns true if the current object's time falls within + # the previous day (yesterday). + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#257 def yesterday?; end + + # Returns the time zone abbreviation. + # + # Time.zone = 'Eastern Time (US & Canada)' # => "Eastern Time (US & Canada)" + # Time.zone.now.zone # => "EST" + # + # source://activesupport//lib/active_support/time_with_zone.rb#134 def zone; end private + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#570 def duration_of_variable_length?(obj); end + + # source://activesupport//lib/active_support/time_with_zone.rb#551 def get_period_and_ensure_valid_local_time(period); end + + # source://activesupport//lib/active_support/time_with_zone.rb#543 def incorporate_utc_offset(time, offset); end + + # Ensure proxy class responds to all methods that underlying time instance + # responds to. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#527 def respond_to_missing?(sym, include_priv); end + + # source://activesupport//lib/active_support/time_with_zone.rb#564 def transfer_time_values_to_utc_constructor(time); end + + # source://activesupport//lib/active_support/time_with_zone.rb#574 def wrap_with_time_zone(time); end class << self + # Report class name as 'Time' to thwart type checking. + # + # source://activesupport//lib/active_support/time_with_zone.rb#42 def name; end end end +# source://activesupport//lib/active_support/time_with_zone.rb#46 ActiveSupport::TimeWithZone::PRECISIONS = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/time_with_zone.rb#541 ActiveSupport::TimeWithZone::SECONDS_PER_DAY = T.let(T.unsafe(nil), Integer) +# The TimeZone class serves as a wrapper around TZInfo::Timezone instances. +# It allows us to do the following: +# +# * Limit the set of zones provided by TZInfo to a meaningful subset of 134 +# zones. +# * Retrieve and display zones with a friendlier name +# (e.g., "Eastern Time (US & Canada)" instead of "America/New_York"). +# * Lazily load TZInfo::Timezone instances only when they're needed. +# * Create ActiveSupport::TimeWithZone instances via TimeZone's +local+, +# +parse+, +at+ and +now+ methods. +# +# If you set config.time_zone in the Rails Application, you can +# access this TimeZone object via Time.zone: +# +# # application.rb: +# class Application < Rails::Application +# config.time_zone = 'Eastern Time (US & Canada)' +# end +# +# Time.zone # => # +# Time.zone.name # => "Eastern Time (US & Canada)" +# Time.zone.now # => Sun, 18 May 2008 14:30:44 EDT -04:00 +# +# source://activesupport//lib/active_support/values/time_zone.rb#29 class ActiveSupport::TimeZone include ::Comparable + # Create a new TimeZone object with the given name and offset. The + # offset is the number of seconds that this time zone is offset from UTC + # (GMT). Seconds were chosen as the offset unit because that is the unit + # that Ruby uses to represent time zone offsets (see Time#utc_offset). + # + # @return [TimeZone] a new instance of TimeZone + # + # source://activesupport//lib/active_support/values/time_zone.rb#297 def initialize(name, utc_offset = T.unsafe(nil), tzinfo = T.unsafe(nil)); end + # Compare this time zone to the parameter. The two are compared first on + # their offsets, and then by name. + # + # source://activesupport//lib/active_support/values/time_zone.rb#320 def <=>(zone); end + + # Compare #name and TZInfo identifier to a supplied regexp, returning +true+ + # if a match is found. + # + # source://activesupport//lib/active_support/values/time_zone.rb#329 def =~(re); end + + # Method for creating new ActiveSupport::TimeWithZone instance in time zone + # of +self+ from number of seconds since the Unix epoch. + # + # Time.zone = 'Hawaii' # => "Hawaii" + # Time.utc(2000).to_f # => 946684800.0 + # Time.zone.at(946684800.0) # => Fri, 31 Dec 1999 14:00:00 HST -10:00 + # + # A second argument can be supplied to specify sub-second precision. + # + # Time.zone = 'Hawaii' # => "Hawaii" + # Time.at(946684800, 123456.789).nsec # => 123456789 + # + # source://activesupport//lib/active_support/values/time_zone.rb#366 def at(*args); end + + # source://activesupport//lib/active_support/values/time_zone.rb#547 def encode_with(coder); end + + # Returns a formatted string of the offset from UTC, or an alternative + # string if the time zone is already UTC. + # + # zone = ActiveSupport::TimeZone['Central Time (US & Canada)'] + # zone.formatted_offset # => "-06:00" + # zone.formatted_offset(false) # => "-0600" + # + # source://activesupport//lib/active_support/values/time_zone.rb#314 def formatted_offset(colon = T.unsafe(nil), alternate_utc_string = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/values/time_zone.rb#543 def init_with(coder); end + + # Method for creating new ActiveSupport::TimeWithZone instance in time zone + # of +self+ from an ISO 8601 string. + # + # Time.zone = 'Hawaii' # => "Hawaii" + # Time.zone.iso8601('1999-12-31T14:00:00') # => Fri, 31 Dec 1999 14:00:00 HST -10:00 + # + # If the time components are missing then they will be set to zero. + # + # Time.zone = 'Hawaii' # => "Hawaii" + # Time.zone.iso8601('1999-12-31') # => Fri, 31 Dec 1999 00:00:00 HST -10:00 + # + # If the string is invalid then an +ArgumentError+ will be raised unlike +parse+ + # which usually returns +nil+ when given an invalid date string. + # + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/values/time_zone.rb#383 def iso8601(str); end + + # Method for creating new ActiveSupport::TimeWithZone instance in time zone + # of +self+ from given values. + # + # Time.zone = 'Hawaii' # => "Hawaii" + # Time.zone.local(2007, 2, 1, 15, 30, 45) # => Thu, 01 Feb 2007 15:30:45 HST -10:00 + # + # source://activesupport//lib/active_support/values/time_zone.rb#350 def local(*args); end + + # Adjust the given time to the simultaneous time in UTC. Returns a + # Time.utc() instance. + # + # source://activesupport//lib/active_support/values/time_zone.rb#523 def local_to_utc(time, dst = T.unsafe(nil)); end + + # Compare #name and TZInfo identifier to a supplied regexp, returning +true+ + # if a match is found. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/values/time_zone.rb#335 def match?(re); end + + # Returns the value of attribute name. + # + # source://activesupport//lib/active_support/values/time_zone.rb#290 def name; end + + # Returns an ActiveSupport::TimeWithZone instance representing the current + # time in the time zone represented by +self+. + # + # Time.zone = 'Hawaii' # => "Hawaii" + # Time.zone.now # => Wed, 23 Jan 2008 20:24:27 HST -10:00 + # + # source://activesupport//lib/active_support/values/time_zone.rb#488 def now; end + + # Method for creating new ActiveSupport::TimeWithZone instance in time zone + # of +self+ from parsed string. + # + # Time.zone = 'Hawaii' # => "Hawaii" + # Time.zone.parse('1999-12-31 14:00:00') # => Fri, 31 Dec 1999 14:00:00 HST -10:00 + # + # If upper components are missing from the string, they are supplied from + # TimeZone#now: + # + # Time.zone.now # => Fri, 31 Dec 1999 14:00:00 HST -10:00 + # Time.zone.parse('22:30:00') # => Fri, 31 Dec 1999 22:30:00 HST -10:00 + # + # However, if the date component is not provided, but any other upper + # components are supplied, then the day of the month defaults to 1: + # + # Time.zone.parse('Mar 2000') # => Wed, 01 Mar 2000 00:00:00 HST -10:00 + # + # If the string is invalid then an +ArgumentError+ could be raised. + # + # source://activesupport//lib/active_support/values/time_zone.rb#425 def parse(str, now = T.unsafe(nil)); end + + # Available so that TimeZone instances respond like TZInfo::Timezone + # instances. + # + # source://activesupport//lib/active_support/values/time_zone.rb#535 def period_for_local(time, dst = T.unsafe(nil)); end + + # Available so that TimeZone instances respond like TZInfo::Timezone + # instances. + # + # source://activesupport//lib/active_support/values/time_zone.rb#529 def period_for_utc(time); end + + # source://activesupport//lib/active_support/values/time_zone.rb#539 def periods_for_local(time); end + + # Method for creating new ActiveSupport::TimeWithZone instance in time zone + # of +self+ from an RFC 3339 string. + # + # Time.zone = 'Hawaii' # => "Hawaii" + # Time.zone.rfc3339('2000-01-01T00:00:00Z') # => Fri, 31 Dec 1999 14:00:00 HST -10:00 + # + # If the time or zone components are missing then an +ArgumentError+ will + # be raised. This is much stricter than either +parse+ or +iso8601+ which + # allow for missing components. + # + # Time.zone = 'Hawaii' # => "Hawaii" + # Time.zone.rfc3339('1999-12-31') # => ArgumentError: invalid date + # + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/values/time_zone.rb#441 def rfc3339(str); end + + # Parses +str+ according to +format+ and returns an ActiveSupport::TimeWithZone. + # + # Assumes that +str+ is a time in the time zone +self+, + # unless +format+ includes an explicit time zone. + # (This is the same behavior as +parse+.) + # In either case, the returned TimeWithZone has the timezone of +self+. + # + # Time.zone = 'Hawaii' # => "Hawaii" + # Time.zone.strptime('1999-12-31 14:00:00', '%Y-%m-%d %H:%M:%S') # => Fri, 31 Dec 1999 14:00:00 HST -10:00 + # + # If upper components are missing from the string, they are supplied from + # TimeZone#now: + # + # Time.zone.now # => Fri, 31 Dec 1999 14:00:00 HST -10:00 + # Time.zone.strptime('22:30:00', '%H:%M:%S') # => Fri, 31 Dec 1999 22:30:00 HST -10:00 + # + # However, if the date component is not provided, but any other upper + # components are supplied, then the day of the month defaults to 1: + # + # Time.zone.strptime('Mar 2000', '%b %Y') # => Wed, 01 Mar 2000 00:00:00 HST -10:00 + # + # source://activesupport//lib/active_support/values/time_zone.rb#479 def strptime(str, format, now = T.unsafe(nil)); end + + # Returns a textual representation of this time zone. + # + # source://activesupport//lib/active_support/values/time_zone.rb#341 def to_s; end + + # Returns the current date in this time zone. + # + # source://activesupport//lib/active_support/values/time_zone.rb#493 def today; end + + # Returns the next date in this time zone. + # + # source://activesupport//lib/active_support/values/time_zone.rb#498 def tomorrow; end + + # Returns the value of attribute tzinfo. + # + # source://activesupport//lib/active_support/values/time_zone.rb#291 def tzinfo; end + + # Returns the offset of this time zone from UTC in seconds. + # + # source://activesupport//lib/active_support/values/time_zone.rb#304 def utc_offset; end + + # Adjust the given time to the simultaneous time in the time zone + # represented by +self+. Returns a local time with the appropriate offset + # -- if you want an ActiveSupport::TimeWithZone instance, use + # Time#in_time_zone() instead. + # + # As of tzinfo 2, utc_to_local returns a Time with a non-zero utc_offset. + # See the +utc_to_local_returns_utc_offset_times+ config for more info. + # + # source://activesupport//lib/active_support/values/time_zone.rb#514 def utc_to_local(time); end + + # Returns the previous date in this time zone. + # + # source://activesupport//lib/active_support/values/time_zone.rb#503 def yesterday; end private + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/values/time_zone.rb#553 def parts_to_time(parts, now); end + + # source://activesupport//lib/active_support/values/time_zone.rb#578 def time_now; end class << self + # Locate a specific time zone object. If the argument is a string, it + # is interpreted to mean the name of the timezone to locate. If it is a + # numeric value it is either the hour offset, or the second offset, of the + # timezone to find. (The first one with that offset will be returned.) + # Returns +nil+ if no such time zone is known to the system. + # + # source://activesupport//lib/active_support/values/time_zone.rb#230 def [](arg); end + + # Returns an array of all TimeZone objects. There are multiple + # TimeZone objects per time zone, in many cases, to make it easier + # for users to find their own time zone. + # + # source://activesupport//lib/active_support/values/time_zone.rb#221 def all; end + + # source://activesupport//lib/active_support/values/time_zone.rb#259 def clear; end + + # A convenience method for returning a collection of TimeZone objects + # for time zones in the country specified by its ISO 3166-1 Alpha2 code. + # + # source://activesupport//lib/active_support/values/time_zone.rb#254 def country_zones(country_code); end + def create(*_arg0); end + + # source://activesupport//lib/active_support/values/time_zone.rb#205 def find_tzinfo(name); end + + # Returns a TimeZone instance with the given name, or +nil+ if no + # such TimeZone instance exists. (This exists to support the use of + # this class with the +composed_of+ macro.) + # + # source://activesupport//lib/active_support/values/time_zone.rb#214 def new(name); end + + # Assumes self represents an offset from UTC in seconds (as returned from + # Time#utc_offset) and turns this into an +HH:MM formatted string. + # + # ActiveSupport::TimeZone.seconds_to_utc_offset(-21_600) # => "-06:00" + # + # source://activesupport//lib/active_support/values/time_zone.rb#197 def seconds_to_utc_offset(seconds, colon = T.unsafe(nil)); end + + # A convenience method for returning a collection of TimeZone objects + # for time zones in the USA. + # + # source://activesupport//lib/active_support/values/time_zone.rb#248 def us_zones; end private + # source://activesupport//lib/active_support/values/time_zone.rb#267 def load_country_zones(code); end + + # source://activesupport//lib/active_support/values/time_zone.rb#281 def zones_map; end end end +# Keys are Rails TimeZone names, values are TZInfo identifiers. +# +# source://activesupport//lib/active_support/values/time_zone.rb#31 ActiveSupport::TimeZone::MAPPING = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/values/time_zone.rb#186 ActiveSupport::TimeZone::UTC_OFFSET_WITHOUT_COLON = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/values/time_zone.rb#185 ActiveSupport::TimeZone::UTC_OFFSET_WITH_COLON = T.let(T.unsafe(nil), String) +# source://activesupport//lib/active_support/core_ext/object/json.rb#36 module ActiveSupport::ToJsonWithActiveSupportEncoder + # source://activesupport//lib/active_support/core_ext/object/json.rb#37 def to_json(options = T.unsafe(nil)); end end +# source://activesupport//lib/active_support/core_ext/object/try.rb#6 module ActiveSupport::Tryable - def try(method_name = T.unsafe(nil), *args, &b); end - def try!(method_name = T.unsafe(nil), *args, &b); end + # source://activesupport//lib/active_support/core_ext/object/try.rb#7 + def try(method_name = T.unsafe(nil), *args, **_arg2, &b); end + + # source://activesupport//lib/active_support/core_ext/object/try.rb#20 + def try!(method_name = T.unsafe(nil), *args, **_arg2, &b); end end +# source://activesupport//lib/active_support/gem_version.rb#9 module ActiveSupport::VERSION; end + +# source://activesupport//lib/active_support/gem_version.rb#10 ActiveSupport::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/gem_version.rb#11 ActiveSupport::VERSION::MINOR = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/gem_version.rb#13 ActiveSupport::VERSION::PRE = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/gem_version.rb#15 ActiveSupport::VERSION::STRING = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/gem_version.rb#12 ActiveSupport::VERSION::TINY = T.let(T.unsafe(nil), Integer) +# source://activesupport//lib/active_support/core_ext/hash/conversions.rb#141 class ActiveSupport::XMLConverter + # @return [XMLConverter] a new instance of XMLConverter + # + # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#152 def initialize(xml, disallowed_types = T.unsafe(nil)); end + # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#157 def to_h; end private + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#223 def become_array?(value); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#219 def become_content?(value); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#227 def become_empty_string?(value); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#233 def become_hash?(value); end + + # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#173 def deep_to_h(value); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#242 def garbage?(value); end + + # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#162 def normalize_keys(params); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#237 def nothing?(value); end + + # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#258 def process_array(value); end + + # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#249 def process_content(value); end + + # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#186 def process_hash(value); end end +# source://activesupport//lib/active_support/core_ext/hash/conversions.rb#150 ActiveSupport::XMLConverter::DISALLOWED_TYPES = T.let(T.unsafe(nil), Array) +# Raised if the XML contains attributes with type="yaml" or +# type="symbol". Read Hash#from_xml for more details. +# +# source://activesupport//lib/active_support/core_ext/hash/conversions.rb#144 class ActiveSupport::XMLConverter::DisallowedType < ::StandardError + # @return [DisallowedType] a new instance of DisallowedType + # + # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#145 def initialize(type); end end +# = XmlMini +# +# To use the much faster libxml parser: +# gem 'libxml-ruby', '=0.9.7' +# XmlMini.backend = 'LibXML' +# +# source://activesupport//lib/active_support/xml_mini.rb#17 module ActiveSupport::XmlMini extend ::ActiveSupport::XmlMini + # source://activesupport//lib/active_support/xml_mini.rb#96 def backend; end + + # source://activesupport//lib/active_support/xml_mini.rb#100 def backend=(name); end + + # Returns the value of attribute depth. + # + # source://activesupport//lib/active_support/xml_mini.rb#91 def depth; end + + # Sets the attribute depth + # + # @param value the value to set the attribute depth to. + # + # source://activesupport//lib/active_support/xml_mini.rb#91 def depth=(_arg0); end - def parse(*args, &block); end + + # source://activesupport//lib/active_support/xml_mini.rb#94 + def parse(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/xml_mini.rb#147 def rename_key(key, options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/xml_mini.rb#114 def to_tag(key, value, options); end + + # source://activesupport//lib/active_support/xml_mini.rb#106 def with_backend(name); end private + # source://activesupport//lib/active_support/xml_mini.rb#158 def _dasherize(key); end + + # TODO: Add support for other encodings + # + # source://activesupport//lib/active_support/xml_mini.rb#165 def _parse_binary(bin, entity); end + + # source://activesupport//lib/active_support/xml_mini.rb#174 def _parse_file(file, entity); end + + # source://activesupport//lib/active_support/xml_mini.rb#190 def cast_backend_name_to_module(name); end + + # source://activesupport//lib/active_support/xml_mini.rb#182 def current_thread_backend; end + + # source://activesupport//lib/active_support/xml_mini.rb#186 def current_thread_backend=(name); end end +# source://activesupport//lib/active_support/xml_mini.rb#34 ActiveSupport::XmlMini::DEFAULT_ENCODINGS = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/xml_mini.rb#54 ActiveSupport::XmlMini::FORMATTING = T.let(T.unsafe(nil), Hash) +# This module decorates files deserialized using Hash.from_xml with +# the original_filename and content_type methods. +# +# source://activesupport//lib/active_support/xml_mini.rb#22 module ActiveSupport::XmlMini::FileLike + # source://activesupport//lib/active_support/xml_mini.rb#29 def content_type; end + + # source://activesupport//lib/active_support/xml_mini.rb#23 def content_type=(_arg0); end + + # source://activesupport//lib/active_support/xml_mini.rb#25 def original_filename; end + + # source://activesupport//lib/active_support/xml_mini.rb#23 def original_filename=(_arg0); end end +# source://activesupport//lib/active_support/xml_mini.rb#64 ActiveSupport::XmlMini::PARSING = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/xml_mini.rb#39 ActiveSupport::XmlMini::TYPE_NAMES = T.let(T.unsafe(nil), Hash) +# source://activesupport//lib/active_support/xml_mini/rexml.rb#8 module ActiveSupport::XmlMini_REXML extend ::ActiveSupport::XmlMini_REXML + # Parse an XML Document string or IO into a simple hash. + # + # Same as XmlSimple::xml_in but doesn't shoot itself in the foot, + # and uses the defaults from Active Support. + # + # data:: + # XML Document string or IO to parse + # + # source://activesupport//lib/active_support/xml_mini/rexml.rb#20 def parse(data); end private + # Actually converts an XML document element into a data structure. + # + # element:: + # The document element to be collapsed. + # + # source://activesupport//lib/active_support/xml_mini/rexml.rb#63 def collapse(element, depth); end + + # Determines if a document element has text content + # + # element:: + # XML element to be checked. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/xml_mini/rexml.rb#133 def empty_content?(element); end + + # Converts the attributes array of an XML element into a hash. + # Returns an empty Hash if node has no attributes. + # + # element:: + # XML element to extract attributes from. + # + # source://activesupport//lib/active_support/xml_mini/rexml.rb#123 def get_attributes(element); end + + # Adds a new key/value pair to an existing Hash. If the key to be added + # already exists and the existing value associated with key is not + # an Array, it will be wrapped in an Array. Then the new value is + # appended to that Array. + # + # hash:: + # Hash to add key/value pair to. + # key:: + # Key to be added. + # value:: + # Value to be associated with key. + # + # source://activesupport//lib/active_support/xml_mini/rexml.rb#103 def merge!(hash, key, value); end + + # Convert an XML element and merge into the hash + # + # hash:: + # Hash to merge the converted element into. + # element:: + # XML element to merge into hash + # + # @raise [REXML::ParseException] + # + # source://activesupport//lib/active_support/xml_mini/rexml.rb#54 def merge_element!(hash, element, depth); end + + # Merge all the texts of an element into the hash + # + # hash:: + # Hash to add the converted element to. + # element:: + # XML element whose texts are to me merged into the hash + # + # source://activesupport//lib/active_support/xml_mini/rexml.rb#81 def merge_texts!(hash, element); end + + # source://activesupport//lib/active_support/xml_mini/rexml.rb#41 def require_rexml; end end +# source://activesupport//lib/active_support/xml_mini/rexml.rb#11 ActiveSupport::XmlMini_REXML::CONTENT_KEY = T.let(T.unsafe(nil), String) +# source://activesupport//lib/active_support/core_ext/object/blank.rb#83 class Array include ::Enumerable - include ::JSON::Ext::Generator::GeneratorMethods::Array - include ::Plist::Emit - include ::MessagePack::CoreExt + # source://activesupport//lib/active_support/core_ext/object/json.rb#153 def as_json(options = T.unsafe(nil)); end + + # Removes all blank elements from the +Array+ in place and returns self. + # Uses Object#blank? for determining if an item is blank. + # + # a = [1, "", nil, 2, " ", [], {}, false, true] + # a.compact_blank! + # # => [1, 2, true] + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#256 def compact_blank!; end + + # Returns a deep copy of array. + # + # array = [1, [2, 3]] + # dup = array.deep_dup + # dup[1][2] = 4 + # + # array[1][2] # => nil + # dup[1][2] # => 4 + # + # source://activesupport//lib/active_support/core_ext/object/deep_dup.rb#29 def deep_dup; end + + # Returns a copy of the Array excluding the specified elements. + # + # ["David", "Rafael", "Aaron", "Todd"].excluding("Aaron", "Todd") # => ["David", "Rafael"] + # [ [ 0, 1 ], [ 1, 0 ] ].excluding([ [ 1, 0 ] ]) # => [ [ 0, 1 ] ] + # + # Note: This is an optimization of Enumerable#excluding that uses Array#- + # instead of Array#reject for performance reasons. + # + # source://activesupport//lib/active_support/core_ext/array/access.rb#47 def excluding(*elements); end + + # Removes and returns the elements for which the block returns a true value. + # If no block is given, an Enumerator is returned instead. + # + # numbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + # odd_numbers = numbers.extract! { |number| number.odd? } # => [1, 3, 5, 7, 9] + # numbers # => [0, 2, 4, 6, 8] + # + # source://activesupport//lib/active_support/core_ext/array/extract.rb#10 def extract!; end + + # Extracts options from a set of arguments. Removes and returns the last + # element in the array if it's a hash, otherwise returns a blank hash. + # + # def options(*args) + # args.extract_options! + # end + # + # options(1, 2) # => {} + # options(1, 2, a: :b) # => {:a=>:b} + # + # source://activesupport//lib/active_support/core_ext/array/extract_options.rb#24 def extract_options!; end + + # Equal to self[4]. + # + # %w( a b c d e ).fifth # => "e" + # + # source://activesupport//lib/active_support/core_ext/array/access.rb#80 def fifth; end + + # Equal to self[41]. Also known as accessing "the reddit". + # + # (1..42).to_a.forty_two # => 42 + # + # source://activesupport//lib/active_support/core_ext/array/access.rb#87 def forty_two; end + + # Equal to self[3]. + # + # %w( a b c d e ).fourth # => "d" + # + # source://activesupport//lib/active_support/core_ext/array/access.rb#73 def fourth; end + + # Returns the tail of the array from +position+. + # + # %w( a b c d ).from(0) # => ["a", "b", "c", "d"] + # %w( a b c d ).from(2) # => ["c", "d"] + # %w( a b c d ).from(10) # => [] + # %w().from(0) # => [] + # %w( a b c d ).from(-2) # => ["c", "d"] + # %w( a b c ).from(-10) # => [] + # + # source://activesupport//lib/active_support/core_ext/array/access.rb#12 def from(position); end + + # Splits or iterates over the array in +number+ of groups, padding any + # remaining slots with +fill_with+ unless it is +false+. + # + # %w(1 2 3 4 5 6 7 8 9 10).in_groups(3) {|group| p group} + # ["1", "2", "3", "4"] + # ["5", "6", "7", nil] + # ["8", "9", "10", nil] + # + # %w(1 2 3 4 5 6 7 8 9 10).in_groups(3, ' ') {|group| p group} + # ["1", "2", "3", "4"] + # ["5", "6", "7", " "] + # ["8", "9", "10", " "] + # + # %w(1 2 3 4 5 6 7).in_groups(3, false) {|group| p group} + # ["1", "2", "3"] + # ["4", "5"] + # ["6", "7"] + # + # source://activesupport//lib/active_support/core_ext/array/grouping.rb#62 def in_groups(number, fill_with = T.unsafe(nil)); end + + # Splits or iterates over the array in groups of size +number+, + # padding any remaining slots with +fill_with+ unless it is +false+. + # + # %w(1 2 3 4 5 6 7 8 9 10).in_groups_of(3) {|group| p group} + # ["1", "2", "3"] + # ["4", "5", "6"] + # ["7", "8", "9"] + # ["10", nil, nil] + # + # %w(1 2 3 4 5).in_groups_of(2, ' ') {|group| p group} + # ["1", "2"] + # ["3", "4"] + # ["5", " "] + # + # %w(1 2 3 4 5).in_groups_of(2, false) {|group| p group} + # ["1", "2"] + # ["3", "4"] + # ["5"] + # + # source://activesupport//lib/active_support/core_ext/array/grouping.rb#22 def in_groups_of(number, fill_with = T.unsafe(nil)); end + + # Returns a new array that includes the passed elements. + # + # [ 1, 2, 3 ].including(4, 5) # => [ 1, 2, 3, 4, 5 ] + # [ [ 0, 1 ] ].including([ [ 1, 0 ] ]) # => [ [ 0, 1 ], [ 1, 0 ] ] + # + # source://activesupport//lib/active_support/core_ext/array/access.rb#36 def including(*elements); end + + # Wraps the array in an +ArrayInquirer+ object, which gives a friendlier way + # to check its string-like contents. + # + # pets = [:cat, :dog].inquiry + # + # pets.cat? # => true + # pets.ferret? # => false + # + # pets.any?(:cat, :ferret) # => true + # pets.any?(:ferret, :alligator) # => false + # + # source://activesupport//lib/active_support/core_ext/array/inquiry.rb#16 def inquiry; end + + # Equal to self[1]. + # + # %w( a b c d e ).second # => "b" + # + # source://activesupport//lib/active_support/core_ext/array/access.rb#59 def second; end + + # Equal to self[-2]. + # + # %w( a b c d e ).second_to_last # => "d" + # + # source://activesupport//lib/active_support/core_ext/array/access.rb#101 def second_to_last; end + + # Divides the array into one or more subarrays based on a delimiting +value+ + # or the result of an optional block. + # + # [1, 2, 3, 4, 5].split(3) # => [[1, 2], [4, 5]] + # (1..10).to_a.split { |i| i % 3 == 0 } # => [[1, 2], [4, 5], [7, 8], [10]] + # + # source://activesupport//lib/active_support/core_ext/array/grouping.rb#93 def split(value = T.unsafe(nil)); end + + # Array#sum was added in Ruby 2.4 but it only works with Numeric elements. + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#241 def sum(init = T.unsafe(nil), &block); end + + # Equal to self[2]. + # + # %w( a b c d e ).third # => "c" + # + # source://activesupport//lib/active_support/core_ext/array/access.rb#66 def third; end + + # Equal to self[-3]. + # + # %w( a b c d e ).third_to_last # => "c" + # + # source://activesupport//lib/active_support/core_ext/array/access.rb#94 def third_to_last; end + + # Returns the beginning of the array up to +position+. + # + # %w( a b c d ).to(0) # => ["a"] + # %w( a b c d ).to(2) # => ["a", "b", "c"] + # %w( a b c d ).to(10) # => ["a", "b", "c", "d"] + # %w().to(0) # => [] + # %w( a b c d ).to(-2) # => ["a", "b", "c"] + # %w( a b c ).to(-10) # => [] + # + # source://activesupport//lib/active_support/core_ext/array/access.rb#24 def to(position); end + + # Extends Array#to_s to convert a collection of elements into a + # comma separated id list if :db argument is given as the format. + # + # Blog.all.to_formatted_s(:db) # => "1,2,3" + # Blog.none.to_formatted_s(:db) # => "null" + # [1,2].to_formatted_s # => "[1, 2]" + # + # source://activesupport//lib/active_support/core_ext/array/conversions.rb#93 def to_formatted_s(format = T.unsafe(nil)); end + + # Calls to_param on all its elements and joins the result with + # slashes. This is used by url_for in Action Pack. + # + # source://activesupport//lib/active_support/core_ext/object/to_query.rb#42 def to_param; end + + # Converts an array into a string suitable for use as a URL query string, + # using the given +key+ as the param name. + # + # ['Rails', 'coding'].to_query('hobbies') # => "hobbies%5B%5D=Rails&hobbies%5B%5D=coding" + # + # source://activesupport//lib/active_support/core_ext/object/to_query.rb#50 def to_query(key); end + + # Extends Array#to_s to convert a collection of elements into a + # comma separated id list if :db argument is given as the format. + # + # Blog.all.to_formatted_s(:db) # => "1,2,3" + # Blog.none.to_formatted_s(:db) # => "null" + # [1,2].to_formatted_s # => "[1, 2]" + # + # source://activesupport//lib/active_support/core_ext/array/conversions.rb#93 def to_s(format = T.unsafe(nil)); end + + # Converts the array to a comma-separated sentence where the last element is + # joined by the connector word. + # + # You can pass the following options to change the default behavior. If you + # pass an option key that doesn't exist in the list below, it will raise an + # ArgumentError. + # + # ==== Options + # + # * :words_connector - The sign or word used to join the elements + # in arrays with two or more elements (default: ", "). + # * :two_words_connector - The sign or word used to join the elements + # in arrays with two elements (default: " and "). + # * :last_word_connector - The sign or word used to join the last element + # in arrays with three or more elements (default: ", and "). + # * :locale - If +i18n+ is available, you can set a locale and use + # the connector options defined on the 'support.array' namespace in the + # corresponding dictionary file. + # + # ==== Examples + # + # [].to_sentence # => "" + # ['one'].to_sentence # => "one" + # ['one', 'two'].to_sentence # => "one and two" + # ['one', 'two', 'three'].to_sentence # => "one, two, and three" + # + # ['one', 'two'].to_sentence(passing: 'invalid option') + # # => ArgumentError: Unknown key: :passing. Valid keys are: :words_connector, :two_words_connector, :last_word_connector, :locale + # + # ['one', 'two'].to_sentence(two_words_connector: '-') + # # => "one-two" + # + # ['one', 'two', 'three'].to_sentence(words_connector: ' or ', last_word_connector: ' or at least ') + # # => "one or two or at least three" + # + # Using :locale option: + # + # # Given this locale dictionary: + # # + # # es: + # # support: + # # array: + # # words_connector: " o " + # # two_words_connector: " y " + # # last_word_connector: " o al menos " + # + # ['uno', 'dos'].to_sentence(locale: :es) + # # => "uno y dos" + # + # ['uno', 'dos', 'tres'].to_sentence(locale: :es) + # # => "uno o dos o al menos tres" + # + # source://activesupport//lib/active_support/core_ext/array/conversions.rb#61 def to_sentence(options = T.unsafe(nil)); end + + # Returns a string that represents the array in XML by invoking +to_xml+ + # on each element. Active Record collections delegate their representation + # in XML to this method. + # + # All elements are expected to respond to +to_xml+, if any of them does + # not then an exception is raised. + # + # The root node reflects the class name of the first element in plural + # if all elements belong to the same type and that's not Hash: + # + # customer.projects.to_xml + # + # + # + # + # 20000.0 + # 1567 + # 2008-04-09 + # ... + # + # + # 57230.0 + # 1567 + # 2008-04-15 + # ... + # + # + # + # Otherwise the root element is "objects": + # + # [{ foo: 1, bar: 2}, { baz: 3}].to_xml + # + # + # + # + # 2 + # 1 + # + # + # 3 + # + # + # + # If the collection is empty the root element is "nil-classes" by default: + # + # [].to_xml + # + # + # + # + # To ensure a meaningful root element use the :root option: + # + # customer_with_no_projects.projects.to_xml(root: 'projects') + # + # + # + # + # By default name of the node for the children of root is root.singularize. + # You can change it with the :children option. + # + # The +options+ hash is passed downwards: + # + # Message.all.to_xml(skip_types: true) + # + # + # + # + # 2008-03-07T09:58:18+01:00 + # 1 + # 1 + # 2008-03-07T09:58:18+01:00 + # 1 + # + # + # + # source://activesupport//lib/active_support/core_ext/array/conversions.rb#183 def to_xml(options = T.unsafe(nil)); end + + # Alias for #excluding. + # + # source://activesupport//lib/active_support/core_ext/array/access.rb#52 def without(*elements); end class << self + # Wraps its argument in an array unless it is already an array (or array-like). + # + # Specifically: + # + # * If the argument is +nil+ an empty array is returned. + # * Otherwise, if the argument responds to +to_ary+ it is invoked, and its result returned. + # * Otherwise, returns an array with the argument as its single element. + # + # Array.wrap(nil) # => [] + # Array.wrap([1, 2, 3]) # => [1, 2, 3] + # Array.wrap(0) # => [0] + # + # This method is similar in purpose to Kernel#Array, but there are some differences: + # + # * If the argument responds to +to_ary+ the method is invoked. Kernel#Array + # moves on to try +to_a+ if the returned value is +nil+, but Array.wrap returns + # an array with the argument as its single element right away. + # * If the returned value from +to_ary+ is neither +nil+ nor an +Array+ object, Kernel#Array + # raises an exception, while Array.wrap does not, it just returns the value. + # * It does not call +to_a+ on the argument, if the argument does not respond to +to_ary+ + # it returns an array with the argument as its single element. + # + # The last point is easily explained with some enumerables: + # + # Array(foo: :bar) # => [[:foo, :bar]] + # Array.wrap(foo: :bar) # => [{:foo=>:bar}] + # + # There's also a related idiom that uses the splat operator: + # + # [*object] + # + # which returns [] for +nil+, but calls to Array(object) otherwise. + # + # The differences with Kernel#Array explained above + # apply to the rest of objects. + # + # source://activesupport//lib/active_support/core_ext/array/wrap.rb#39 def wrap(object); end end end +# source://activesupport//lib/active_support/core_ext/object/json.rb#113 class BigDecimal < ::Numeric include ::ActiveSupport::BigDecimalWithDefaultFormat include ::ActiveSupport::NumericWithFormat - extend ::BigDecimal::Deprecation + # A BigDecimal would be naturally represented as a JSON number. Most libraries, + # however, parse non-integer JSON numbers directly as floats. Clients using + # those libraries would get in general a wrong number and no way to recover + # other than manually inspecting the string with the JSON code itself. + # + # That's why a JSON string is returned. The JSON literal is not numeric, but + # if the other end knows by contract that the data is supposed to be a + # BigDecimal, it still has the chance to post-process the string and get the + # real value. + # + # source://activesupport//lib/active_support/core_ext/object/json.rb#123 def as_json(options = T.unsafe(nil)); end -end -BigDecimal::EXCEPTION_NaN = T.let(T.unsafe(nil), Integer) -BigDecimal::VERSION = T.let(T.unsafe(nil), String) + # source://activesupport//lib/active_support/core_ext/numeric/conversions.rb#109 + def to_s(format = T.unsafe(nil), options = T.unsafe(nil)); end +end +# source://activesupport//lib/active_support/core_ext/class/attribute.rb#5 class Class < ::Module + # Declare a class-level attribute whose value is inheritable by subclasses. + # Subclasses can change their own value and it will not impact parent class. + # + # ==== Options + # + # * :instance_reader - Sets the instance reader method (defaults to true). + # * :instance_writer - Sets the instance writer method (defaults to true). + # * :instance_accessor - Sets both instance methods (defaults to true). + # * :instance_predicate - Sets a predicate method (defaults to true). + # * :default - Sets a default value for the attribute (defaults to nil). + # + # ==== Examples + # + # class Base + # class_attribute :setting + # end + # + # class Subclass < Base + # end + # + # Base.setting = true + # Subclass.setting # => true + # Subclass.setting = false + # Subclass.setting # => false + # Base.setting # => true + # + # In the above case as long as Subclass does not assign a value to setting + # by performing Subclass.setting = _something_, Subclass.setting + # would read value assigned to parent class. Once Subclass assigns a value then + # the value assigned by Subclass would be returned. + # + # This matches normal Ruby method inheritance: think of writing an attribute + # on a subclass as overriding the reader method. However, you need to be aware + # when using +class_attribute+ with mutable structures as +Array+ or +Hash+. + # In such cases, you don't want to do changes in place. Instead use setters: + # + # Base.setting = [] + # Base.setting # => [] + # Subclass.setting # => [] + # + # # Appending in child changes both parent and child because it is the same object: + # Subclass.setting << :foo + # Base.setting # => [:foo] + # Subclass.setting # => [:foo] + # + # # Use setters to not propagate changes: + # Base.setting = [] + # Subclass.setting += [:foo] + # Base.setting # => [] + # Subclass.setting # => [:foo] + # + # For convenience, an instance predicate method is defined as well. + # To skip it, pass instance_predicate: false. + # + # Subclass.setting? # => false + # + # Instances may overwrite the class value in the same way: + # + # Base.setting = true + # object = Base.new + # object.setting # => true + # object.setting = false + # object.setting # => false + # Base.setting # => true + # + # To opt out of the instance reader method, pass instance_reader: false. + # + # object.setting # => NoMethodError + # object.setting? # => NoMethodError + # + # To opt out of the instance writer method, pass instance_writer: false. + # + # object.setting = false # => NoMethodError + # + # To opt out of both instance methods, pass instance_accessor: false. + # + # To set a default value for the attribute, pass default:, like so: + # + # class_attribute :settings, default: {} + # + # source://activesupport//lib/active_support/core_ext/class/attribute.rb#85 def class_attribute(*attrs, instance_accessor: T.unsafe(nil), instance_reader: T.unsafe(nil), instance_writer: T.unsafe(nil), instance_predicate: T.unsafe(nil), default: T.unsafe(nil)); end + + # Returns an array with all classes that are < than its receiver. + # + # class C; end + # C.descendants # => [] + # + # class B < C; end + # C.descendants # => [B] + # + # class A < B; end + # C.descendants # => [B, A] + # + # class D < C; end + # C.descendants # => [B, A, D] + # + # source://activesupport//lib/active_support/core_ext/class/subclasses.rb#17 def descendants; end + + # Returns an array with the direct children of +self+. + # + # class Foo; end + # class Bar < Foo; end + # class Baz < Bar; end + # + # Foo.subclasses # => [Bar] + # + # source://activesupport//lib/active_support/core_ext/class/subclasses.rb#30 def subclasses; end end +# source://activesupport//lib/active_support/core_ext/date/zones.rb#6 class Date include ::Comparable include ::DateAndTime::Zones include ::DateAndTime::Calculations + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#90 def +(other); end + + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#100 def -(other); end + + # Allow Date to be compared with Time by converting to DateTime and relying on the <=> from there. + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#137 def <=>(other); end + + # Duck-types as a Date-like class. See Object#acts_like?. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/date/acts_like.rb#7 def acts_like_date?; end + + # Provides precise Date calculations for years, months, and days. The +options+ parameter takes a hash with + # any of these keys: :years, :months, :weeks, :days. + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#112 def advance(options); end + + # Converts Date to a Time (or DateTime if necessary) with the time portion set to the beginning of the day (0:00) + # and then subtracts the specified number of seconds. + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#55 def ago(seconds); end + + # source://activesupport//lib/active_support/core_ext/object/json.rb#192 def as_json(options = T.unsafe(nil)); end + + # Converts Date to a Time (or DateTime if necessary) with the time portion set to the beginning of the day (0:00) + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#67 def at_beginning_of_day; end + + # Converts Date to a Time (or DateTime if necessary) with the time portion set to the end of the day (23:59:59) + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#85 def at_end_of_day; end + + # Converts Date to a Time (or DateTime if necessary) with the time portion set to the middle of the day (12:00) + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#75 def at_midday; end + + # Converts Date to a Time (or DateTime if necessary) with the time portion set to the middle of the day (12:00) + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#75 def at_middle_of_day; end + + # Converts Date to a Time (or DateTime if necessary) with the time portion set to the beginning of the day (0:00) + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#67 def at_midnight; end + + # Converts Date to a Time (or DateTime if necessary) with the time portion set to the middle of the day (12:00) + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#75 def at_noon; end + + # Converts Date to a Time (or DateTime if necessary) with the time portion set to the beginning of the day (0:00) + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#67 def beginning_of_day; end + + # No Date is blank: + # + # Date.today.blank? # => false + # + # @return [false] + # + # source://activesupport//lib/active_support/core_ext/date/blank.rb#11 def blank?; end + + # Returns a new Date where one or more of the elements have been changed according to the +options+ parameter. + # The +options+ parameter is a hash with a combination of these keys: :year, :month, :day. + # + # Date.new(2007, 5, 12).change(day: 1) # => Date.new(2007, 5, 1) + # Date.new(2007, 5, 12).change(year: 2005, month: 1) # => Date.new(2005, 1, 12) + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#128 def change(options); end + + # Allow Date to be compared with Time by converting to DateTime and relying on the <=> from there. + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#137 def compare_with_coercion(other); end + + # Converts Date to a Time (or DateTime if necessary) with the time portion set to the end of the day (23:59:59) + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#85 def end_of_day; end + + # Converts Date to a Time (or DateTime if necessary) with the time portion set to the beginning of the day (0:00) + # and then adds the specified number of seconds + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#61 def in(seconds); end + + # Overrides the default inspect method with a human readable one, e.g., "Mon, 21 Feb 2005" + # + # source://activesupport//lib/active_support/core_ext/date/conversions.rb#62 def inspect; end + + # Converts Date to a Time (or DateTime if necessary) with the time portion set to the middle of the day (12:00) + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#75 def midday; end + + # Converts Date to a Time (or DateTime if necessary) with the time portion set to the middle of the day (12:00) + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#75 def middle_of_day; end + + # Converts Date to a Time (or DateTime if necessary) with the time portion set to the beginning of the day (0:00) + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#67 def midnight; end + + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#100 def minus_with_duration(other); end + + # Converts Date to a Time (or DateTime if necessary) with the time portion set to the middle of the day (12:00) + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#75 def noon; end + + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#90 def plus_with_duration(other); end + + # Overrides the default inspect method with a human readable one, e.g., "Mon, 21 Feb 2005" + # + # source://activesupport//lib/active_support/core_ext/date/conversions.rb#62 def readable_inspect; end + + # Converts Date to a Time (or DateTime if necessary) with the time portion set to the beginning of the day (0:00) + # and then adds the specified number of seconds + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#61 def since(seconds); end + + # Convert to a formatted string. See DATE_FORMATS for predefined formats. + # + # This method is aliased to to_s. + # + # date = Date.new(2007, 11, 10) # => Sat, 10 Nov 2007 + # + # date.to_formatted_s(:db) # => "2007-11-10" + # date.to_s(:db) # => "2007-11-10" + # + # date.to_formatted_s(:short) # => "10 Nov" + # date.to_formatted_s(:number) # => "20071110" + # date.to_formatted_s(:long) # => "November 10, 2007" + # date.to_formatted_s(:long_ordinal) # => "November 10th, 2007" + # date.to_formatted_s(:rfc822) # => "10 Nov 2007" + # date.to_formatted_s(:iso8601) # => "2007-11-10" + # + # == Adding your own date formats to to_formatted_s + # You can add your own formats to the Date::DATE_FORMATS hash. + # Use the format name as the hash key and either a strftime string + # or Proc instance that takes a date argument as the value. + # + # # config/initializers/date_formats.rb + # Date::DATE_FORMATS[:month_and_year] = '%B %Y' + # Date::DATE_FORMATS[:short_ordinal] = ->(date) { date.strftime("%B #{date.day.ordinalize}") } + # + # source://activesupport//lib/active_support/core_ext/date/conversions.rb#47 def to_formatted_s(format = T.unsafe(nil)); end + + # Convert to a formatted string. See DATE_FORMATS for predefined formats. + # + # This method is aliased to to_s. + # + # date = Date.new(2007, 11, 10) # => Sat, 10 Nov 2007 + # + # date.to_formatted_s(:db) # => "2007-11-10" + # date.to_s(:db) # => "2007-11-10" + # + # date.to_formatted_s(:short) # => "10 Nov" + # date.to_formatted_s(:number) # => "20071110" + # date.to_formatted_s(:long) # => "November 10, 2007" + # date.to_formatted_s(:long_ordinal) # => "November 10th, 2007" + # date.to_formatted_s(:rfc822) # => "10 Nov 2007" + # date.to_formatted_s(:iso8601) # => "2007-11-10" + # + # == Adding your own date formats to to_formatted_s + # You can add your own formats to the Date::DATE_FORMATS hash. + # Use the format name as the hash key and either a strftime string + # or Proc instance that takes a date argument as the value. + # + # # config/initializers/date_formats.rb + # Date::DATE_FORMATS[:month_and_year] = '%B %Y' + # Date::DATE_FORMATS[:short_ordinal] = ->(date) { date.strftime("%B #{date.day.ordinalize}") } + # + # source://activesupport//lib/active_support/core_ext/date/conversions.rb#47 def to_s(format = T.unsafe(nil)); end + + # Converts a Date instance to a Time, where the time is set to the beginning of the day. + # The timezone can be either :local or :utc (default :local). + # + # date = Date.new(2007, 11, 10) # => Sat, 10 Nov 2007 + # + # date.to_time # => 2007-11-10 00:00:00 0800 + # date.to_time(:local) # => 2007-11-10 00:00:00 0800 + # + # date.to_time(:utc) # => 2007-11-10 00:00:00 UTC + # + # NOTE: The :local timezone is Ruby's *process* timezone, i.e. ENV['TZ']. + # If the *application's* timezone is needed, then use +in_time_zone+ instead. + # + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/core_ext/date/conversions.rb#82 def to_time(form = T.unsafe(nil)); end + + # Returns a string which represents the time in used time zone as DateTime + # defined by XML Schema: + # + # date = Date.new(2015, 05, 23) # => Sat, 23 May 2015 + # date.xmlschema # => "2015-05-23T00:00:00+04:00" + # + # source://activesupport//lib/active_support/core_ext/date/conversions.rb#94 def xmlschema; end class << self + # Returns the week start (e.g. :monday) for the current request, if this has been set (via Date.beginning_of_week=). + # If Date.beginning_of_week has not been set for the current request, returns the week start specified in config.beginning_of_week. + # If no config.beginning_of_week was specified, returns :monday. + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#19 def beginning_of_week; end + + # Sets Date.beginning_of_week to a week start (e.g. :monday) for current request/thread. + # + # This method accepts any of the following day symbols: + # :monday, :tuesday, :wednesday, :thursday, :friday, :saturday, :sunday + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#27 def beginning_of_week=(week_start); end + + # Returns the value of attribute beginning_of_week_default. + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#14 def beginning_of_week_default; end + + # Sets the attribute beginning_of_week_default + # + # @param value the value to set the attribute beginning_of_week_default to. + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#14 def beginning_of_week_default=(_arg0); end + + # Returns Time.zone.today when Time.zone or config.time_zone are set, otherwise just returns Date.today. + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#48 def current; end + + # Returns week start day symbol (e.g. :monday), or raises an +ArgumentError+ for invalid day symbol. + # + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#32 def find_beginning_of_week!(week_start); end + + # Returns a new Date representing the date 1 day after today (i.e. tomorrow's date). + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#43 def tomorrow; end + + # Returns a new Date representing the date 1 day ago (i.e. yesterday's date). + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#38 def yesterday; end end end +# source://activesupport//lib/active_support/core_ext/date/conversions.rb#9 Date::DATE_FORMATS = T.let(T.unsafe(nil), Hash) -Date::VERSION = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/core_ext/date_and_time/compatibility.rb#5 module DateAndTime; end +# source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#7 module DateAndTime::Calculations + # Returns true if the date/time falls after date_or_time. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#72 def after?(date_or_time); end + + # Returns a Range representing the whole day of the current date/time. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#300 def all_day; end + + # Returns a Range representing the whole month of the current date/time. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#311 def all_month; end + + # Returns a Range representing the whole quarter of the current date/time. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#316 def all_quarter; end + + # Returns a Range representing the whole week of the current date/time. + # Week starts on start_day, default is Date.beginning_of_week or config.beginning_of_week when set. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#306 def all_week(start_day = T.unsafe(nil)); end + + # Returns a Range representing the whole year of the current date/time. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#321 def all_year; end + + # Returns a new date/time at the start of the month. + # + # today = Date.today # => Thu, 18 Jun 2015 + # today.beginning_of_month # => Mon, 01 Jun 2015 + # + # +DateTime+ objects will have a time set to 0:00. + # + # now = DateTime.current # => Thu, 18 Jun 2015 15:23:13 +0000 + # now.beginning_of_month # => Mon, 01 Jun 2015 00:00:00 +0000 + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#125 def at_beginning_of_month; end + + # Returns a new date/time at the start of the quarter. + # + # today = Date.today # => Fri, 10 Jul 2015 + # today.beginning_of_quarter # => Wed, 01 Jul 2015 + # + # +DateTime+ objects will have a time set to 0:00. + # + # now = DateTime.current # => Fri, 10 Jul 2015 18:41:29 +0000 + # now.beginning_of_quarter # => Wed, 01 Jul 2015 00:00:00 +0000 + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#139 def at_beginning_of_quarter; end + + # Returns a new date/time representing the start of this week on the given day. + # Week is assumed to start on +start_day+, default is + # +Date.beginning_of_week+ or +config.beginning_of_week+ when set. + # +DateTime+ objects have their time set to 0:00. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#257 def at_beginning_of_week(start_day = T.unsafe(nil)); end + + # Returns a new date/time at the beginning of the year. + # + # today = Date.today # => Fri, 10 Jul 2015 + # today.beginning_of_year # => Thu, 01 Jan 2015 + # + # +DateTime+ objects will have a time set to 0:00. + # + # now = DateTime.current # => Fri, 10 Jul 2015 18:41:29 +0000 + # now.beginning_of_year # => Thu, 01 Jan 2015 00:00:00 +0000 + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#169 def at_beginning_of_year; end + + # Returns a new date/time representing the end of the month. + # DateTime objects will have a time set to 23:59:59. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#286 def at_end_of_month; end + + # Returns a new date/time at the end of the quarter. + # + # today = Date.today # => Fri, 10 Jul 2015 + # today.end_of_quarter # => Wed, 30 Sep 2015 + # + # +DateTime+ objects will have a time set to 23:59:59. + # + # now = DateTime.current # => Fri, 10 Jul 2015 18:41:29 +0000 + # now.end_of_quarter # => Wed, 30 Sep 2015 23:59:59 +0000 + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#154 def at_end_of_quarter; end + + # Returns a new date/time representing the end of this week on the given day. + # Week is assumed to start on +start_day+, default is + # +Date.beginning_of_week+ or +config.beginning_of_week+ when set. + # DateTime objects have their time set to 23:59:59. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#273 def at_end_of_week(start_day = T.unsafe(nil)); end + + # Returns a new date/time representing the end of the year. + # DateTime objects will have a time set to 23:59:59. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#294 def at_end_of_year; end + + # Returns true if the date/time falls before date_or_time. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#67 def before?(date_or_time); end + + # Returns a new date/time at the start of the month. + # + # today = Date.today # => Thu, 18 Jun 2015 + # today.beginning_of_month # => Mon, 01 Jun 2015 + # + # +DateTime+ objects will have a time set to 0:00. + # + # now = DateTime.current # => Thu, 18 Jun 2015 15:23:13 +0000 + # now.beginning_of_month # => Mon, 01 Jun 2015 00:00:00 +0000 + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#125 def beginning_of_month; end + + # Returns a new date/time at the start of the quarter. + # + # today = Date.today # => Fri, 10 Jul 2015 + # today.beginning_of_quarter # => Wed, 01 Jul 2015 + # + # +DateTime+ objects will have a time set to 0:00. + # + # now = DateTime.current # => Fri, 10 Jul 2015 18:41:29 +0000 + # now.beginning_of_quarter # => Wed, 01 Jul 2015 00:00:00 +0000 + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#139 def beginning_of_quarter; end + + # Returns a new date/time representing the start of this week on the given day. + # Week is assumed to start on +start_day+, default is + # +Date.beginning_of_week+ or +config.beginning_of_week+ when set. + # +DateTime+ objects have their time set to 0:00. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#257 def beginning_of_week(start_day = T.unsafe(nil)); end + + # Returns a new date/time at the beginning of the year. + # + # today = Date.today # => Fri, 10 Jul 2015 + # today.beginning_of_year # => Thu, 01 Jan 2015 + # + # +DateTime+ objects will have a time set to 0:00. + # + # now = DateTime.current # => Fri, 10 Jul 2015 18:41:29 +0000 + # now.beginning_of_year # => Thu, 01 Jan 2015 00:00:00 +0000 + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#169 def beginning_of_year; end + + # Returns a new date/time the specified number of days ago. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#77 def days_ago(days); end + + # Returns a new date/time the specified number of days in the future. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#82 def days_since(days); end + + # Returns the number of days to the start of the week on the given day. + # Week is assumed to start on +start_day+, default is + # +Date.beginning_of_week+ or +config.beginning_of_week+ when set. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#248 def days_to_week_start(start_day = T.unsafe(nil)); end + + # Returns a new date/time representing the end of the month. + # DateTime objects will have a time set to 23:59:59. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#286 def end_of_month; end + + # Returns a new date/time at the end of the quarter. + # + # today = Date.today # => Fri, 10 Jul 2015 + # today.end_of_quarter # => Wed, 30 Sep 2015 + # + # +DateTime+ objects will have a time set to 23:59:59. + # + # now = DateTime.current # => Fri, 10 Jul 2015 18:41:29 +0000 + # now.end_of_quarter # => Wed, 30 Sep 2015 23:59:59 +0000 + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#154 def end_of_quarter; end + + # Returns a new date/time representing the end of this week on the given day. + # Week is assumed to start on +start_day+, default is + # +Date.beginning_of_week+ or +config.beginning_of_week+ when set. + # DateTime objects have their time set to 23:59:59. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#273 def end_of_week(start_day = T.unsafe(nil)); end + + # Returns a new date/time representing the end of the year. + # DateTime objects will have a time set to 23:59:59. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#294 def end_of_year; end + + # Returns true if the date/time is in the future. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#52 def future?; end + + # Short-hand for months_ago(1). + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#230 def last_month; end + + # Short-hand for months_ago(3). + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#235 def last_quarter; end + + # Returns a new date/time representing the given day in the previous week. + # Week is assumed to start on +start_day+, default is + # +Date.beginning_of_week+ or +config.beginning_of_week+ when set. + # DateTime objects have their time set to 0:00 unless +same_time+ is true. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#213 def last_week(start_day = T.unsafe(nil), same_time: T.unsafe(nil)); end + + # Returns a new date/time representing the previous weekday. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#220 def last_weekday; end + + # Short-hand for years_ago(1). + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#241 def last_year; end + + # Returns Monday of this week assuming that week starts on Monday. + # +DateTime+ objects have their time set to 0:00. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#265 def monday; end + + # Returns a new date/time the specified number of months ago. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#97 def months_ago(months); end + + # Returns a new date/time the specified number of months in the future. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#102 def months_since(months); end + + # Returns true if the date/time is tomorrow. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#35 def next_day?; end + + # Returns a new date/time representing the next occurrence of the specified day of week. + # + # today = Date.today # => Thu, 14 Dec 2017 + # today.next_occurring(:monday) # => Mon, 18 Dec 2017 + # today.next_occurring(:thursday) # => Thu, 21 Dec 2017 + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#330 def next_occurring(day_of_week); end + + # Short-hand for months_since(3) + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#205 def next_quarter; end + + # Returns a new date/time representing the given day in the next week. + # + # today = Date.today # => Thu, 07 May 2015 + # today.next_week # => Mon, 11 May 2015 + # + # The +given_day_in_next_week+ defaults to the beginning of the week + # which is determined by +Date.beginning_of_week+ or +config.beginning_of_week+ + # when set. + # + # today = Date.today # => Thu, 07 May 2015 + # today.next_week(:friday) # => Fri, 15 May 2015 + # + # +DateTime+ objects have their time set to 0:00 unless +same_time+ is true. + # + # now = DateTime.current # => Thu, 07 May 2015 13:31:16 +0000 + # now.next_week # => Mon, 11 May 2015 00:00:00 +0000 + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#190 def next_week(given_day_in_next_week = T.unsafe(nil), same_time: T.unsafe(nil)); end + + # Returns a new date/time representing the next weekday. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#196 def next_weekday; end + + # Returns true if the date/time does not fall on a Saturday or Sunday. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#62 def on_weekday?; end + + # Returns true if the date/time falls on a Saturday or Sunday. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#57 def on_weekend?; end + + # Returns true if the date/time is in the past. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#47 def past?; end + + # Returns true if the date/time is yesterday. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#41 def prev_day?; end + + # Returns a new date/time representing the previous occurrence of the specified day of week. + # + # today = Date.today # => Thu, 14 Dec 2017 + # today.prev_occurring(:monday) # => Mon, 11 Dec 2017 + # today.prev_occurring(:thursday) # => Thu, 07 Dec 2017 + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#341 def prev_occurring(day_of_week); end + + # Short-hand for months_ago(3). + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#235 def prev_quarter; end + + # Returns a new date/time representing the given day in the previous week. + # Week is assumed to start on +start_day+, default is + # +Date.beginning_of_week+ or +config.beginning_of_week+ when set. + # DateTime objects have their time set to 0:00 unless +same_time+ is true. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#213 def prev_week(start_day = T.unsafe(nil), same_time: T.unsafe(nil)); end + + # Returns a new date/time representing the previous weekday. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#220 def prev_weekday; end + + # Returns Sunday of this week assuming that week starts on Monday. + # +DateTime+ objects have their time set to 23:59:59. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#280 def sunday; end + + # Returns true if the date/time is today. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#30 def today?; end + + # Returns a new date/time representing tomorrow. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#25 def tomorrow; end + + # Returns true if the date/time is tomorrow. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#35 def tomorrow?; end + + # Returns a new date/time the specified number of weeks ago. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#87 def weeks_ago(weeks); end + + # Returns a new date/time the specified number of weeks in the future. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#92 def weeks_since(weeks); end + + # Returns a new date/time the specified number of years ago. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#107 def years_ago(years); end + + # Returns a new date/time the specified number of years in the future. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#112 def years_since(years); end + + # Returns a new date/time representing yesterday. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#20 def yesterday; end + + # Returns true if the date/time is yesterday. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#41 def yesterday?; end private + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#360 def copy_time_to(other); end + + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#356 def days_span(day); end + + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#348 def first_hour(date_or_time); end + + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#352 def last_hour(date_or_time); end end +# source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#8 DateAndTime::Calculations::DAYS_INTO_WEEK = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#17 DateAndTime::Calculations::WEEKEND_DAYS = T.let(T.unsafe(nil), Array) +# source://activesupport//lib/active_support/core_ext/date_and_time/compatibility.rb#6 module DateAndTime::Compatibility + # source://activesupport//lib/active_support/core_ext/date_and_time/compatibility.rb#14 def preserve_timezone; end + + # source://activesupport//lib/active_support/core_ext/date_and_time/compatibility.rb#29 def utc_to_local_returns_utc_offset_times; end class << self + # source://activesupport//lib/active_support/core_ext/date_and_time/compatibility.rb#14 def preserve_timezone; end + + # source://activesupport//lib/active_support/core_ext/date_and_time/compatibility.rb#14 def preserve_timezone=(val); end + + # source://activesupport//lib/active_support/core_ext/date_and_time/compatibility.rb#29 def utc_to_local_returns_utc_offset_times; end + + # source://activesupport//lib/active_support/core_ext/date_and_time/compatibility.rb#29 def utc_to_local_returns_utc_offset_times=(val); end end end +# source://activesupport//lib/active_support/core_ext/date_and_time/zones.rb#4 module DateAndTime::Zones + # Returns the simultaneous time in Time.zone if a zone is given or + # if Time.zone_default is set. Otherwise, it returns the current time. + # + # Time.zone = 'Hawaii' # => 'Hawaii' + # Time.utc(2000).in_time_zone # => Fri, 31 Dec 1999 14:00:00 HST -10:00 + # Date.new(2000).in_time_zone # => Sat, 01 Jan 2000 00:00:00 HST -10:00 + # + # This method is similar to Time#localtime, except that it uses Time.zone as the local zone + # instead of the operating system's time zone. + # + # You can also pass in a TimeZone instance or string that identifies a TimeZone as an argument, + # and the conversion will be based on that zone instead of Time.zone. + # + # Time.utc(2000).in_time_zone('Alaska') # => Fri, 31 Dec 1999 15:00:00 AKST -09:00 + # Date.new(2000).in_time_zone('Alaska') # => Sat, 01 Jan 2000 00:00:00 AKST -09:00 + # + # source://activesupport//lib/active_support/core_ext/date_and_time/zones.rb#20 def in_time_zone(zone = T.unsafe(nil)); end private + # source://activesupport//lib/active_support/core_ext/date_and_time/zones.rb#32 def time_with_zone(time, zone); end end +# source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#5 class DateTime < ::Date include ::DateAndTime::Compatibility + # Layers additional behavior on DateTime#<=> so that Time and + # ActiveSupport::TimeWithZone instances can be compared with a DateTime. + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#204 def <=>(other); end + + # Duck-types as a Date-like class. See Object#acts_like?. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/date_time/acts_like.rb#8 def acts_like_date?; end + + # Duck-types as a Time-like class. See Object#acts_like?. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/date_time/acts_like.rb#13 def acts_like_time?; end + + # Uses Date to provide precise Time calculations for years, months, and days. + # The +options+ parameter takes a hash with any of these keys: :years, + # :months, :weeks, :days, :hours, + # :minutes, :seconds. + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#78 def advance(options); end + + # Returns a new DateTime representing the time a number of seconds ago. + # Do not use this method in combination with x.months, use months_ago instead! + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#105 def ago(seconds); end + + # source://activesupport//lib/active_support/core_ext/object/json.rb#202 def as_json(options = T.unsafe(nil)); end + + # Returns a new DateTime representing the start of the day (0:00). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#118 def at_beginning_of_day; end + + # Returns a new DateTime representing the start of the hour (hh:00:00). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#142 def at_beginning_of_hour; end + + # Returns a new DateTime representing the start of the minute (hh:mm:00). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#154 def at_beginning_of_minute; end + + # Returns a new DateTime representing the end of the day (23:59:59). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#136 def at_end_of_day; end + + # Returns a new DateTime representing the end of the hour (hh:59:59). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#148 def at_end_of_hour; end + + # Returns a new DateTime representing the end of the minute (hh:mm:59). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#160 def at_end_of_minute; end + + # Returns a new DateTime representing the middle of the day (12:00) + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#126 def at_midday; end + + # Returns a new DateTime representing the middle of the day (12:00) + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#126 def at_middle_of_day; end + + # Returns a new DateTime representing the start of the day (0:00). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#118 def at_midnight; end + + # Returns a new DateTime representing the middle of the day (12:00) + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#126 def at_noon; end + + # Returns a new DateTime representing the start of the day (0:00). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#118 def beginning_of_day; end + + # Returns a new DateTime representing the start of the hour (hh:00:00). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#142 def beginning_of_hour; end + + # Returns a new DateTime representing the start of the minute (hh:mm:00). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#154 def beginning_of_minute; end + + # No DateTime is ever blank: + # + # DateTime.now.blank? # => false + # + # @return [false] + # + # source://activesupport//lib/active_support/core_ext/date_time/blank.rb#11 def blank?; end + + # Returns a new DateTime where one or more of the elements have been changed + # according to the +options+ parameter. The time options (:hour, + # :min, :sec) reset cascadingly, so if only the hour is + # passed, then minute and sec is set to 0. If the hour and minute is passed, + # then sec is set to 0. The +options+ parameter takes a hash with any of these + # keys: :year, :month, :day, :hour, + # :min, :sec, :offset, :start. + # + # DateTime.new(2012, 8, 29, 22, 35, 0).change(day: 1) # => DateTime.new(2012, 8, 1, 22, 35, 0) + # DateTime.new(2012, 8, 29, 22, 35, 0).change(year: 1981, day: 1) # => DateTime.new(1981, 8, 1, 22, 35, 0) + # DateTime.new(2012, 8, 29, 22, 35, 0).change(year: 1981, hour: 0) # => DateTime.new(1981, 8, 29, 0, 0, 0) + # + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#51 def change(options); end + + # Returns a new DateTime representing the end of the day (23:59:59). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#136 def end_of_day; end + + # Returns a new DateTime representing the end of the hour (hh:59:59). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#148 def end_of_hour; end + + # Returns a new DateTime representing the end of the minute (hh:mm:59). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#160 def end_of_minute; end + + # Returns a formatted string of the offset from UTC, or an alternative + # string if the time zone is already UTC. + # + # datetime = DateTime.civil(2000, 1, 1, 0, 0, 0, Rational(-6, 24)) + # datetime.formatted_offset # => "-06:00" + # datetime.formatted_offset(false) # => "-0600" + # + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#51 def formatted_offset(colon = T.unsafe(nil), alternate_utc_string = T.unsafe(nil)); end + + # Returns a Time instance of the simultaneous time in the UTC timezone. + # + # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)) # => Mon, 21 Feb 2005 10:11:12 -0600 + # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)).utc # => Mon, 21 Feb 2005 16:11:12 UTC + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#180 def getgm; end + + # Returns a Time instance of the simultaneous time in the system timezone. + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#166 def getlocal(utc_offset = T.unsafe(nil)); end + + # Returns a Time instance of the simultaneous time in the UTC timezone. + # + # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)) # => Mon, 21 Feb 2005 10:11:12 -0600 + # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)).utc # => Mon, 21 Feb 2005 16:11:12 UTC + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#180 def getutc; end + + # Returns a Time instance of the simultaneous time in the UTC timezone. + # + # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)) # => Mon, 21 Feb 2005 10:11:12 -0600 + # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)).utc # => Mon, 21 Feb 2005 16:11:12 UTC + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#180 def gmtime; end + + # Returns a new DateTime representing the time a number of seconds since the + # instance time. Do not use this method in combination with x.months, use + # months_since instead! + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#112 def in(seconds); end + + # Overrides the default inspect method with a human readable one, e.g., "Mon, 21 Feb 2005 14:30:00 +0000". + # + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#56 def inspect; end + + # Returns a Time instance of the simultaneous time in the system timezone. + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#166 def localtime(utc_offset = T.unsafe(nil)); end + + # Returns a new DateTime representing the middle of the day (12:00) + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#126 def midday; end + + # Returns a new DateTime representing the middle of the day (12:00) + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#126 def middle_of_day; end + + # Returns a new DateTime representing the start of the day (0:00). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#118 def midnight; end + + # Returns a new DateTime representing the middle of the day (12:00) + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#126 def noon; end + + # Returns the fraction of a second as nanoseconds + # + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#94 def nsec; end + + # Overrides the default inspect method with a human readable one, e.g., "Mon, 21 Feb 2005 14:30:00 +0000". + # + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#56 def readable_inspect; end + + # Returns the number of seconds since 00:00:00. + # + # DateTime.new(2012, 8, 29, 0, 0, 0).seconds_since_midnight # => 0 + # DateTime.new(2012, 8, 29, 12, 34, 56).seconds_since_midnight # => 45296 + # DateTime.new(2012, 8, 29, 23, 59, 59).seconds_since_midnight # => 86399 + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#20 def seconds_since_midnight; end + + # Returns the number of seconds until 23:59:59. + # + # DateTime.new(2012, 8, 29, 0, 0, 0).seconds_until_end_of_day # => 86399 + # DateTime.new(2012, 8, 29, 12, 34, 56).seconds_until_end_of_day # => 41103 + # DateTime.new(2012, 8, 29, 23, 59, 59).seconds_until_end_of_day # => 0 + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#29 def seconds_until_end_of_day; end + + # Returns a new DateTime representing the time a number of seconds since the + # instance time. Do not use this method in combination with x.months, use + # months_since instead! + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#112 def since(seconds); end + + # Returns the fraction of a second as a +Rational+ + # + # DateTime.new(2012, 8, 29, 0, 0, 0.5).subsec # => (1/2) + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#36 def subsec; end + + # Converts +self+ to a floating-point number of seconds, including fractional microseconds, since the Unix epoch. + # + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#79 def to_f; end + + # Convert to a formatted string. See Time::DATE_FORMATS for predefined formats. + # + # This method is aliased to to_s. + # + # === Examples + # datetime = DateTime.civil(2007, 12, 4, 0, 0, 0, 0) # => Tue, 04 Dec 2007 00:00:00 +0000 + # + # datetime.to_formatted_s(:db) # => "2007-12-04 00:00:00" + # datetime.to_s(:db) # => "2007-12-04 00:00:00" + # datetime.to_s(:number) # => "20071204000000" + # datetime.to_formatted_s(:short) # => "04 Dec 00:00" + # datetime.to_formatted_s(:long) # => "December 04, 2007 00:00" + # datetime.to_formatted_s(:long_ordinal) # => "December 4th, 2007 00:00" + # datetime.to_formatted_s(:rfc822) # => "Tue, 04 Dec 2007 00:00:00 +0000" + # datetime.to_formatted_s(:iso8601) # => "2007-12-04T00:00:00+00:00" + # + # == Adding your own datetime formats to to_formatted_s + # DateTime formats are shared with Time. You can add your own to the + # Time::DATE_FORMATS hash. Use the format name as the hash key and + # either a strftime string or Proc instance that takes a time or + # datetime argument as the value. + # + # # config/initializers/time_formats.rb + # Time::DATE_FORMATS[:month_and_year] = '%B %Y' + # Time::DATE_FORMATS[:short_ordinal] = lambda { |time| time.strftime("%B #{time.day.ordinalize}") } + # + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#35 def to_formatted_s(format = T.unsafe(nil)); end + + # Converts +self+ to an integer number of seconds since the Unix epoch. + # + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#84 def to_i; end + + # Convert to a formatted string. See Time::DATE_FORMATS for predefined formats. + # + # This method is aliased to to_s. + # + # === Examples + # datetime = DateTime.civil(2007, 12, 4, 0, 0, 0, 0) # => Tue, 04 Dec 2007 00:00:00 +0000 + # + # datetime.to_formatted_s(:db) # => "2007-12-04 00:00:00" + # datetime.to_s(:db) # => "2007-12-04 00:00:00" + # datetime.to_s(:number) # => "20071204000000" + # datetime.to_formatted_s(:short) # => "04 Dec 00:00" + # datetime.to_formatted_s(:long) # => "December 04, 2007 00:00" + # datetime.to_formatted_s(:long_ordinal) # => "December 4th, 2007 00:00" + # datetime.to_formatted_s(:rfc822) # => "Tue, 04 Dec 2007 00:00:00 +0000" + # datetime.to_formatted_s(:iso8601) # => "2007-12-04T00:00:00+00:00" + # + # == Adding your own datetime formats to to_formatted_s + # DateTime formats are shared with Time. You can add your own to the + # Time::DATE_FORMATS hash. Use the format name as the hash key and + # either a strftime string or Proc instance that takes a time or + # datetime argument as the value. + # + # # config/initializers/time_formats.rb + # Time::DATE_FORMATS[:month_and_year] = '%B %Y' + # Time::DATE_FORMATS[:short_ordinal] = lambda { |time| time.strftime("%B #{time.day.ordinalize}") } + # + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#35 def to_s(format = T.unsafe(nil)); end + + # Either return an instance of +Time+ with the same UTC offset + # as +self+ or an instance of +Time+ representing the same time + # in the local system timezone depending on the setting of + # on the setting of +ActiveSupport.to_time_preserves_timezone+. + # + # source://activesupport//lib/active_support/core_ext/date_time/compatibility.rb#15 def to_time; end + + # Returns the fraction of a second as microseconds + # + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#89 def usec; end + + # Returns a Time instance of the simultaneous time in the UTC timezone. + # + # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)) # => Mon, 21 Feb 2005 10:11:12 -0600 + # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)).utc # => Mon, 21 Feb 2005 16:11:12 UTC + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#180 def utc; end + + # Returns +true+ if offset == 0. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#193 def utc?; end + + # Returns the offset value in seconds. + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#198 def utc_offset; end private + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#99 def offset_in_seconds; end + + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#103 def seconds_since_unix_epoch; end class << self + # Returns DateTime with local offset for given year if format is local else + # offset is zero. + # + # DateTime.civil_from_format :local, 2012 + # # => Sun, 01 Jan 2012 00:00:00 +0300 + # DateTime.civil_from_format :local, 2012, 12, 17 + # # => Mon, 17 Dec 2012 00:00:00 +0000 + # + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#69 def civil_from_format(utc_or_local, year, month = T.unsafe(nil), day = T.unsafe(nil), hour = T.unsafe(nil), min = T.unsafe(nil), sec = T.unsafe(nil)); end + + # Returns Time.zone.now.to_datetime when Time.zone or + # config.time_zone are set, otherwise returns + # Time.now.to_datetime. + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#10 def current; end end end +# source://activesupport//lib/active_support/core_ext/object/try.rb#117 +class Delegator < ::BasicObject + include ::ActiveSupport::Tryable +end + +# source://activesupport//lib/active_support/core_ext/digest/uuid.rb#7 module Digest::UUID class << self + # Generates a v5 non-random UUID (Universally Unique IDentifier). + # + # Using Digest::MD5 generates version 3 UUIDs; Digest::SHA1 generates version 5 UUIDs. + # uuid_from_hash always generates the same UUID for a given name and namespace combination. + # + # See RFC 4122 for details of UUID at: https://www.ietf.org/rfc/rfc4122.txt + # + # source://activesupport//lib/active_support/core_ext/digest/uuid.rb#19 def uuid_from_hash(hash_class, uuid_namespace, name); end + + # Convenience method for uuid_from_hash using Digest::MD5. + # + # source://activesupport//lib/active_support/core_ext/digest/uuid.rb#40 def uuid_v3(uuid_namespace, name); end + + # Convenience method for SecureRandom.uuid. + # + # source://activesupport//lib/active_support/core_ext/digest/uuid.rb#50 def uuid_v4; end + + # Convenience method for uuid_from_hash using Digest::SHA1. + # + # source://activesupport//lib/active_support/core_ext/digest/uuid.rb#45 def uuid_v5(uuid_namespace, name); end end end +# source://activesupport//lib/active_support/core_ext/digest/uuid.rb#8 Digest::UUID::DNS_NAMESPACE = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/core_ext/digest/uuid.rb#10 Digest::UUID::OID_NAMESPACE = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/core_ext/digest/uuid.rb#9 Digest::UUID::URL_NAMESPACE = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/core_ext/digest/uuid.rb#11 Digest::UUID::X500_NAMESPACE = T.let(T.unsafe(nil), String) +# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#8 module ERB::Util private + # A utility method for escaping HTML tag characters. + # This method is also aliased as h. + # + # puts html_escape('is a > 0 & a < 10?') + # # => is a > 0 & a < 10? + # + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#27 def h(s); end + + # A utility method for escaping HTML tag characters. + # This method is also aliased as h. + # + # puts html_escape('is a > 0 & a < 10?') + # # => is a > 0 & a < 10? + # + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#27 def html_escape(s); end + + # A utility method for escaping HTML without affecting existing escaped entities. + # + # html_escape_once('1 < 2 & 3') + # # => "1 < 2 & 3" + # + # html_escape_once('<< Accept & Checkout') + # # => "<< Accept & Checkout" + # + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#58 def html_escape_once(s); end + + # A utility method for escaping HTML entities in JSON strings. Specifically, the + # &, > and < characters are replaced with their equivalent unicode escaped form - + # \u0026, \u003e, and \u003c. The Unicode sequences \u2028 and \u2029 are also + # escaped as they are treated as newline characters in some JavaScript engines. + # These sequences have identical meaning as the original characters inside the + # context of a JSON string, so assuming the input is a valid and well-formed + # JSON value, the output will have equivalent meaning when parsed: + # + # json = JSON.generate({ name: ""}) + # # => "{\"name\":\"\"}" + # + # json_escape(json) + # # => "{\"name\":\"\\u003C/script\\u003E\\u003Cscript\\u003Ealert('PWNED!!!')\\u003C/script\\u003E\"}" + # + # JSON.parse(json) == JSON.parse(json_escape(json)) + # # => true + # + # The intended use case for this method is to escape JSON strings before including + # them inside a script tag to avoid XSS vulnerability: + # + # + # + # It is necessary to +raw+ the result of +json_escape+, so that quotation marks + # don't get converted to " entities. +json_escape+ doesn't + # automatically flag the result as HTML safe, since the raw value is unsafe to + # use inside HTML attributes. + # + # If your JSON is being used downstream for insertion into the DOM, be aware of + # whether or not it is being inserted via html(). Most jQuery plugins do this. + # If that is the case, be sure to +html_escape+ or +sanitize+ any user-generated + # content returned by your JSON. + # + # If you need to output JSON elsewhere in your HTML, you can just do something + # like this, as any unsafe characters (including quotation marks) will be + # automatically escaped for you: + # + #
...
+ # + # WARNING: this helper only works with valid JSON. Using this on non-JSON values + # will open up serious XSS vulnerabilities. For example, if you replace the + # +current_user.to_json+ in the example above with user input instead, the browser + # will happily eval() that string as JavaScript. + # + # The escaping performed in this method is identical to those performed in the + # Active Support JSON encoder when +ActiveSupport.escape_html_entities_in_json+ is + # set to true. Because this transformation is idempotent, this helper can be + # applied even if +ActiveSupport.escape_html_entities_in_json+ is already true. + # + # Therefore, when you are unsure if +ActiveSupport.escape_html_entities_in_json+ + # is enabled, or if you are unsure where your JSON string originated from, it + # is recommended that you always apply this helper (other libraries, such as the + # JSON gem, do not provide this kind of protection by default; also some gems + # might override +to_json+ to bypass Active Support's encoder). + # + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#120 def json_escape(s); end + + # HTML escapes strings but doesn't wrap them with an ActiveSupport::SafeBuffer. + # This method is not for public consumption! Seriously! + # + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#41 def unwrapped_html_escape(s); end + + # A utility method for escaping XML names of tags and names of attributes. + # + # xml_name_escape('1 < 2 & 3') + # # => "1___2___3" + # + # It follows the requirements of the specification: https://www.w3.org/TR/REC-xml/#NT-Name + # + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#133 def xml_name_escape(name); end class << self + # A utility method for escaping HTML tag characters. + # This method is also aliased as h. + # + # puts html_escape('is a > 0 & a < 10?') + # # => is a > 0 & a < 10? + # + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#27 def h(s); end + + # A utility method for escaping HTML tag characters. + # This method is also aliased as h. + # + # puts html_escape('is a > 0 & a < 10?') + # # => is a > 0 & a < 10? + # + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#27 def html_escape(s); end + + # A utility method for escaping HTML without affecting existing escaped entities. + # + # html_escape_once('1 < 2 & 3') + # # => "1 < 2 & 3" + # + # html_escape_once('<< Accept & Checkout') + # # => "<< Accept & Checkout" + # + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#58 def html_escape_once(s); end + + # A utility method for escaping HTML entities in JSON strings. Specifically, the + # &, > and < characters are replaced with their equivalent unicode escaped form - + # \u0026, \u003e, and \u003c. The Unicode sequences \u2028 and \u2029 are also + # escaped as they are treated as newline characters in some JavaScript engines. + # These sequences have identical meaning as the original characters inside the + # context of a JSON string, so assuming the input is a valid and well-formed + # JSON value, the output will have equivalent meaning when parsed: + # + # json = JSON.generate({ name: ""}) + # # => "{\"name\":\"\"}" + # + # json_escape(json) + # # => "{\"name\":\"\\u003C/script\\u003E\\u003Cscript\\u003Ealert('PWNED!!!')\\u003C/script\\u003E\"}" + # + # JSON.parse(json) == JSON.parse(json_escape(json)) + # # => true + # + # The intended use case for this method is to escape JSON strings before including + # them inside a script tag to avoid XSS vulnerability: + # + # + # + # It is necessary to +raw+ the result of +json_escape+, so that quotation marks + # don't get converted to " entities. +json_escape+ doesn't + # automatically flag the result as HTML safe, since the raw value is unsafe to + # use inside HTML attributes. + # + # If your JSON is being used downstream for insertion into the DOM, be aware of + # whether or not it is being inserted via html(). Most jQuery plugins do this. + # If that is the case, be sure to +html_escape+ or +sanitize+ any user-generated + # content returned by your JSON. + # + # If you need to output JSON elsewhere in your HTML, you can just do something + # like this, as any unsafe characters (including quotation marks) will be + # automatically escaped for you: + # + #
...
+ # + # WARNING: this helper only works with valid JSON. Using this on non-JSON values + # will open up serious XSS vulnerabilities. For example, if you replace the + # +current_user.to_json+ in the example above with user input instead, the browser + # will happily eval() that string as JavaScript. + # + # The escaping performed in this method is identical to those performed in the + # Active Support JSON encoder when +ActiveSupport.escape_html_entities_in_json+ is + # set to true. Because this transformation is idempotent, this helper can be + # applied even if +ActiveSupport.escape_html_entities_in_json+ is already true. + # + # Therefore, when you are unsure if +ActiveSupport.escape_html_entities_in_json+ + # is enabled, or if you are unsure where your JSON string originated from, it + # is recommended that you always apply this helper (other libraries, such as the + # JSON gem, do not provide this kind of protection by default; also some gems + # might override +to_json+ to bypass Active Support's encoder). + # + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#120 def json_escape(s); end + + # HTML escapes strings but doesn't wrap them with an ActiveSupport::SafeBuffer. + # This method is not for public consumption! Seriously! + # + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#41 def unwrapped_html_escape(s); end + + # A utility method for escaping XML names of tags and names of attributes. + # + # xml_name_escape('1 < 2 & 3') + # # => "1___2___3" + # + # It follows the requirements of the specification: https://www.w3.org/TR/REC-xml/#NT-Name + # + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#133 def xml_name_escape(name); end end end +# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#9 ERB::Util::HTML_ESCAPE = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#11 ERB::Util::HTML_ESCAPE_ONCE_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#10 ERB::Util::JSON_ESCAPE = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#12 ERB::Util::JSON_ESCAPE_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#19 ERB::Util::TAG_NAME_FOLLOWING_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#20 ERB::Util::TAG_NAME_REPLACEMENT_CHAR = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#18 ERB::Util::TAG_NAME_START_REGEXP = T.let(T.unsafe(nil), Regexp) + +# Following XML requirements: https://www.w3.org/TR/REC-xml/#NT-Name +# +# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#15 ERB::Util::TAG_NAME_START_REGEXP_SET = T.let(T.unsafe(nil), String) +# source://activesupport//lib/active_support/core_ext/enumerable.rb#3 module Enumerable + include ::ActiveSupport::ToJsonWithActiveSupportEncoder + + # source://activesupport//lib/active_support/core_ext/object/json.rb#135 def as_json(options = T.unsafe(nil)); end + + # Returns a new +Array+ without the blank items. + # Uses Object#blank? for determining if an item is blank. + # + # [1, "", nil, 2, " ", [], {}, false, true].compact_blank + # # => [1, 2, true] + # + # Set.new([nil, "", 1, 2]) + # # => [2, 1] (or [1, 2]) + # + # When called on a +Hash+, returns a new +Hash+ without the blank values. + # + # { a: "", b: 1, c: nil, d: [], e: false, f: true }.compact_blank + # #=> { b: 1, f: true } + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#191 def compact_blank; end + + # The negative of the Enumerable#include?. Returns +true+ if the + # collection does not include the object. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#121 def exclude?(object); end + + # Returns a copy of the enumerable excluding the specified elements. + # + # ["David", "Rafael", "Aaron", "Todd"].excluding "Aaron", "Todd" + # # => ["David", "Rafael"] + # + # ["David", "Rafael", "Aaron", "Todd"].excluding %w[ Aaron Todd ] + # # => ["David", "Rafael"] + # + # {foo: 1, bar: 2, baz: 3}.excluding :bar + # # => {foo: 1, baz: 3} + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#135 def excluding(*elements); end + + # Returns a new array that includes the passed elements. + # + # [ 1, 2, 3 ].including(4, 5) + # # => [ 1, 2, 3, 4, 5 ] + # + # ["David", "Rafael"].including %w[ Aaron Todd ] + # # => ["David", "Rafael", "Aaron", "Todd"] + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#115 def including(*elements); end + + # Convert an enumerable to a hash, using the block result as the key and the + # element as the value. + # + # people.index_by(&:login) + # # => { "nextangle" => , "chade-" => , ...} + # + # people.index_by { |person| "#{person.first_name} #{person.last_name}" } + # # => { "Chade- Fowlersburg-e" => , "David Heinemeier Hansson" => , ...} + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#55 def index_by; end + + # Convert an enumerable to a hash, using the element as the key and the block + # result as the value. + # + # post = Post.new(title: "hey there", body: "what's up?") + # + # %i( title body ).index_with { |attr_name| post.public_send(attr_name) } + # # => { title: "hey there", body: "what's up?" } + # + # If an argument is passed instead of a block, it will be used as the value + # for all elements: + # + # %i( created_at updated_at ).index_with(Time.now) + # # => { created_at: 2020-03-09 22:31:47, updated_at: 2020-03-09 22:31:47 } + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#78 def index_with(default = T.unsafe(nil)); end + + # Returns +true+ if the enumerable has more than 1 element. Functionally + # equivalent to enum.to_a.size > 1. Can be called with a block too, + # much like any?, so people.many? { |p| p.age > 26 } returns +true+ + # if more than one person is over 26. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#96 def many?; end + + # Extract the given key from the first element in the enumerable. + # + # [{ name: "David" }, { name: "Rafael" }, { name: "Aaron" }].pick(:name) + # # => "David" + # + # [{ id: 1, name: "David" }, { id: 2, name: "Rafael" }].pick(:id, :name) + # # => [1, "David"] + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#168 def pick(*keys); end + + # Extract the given key from each element in the enumerable. + # + # [{ name: "David" }, { name: "Rafael" }, { name: "Aaron" }].pluck(:name) + # # => ["David", "Rafael", "Aaron"] + # + # [{ id: 1, name: "David" }, { id: 2, name: "Rafael" }].pluck(:id, :name) + # # => [[1, "David"], [2, "Rafael"]] + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#152 def pluck(*keys); end + + # Calculates a sum from the elements. + # + # payments.sum { |p| p.price * p.tax_rate } + # payments.sum(&:price) + # + # The latter is a shortcut for: + # + # payments.inject(0) { |sum, p| sum + p.price } + # + # It can also calculate the sum without the use of a block. + # + # [5, 15, 10].sum # => 30 + # ['foo', 'bar'].sum # => "foobar" + # [[1, 2], [3, 1, 5]].sum # => [1, 2, 3, 1, 5] + # + # The default sum of an empty list is zero. You can override this default: + # + # [].sum(Payment.new(0)) { |i| i.amount } # => Payment.new(0) + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#37 def sum(identity = T.unsafe(nil), &block); end + + # Alias for #excluding. + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#141 def without(*elements); end end +# source://activesupport//lib/active_support/core_ext/enumerable.rb#4 Enumerable::INDEX_WITH_DEFAULT = T.let(T.unsafe(nil), Object) +# source://activesupport//lib/active_support/core_ext/object/json.rb#235 class Exception include ::ActiveSupport::Dependencies::Blamable + # source://activesupport//lib/active_support/core_ext/object/json.rb#236 def as_json(options = T.unsafe(nil)); end end +# source://activesupport//lib/active_support/core_ext/object/blank.rb#61 class FalseClass - include ::JSON::Ext::Generator::GeneratorMethods::FalseClass - include ::MessagePack::CoreExt - + # source://activesupport//lib/active_support/core_ext/object/json.rb#76 def as_json(options = T.unsafe(nil)); end + + # +false+ is blank: + # + # false.blank? # => true + # + # @return [true] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#67 def blank?; end + + # Returns +self+. + # + # source://activesupport//lib/active_support/core_ext/object/to_query.rb#34 def to_param; end end +# source://activesupport//lib/active_support/core_ext/file/atomic.rb#5 +class File < ::IO + class << self + # Write to a file atomically. Useful for situations where you don't + # want other processes or threads to see half-written files. + # + # File.atomic_write('important.file') do |file| + # file.write('hello') + # end + # + # This method needs to create a temporary file. By default it will create it + # in the same directory as the destination file. If you don't like this + # behavior you can provide a different directory but it must be on the + # same physical filesystem as the file you're trying to write. + # + # File.atomic_write('/data/something.important', '/data/tmp') do |file| + # file.write('hello') + # end + # + # source://activesupport//lib/active_support/core_ext/file/atomic.rb#21 + def atomic_write(file_name, temp_dir = T.unsafe(nil)); end + + # Private utility method. + # + # source://activesupport//lib/active_support/core_ext/file/atomic.rb#56 + def probe_stat_in(dir); end + end +end + +# source://activesupport//lib/active_support/core_ext/object/json.rb#105 class Float < ::Numeric include ::ActiveSupport::NumericWithFormat - include ::JSON::Ext::Generator::GeneratorMethods::Float - include ::MessagePack::CoreExt + # Encoding Infinity or NaN to JSON should return "null". The default returns + # "Infinity" or "NaN" which are not valid JSON. + # + # source://activesupport//lib/active_support/core_ext/object/json.rb#108 def as_json(options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/core_ext/numeric/conversions.rb#109 + def to_s(format = T.unsafe(nil), options = T.unsafe(nil)); end end +# source://activesupport//lib/active_support/core_ext/hash/deep_merge.rb#3 class Hash include ::Enumerable - include ::JSON::Ext::Generator::GeneratorMethods::Hash - include ::Plist::Emit - include ::MessagePack::CoreExt + # source://activesupport//lib/active_support/core_ext/object/json.rb#159 def as_json(options = T.unsafe(nil)); end + + # Validates all keys in a hash match *valid_keys, raising + # +ArgumentError+ on a mismatch. + # + # Note that keys are treated differently than HashWithIndifferentAccess, + # meaning that string and symbol keys will not match. + # + # { name: 'Rob', years: '28' }.assert_valid_keys(:name, :age) # => raises "ArgumentError: Unknown key: :years. Valid keys are: :name, :age" + # { name: 'Rob', age: '28' }.assert_valid_keys('name', 'age') # => raises "ArgumentError: Unknown key: :name. Valid keys are: 'name', 'age'" + # { name: 'Rob', age: '28' }.assert_valid_keys(:name, :age) # => passes, raises nothing + # + # source://activesupport//lib/active_support/core_ext/hash/keys.rb#48 def assert_valid_keys(*valid_keys); end + + # Hash#reject has its own definition, so this needs one too. + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#198 def compact_blank; end + + # Removes all blank values from the +Hash+ in place and returns self. + # Uses Object#blank? for determining if a value is blank. + # + # h = { a: "", b: 1, c: nil, d: [], e: false, f: true } + # h.compact_blank! + # # => { b: 1, f: true } + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#208 def compact_blank!; end + + # Returns a deep copy of hash. + # + # hash = { a: { b: 'b' } } + # dup = hash.deep_dup + # dup[:a][:c] = 'c' + # + # hash[:a][:c] # => nil + # dup[:a][:c] # => "c" + # + # source://activesupport//lib/active_support/core_ext/object/deep_dup.rb#43 def deep_dup; end + + # Returns a new hash with +self+ and +other_hash+ merged recursively. + # + # h1 = { a: true, b: { c: [1, 2, 3] } } + # h2 = { a: false, b: { x: [3, 4, 5] } } + # + # h1.deep_merge(h2) # => { a: false, b: { c: [1, 2, 3], x: [3, 4, 5] } } + # + # Like with Hash#merge in the standard library, a block can be provided + # to merge values: + # + # h1 = { a: 100, b: 200, c: { c1: 100 } } + # h2 = { b: 250, c: { c1: 200 } } + # h1.deep_merge(h2) { |key, this_val, other_val| this_val + other_val } + # # => { a: 100, b: 450, c: { c1: 300 } } + # + # source://activesupport//lib/active_support/core_ext/hash/deep_merge.rb#18 def deep_merge(other_hash, &block); end + + # Same as +deep_merge+, but modifies +self+. + # + # source://activesupport//lib/active_support/core_ext/hash/deep_merge.rb#23 def deep_merge!(other_hash, &block); end + + # Returns a new hash with all keys converted to strings. + # This includes the keys from the root hash and from all + # nested hashes and arrays. + # + # hash = { person: { name: 'Rob', age: '28' } } + # + # hash.deep_stringify_keys + # # => {"person"=>{"name"=>"Rob", "age"=>"28"}} + # + # source://activesupport//lib/active_support/core_ext/hash/keys.rb#84 def deep_stringify_keys; end + + # Destructively converts all keys to strings. + # This includes the keys from the root hash and from all + # nested hashes and arrays. + # + # source://activesupport//lib/active_support/core_ext/hash/keys.rb#91 def deep_stringify_keys!; end + + # Returns a new hash with all keys converted to symbols, as long as + # they respond to +to_sym+. This includes the keys from the root hash + # and from all nested hashes and arrays. + # + # hash = { 'person' => { 'name' => 'Rob', 'age' => '28' } } + # + # hash.deep_symbolize_keys + # # => {:person=>{:name=>"Rob", :age=>"28"}} + # + # source://activesupport//lib/active_support/core_ext/hash/keys.rb#103 def deep_symbolize_keys; end + + # Destructively converts all keys to symbols, as long as they respond + # to +to_sym+. This includes the keys from the root hash and from all + # nested hashes and arrays. + # + # source://activesupport//lib/active_support/core_ext/hash/keys.rb#110 def deep_symbolize_keys!; end + + # Returns a new hash with all keys converted by the block operation. + # This includes the keys from the root hash and from all + # nested hashes and arrays. + # + # hash = { person: { name: 'Rob', age: '28' } } + # + # hash.deep_transform_keys{ |key| key.to_s.upcase } + # # => {"PERSON"=>{"NAME"=>"Rob", "AGE"=>"28"}} + # + # source://activesupport//lib/active_support/core_ext/hash/keys.rb#65 def deep_transform_keys(&block); end + + # Destructively converts all keys by using the block operation. + # This includes the keys from the root hash and from all + # nested hashes and arrays. + # + # source://activesupport//lib/active_support/core_ext/hash/keys.rb#72 def deep_transform_keys!(&block); end + + # Returns a new hash with all values converted by the block operation. + # This includes the values from the root hash and from all + # nested hashes and arrays. + # + # hash = { person: { name: 'Rob', age: '28' } } + # + # hash.deep_transform_values{ |value| value.to_s.upcase } + # # => {person: {name: "ROB", age: "28"}} + # + # source://activesupport//lib/active_support/core_ext/hash/deep_transform_values.rb#12 def deep_transform_values(&block); end + + # Destructively converts all values by using the block operation. + # This includes the values from the root hash and from all + # nested hashes and arrays. + # + # source://activesupport//lib/active_support/core_ext/hash/deep_transform_values.rb#19 def deep_transform_values!(&block); end - def except(*keys); end + + # Removes the given keys from hash and returns it. + # hash = { a: true, b: false, c: nil } + # hash.except!(:c) # => { a: true, b: false } + # hash # => { a: true, b: false } + # + # source://activesupport//lib/active_support/core_ext/hash/except.rb#20 def except!(*keys); end + + # Removes and returns the key/value pairs matching the given keys. + # + # hash = { a: 1, b: 2, c: 3, d: 4 } + # hash.extract!(:a, :b) # => {:a=>1, :b=>2} + # hash # => {:c=>3, :d=>4} + # + # source://activesupport//lib/active_support/core_ext/hash/slice.rb#24 def extract!(*keys); end + + # By default, only instances of Hash itself are extractable. + # Subclasses of Hash may implement this method and return + # true to declare themselves as extractable. If a Hash + # is extractable, Array#extract_options! pops it from + # the Array when it is the last element of the Array. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/array/extract_options.rb#9 def extractable_options?; end + + # Returns an ActiveSupport::HashWithIndifferentAccess out of its receiver: + # + # { a: 1 }.with_indifferent_access['a'] # => 1 + # Called when object is nested under an object that receives + # #with_indifferent_access. This method will be called on the current object + # by the enclosing object and is aliased to #with_indifferent_access by + # default. Subclasses of Hash may overwrite this method to return +self+ if + # converting to an ActiveSupport::HashWithIndifferentAccess would not be + # desirable. + # + # b = { b: 1 } + # { a: b }.with_indifferent_access['a'] # calls b.nested_under_indifferent_access + # # => {"b"=>1} + # + # source://activesupport//lib/active_support/core_ext/hash/indifferent_access.rb#9 def nested_under_indifferent_access; end + + # Merges the caller into +other_hash+. For example, + # + # options = options.reverse_merge(size: 25, velocity: 10) + # + # is equivalent to + # + # options = { size: 25, velocity: 10 }.merge(options) + # + # This is particularly useful for initializing an options hash + # with default values. + # + # source://activesupport//lib/active_support/core_ext/hash/reverse_merge.rb#14 def reverse_merge(other_hash); end + + # Destructive +reverse_merge+. + # + # source://activesupport//lib/active_support/core_ext/hash/reverse_merge.rb#20 def reverse_merge!(other_hash); end + + # Destructive +reverse_merge+. + # + # source://activesupport//lib/active_support/core_ext/hash/reverse_merge.rb#20 def reverse_update(other_hash); end + + # Replaces the hash with only the given keys. + # Returns a hash containing the removed key/value pairs. + # + # hash = { a: 1, b: 2, c: 3, d: 4 } + # hash.slice!(:a, :b) # => {:c=>3, :d=>4} + # hash # => {:a=>1, :b=>2} + # + # source://activesupport//lib/active_support/core_ext/hash/slice.rb#10 def slice!(*keys); end + + # Returns a new hash with all keys converted to strings. + # + # hash = { name: 'Rob', age: '28' } + # + # hash.stringify_keys + # # => {"name"=>"Rob", "age"=>"28"} + # + # source://activesupport//lib/active_support/core_ext/hash/keys.rb#10 def stringify_keys; end + + # Destructively converts all keys to strings. Same as + # +stringify_keys+, but modifies +self+. + # + # source://activesupport//lib/active_support/core_ext/hash/keys.rb#16 def stringify_keys!; end + + # Returns a new hash with all keys converted to symbols, as long as + # they respond to +to_sym+. + # + # hash = { 'name' => 'Rob', 'age' => '28' } + # + # hash.symbolize_keys + # # => {:name=>"Rob", :age=>"28"} + # + # source://activesupport//lib/active_support/core_ext/hash/keys.rb#27 def symbolize_keys; end + + # Destructively converts all keys to symbols, as long as they respond + # to +to_sym+. Same as +symbolize_keys+, but modifies +self+. + # + # source://activesupport//lib/active_support/core_ext/hash/keys.rb#34 def symbolize_keys!; end + + # Returns a new hash with all keys converted to symbols, as long as + # they respond to +to_sym+. + # + # hash = { 'name' => 'Rob', 'age' => '28' } + # + # hash.symbolize_keys + # # => {:name=>"Rob", :age=>"28"} + # + # source://activesupport//lib/active_support/core_ext/hash/keys.rb#27 def to_options; end + + # Destructively converts all keys to symbols, as long as they respond + # to +to_sym+. Same as +symbolize_keys+, but modifies +self+. + # + # source://activesupport//lib/active_support/core_ext/hash/keys.rb#34 def to_options!; end + + # Returns a string representation of the receiver suitable for use as a URL + # query string: + # + # {name: 'David', nationality: 'Danish'}.to_query + # # => "name=David&nationality=Danish" + # + # An optional namespace can be passed to enclose key names: + # + # {name: 'David', nationality: 'Danish'}.to_query('user') + # # => "user%5Bname%5D=David&user%5Bnationality%5D=Danish" + # + # The string pairs "key=value" that conform the query string + # are sorted lexicographically in ascending order. + # + # This method is also aliased as +to_param+. + # + # source://activesupport//lib/active_support/core_ext/object/to_query.rb#77 def to_param(namespace = T.unsafe(nil)); end + + # Returns a string representation of the receiver suitable for use as a URL + # query string: + # + # {name: 'David', nationality: 'Danish'}.to_query + # # => "name=David&nationality=Danish" + # + # An optional namespace can be passed to enclose key names: + # + # {name: 'David', nationality: 'Danish'}.to_query('user') + # # => "user%5Bname%5D=David&user%5Bnationality%5D=Danish" + # + # The string pairs "key=value" that conform the query string + # are sorted lexicographically in ascending order. + # + # This method is also aliased as +to_param+. + # + # source://activesupport//lib/active_support/core_ext/object/to_query.rb#77 def to_query(namespace = T.unsafe(nil)); end + + # Returns a string containing an XML representation of its receiver: + # + # { foo: 1, bar: 2 }.to_xml + # # => + # # + # # + # # 1 + # # 2 + # # + # + # To do so, the method loops over the pairs and builds nodes that depend on + # the _values_. Given a pair +key+, +value+: + # + # * If +value+ is a hash there's a recursive call with +key+ as :root. + # + # * If +value+ is an array there's a recursive call with +key+ as :root, + # and +key+ singularized as :children. + # + # * If +value+ is a callable object it must expect one or two arguments. Depending + # on the arity, the callable is invoked with the +options+ hash as first argument + # with +key+ as :root, and +key+ singularized as second argument. The + # callable can add nodes by using options[:builder]. + # + # {foo: lambda { |options, key| options[:builder].b(key) }}.to_xml + # # => "foo" + # + # * If +value+ responds to +to_xml+ the method is invoked with +key+ as :root. + # + # class Foo + # def to_xml(options) + # options[:builder].bar 'fooing!' + # end + # end + # + # { foo: Foo.new }.to_xml(skip_instruct: true) + # # => + # # + # # fooing! + # # + # + # * Otherwise, a node with +key+ as tag is created with a string representation of + # +value+ as text node. If +value+ is +nil+ an attribute "nil" set to "true" is added. + # Unless the option :skip_types exists and is true, an attribute "type" is + # added as well according to the following mapping: + # + # XML_TYPE_NAMES = { + # "Symbol" => "symbol", + # "Integer" => "integer", + # "BigDecimal" => "decimal", + # "Float" => "float", + # "TrueClass" => "boolean", + # "FalseClass" => "boolean", + # "Date" => "date", + # "DateTime" => "dateTime", + # "Time" => "dateTime" + # } + # + # By default the root node is "hash", but that's configurable via the :root option. + # + # The default XML builder is a fresh instance of Builder::XmlMarkup. You can + # configure your own builder with the :builder option. The method also accepts + # options like :dasherize and friends, they are forwarded to the builder. + # + # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#75 def to_xml(options = T.unsafe(nil)); end + + # Merges the caller into +other_hash+. For example, + # + # options = options.reverse_merge(size: 25, velocity: 10) + # + # is equivalent to + # + # options = { size: 25, velocity: 10 }.merge(options) + # + # This is particularly useful for initializing an options hash + # with default values. + # + # source://activesupport//lib/active_support/core_ext/hash/reverse_merge.rb#14 def with_defaults(other_hash); end + + # Destructive +reverse_merge+. + # + # source://activesupport//lib/active_support/core_ext/hash/reverse_merge.rb#20 def with_defaults!(other_hash); end + + # Returns an ActiveSupport::HashWithIndifferentAccess out of its receiver: + # + # { a: 1 }.with_indifferent_access['a'] # => 1 + # + # source://activesupport//lib/active_support/core_ext/hash/indifferent_access.rb#9 def with_indifferent_access; end private + # Support methods for deep transforming nested hashes and arrays. + # + # source://activesupport//lib/active_support/core_ext/hash/keys.rb#116 def _deep_transform_keys_in_object(object, &block); end + + # source://activesupport//lib/active_support/core_ext/hash/keys.rb#129 def _deep_transform_keys_in_object!(object, &block); end + + # Support methods for deep transforming nested hashes and arrays. + # + # source://activesupport//lib/active_support/core_ext/hash/deep_transform_values.rb#25 def _deep_transform_values_in_object(object, &block); end + + # source://activesupport//lib/active_support/core_ext/hash/deep_transform_values.rb#36 def _deep_transform_values_in_object!(object, &block); end class << self + # Builds a Hash from XML just like Hash.from_xml, but also allows Symbol and YAML. + # + # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#134 def from_trusted_xml(xml); end + + # Returns a Hash containing a collection of pairs when the key is the node name and the value is + # its content + # + # xml = <<-XML + # + # + # 1 + # 2 + # + # XML + # + # hash = Hash.from_xml(xml) + # # => {"hash"=>{"foo"=>1, "bar"=>2}} + # + # +DisallowedType+ is raised if the XML contains attributes with type="yaml" or + # type="symbol". Use Hash.from_trusted_xml to + # parse this XML. + # + # Custom +disallowed_types+ can also be passed in the form of an + # array. + # + # xml = <<-XML + # + # + # 1 + # "David" + # + # XML + # + # hash = Hash.from_xml(xml, ['integer']) + # # => ActiveSupport::XMLConverter::DisallowedType: Disallowed type attribute: "integer" + # + # Note that passing custom disallowed types will override the default types, + # which are Symbol and YAML. + # + # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#129 def from_xml(xml, disallowed_types = T.unsafe(nil)); end end end +# :stopdoc: +# +# source://activesupport//lib/active_support/hash_with_indifferent_access.rb#423 HashWithIndifferentAccess = ActiveSupport::HashWithIndifferentAccess +# source://activesupport//lib/active_support/core_ext/object/json.rb#140 class IO include ::Enumerable include ::File::Constants + # source://activesupport//lib/active_support/core_ext/object/json.rb#141 def as_json(options = T.unsafe(nil)); end end +class IO::Buffer + include ::Comparable + + def initialize(*_arg0); end + + def <=>(_arg0); end + def clear(*_arg0); end + def copy(*_arg0); end + def empty?; end + def external?; end + def free; end + def get_string(*_arg0); end + def get_value(_arg0, _arg1); end + def hexdump; end + def inspect; end + def internal?; end + def locked; end + def locked?; end + def mapped?; end + def null?; end + def pread(_arg0, _arg1, _arg2); end + def pwrite(_arg0, _arg1, _arg2); end + def read(_arg0, _arg1); end + def readonly?; end + def resize(_arg0); end + def set_string(*_arg0); end + def set_value(_arg0, _arg1, _arg2); end + def size; end + def slice(_arg0, _arg1); end + def to_s; end + def transfer; end + def valid?; end + def write(_arg0, _arg1); end + + class << self + def for(_arg0); end + def map(*_arg0); end + end +end + +class IO::Buffer::AccessError < ::RuntimeError; end +class IO::Buffer::AllocationError < ::RuntimeError; end +IO::Buffer::BIG_ENDIAN = T.let(T.unsafe(nil), Integer) +IO::Buffer::DEFAULT_SIZE = T.let(T.unsafe(nil), Integer) +IO::Buffer::EXTERNAL = T.let(T.unsafe(nil), Integer) +IO::Buffer::HOST_ENDIAN = T.let(T.unsafe(nil), Integer) +IO::Buffer::INTERNAL = T.let(T.unsafe(nil), Integer) +class IO::Buffer::InvalidatedError < ::RuntimeError; end +IO::Buffer::LITTLE_ENDIAN = T.let(T.unsafe(nil), Integer) +IO::Buffer::LOCKED = T.let(T.unsafe(nil), Integer) +class IO::Buffer::LockedError < ::RuntimeError; end +IO::Buffer::MAPPED = T.let(T.unsafe(nil), Integer) +IO::Buffer::NETWORK_ENDIAN = T.let(T.unsafe(nil), Integer) +IO::Buffer::PAGE_SIZE = T.let(T.unsafe(nil), Integer) +IO::Buffer::PRIVATE = T.let(T.unsafe(nil), Integer) +IO::Buffer::READONLY = T.let(T.unsafe(nil), Integer) + +class IO::ConsoleMode + def echo=(_arg0); end + def raw(*_arg0); end + def raw!(*_arg0); end + + private + + def initialize_copy(_arg0); end +end + class IO::EAGAINWaitReadable < ::Errno::EAGAIN include ::IO::WaitReadable end @@ -3399,217 +14886,1892 @@ end IO::EWOULDBLOCKWaitReadable = IO::EAGAINWaitReadable IO::EWOULDBLOCKWaitWritable = IO::EAGAINWaitWritable +IO::PRIORITY = T.let(T.unsafe(nil), Integer) +IO::READABLE = T.let(T.unsafe(nil), Integer) +IO::WRITABLE = T.let(T.unsafe(nil), Integer) +# source://activesupport//lib/active_support/core_ext/object/json.rb#223 class IPAddr - include ::Comparable - + # source://activesupport//lib/active_support/core_ext/object/json.rb#224 def as_json(options = T.unsafe(nil)); end end +# source://activesupport//lib/active_support/core_ext/integer/time.rb#6 class Integer < ::Numeric include ::ActiveSupport::NumericWithFormat - include ::JSON::Ext::Generator::GeneratorMethods::Integer - include ::MessagePack::CoreExt + # Returns a Duration instance matching the number of months provided. + # + # 2.months # => 2 months + # + # source://activesupport//lib/active_support/core_ext/integer/time.rb#10 def month; end + + # Returns a Duration instance matching the number of months provided. + # + # 2.months # => 2 months + # + # source://activesupport//lib/active_support/core_ext/integer/time.rb#10 def months; end + + # Check whether the integer is evenly divisible by the argument. + # + # 0.multiple_of?(0) # => true + # 6.multiple_of?(5) # => false + # 10.multiple_of?(2) # => true + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/integer/multiple.rb#9 def multiple_of?(number); end + + # Ordinal returns the suffix used to denote the position + # in an ordered sequence such as 1st, 2nd, 3rd, 4th. + # + # 1.ordinal # => "st" + # 2.ordinal # => "nd" + # 1002.ordinal # => "nd" + # 1003.ordinal # => "rd" + # -11.ordinal # => "th" + # -1001.ordinal # => "st" + # + # source://activesupport//lib/active_support/core_ext/integer/inflections.rb#28 def ordinal; end + + # Ordinalize turns a number into an ordinal string used to denote the + # position in an ordered sequence such as 1st, 2nd, 3rd, 4th. + # + # 1.ordinalize # => "1st" + # 2.ordinalize # => "2nd" + # 1002.ordinalize # => "1002nd" + # 1003.ordinalize # => "1003rd" + # -11.ordinalize # => "-11th" + # -1001.ordinalize # => "-1001st" + # + # source://activesupport//lib/active_support/core_ext/integer/inflections.rb#15 def ordinalize; end + + # source://activesupport//lib/active_support/core_ext/numeric/conversions.rb#109 + def to_s(format = T.unsafe(nil), options = T.unsafe(nil)); end + + # Returns a Duration instance matching the number of years provided. + # + # 2.years # => 2 years + # + # source://activesupport//lib/active_support/core_ext/integer/time.rb#18 def year; end + + # Returns a Duration instance matching the number of years provided. + # + # 2.years # => 2 years + # + # source://activesupport//lib/active_support/core_ext/integer/time.rb#18 def years; end end +# source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#3 module Kernel - extend ::Forwardable + include ::ActiveSupport::ForkTracker::CoreExt + include ::ActiveSupport::ForkTracker::CoreExtPrivate + # class_eval on an object acts like singleton_class.class_eval. + # + # source://activesupport//lib/active_support/core_ext/kernel/singleton_class.rb#5 def class_eval(*args, &block); end private + # A shortcut to define a toplevel concern, not within a module. + # + # See Module::Concerning for more. + # + # source://activesupport//lib/active_support/core_ext/kernel/concern.rb#11 def concern(topic, &module_definition); end + + # Sets $VERBOSE to +true+ for the duration of the block and back to its + # original value afterwards. + # + # source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#20 def enable_warnings; end + + # source://activesupport//lib/active_support/fork_tracker.rb#26 + def fork(*_arg0, **_arg1); end + + # Sets $VERBOSE to +nil+ for the duration of the block and back to its original + # value afterwards. + # + # silence_warnings do + # value = noisy_call # no warning voiced + # end + # + # noisy_call # warning voiced + # + # source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#14 def silence_warnings; end + + # Blocks and ignores any exception passed as argument if raised within the block. + # + # suppress(ZeroDivisionError) do + # 1/0 + # puts 'This code is NOT reached' + # end + # + # puts 'This code gets executed and nothing related to ZeroDivisionError was seen' + # + # source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#41 def suppress(*exception_classes); end + + # Sets $VERBOSE for the duration of the block and back to its original + # value afterwards. + # + # source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#26 def with_warnings(flag); end class << self + # A shortcut to define a toplevel concern, not within a module. + # + # See Module::Concerning for more. + # + # source://activesupport//lib/active_support/core_ext/kernel/concern.rb#11 def concern(topic, &module_definition); end + + # Sets $VERBOSE to +true+ for the duration of the block and back to its + # original value afterwards. + # + # source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#20 def enable_warnings; end + + # source://activesupport//lib/active_support/fork_tracker.rb#6 + def fork(*_arg0, **_arg1); end + + # Sets $VERBOSE to +nil+ for the duration of the block and back to its original + # value afterwards. + # + # silence_warnings do + # value = noisy_call # no warning voiced + # end + # + # noisy_call # warning voiced + # + # source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#14 def silence_warnings; end + + # Blocks and ignores any exception passed as argument if raised within the block. + # + # suppress(ZeroDivisionError) do + # 1/0 + # puts 'This code is NOT reached' + # end + # + # puts 'This code gets executed and nothing related to ZeroDivisionError was seen' + # + # source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#41 def suppress(*exception_classes); end + + # Sets $VERBOSE for the duration of the block and back to its original + # value afterwards. + # + # source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#26 def with_warnings(flag); end end end +# source://activesupport//lib/active_support/core_ext/load_error.rb#3 class LoadError < ::ScriptError + include ::DidYouMean::Correctable + + # Returns true if the given path name (except perhaps for the ".rb" + # extension) is the missing file which caused the exception to be raised. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/load_error.rb#6 def is_missing?(location); end end -class Method - include ::MethodSource::SourceLocation::MethodExtensions - include ::MethodSource::MethodExtensions +module Marshal + extend ::ActiveSupport::MarshalWithAutoloading +end +# source://activesupport//lib/active_support/core_ext/object/duplicable.rb#31 +class Method + # Methods are not duplicable: + # + # method(:puts).duplicable? # => false + # method(:puts).dup # => TypeError: allocator undefined for Method + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/object/duplicable.rb#36 def duplicable?; end end +# Extends the module object with class/module and instance accessors for +# class/module attributes, just like the native attr* accessors for instance +# attributes, but does so on a per-thread basis. +# +# So the values are scoped within the Thread.current space under the class name +# of the module. +# +# source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#6 class Module include ::Module::Concerning include ::ActiveSupport::Dependencies::ModuleConstMissing + # Allows you to make aliases for attributes, which includes + # getter, setter, and a predicate. + # + # class Content < ActiveRecord::Base + # # has a title attribute + # end + # + # class Email < Content + # alias_attribute :subject, :title + # end + # + # e = Email.find(1) + # e.title # => "Superstars" + # e.subject # => "Superstars" + # e.subject? # => true + # e.subject = "Megastars" + # e.title # => "Megastars" + # + # source://activesupport//lib/active_support/core_ext/module/aliasing.rb#21 def alias_attribute(new_name, old_name); end + + # A module may or may not have a name. + # + # module M; end + # M.name # => "M" + # + # m = Module.new + # m.name # => nil + # + # +anonymous?+ method returns true if module does not have a name, false otherwise: + # + # Module.new.anonymous? # => true + # + # module M; end + # M.anonymous? # => false + # + # A module gets a name when it is first assigned to a constant. Either + # via the +module+ or +class+ keyword or by an explicit assignment: + # + # m = Module.new # creates an anonymous module + # m.anonymous? # => true + # M = m # m gets a name here as a side-effect + # m.name # => "M" + # m.anonymous? # => false + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/module/anonymous.rb#27 def anonymous?; end + + # Declares an attribute reader and writer backed by an internally-named instance + # variable. + # + # source://activesupport//lib/active_support/core_ext/module/attr_internal.rb#16 def attr_internal(*attrs); end + + # Declares an attribute reader and writer backed by an internally-named instance + # variable. + # + # source://activesupport//lib/active_support/core_ext/module/attr_internal.rb#16 def attr_internal_accessor(*attrs); end + + # Declares an attribute reader backed by an internally-named instance variable. + # + # source://activesupport//lib/active_support/core_ext/module/attr_internal.rb#5 def attr_internal_reader(*attrs); end + + # Declares an attribute writer backed by an internally-named instance variable. + # + # source://activesupport//lib/active_support/core_ext/module/attr_internal.rb#10 def attr_internal_writer(*attrs); end + + # Defines both class and instance accessors for class attributes. + # All class and instance methods created will be public, even if + # this method is called with a private or protected access modifier. + # + # module HairColors + # mattr_accessor :hair_colors + # end + # + # class Person + # include HairColors + # end + # + # HairColors.hair_colors = [:brown, :black, :blonde, :red] + # HairColors.hair_colors # => [:brown, :black, :blonde, :red] + # Person.new.hair_colors # => [:brown, :black, :blonde, :red] + # + # If a subclass changes the value then that would also change the value for + # parent class. Similarly if parent class changes the value then that would + # change the value of subclasses too. + # + # class Citizen < Person + # end + # + # Citizen.new.hair_colors << :blue + # Person.new.hair_colors # => [:brown, :black, :blonde, :red, :blue] + # + # To omit the instance writer method, pass instance_writer: false. + # To omit the instance reader method, pass instance_reader: false. + # + # module HairColors + # mattr_accessor :hair_colors, instance_writer: false, instance_reader: false + # end + # + # class Person + # include HairColors + # end + # + # Person.new.hair_colors = [:brown] # => NoMethodError + # Person.new.hair_colors # => NoMethodError + # + # Or pass instance_accessor: false, to omit both instance methods. + # + # module HairColors + # mattr_accessor :hair_colors, instance_accessor: false + # end + # + # class Person + # include HairColors + # end + # + # Person.new.hair_colors = [:brown] # => NoMethodError + # Person.new.hair_colors # => NoMethodError + # + # You can set a default value for the attribute. + # + # module HairColors + # mattr_accessor :hair_colors, default: [:brown, :black, :blonde, :red] + # end + # + # class Person + # include HairColors + # end + # + # Person.class_variable_get("@@hair_colors") # => [:brown, :black, :blonde, :red] + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#200 def cattr_accessor(*syms, instance_reader: T.unsafe(nil), instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), &blk); end + + # Defines a class attribute and creates a class and instance reader methods. + # The underlying class variable is set to +nil+, if it is not previously + # defined. All class and instance methods created will be public, even if + # this method is called with a private or protected access modifier. + # + # module HairColors + # mattr_reader :hair_colors + # end + # + # HairColors.hair_colors # => nil + # HairColors.class_variable_set("@@hair_colors", [:brown, :black]) + # HairColors.hair_colors # => [:brown, :black] + # + # The attribute name must be a valid method name in Ruby. + # + # module Foo + # mattr_reader :"1_Badname" + # end + # # => NameError: invalid attribute name: 1_Badname + # + # To omit the instance reader method, pass + # instance_reader: false or instance_accessor: false. + # + # module HairColors + # mattr_reader :hair_colors, instance_reader: false + # end + # + # class Person + # include HairColors + # end + # + # Person.new.hair_colors # => NoMethodError + # + # You can set a default value for the attribute. + # + # module HairColors + # mattr_reader :hair_colors, default: [:brown, :black, :blonde, :red] + # end + # + # class Person + # include HairColors + # end + # + # Person.new.hair_colors # => [:brown, :black, :blonde, :red] + # + # @raise [TypeError] + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#51 def cattr_reader(*syms, instance_reader: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), location: T.unsafe(nil)); end + + # Defines a class attribute and creates a class and instance writer methods to + # allow assignment to the attribute. All class and instance methods created + # will be public, even if this method is called with a private or protected + # access modifier. + # + # module HairColors + # mattr_writer :hair_colors + # end + # + # class Person + # include HairColors + # end + # + # HairColors.hair_colors = [:brown, :black] + # Person.class_variable_get("@@hair_colors") # => [:brown, :black] + # Person.new.hair_colors = [:blonde, :red] + # HairColors.class_variable_get("@@hair_colors") # => [:blonde, :red] + # + # To omit the instance writer method, pass + # instance_writer: false or instance_accessor: false. + # + # module HairColors + # mattr_writer :hair_colors, instance_writer: false + # end + # + # class Person + # include HairColors + # end + # + # Person.new.hair_colors = [:blonde, :red] # => NoMethodError + # + # You can set a default value for the attribute. + # + # module HairColors + # mattr_writer :hair_colors, default: [:brown, :black, :blonde, :red] + # end + # + # class Person + # include HairColors + # end + # + # Person.class_variable_get("@@hair_colors") # => [:brown, :black, :blonde, :red] + # + # @raise [TypeError] + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#115 def cattr_writer(*syms, instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), location: T.unsafe(nil)); end + + # Provides a +delegate+ class method to easily expose contained objects' + # public methods as your own. + # + # ==== Options + # * :to - Specifies the target object name as a symbol or string + # * :prefix - Prefixes the new method with the target name or a custom prefix + # * :allow_nil - If set to true, prevents a +Module::DelegationError+ + # from being raised + # * :private - If set to true, changes method visibility to private + # + # The macro receives one or more method names (specified as symbols or + # strings) and the name of the target object via the :to option + # (also a symbol or string). + # + # Delegation is particularly useful with Active Record associations: + # + # class Greeter < ActiveRecord::Base + # def hello + # 'hello' + # end + # + # def goodbye + # 'goodbye' + # end + # end + # + # class Foo < ActiveRecord::Base + # belongs_to :greeter + # delegate :hello, to: :greeter + # end + # + # Foo.new.hello # => "hello" + # Foo.new.goodbye # => NoMethodError: undefined method `goodbye' for # + # + # Multiple delegates to the same target are allowed: + # + # class Foo < ActiveRecord::Base + # belongs_to :greeter + # delegate :hello, :goodbye, to: :greeter + # end + # + # Foo.new.goodbye # => "goodbye" + # + # Methods can be delegated to instance variables, class variables, or constants + # by providing them as a symbols: + # + # class Foo + # CONSTANT_ARRAY = [0,1,2,3] + # @@class_array = [4,5,6,7] + # + # def initialize + # @instance_array = [8,9,10,11] + # end + # delegate :sum, to: :CONSTANT_ARRAY + # delegate :min, to: :@@class_array + # delegate :max, to: :@instance_array + # end + # + # Foo.new.sum # => 6 + # Foo.new.min # => 4 + # Foo.new.max # => 11 + # + # It's also possible to delegate a method to the class by using +:class+: + # + # class Foo + # def self.hello + # "world" + # end + # + # delegate :hello, to: :class + # end + # + # Foo.new.hello # => "world" + # + # Delegates can optionally be prefixed using the :prefix option. If the value + # is true, the delegate methods are prefixed with the name of the object being + # delegated to. + # + # Person = Struct.new(:name, :address) + # + # class Invoice < Struct.new(:client) + # delegate :name, :address, to: :client, prefix: true + # end + # + # john_doe = Person.new('John Doe', 'Vimmersvej 13') + # invoice = Invoice.new(john_doe) + # invoice.client_name # => "John Doe" + # invoice.client_address # => "Vimmersvej 13" + # + # It is also possible to supply a custom prefix. + # + # class Invoice < Struct.new(:client) + # delegate :name, :address, to: :client, prefix: :customer + # end + # + # invoice = Invoice.new(john_doe) + # invoice.customer_name # => 'John Doe' + # invoice.customer_address # => 'Vimmersvej 13' + # + # The delegated methods are public by default. + # Pass private: true to change that. + # + # class User < ActiveRecord::Base + # has_one :profile + # delegate :first_name, to: :profile + # delegate :date_of_birth, to: :profile, private: true + # + # def age + # Date.today.year - date_of_birth.year + # end + # end + # + # User.new.first_name # => "Tomas" + # User.new.date_of_birth # => NoMethodError: private method `date_of_birth' called for # + # User.new.age # => 2 + # + # If the target is +nil+ and does not respond to the delegated method a + # +Module::DelegationError+ is raised. If you wish to instead return +nil+, + # use the :allow_nil option. + # + # class User < ActiveRecord::Base + # has_one :profile + # delegate :age, to: :profile + # end + # + # User.new.age + # # => Module::DelegationError: User#age delegated to profile.age, but profile is nil + # + # But if not having a profile yet is fine and should not be an error + # condition: + # + # class User < ActiveRecord::Base + # has_one :profile + # delegate :age, to: :profile, allow_nil: true + # end + # + # User.new.age # nil + # + # Note that if the target is not +nil+ then the call is attempted regardless of the + # :allow_nil option, and thus an exception is still raised if said object + # does not respond to the method: + # + # class Foo + # def initialize(bar) + # @bar = bar + # end + # + # delegate :name, to: :@bar, allow_nil: true + # end + # + # Foo.new("Bar").name # raises NoMethodError: undefined method `name' + # + # The target method must be public, otherwise it will raise +NoMethodError+. + # + # source://activesupport//lib/active_support/core_ext/module/delegation.rb#171 def delegate(*methods, to: T.unsafe(nil), prefix: T.unsafe(nil), allow_nil: T.unsafe(nil), private: T.unsafe(nil)); end + + # When building decorators, a common pattern may emerge: + # + # class Partition + # def initialize(event) + # @event = event + # end + # + # def person + # detail.person || creator + # end + # + # private + # def respond_to_missing?(name, include_private = false) + # @event.respond_to?(name, include_private) + # end + # + # def method_missing(method, *args, &block) + # @event.send(method, *args, &block) + # end + # end + # + # With Module#delegate_missing_to, the above is condensed to: + # + # class Partition + # delegate_missing_to :@event + # + # def initialize(event) + # @event = event + # end + # + # def person + # detail.person || creator + # end + # end + # + # The target can be anything callable within the object, e.g. instance + # variables, methods, constants, etc. + # + # The delegated method must be public on the target, otherwise it will + # raise +DelegationError+. If you wish to instead return +nil+, + # use the :allow_nil option. + # + # The marshal_dump and _dump methods are exempt from + # delegation due to possible interference when calling + # Marshal.dump(object), should the delegation target method + # of object add or remove instance variables. + # + # source://activesupport//lib/active_support/core_ext/module/delegation.rb#295 def delegate_missing_to(target, allow_nil: T.unsafe(nil)); end + + # deprecate :foo + # deprecate bar: 'message' + # deprecate :foo, :bar, baz: 'warning!', qux: 'gone!' + # + # You can also use custom deprecator instance: + # + # deprecate :foo, deprecator: MyLib::Deprecator.new + # deprecate :foo, bar: "warning!", deprecator: MyLib::Deprecator.new + # + # \Custom deprecators must respond to deprecation_warning(deprecated_method_name, message, caller_backtrace) + # method where you can implement your custom warning behavior. + # + # class MyLib::Deprecator + # def deprecation_warning(deprecated_method_name, message, caller_backtrace = nil) + # message = "#{deprecated_method_name} is deprecated and will be removed from MyLibrary | #{message}" + # Kernel.warn message + # end + # end + # + # source://activesupport//lib/active_support/core_ext/module/deprecation.rb#22 def deprecate(*method_names); end + + # Defines both class and instance accessors for class attributes. + # All class and instance methods created will be public, even if + # this method is called with a private or protected access modifier. + # + # module HairColors + # mattr_accessor :hair_colors + # end + # + # class Person + # include HairColors + # end + # + # HairColors.hair_colors = [:brown, :black, :blonde, :red] + # HairColors.hair_colors # => [:brown, :black, :blonde, :red] + # Person.new.hair_colors # => [:brown, :black, :blonde, :red] + # + # If a subclass changes the value then that would also change the value for + # parent class. Similarly if parent class changes the value then that would + # change the value of subclasses too. + # + # class Citizen < Person + # end + # + # Citizen.new.hair_colors << :blue + # Person.new.hair_colors # => [:brown, :black, :blonde, :red, :blue] + # + # To omit the instance writer method, pass instance_writer: false. + # To omit the instance reader method, pass instance_reader: false. + # + # module HairColors + # mattr_accessor :hair_colors, instance_writer: false, instance_reader: false + # end + # + # class Person + # include HairColors + # end + # + # Person.new.hair_colors = [:brown] # => NoMethodError + # Person.new.hair_colors # => NoMethodError + # + # Or pass instance_accessor: false, to omit both instance methods. + # + # module HairColors + # mattr_accessor :hair_colors, instance_accessor: false + # end + # + # class Person + # include HairColors + # end + # + # Person.new.hair_colors = [:brown] # => NoMethodError + # Person.new.hair_colors # => NoMethodError + # + # You can set a default value for the attribute. + # + # module HairColors + # mattr_accessor :hair_colors, default: [:brown, :black, :blonde, :red] + # end + # + # class Person + # include HairColors + # end + # + # Person.class_variable_get("@@hair_colors") # => [:brown, :black, :blonde, :red] + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#200 def mattr_accessor(*syms, instance_reader: T.unsafe(nil), instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), &blk); end + + # Defines a class attribute and creates a class and instance reader methods. + # The underlying class variable is set to +nil+, if it is not previously + # defined. All class and instance methods created will be public, even if + # this method is called with a private or protected access modifier. + # + # module HairColors + # mattr_reader :hair_colors + # end + # + # HairColors.hair_colors # => nil + # HairColors.class_variable_set("@@hair_colors", [:brown, :black]) + # HairColors.hair_colors # => [:brown, :black] + # + # The attribute name must be a valid method name in Ruby. + # + # module Foo + # mattr_reader :"1_Badname" + # end + # # => NameError: invalid attribute name: 1_Badname + # + # To omit the instance reader method, pass + # instance_reader: false or instance_accessor: false. + # + # module HairColors + # mattr_reader :hair_colors, instance_reader: false + # end + # + # class Person + # include HairColors + # end + # + # Person.new.hair_colors # => NoMethodError + # + # You can set a default value for the attribute. + # + # module HairColors + # mattr_reader :hair_colors, default: [:brown, :black, :blonde, :red] + # end + # + # class Person + # include HairColors + # end + # + # Person.new.hair_colors # => [:brown, :black, :blonde, :red] + # + # @raise [TypeError] + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#51 def mattr_reader(*syms, instance_reader: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), location: T.unsafe(nil)); end + + # Defines a class attribute and creates a class and instance writer methods to + # allow assignment to the attribute. All class and instance methods created + # will be public, even if this method is called with a private or protected + # access modifier. + # + # module HairColors + # mattr_writer :hair_colors + # end + # + # class Person + # include HairColors + # end + # + # HairColors.hair_colors = [:brown, :black] + # Person.class_variable_get("@@hair_colors") # => [:brown, :black] + # Person.new.hair_colors = [:blonde, :red] + # HairColors.class_variable_get("@@hair_colors") # => [:blonde, :red] + # + # To omit the instance writer method, pass + # instance_writer: false or instance_accessor: false. + # + # module HairColors + # mattr_writer :hair_colors, instance_writer: false + # end + # + # class Person + # include HairColors + # end + # + # Person.new.hair_colors = [:blonde, :red] # => NoMethodError + # + # You can set a default value for the attribute. + # + # module HairColors + # mattr_writer :hair_colors, default: [:brown, :black, :blonde, :red] + # end + # + # class Person + # include HairColors + # end + # + # Person.class_variable_get("@@hair_colors") # => [:brown, :black, :blonde, :red] + # + # @raise [TypeError] + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#115 def mattr_writer(*syms, instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://activesupport//lib/active_support/core_ext/module/redefine_method.rb#30 def method_visibility(method); end + + # Returns the module which contains this one according to its name. + # + # module M + # module N + # end + # end + # X = M::N + # + # M::N.module_parent # => M + # X.module_parent # => M + # + # The parent of top-level and anonymous modules is Object. + # + # M.module_parent # => Object + # Module.new.module_parent # => Object + # + # source://activesupport//lib/active_support/core_ext/module/introspection.rb#35 def module_parent; end + + # Returns the name of the module containing this one. + # + # M::N.module_parent_name # => "M" + # + # source://activesupport//lib/active_support/core_ext/module/introspection.rb#10 def module_parent_name; end + + # Returns all the parents of this module according to its name, ordered from + # nested outwards. The receiver is not contained within the result. + # + # module M + # module N + # end + # end + # X = M::N + # + # M.module_parents # => [Object] + # M::N.module_parents # => [M, Object] + # X.module_parents # => [M, Object] + # + # source://activesupport//lib/active_support/core_ext/module/introspection.rb#51 def module_parents; end + + # Replaces the existing method definition, if there is one, with the passed + # block as its body. + # + # source://activesupport//lib/active_support/core_ext/module/redefine_method.rb#17 def redefine_method(method, &block); end + + # Replaces the existing singleton method definition, if there is one, with + # the passed block as its body. + # + # source://activesupport//lib/active_support/core_ext/module/redefine_method.rb#26 def redefine_singleton_method(method, &block); end + + # Removes the named method, if it exists. + # + # source://activesupport//lib/active_support/core_ext/module/remove_method.rb#7 def remove_possible_method(method); end + + # Removes the named singleton method, if it exists. + # + # source://activesupport//lib/active_support/core_ext/module/remove_method.rb#14 def remove_possible_singleton_method(method); end + + # Marks the named method as intended to be redefined, if it exists. + # Suppresses the Ruby method redefinition warning. Prefer + # #redefine_method where possible. + # + # source://activesupport//lib/active_support/core_ext/module/redefine_method.rb#7 def silence_redefinition_of_method(method); end + + # Defines both class and instance accessors for class attributes. + # + # class Account + # thread_mattr_accessor :user + # end + # + # Account.user = "DHH" + # Account.user # => "DHH" + # Account.new.user # => "DHH" + # + # If a subclass changes the value, the parent class' value is not changed. + # Similarly, if the parent class changes the value, the value of subclasses + # is not changed. + # + # class Customer < Account + # end + # + # Customer.user = "Rafael" + # Customer.user # => "Rafael" + # Account.user # => "DHH" + # + # To omit the instance writer method, pass instance_writer: false. + # To omit the instance reader method, pass instance_reader: false. + # + # class Current + # thread_mattr_accessor :user, instance_writer: false, instance_reader: false + # end + # + # Current.new.user = "DHH" # => NoMethodError + # Current.new.user # => NoMethodError + # + # Or pass instance_accessor: false, to omit both instance methods. + # + # class Current + # thread_mattr_accessor :user, instance_accessor: false + # end + # + # Current.new.user = "DHH" # => NoMethodError + # Current.new.user # => NoMethodError + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#143 def thread_cattr_accessor(*syms, instance_reader: T.unsafe(nil), instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil)); end + + # Defines a per-thread class attribute and creates class and instance reader methods. + # The underlying per-thread class variable is set to +nil+, if it is not previously defined. + # + # module Current + # thread_mattr_reader :user + # end + # + # Current.user # => nil + # Thread.current[:attr_Current_user] = "DHH" + # Current.user # => "DHH" + # + # The attribute name must be a valid method name in Ruby. + # + # module Foo + # thread_mattr_reader :"1_Badname" + # end + # # => NameError: invalid attribute name: 1_Badname + # + # To omit the instance reader method, pass + # instance_reader: false or instance_accessor: false. + # + # class Current + # thread_mattr_reader :user, instance_reader: false + # end + # + # Current.new.user # => NoMethodError + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#36 def thread_cattr_reader(*syms, instance_reader: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil)); end + + # Defines a per-thread class attribute and creates a class and instance writer methods to + # allow assignment to the attribute. + # + # module Current + # thread_mattr_writer :user + # end + # + # Current.user = "DHH" + # Thread.current[:attr_Current_user] # => "DHH" + # + # To omit the instance writer method, pass + # instance_writer: false or instance_accessor: false. + # + # class Current + # thread_mattr_writer :user, instance_writer: false + # end + # + # Current.new.user = "DHH" # => NoMethodError + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#79 def thread_cattr_writer(*syms, instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil)); end + + # Defines both class and instance accessors for class attributes. + # + # class Account + # thread_mattr_accessor :user + # end + # + # Account.user = "DHH" + # Account.user # => "DHH" + # Account.new.user # => "DHH" + # + # If a subclass changes the value, the parent class' value is not changed. + # Similarly, if the parent class changes the value, the value of subclasses + # is not changed. + # + # class Customer < Account + # end + # + # Customer.user = "Rafael" + # Customer.user # => "Rafael" + # Account.user # => "DHH" + # + # To omit the instance writer method, pass instance_writer: false. + # To omit the instance reader method, pass instance_reader: false. + # + # class Current + # thread_mattr_accessor :user, instance_writer: false, instance_reader: false + # end + # + # Current.new.user = "DHH" # => NoMethodError + # Current.new.user # => NoMethodError + # + # Or pass instance_accessor: false, to omit both instance methods. + # + # class Current + # thread_mattr_accessor :user, instance_accessor: false + # end + # + # Current.new.user = "DHH" # => NoMethodError + # Current.new.user # => NoMethodError + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#143 def thread_mattr_accessor(*syms, instance_reader: T.unsafe(nil), instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil)); end + + # Defines a per-thread class attribute and creates class and instance reader methods. + # The underlying per-thread class variable is set to +nil+, if it is not previously defined. + # + # module Current + # thread_mattr_reader :user + # end + # + # Current.user # => nil + # Thread.current[:attr_Current_user] = "DHH" + # Current.user # => "DHH" + # + # The attribute name must be a valid method name in Ruby. + # + # module Foo + # thread_mattr_reader :"1_Badname" + # end + # # => NameError: invalid attribute name: 1_Badname + # + # To omit the instance reader method, pass + # instance_reader: false or instance_accessor: false. + # + # class Current + # thread_mattr_reader :user, instance_reader: false + # end + # + # Current.new.user # => NoMethodError + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#36 def thread_mattr_reader(*syms, instance_reader: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil)); end + + # Defines a per-thread class attribute and creates a class and instance writer methods to + # allow assignment to the attribute. + # + # module Current + # thread_mattr_writer :user + # end + # + # Current.user = "DHH" + # Thread.current[:attr_Current_user] # => "DHH" + # + # To omit the instance writer method, pass + # instance_writer: false or instance_accessor: false. + # + # class Current + # thread_mattr_writer :user, instance_writer: false + # end + # + # Current.new.user = "DHH" # => NoMethodError + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#79 def thread_mattr_writer(*syms, instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil)); end private + # source://activesupport//lib/active_support/core_ext/module/attr_internal.rb#30 def attr_internal_define(attr_name, type); end + + # source://activesupport//lib/active_support/core_ext/module/attr_internal.rb#26 def attr_internal_ivar_name(attr); end class << self + # Returns the value of attribute attr_internal_naming_format. + # + # source://activesupport//lib/active_support/core_ext/module/attr_internal.rb#22 def attr_internal_naming_format; end + + # Sets the attribute attr_internal_naming_format + # + # @param value the value to set the attribute attr_internal_naming_format to. + # + # source://activesupport//lib/active_support/core_ext/module/attr_internal.rb#22 def attr_internal_naming_format=(_arg0); end end end +# = Bite-sized separation of concerns +# +# We often find ourselves with a medium-sized chunk of behavior that we'd +# like to extract, but only mix in to a single class. +# +# Extracting a plain old Ruby object to encapsulate it and collaborate or +# delegate to the original object is often a good choice, but when there's +# no additional state to encapsulate or we're making DSL-style declarations +# about the parent class, introducing new collaborators can obfuscate rather +# than simplify. +# +# The typical route is to just dump everything in a monolithic class, perhaps +# with a comment, as a least-bad alternative. Using modules in separate files +# means tedious sifting to get a big-picture view. +# +# = Dissatisfying ways to separate small concerns +# +# == Using comments: +# +# class Todo < ApplicationRecord +# # Other todo implementation +# # ... +# +# ## Event tracking +# has_many :events +# +# before_create :track_creation +# +# private +# def track_creation +# # ... +# end +# end +# +# == With an inline module: +# +# Noisy syntax. +# +# class Todo < ApplicationRecord +# # Other todo implementation +# # ... +# +# module EventTracking +# extend ActiveSupport::Concern +# +# included do +# has_many :events +# before_create :track_creation +# end +# +# private +# def track_creation +# # ... +# end +# end +# include EventTracking +# end +# +# == Mix-in noise exiled to its own file: +# +# Once our chunk of behavior starts pushing the scroll-to-understand-it +# boundary, we give in and move it to a separate file. At this size, the +# increased overhead can be a reasonable tradeoff even if it reduces our +# at-a-glance perception of how things work. +# +# class Todo < ApplicationRecord +# # Other todo implementation +# # ... +# +# include TodoEventTracking +# end +# +# = Introducing Module#concerning +# +# By quieting the mix-in noise, we arrive at a natural, low-ceremony way to +# separate bite-sized concerns. +# +# class Todo < ApplicationRecord +# # Other todo implementation +# # ... +# +# concerning :EventTracking do +# included do +# has_many :events +# before_create :track_creation +# end +# +# private +# def track_creation +# # ... +# end +# end +# end +# +# Todo.ancestors +# # => [Todo, Todo::EventTracking, ApplicationRecord, Object] +# +# This small step has some wonderful ripple effects. We can +# * grok the behavior of our class in one glance, +# * clean up monolithic junk-drawer classes by separating their concerns, and +# * stop leaning on protected/private for crude "this is internal stuff" modularity. +# +# === Prepending concerning +# +# concerning supports a prepend: true argument which will prepend the +# concern instead of using include for it. +# +# source://activesupport//lib/active_support/core_ext/module/concerning.rb#112 module Module::Concerning + # A low-cruft shortcut to define a concern. + # + # concern :EventTracking do + # ... + # end + # + # is equivalent to + # + # module EventTracking + # extend ActiveSupport::Concern + # + # ... + # end + # + # source://activesupport//lib/active_support/core_ext/module/concerning.rb#132 def concern(topic, &module_definition); end + + # Define a new concern and mix it in. + # + # source://activesupport//lib/active_support/core_ext/module/concerning.rb#114 def concerning(topic, prepend: T.unsafe(nil), &block); end end +# source://activesupport//lib/active_support/core_ext/module/delegation.rb#13 Module::DELEGATION_RESERVED_KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/core_ext/module/delegation.rb#14 Module::DELEGATION_RESERVED_METHOD_NAMES = T.let(T.unsafe(nil), Set) + +# Error generated by +delegate+ when a method is called on +nil+ and +allow_nil+ +# option is not used. +# +# source://activesupport//lib/active_support/core_ext/module/delegation.rb#8 class Module::DelegationError < ::NoMethodError; end + +# source://activesupport//lib/active_support/core_ext/module/delegation.rb#10 Module::RUBY_RESERVED_KEYWORDS = T.let(T.unsafe(nil), Array) +# source://activesupport//lib/active_support/core_ext/name_error.rb#3 class NameError < ::StandardError + include ::ErrorHighlight::CoreExt include ::DidYouMean::Correctable + # Extract the name of the missing constant from the exception message. + # + # begin + # HelloWorld + # rescue NameError => e + # e.missing_name + # end + # # => "HelloWorld" + # + # source://activesupport//lib/active_support/core_ext/name_error.rb#12 def missing_name; end + + # Was this exception raised because the given name was missing? + # + # begin + # HelloWorld + # rescue NameError => e + # e.missing_name?("HelloWorld") + # end + # # => true + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/name_error.rb#44 def missing_name?(name); end private + # source://activesupport//lib/active_support/core_ext/name_error.rb#57 def real_mod_name(mod); end end +# source://activesupport//lib/active_support/core_ext/name_error.rb#53 NameError::UNBOUND_METHOD_MODULE_NAME = T.let(T.unsafe(nil), UnboundMethod) +# source://activesupport//lib/active_support/core_ext/object/blank.rb#50 class NilClass - include ::JSON::Ext::Generator::GeneratorMethods::NilClass - include ::MessagePack::CoreExt - + # source://activesupport//lib/active_support/core_ext/object/json.rb#82 def as_json(options = T.unsafe(nil)); end + + # +nil+ is blank: + # + # nil.blank? # => true + # + # @return [true] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#56 def blank?; end + + # Returns +self+. + # + # source://activesupport//lib/active_support/core_ext/object/to_query.rb#20 def to_param; end + + # Calling +try+ on +nil+ always returns +nil+. + # It becomes especially helpful when navigating through associations that may return +nil+. + # + # nil.try(:name) # => nil + # + # Without +try+ + # @person && @person.children.any? && @person.children.first.name + # + # With +try+ + # @person.try(:children).try(:first).try(:name) + # + # source://activesupport//lib/active_support/core_ext/object/try.rb#148 def try(_method_name = T.unsafe(nil), *_arg1); end + + # Calling +try!+ on +nil+ always returns +nil+. + # + # nil.try!(:name) # => nil + # + # source://activesupport//lib/active_support/core_ext/object/try.rb#155 def try!(_method_name = T.unsafe(nil), *_arg1); end end +# source://activesupport//lib/active_support/core_ext/object/blank.rb#134 class Numeric include ::Comparable + # source://activesupport//lib/active_support/core_ext/object/json.rb#100 def as_json(options = T.unsafe(nil)); end + + # No number is blank: + # + # 1.blank? # => false + # 0.blank? # => false + # + # @return [false] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#141 def blank?; end + + # Enables the use of byte calculations and declarations, like 45.bytes + 2.6.megabytes + # + # 2.bytes # => 2 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#14 def byte; end + + # Enables the use of byte calculations and declarations, like 45.bytes + 2.6.megabytes + # + # 2.bytes # => 2 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#14 def bytes; end + + # Returns a Duration instance matching the number of days provided. + # + # 2.days # => 2 days + # + # source://activesupport//lib/active_support/core_ext/numeric/time.rb#37 def day; end + + # Returns a Duration instance matching the number of days provided. + # + # 2.days # => 2 days + # + # source://activesupport//lib/active_support/core_ext/numeric/time.rb#37 def days; end + + # Returns the number of bytes equivalent to the exabytes provided. + # + # 2.exabytes # => 2_305_843_009_213_693_952 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#62 def exabyte; end + + # Returns the number of bytes equivalent to the exabytes provided. + # + # 2.exabytes # => 2_305_843_009_213_693_952 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#62 def exabytes; end + + # Returns a Duration instance matching the number of fortnights provided. + # + # 2.fortnights # => 4 weeks + # + # source://activesupport//lib/active_support/core_ext/numeric/time.rb#53 def fortnight; end + + # Returns a Duration instance matching the number of fortnights provided. + # + # 2.fortnights # => 4 weeks + # + # source://activesupport//lib/active_support/core_ext/numeric/time.rb#53 def fortnights; end + + # Returns the number of bytes equivalent to the gigabytes provided. + # + # 2.gigabytes # => 2_147_483_648 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#38 def gigabyte; end + + # Returns the number of bytes equivalent to the gigabytes provided. + # + # 2.gigabytes # => 2_147_483_648 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#38 def gigabytes; end + + # Returns a Duration instance matching the number of hours provided. + # + # 2.hours # => 2 hours + # + # source://activesupport//lib/active_support/core_ext/numeric/time.rb#29 def hour; end + + # Returns a Duration instance matching the number of hours provided. + # + # 2.hours # => 2 hours + # + # source://activesupport//lib/active_support/core_ext/numeric/time.rb#29 def hours; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#156 def html_safe?; end + + # Returns the number of milliseconds equivalent to the seconds provided. + # Used with the standard time durations. + # + # 2.in_milliseconds # => 2000 + # 1.hour.in_milliseconds # => 3600000 + # + # source://activesupport//lib/active_support/core_ext/numeric/time.rb#63 def in_milliseconds; end + + # Returns the number of bytes equivalent to the kilobytes provided. + # + # 2.kilobytes # => 2048 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#22 def kilobyte; end + + # Returns the number of bytes equivalent to the kilobytes provided. + # + # 2.kilobytes # => 2048 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#22 def kilobytes; end + + # Returns the number of bytes equivalent to the megabytes provided. + # + # 2.megabytes # => 2_097_152 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#30 def megabyte; end + + # Returns the number of bytes equivalent to the megabytes provided. + # + # 2.megabytes # => 2_097_152 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#30 def megabytes; end + + # Returns a Duration instance matching the number of minutes provided. + # + # 2.minutes # => 2 minutes + # + # source://activesupport//lib/active_support/core_ext/numeric/time.rb#21 def minute; end + + # Returns a Duration instance matching the number of minutes provided. + # + # 2.minutes # => 2 minutes + # + # source://activesupport//lib/active_support/core_ext/numeric/time.rb#21 def minutes; end + + # Returns the number of bytes equivalent to the petabytes provided. + # + # 2.petabytes # => 2_251_799_813_685_248 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#54 def petabyte; end + + # Returns the number of bytes equivalent to the petabytes provided. + # + # 2.petabytes # => 2_251_799_813_685_248 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#54 def petabytes; end + + # Returns a Duration instance matching the number of seconds provided. + # + # 2.seconds # => 2 seconds + # + # source://activesupport//lib/active_support/core_ext/numeric/time.rb#13 def second; end + + # Returns a Duration instance matching the number of seconds provided. + # + # 2.seconds # => 2 seconds + # + # source://activesupport//lib/active_support/core_ext/numeric/time.rb#13 def seconds; end + + # Returns the number of bytes equivalent to the terabytes provided. + # + # 2.terabytes # => 2_199_023_255_552 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#46 def terabyte; end + + # Returns the number of bytes equivalent to the terabytes provided. + # + # 2.terabytes # => 2_199_023_255_552 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#46 def terabytes; end + + # Returns a Duration instance matching the number of weeks provided. + # + # 2.weeks # => 2 weeks + # + # source://activesupport//lib/active_support/core_ext/numeric/time.rb#45 def week; end + + # Returns a Duration instance matching the number of weeks provided. + # + # 2.weeks # => 2 weeks + # + # source://activesupport//lib/active_support/core_ext/numeric/time.rb#45 def weeks; end end +# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#9 Numeric::EXABYTE = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#6 Numeric::GIGABYTE = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#4 Numeric::KILOBYTE = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#5 Numeric::MEGABYTE = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#8 Numeric::PETABYTE = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#7 Numeric::TERABYTE = T.let(T.unsafe(nil), Integer) +# -- +# Most objects are cloneable, but not all. For example you can't dup methods: +# +# method(:puts).dup # => TypeError: allocator undefined for Method +# +# Classes may signal their instances are not duplicable removing +dup+/+clone+ +# or raising exceptions from them. So, to dup an arbitrary object you normally +# use an optimistic approach and are ready to catch an exception, say: +# +# arbitrary_object.dup rescue object +# +# Rails dups objects in a few critical spots where they are not that arbitrary. +# That rescue is very expensive (like 40 times slower than a predicate), and it +# is often triggered. +# +# That's why we hardcode the following cases and check duplicable? instead of +# using that rescue idiom. +# ++ +# +# source://activesupport//lib/active_support/core_ext/object/blank.rb#5 class Object < ::BasicObject include ::ActiveSupport::ToJsonWithActiveSupportEncoder include ::ActiveSupport::ForkTracker::CoreExt include ::ActiveSupport::ForkTracker::CoreExtPrivate include ::Kernel - include ::JSON::Ext::Generator::GeneratorMethods::Object include ::PP::ObjectMixin include ::ActiveSupport::Tryable include ::ActiveSupport::Dependencies::Loadable + # A duck-type assistant method. For example, Active Support extends Date + # to define an acts_like_date? method, and extends Time to define + # acts_like_time?. As a result, we can do x.acts_like?(:time) and + # x.acts_like?(:date) to do duck-type-safe comparisons, since classes that + # we want to act like Time simply need to define an acts_like_time? method. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/object/acts_like.rb#9 def acts_like?(duck); end + + # source://activesupport//lib/active_support/core_ext/object/json.rb#54 def as_json(options = T.unsafe(nil)); end + + # An object is blank if it's false, empty, or a whitespace string. + # For example, +nil+, '', ' ', [], {}, and +false+ are all blank. + # + # This simplifies + # + # !address || address.empty? + # + # to + # + # address.blank? + # + # @return [true, false] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#18 def blank?; end + + # Returns a deep copy of object if it's duplicable. If it's + # not duplicable, returns +self+. + # + # object = Object.new + # dup = object.deep_dup + # dup.instance_variable_set(:@a, 1) + # + # object.instance_variable_defined?(:@a) # => false + # dup.instance_variable_defined?(:@a) # => true + # + # source://activesupport//lib/active_support/core_ext/object/deep_dup.rb#15 def deep_dup; end + + # Can you safely dup this object? + # + # False for method objects; + # true otherwise. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/object/duplicable.rb#26 def duplicable?; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#150 def html_safe?; end + + # Returns true if this object is included in the argument. Argument must be + # any object which responds to +#include?+. Usage: + # + # characters = ["Konata", "Kagami", "Tsukasa"] + # "Konata".in?(characters) # => true + # + # This will throw an +ArgumentError+ if the argument doesn't respond + # to +#include?+. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/object/inclusion.rb#12 def in?(another_object); end + + # Returns a hash with string keys that maps instance variable names without "@" to their + # corresponding values. + # + # class C + # def initialize(x, y) + # @x, @y = x, y + # end + # end + # + # C.new(0, 1).instance_values # => {"x" => 0, "y" => 1} + # + # source://activesupport//lib/active_support/core_ext/object/instance_variables.rb#14 def instance_values; end + + # Returns an array of instance variable names as strings including "@". + # + # class C + # def initialize(x, y) + # @x, @y = x, y + # end + # end + # + # C.new(0, 1).instance_variable_names # => ["@y", "@x"] + # + # source://activesupport//lib/active_support/core_ext/object/instance_variables.rb#27 def instance_variable_names; end + + # Returns the receiver if it's present otherwise returns +nil+. + # object.presence is equivalent to + # + # object.present? ? object : nil + # + # For example, something like + # + # state = params[:state] if params[:state].present? + # country = params[:country] if params[:country].present? + # region = state || country || 'US' + # + # becomes + # + # region = params[:state].presence || params[:country].presence || 'US' + # + # @return [Object] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#45 def presence; end + + # Returns the receiver if it's included in the argument otherwise returns +nil+. + # Argument must be any object which responds to +#include?+. Usage: + # + # params[:bucket_type].presence_in %w( project calendar ) + # + # This will throw an +ArgumentError+ if the argument doesn't respond to +#include?+. + # + # @return [Object] + # + # source://activesupport//lib/active_support/core_ext/object/inclusion.rb#26 def presence_in(another_object); end + + # An object is present if it's not blank. + # + # @return [true, false] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#25 def present?; end + + # Alias of to_s. + # + # source://activesupport//lib/active_support/core_ext/object/to_query.rb#7 def to_param; end + + # Converts an object into a string suitable for use as a URL query string, + # using the given key as the param name. + # + # source://activesupport//lib/active_support/core_ext/object/to_query.rb#13 def to_query(key); end + + # An elegant way to factor duplication out of options passed to a series of + # method calls. Each method called in the block, with the block variable as + # the receiver, will have its options merged with the default +options+ hash + # provided. Each method called on the block variable must take an options + # hash as its final argument. + # + # Without with_options, this code contains duplication: + # + # class Account < ActiveRecord::Base + # has_many :customers, dependent: :destroy + # has_many :products, dependent: :destroy + # has_many :invoices, dependent: :destroy + # has_many :expenses, dependent: :destroy + # end + # + # Using with_options, we can remove the duplication: + # + # class Account < ActiveRecord::Base + # with_options dependent: :destroy do |assoc| + # assoc.has_many :customers + # assoc.has_many :products + # assoc.has_many :invoices + # assoc.has_many :expenses + # end + # end + # + # It can also be used with an explicit receiver: + # + # I18n.with_options locale: user.locale, scope: 'newsletter' do |i18n| + # subject i18n.t :subject + # body i18n.t :body, user_name: user.name + # end + # + # When you don't pass an explicit receiver, it executes the whole block + # in merging options context: + # + # class Account < ActiveRecord::Base + # with_options dependent: :destroy do + # has_many :customers + # has_many :products + # has_many :invoices + # has_many :expenses + # end + # end + # + # with_options can also be nested since the call is forwarded to its receiver. + # + # NOTE: Each nesting level will merge inherited defaults in addition to their own. + # + # class Post < ActiveRecord::Base + # with_options if: :persisted?, length: { minimum: 50 } do + # validates :content, if: -> { content.present? } + # end + # end + # + # The code is equivalent to: + # + # validates :content, length: { minimum: 50 }, if: -> { content.present? } + # + # Hence the inherited default for +if+ key is ignored. + # + # NOTE: You cannot call class methods implicitly inside of with_options. + # You can access these methods using the class name instead: + # + # class Phone < ActiveRecord::Base + # enum phone_number_type: { home: 0, office: 1, mobile: 2 } + # + # with_options presence: true do + # validates :phone_number_type, inclusion: { in: Phone.phone_number_types.keys } + # end + # end + # + # source://activesupport//lib/active_support/core_ext/object/with_options.rb#78 def with_options(options, &block); end end +# source://activesupport//lib/active_support/core_ext/object/json.rb#217 class Pathname + # source://activesupport//lib/active_support/core_ext/object/json.rb#218 def as_json(options = T.unsafe(nil)); end end +module Process + class << self + # source://activesupport//lib/active_support/fork_tracker.rb#6 + def fork(*_arg0, **_arg1); end + end +end + +# source://activesupport//lib/active_support/core_ext/object/json.rb#229 class Process::Status + # source://activesupport//lib/active_support/core_ext/object/json.rb#230 def as_json(options = T.unsafe(nil)); end end +# source://activesupport//lib/active_support/core_ext/enumerable.rb#214 class Range include ::ActiveSupport::RangeWithFormat include ::ActiveSupport::CompareWithRange @@ -3617,248 +16779,1385 @@ class Range include ::ActiveSupport::EachTimeWithZone include ::Enumerable + # source://activesupport//lib/active_support/core_ext/range/compare_range.rb#16 + def ===(value); end + + # source://activesupport//lib/active_support/core_ext/object/json.rb#147 def as_json(options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/core_ext/range/compare_range.rb#66 + def cover?(value); end + + # source://activesupport//lib/active_support/core_ext/range/each.rb#7 + def each(&block); end + + # source://activesupport//lib/active_support/core_ext/range/include_time_with_zone.rb#12 + def include?(value); end + + # Compare two ranges and see if they overlap each other + # (1..5).overlaps?(4..6) # => true + # (1..5).overlaps?(7..9) # => false + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/range/overlaps.rb#7 def overlaps?(other); end + + # source://activesupport//lib/active_support/core_ext/range/each.rb#12 + def step(n = T.unsafe(nil), &block); end + + # Optimize range sum to use arithmetic progression if a block is not given and + # we have a range of numeric values. + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#217 def sum(identity = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/core_ext/range/conversions.rb#28 + def to_default_s(format = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/core_ext/range/conversions.rb#28 + def to_formatted_s(format = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/core_ext/range/conversions.rb#28 + def to_s(format = T.unsafe(nil)); end end +# source://activesupport//lib/active_support/core_ext/object/json.rb#128 class Regexp + # source://activesupport//lib/active_support/core_ext/object/json.rb#129 def as_json(options = T.unsafe(nil)); end - def multiline?; end -end - -Regexp::TOKEN_KEYS = T.let(T.unsafe(nil), Array) - -class Regexp::Token < ::Struct - def conditional_level; end - def conditional_level=(_); end - def length; end - def level; end - def level=(_); end - def next; end - def next=(_arg0); end - def offset; end - def previous; end - def previous=(_arg0); end - def set_level; end - def set_level=(_); end - def te; end - def te=(_); end - def text; end - def text=(_); end - def token; end - def token=(_); end - def ts; end - def ts=(_); end - def type; end - def type=(_); end - class << self - def [](*_arg0); end - def inspect; end - def members; end - def new(*_arg0); end - end + # Returns +true+ if the regexp has the multiline flag set. + # + # (/./).multiline? # => false + # (/./m).multiline? # => true + # + # Regexp.new(".").multiline? # => false + # Regexp.new(".", Regexp::MULTILINE).multiline? # => true + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/regexp.rb#11 + def multiline?; end end +# source://activesupport//lib/active_support/core_ext/securerandom.rb#5 module SecureRandom - extend ::Random::Formatter - class << self + # SecureRandom.base36 generates a random base36 string in lowercase. + # + # The argument _n_ specifies the length of the random string to be generated. + # + # If _n_ is not specified or is +nil+, 16 is assumed. It may be larger in the future. + # This method can be used over +base58+ if a deterministic case key is necessary. + # + # The result will contain alphanumeric characters in lowercase. + # + # p SecureRandom.base36 # => "4kugl2pdqmscqtje" + # p SecureRandom.base36(24) # => "77tmhrhjfvfdwodq8w7ev2m7" + # + # source://activesupport//lib/active_support/core_ext/securerandom.rb#38 def base36(n = T.unsafe(nil)); end + + # SecureRandom.base58 generates a random base58 string. + # + # The argument _n_ specifies the length of the random string to be generated. + # + # If _n_ is not specified or is +nil+, 16 is assumed. It may be larger in the future. + # + # The result may contain alphanumeric characters except 0, O, I and l. + # + # p SecureRandom.base58 # => "4kUgL2pdQMSCQtjE" + # p SecureRandom.base58(24) # => "77TMHrHJFvFDwodq8w7Ev2m7" + # + # source://activesupport//lib/active_support/core_ext/securerandom.rb#19 def base58(n = T.unsafe(nil)); end end end +# source://activesupport//lib/active_support/core_ext/securerandom.rb#7 SecureRandom::BASE36_ALPHABET = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/core_ext/securerandom.rb#6 SecureRandom::BASE58_ALPHABET = T.let(T.unsafe(nil), Array) +# String inflections define new methods on the String class to transform names for different purposes. +# For instance, you can figure out the name of a table from the name of a class. +# +# 'ScaleScore'.tableize # => "scale_scores" +# +# source://activesupport//lib/active_support/core_ext/string/multibyte.rb#5 class String include ::Comparable - include ::JSON::Ext::Generator::GeneratorMethods::String - include ::MessagePack::CoreExt - extend ::JSON::Ext::Generator::GeneratorMethods::String::Extend + # Enables more predictable duck-typing on String-like classes. See Object#acts_like?. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/string/behavior.rb#5 def acts_like_string?; end + + # source://activesupport//lib/active_support/core_ext/object/json.rb#88 def as_json(options = T.unsafe(nil)); end + + # If you pass a single integer, returns a substring of one character at that + # position. The first character of the string is at position 0, the next at + # position 1, and so on. If a range is supplied, a substring containing + # characters at offsets given by the range is returned. In both cases, if an + # offset is negative, it is counted from the end of the string. Returns +nil+ + # if the initial offset falls outside the string. Returns an empty string if + # the beginning of the range is greater than the end of the string. + # + # str = "hello" + # str.at(0) # => "h" + # str.at(1..3) # => "ell" + # str.at(-2) # => "l" + # str.at(-2..-1) # => "lo" + # str.at(5) # => nil + # str.at(5..-1) # => "" + # + # If a Regexp is given, the matching portion of the string is returned. + # If a String is given, that given string is returned if it occurs in + # the string. In both cases, +nil+ is returned if there is no match. + # + # str = "hello" + # str.at(/lo/) # => "lo" + # str.at(/ol/) # => nil + # str.at("lo") # => "lo" + # str.at("ol") # => nil + # + # source://activesupport//lib/active_support/core_ext/string/access.rb#29 def at(position); end + + # A string is blank if it's empty or contains whitespaces only: + # + # ''.blank? # => true + # ' '.blank? # => true + # "\t\n\r".blank? # => true + # ' blah '.blank? # => false + # + # Unicode whitespace is supported: + # + # "\u00a0".blank? # => true + # + # @return [true, false] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#121 def blank?; end + + # By default, +camelize+ converts strings to UpperCamelCase. If the argument to camelize + # is set to :lower then camelize produces lowerCamelCase. + # + # +camelize+ will also convert '/' to '::' which is useful for converting paths to namespaces. + # + # 'active_record'.camelize # => "ActiveRecord" + # 'active_record'.camelize(:lower) # => "activeRecord" + # 'active_record/errors'.camelize # => "ActiveRecord::Errors" + # 'active_record/errors'.camelize(:lower) # => "activeRecord::Errors" + # + # +camelize+ is also aliased as +camelcase+. + # + # See ActiveSupport::Inflector.camelize. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#103 def camelcase(first_letter = T.unsafe(nil)); end + + # By default, +camelize+ converts strings to UpperCamelCase. If the argument to camelize + # is set to :lower then camelize produces lowerCamelCase. + # + # +camelize+ will also convert '/' to '::' which is useful for converting paths to namespaces. + # + # 'active_record'.camelize # => "ActiveRecord" + # 'active_record'.camelize(:lower) # => "activeRecord" + # 'active_record/errors'.camelize # => "ActiveRecord::Errors" + # 'active_record/errors'.camelize(:lower) # => "activeRecord::Errors" + # + # +camelize+ is also aliased as +camelcase+. + # + # See ActiveSupport::Inflector.camelize. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#103 def camelize(first_letter = T.unsafe(nil)); end + + # Creates a class name from a plural table name like Rails does for table names to models. + # Note that this returns a string and not a class. (To convert to an actual class + # follow +classify+ with +constantize+.) + # + # 'ham_and_eggs'.classify # => "HamAndEgg" + # 'posts'.classify # => "Post" + # + # See ActiveSupport::Inflector.classify. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#243 def classify; end + + # +constantize+ tries to find a declared constant with the name specified + # in the string. It raises a NameError when the name is not in CamelCase + # or is not initialized. + # + # 'Module'.constantize # => Module + # 'Class'.constantize # => Class + # 'blargle'.constantize # => NameError: wrong constant name blargle + # + # See ActiveSupport::Inflector.constantize. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#73 def constantize; end + + # Replaces underscores with dashes in the string. + # + # 'puni_puni'.dasherize # => "puni-puni" + # + # See ActiveSupport::Inflector.dasherize. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#152 def dasherize; end + + # Removes the rightmost segment from the constant expression in the string. + # + # 'Net::HTTP'.deconstantize # => "Net" + # '::Net::HTTP'.deconstantize # => "::Net" + # 'String'.deconstantize # => "" + # '::String'.deconstantize # => "" + # ''.deconstantize # => "" + # + # See ActiveSupport::Inflector.deconstantize. + # + # See also +demodulize+. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#181 def deconstantize; end + + # Removes the module part from the constant expression in the string. + # + # 'ActiveSupport::Inflector::Inflections'.demodulize # => "Inflections" + # 'Inflections'.demodulize # => "Inflections" + # '::Inflections'.demodulize # => "Inflections" + # ''.demodulize # => '' + # + # See ActiveSupport::Inflector.demodulize. + # + # See also +deconstantize+. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#166 def demodulize; end + + # The inverse of String#include?. Returns true if the string + # does not include the other string. + # + # "hello".exclude? "lo" # => false + # "hello".exclude? "ol" # => true + # "hello".exclude? ?h # => false + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/string/exclude.rb#10 def exclude?(string); end + + # Returns the first character. If a limit is supplied, returns a substring + # from the beginning of the string until it reaches the limit value. If the + # given limit is greater than or equal to the string length, returns a copy of self. + # + # str = "hello" + # str.first # => "h" + # str.first(1) # => "h" + # str.first(2) # => "he" + # str.first(0) # => "" + # str.first(6) # => "hello" + # + # source://activesupport//lib/active_support/core_ext/string/access.rb#78 def first(limit = T.unsafe(nil)); end + + # Creates a foreign key name from a class name. + # +separate_class_name_and_id_with_underscore+ sets whether + # the method should put '_' between the name and 'id'. + # + # 'Message'.foreign_key # => "message_id" + # 'Message'.foreign_key(false) # => "messageid" + # 'Admin::Post'.foreign_key # => "post_id" + # + # See ActiveSupport::Inflector.foreign_key. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#290 def foreign_key(separate_class_name_and_id_with_underscore = T.unsafe(nil)); end + + # Returns a substring from the given position to the end of the string. + # If the position is negative, it is counted from the end of the string. + # + # str = "hello" + # str.from(0) # => "hello" + # str.from(3) # => "lo" + # str.from(-2) # => "lo" + # + # You can mix it with +to+ method and do fun things like: + # + # str = "hello" + # str.from(0).to(-1) # => "hello" + # str.from(1).to(-2) # => "ell" + # + # source://activesupport//lib/active_support/core_ext/string/access.rb#46 def from(position); end + + # Marks a string as trusted safe. It will be inserted into HTML with no + # additional escaping performed. It is your responsibility to ensure that the + # string contains no malicious content. This method is equivalent to the + # +raw+ helper in views. It is recommended that you use +sanitize+ instead of + # this method. It should never be called on user input. + # + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#344 def html_safe; end + + # Capitalizes the first word, turns underscores into spaces, and (by default)strips a + # trailing '_id' if present. + # Like +titleize+, this is meant for creating pretty output. + # + # The capitalization of the first word can be turned off by setting the + # optional parameter +capitalize+ to false. + # By default, this parameter is true. + # + # The trailing '_id' can be kept and capitalized by setting the + # optional parameter +keep_id_suffix+ to true. + # By default, this parameter is false. + # + # 'employee_salary'.humanize # => "Employee salary" + # 'author_id'.humanize # => "Author" + # 'author_id'.humanize(capitalize: false) # => "author" + # '_id'.humanize # => "Id" + # 'author_id'.humanize(keep_id_suffix: true) # => "Author Id" + # + # See ActiveSupport::Inflector.humanize. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#266 def humanize(capitalize: T.unsafe(nil), keep_id_suffix: T.unsafe(nil)); end + + # Converts String to a TimeWithZone in the current zone if Time.zone or Time.zone_default + # is set, otherwise converts String to a Time via String#to_time + # + # source://activesupport//lib/active_support/core_ext/string/zones.rb#9 def in_time_zone(zone = T.unsafe(nil)); end + + # Indents the lines in the receiver: + # + # < + # def some_method + # some_code + # end + # + # The second argument, +indent_string+, specifies which indent string to + # use. The default is +nil+, which tells the method to make a guess by + # peeking at the first indented line, and fallback to a space if there is + # none. + # + # " foo".indent(2) # => " foo" + # "foo\n\t\tbar".indent(2) # => "\t\tfoo\n\t\t\t\tbar" + # "foo".indent(2, "\t") # => "\t\tfoo" + # + # While +indent_string+ is typically one space or tab, it may be any string. + # + # The third argument, +indent_empty_lines+, is a flag that says whether + # empty lines should be indented. Default is false. + # + # "foo\n\nbar".indent(2) # => " foo\n\n bar" + # "foo\n\nbar".indent(2, nil, true) # => " foo\n \n bar" + # + # source://activesupport//lib/active_support/core_ext/string/indent.rb#42 def indent(amount, indent_string = T.unsafe(nil), indent_empty_lines = T.unsafe(nil)); end + + # Same as +indent+, except it indents the receiver in-place. + # + # Returns the indented string, or +nil+ if there was nothing to indent. + # + # source://activesupport//lib/active_support/core_ext/string/indent.rb#7 def indent!(amount, indent_string = T.unsafe(nil), indent_empty_lines = T.unsafe(nil)); end + + # Wraps the current string in the ActiveSupport::StringInquirer class, + # which gives you a prettier way to test for equality. + # + # env = 'production'.inquiry + # env.production? # => true + # env.development? # => false + # + # source://activesupport//lib/active_support/core_ext/string/inquiry.rb#13 def inquiry; end + + # Returns +true+ if string has utf_8 encoding. + # + # utf_8_str = "some string".encode "UTF-8" + # iso_str = "some string".encode "ISO-8859-1" + # + # utf_8_str.is_utf8? # => true + # iso_str.is_utf8? # => false + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/string/multibyte.rb#48 def is_utf8?; end + + # Returns the last character of the string. If a limit is supplied, returns a substring + # from the end of the string until it reaches the limit value (counting backwards). If + # the given limit is greater than or equal to the string length, returns a copy of self. + # + # str = "hello" + # str.last # => "o" + # str.last(1) # => "o" + # str.last(2) # => "lo" + # str.last(0) # => "" + # str.last(6) # => "hello" + # + # source://activesupport//lib/active_support/core_ext/string/access.rb#92 def last(limit = T.unsafe(nil)); end + + # == Multibyte proxy + # + # +mb_chars+ is a multibyte safe proxy for string methods. + # + # It creates and returns an instance of the ActiveSupport::Multibyte::Chars class which + # encapsulates the original string. A Unicode safe version of all the String methods are defined on this proxy + # class. If the proxy class doesn't respond to a certain method, it's forwarded to the encapsulated string. + # + # >> "lj".mb_chars.upcase.to_s + # => "LJ" + # + # NOTE: Ruby 2.4 and later support native Unicode case mappings: + # + # >> "lj".upcase + # => "LJ" + # + # == Method chaining + # + # All the methods on the Chars proxy which normally return a string will return a Chars object. This allows + # method chaining on the result of any of these methods. + # + # name.mb_chars.reverse.length # => 12 + # + # == Interoperability and configuration + # + # The Chars object tries to be as interchangeable with String objects as possible: sorting and comparing between + # String and Char work like expected. The bang! methods change the internal string representation in the Chars + # object. Interoperability problems can be resolved easily with a +to_s+ call. + # + # For more information about the methods defined on the Chars proxy see ActiveSupport::Multibyte::Chars. For + # information about how to change the default Multibyte behavior see ActiveSupport::Multibyte. + # + # source://activesupport//lib/active_support/core_ext/string/multibyte.rb#37 def mb_chars; end + + # Replaces special characters in a string so that it may be used as part of a 'pretty' URL. + # + # If the optional parameter +locale+ is specified, + # the word will be parameterized as a word of that language. + # By default, this parameter is set to nil and it will use + # the configured I18n.locale. + # + # class Person + # def to_param + # "#{id}-#{name.parameterize}" + # end + # end + # + # @person = Person.find(1) + # # => # + # + # <%= link_to(@person.name, person_path) %> + # # => Donald E. Knuth + # + # To preserve the case of the characters in a string, use the +preserve_case+ argument. + # + # class Person + # def to_param + # "#{id}-#{name.parameterize(preserve_case: true)}" + # end + # end + # + # @person = Person.find(1) + # # => # + # + # <%= link_to(@person.name, person_path) %> + # # => Donald E. Knuth + # + # See ActiveSupport::Inflector.parameterize. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#219 def parameterize(separator: T.unsafe(nil), preserve_case: T.unsafe(nil), locale: T.unsafe(nil)); end + + # Returns the plural form of the word in the string. + # + # If the optional parameter +count+ is specified, + # the singular form will be returned if count == 1. + # For any other value of +count+ the plural will be returned. + # + # If the optional parameter +locale+ is specified, + # the word will be pluralized as a word of that language. + # By default, this parameter is set to :en. + # You must define your own inflection rules for languages other than English. + # + # 'post'.pluralize # => "posts" + # 'octopus'.pluralize # => "octopi" + # 'sheep'.pluralize # => "sheep" + # 'words'.pluralize # => "words" + # 'the blue mailman'.pluralize # => "the blue mailmen" + # 'CamelOctopus'.pluralize # => "CamelOctopi" + # 'apple'.pluralize(1) # => "apple" + # 'apple'.pluralize(2) # => "apples" + # 'ley'.pluralize(:es) # => "leyes" + # 'ley'.pluralize(1, :es) # => "ley" + # + # See ActiveSupport::Inflector.pluralize. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#35 def pluralize(count = T.unsafe(nil), locale = T.unsafe(nil)); end + + # Returns a new string with all occurrences of the patterns removed. + # str = "foo bar test" + # str.remove(" test") # => "foo bar" + # str.remove(" test", /bar/) # => "foo " + # str # => "foo bar test" + # + # source://activesupport//lib/active_support/core_ext/string/filters.rb#32 def remove(*patterns); end + + # Alters the string by removing all occurrences of the patterns. + # str = "foo bar test" + # str.remove!(" test", /bar/) # => "foo " + # str # => "foo " + # + # source://activesupport//lib/active_support/core_ext/string/filters.rb#40 def remove!(*patterns); end + + # +safe_constantize+ tries to find a declared constant with the name specified + # in the string. It returns +nil+ when the name is not in CamelCase + # or is not initialized. + # + # 'Module'.safe_constantize # => Module + # 'Class'.safe_constantize # => Class + # 'blargle'.safe_constantize # => nil + # + # See ActiveSupport::Inflector.safe_constantize. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#86 def safe_constantize; end + + # The reverse of +pluralize+, returns the singular form of a word in a string. + # + # If the optional parameter +locale+ is specified, + # the word will be singularized as a word of that language. + # By default, this parameter is set to :en. + # You must define your own inflection rules for languages other than English. + # + # 'posts'.singularize # => "post" + # 'octopi'.singularize # => "octopus" + # 'sheep'.singularize # => "sheep" + # 'word'.singularize # => "word" + # 'the blue mailmen'.singularize # => "the blue mailman" + # 'CamelOctopi'.singularize # => "CamelOctopus" + # 'leyes'.singularize(:es) # => "ley" + # + # See ActiveSupport::Inflector.singularize. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#60 def singularize(locale = T.unsafe(nil)); end + + # Returns the string, first removing all whitespace on both ends of + # the string, and then changing remaining consecutive whitespace + # groups into one space each. + # + # Note that it handles both ASCII and Unicode whitespace. + # + # %{ Multi-line + # string }.squish # => "Multi-line string" + # " foo bar \n \t boo".squish # => "foo bar boo" + # + # source://activesupport//lib/active_support/core_ext/string/filters.rb#13 def squish; end + + # Performs a destructive squish. See String#squish. + # str = " foo bar \n \t boo" + # str.squish! # => "foo bar boo" + # str # => "foo bar boo" + # + # source://activesupport//lib/active_support/core_ext/string/filters.rb#21 def squish!; end + + # Strips indentation in heredocs. + # + # For example in + # + # if options[:usage] + # puts <<-USAGE.strip_heredoc + # This command does such and such. + # + # Supported options are: + # -h This message + # ... + # USAGE + # end + # + # the user would see the usage message aligned against the left margin. + # + # Technically, it looks for the least indented non-empty line + # in the whole string, and removes that amount of leading whitespace. + # + # source://activesupport//lib/active_support/core_ext/string/strip.rb#22 def strip_heredoc; end + + # Creates the name of a table like Rails does for models to table names. This method + # uses the +pluralize+ method on the last word in the string. + # + # 'RawScaledScorer'.tableize # => "raw_scaled_scorers" + # 'ham_and_egg'.tableize # => "ham_and_eggs" + # 'fancyCategory'.tableize # => "fancy_categories" + # + # See ActiveSupport::Inflector.tableize. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#231 def tableize; end + + # Capitalizes all the words and replaces some characters in the string to create + # a nicer looking title. +titleize+ is meant for creating pretty output. It is not + # used in the Rails internals. + # + # The trailing '_id','Id'.. can be kept and capitalized by setting the + # optional parameter +keep_id_suffix+ to true. + # By default, this parameter is false. + # + # 'man from the boondocks'.titleize # => "Man From The Boondocks" + # 'x-men: the last stand'.titleize # => "X Men: The Last Stand" + # 'string_ending_with_id'.titleize(keep_id_suffix: true) # => "String Ending With Id" + # + # +titleize+ is also aliased as +titlecase+. + # + # See ActiveSupport::Inflector.titleize. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#130 def titlecase(keep_id_suffix: T.unsafe(nil)); end + + # Capitalizes all the words and replaces some characters in the string to create + # a nicer looking title. +titleize+ is meant for creating pretty output. It is not + # used in the Rails internals. + # + # The trailing '_id','Id'.. can be kept and capitalized by setting the + # optional parameter +keep_id_suffix+ to true. + # By default, this parameter is false. + # + # 'man from the boondocks'.titleize # => "Man From The Boondocks" + # 'x-men: the last stand'.titleize # => "X Men: The Last Stand" + # 'string_ending_with_id'.titleize(keep_id_suffix: true) # => "String Ending With Id" + # + # +titleize+ is also aliased as +titlecase+. + # + # See ActiveSupport::Inflector.titleize. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#130 def titleize(keep_id_suffix: T.unsafe(nil)); end + + # Returns a substring from the beginning of the string to the given position. + # If the position is negative, it is counted from the end of the string. + # + # str = "hello" + # str.to(0) # => "h" + # str.to(3) # => "hell" + # str.to(-2) # => "hell" + # + # You can mix it with +from+ method and do fun things like: + # + # str = "hello" + # str.from(0).to(-1) # => "hello" + # str.from(1).to(-2) # => "ell" + # + # source://activesupport//lib/active_support/core_ext/string/access.rb#63 def to(position); end + + # Converts a string to a Date value. + # + # "1-1-2012".to_date # => Sun, 01 Jan 2012 + # "01/01/2012".to_date # => Sun, 01 Jan 2012 + # "2012-12-13".to_date # => Thu, 13 Dec 2012 + # "12/13/2012".to_date # => ArgumentError: invalid date + # + # source://activesupport//lib/active_support/core_ext/string/conversions.rb#47 def to_date; end + + # Converts a string to a DateTime value. + # + # "1-1-2012".to_datetime # => Sun, 01 Jan 2012 00:00:00 +0000 + # "01/01/2012 23:59:59".to_datetime # => Sun, 01 Jan 2012 23:59:59 +0000 + # "2012-12-13 12:50".to_datetime # => Thu, 13 Dec 2012 12:50:00 +0000 + # "12/13/2012".to_datetime # => ArgumentError: invalid date + # + # source://activesupport//lib/active_support/core_ext/string/conversions.rb#57 def to_datetime; end + + # Converts a string to a Time value. + # The +form+ can be either :utc or :local (default :local). + # + # The time is parsed using Time.parse method. + # If +form+ is :local, then the time is in the system timezone. + # If the date part is missing then the current date is used and if + # the time part is missing then it is assumed to be 00:00:00. + # + # "13-12-2012".to_time # => 2012-12-13 00:00:00 +0100 + # "06:12".to_time # => 2012-12-13 06:12:00 +0100 + # "2012-12-13 06:12".to_time # => 2012-12-13 06:12:00 +0100 + # "2012-12-13T06:12".to_time # => 2012-12-13 06:12:00 +0100 + # "2012-12-13T06:12".to_time(:utc) # => 2012-12-13 06:12:00 UTC + # "12/13/2012".to_time # => ArgumentError: argument out of range + # "1604326192".to_time # => ArgumentError: argument out of range + # + # source://activesupport//lib/active_support/core_ext/string/conversions.rb#22 def to_time(form = T.unsafe(nil)); end + + # Truncates a given +text+ after a given length if +text+ is longer than length: + # + # 'Once upon a time in a world far far away'.truncate(27) + # # => "Once upon a time in a wo..." + # + # Pass a string or regexp :separator to truncate +text+ at a natural break: + # + # 'Once upon a time in a world far far away'.truncate(27, separator: ' ') + # # => "Once upon a time in a..." + # + # 'Once upon a time in a world far far away'.truncate(27, separator: /\s/) + # # => "Once upon a time in a..." + # + # The last characters will be replaced with the :omission string (defaults to "...") + # for a total length not exceeding length: + # + # 'And they found that many people were sleeping better.'.truncate(25, omission: '... (continued)') + # # => "And they f... (continued)" + # + # source://activesupport//lib/active_support/core_ext/string/filters.rb#66 def truncate(truncate_at, options = T.unsafe(nil)); end + + # Truncates +text+ to at most bytesize bytes in length without + # breaking string encoding by splitting multibyte characters or breaking + # grapheme clusters ("perceptual characters") by truncating at combining + # characters. + # + # >> "🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪".size + # => 20 + # >> "🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪".bytesize + # => 80 + # >> "🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪".truncate_bytes(20) + # => "🔪🔪🔪🔪…" + # + # The truncated text ends with the :omission string, defaulting + # to "…", for a total length not exceeding bytesize. + # + # source://activesupport//lib/active_support/core_ext/string/filters.rb#95 def truncate_bytes(truncate_at, omission: T.unsafe(nil)); end + + # Truncates a given +text+ after a given number of words (words_count): + # + # 'Once upon a time in a world far far away'.truncate_words(4) + # # => "Once upon a time..." + # + # Pass a string or regexp :separator to specify a different separator of words: + # + # 'Once
upon
a
time
in
a
world'.truncate_words(5, separator: '
') + # # => "Once
upon
a
time
in..." + # + # The last characters will be replaced with the :omission string (defaults to "..."): + # + # 'And they found that many people were sleeping better.'.truncate_words(5, omission: '... (continued)') + # # => "And they found that many... (continued)" + # + # source://activesupport//lib/active_support/core_ext/string/filters.rb#136 def truncate_words(words_count, options = T.unsafe(nil)); end + + # The reverse of +camelize+. Makes an underscored, lowercase form from the expression in the string. + # + # +underscore+ will also change '::' to '/' to convert namespaces to paths. + # + # 'ActiveModel'.underscore # => "active_model" + # 'ActiveModel::Errors'.underscore # => "active_model/errors" + # + # See ActiveSupport::Inflector.underscore. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#143 def underscore; end + + # Converts just the first character to uppercase. + # + # 'what a Lovely Day'.upcase_first # => "What a Lovely Day" + # 'w'.upcase_first # => "W" + # ''.upcase_first # => "" + # + # See ActiveSupport::Inflector.upcase_first. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#277 def upcase_first; end end +# source://activesupport//lib/active_support/core_ext/object/blank.rb#104 String::BLANK_RE = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/core_ext/object/blank.rb#105 String::ENCODED_BLANKS = T.let(T.unsafe(nil), Concurrent::Map) +# source://activesupport//lib/active_support/core_ext/object/json.rb#63 class Struct include ::Enumerable + # source://activesupport//lib/active_support/core_ext/object/json.rb#64 def as_json(options = T.unsafe(nil)); end end -Struct::Group = Etc::Group -Struct::Passwd = Etc::Passwd -Struct::Tms = Process::Tms - +# source://activesupport//lib/active_support/core_ext/symbol/starts_ends_with.rb#3 class Symbol include ::Comparable - include ::MessagePack::CoreExt + # source://activesupport//lib/active_support/core_ext/object/json.rb#94 def as_json(options = T.unsafe(nil)); end - def end_with?(*suffixes); end - def ends_with?(*suffixes); end - def start_with?(*prefixes); end - def starts_with?(*prefixes); end end +# source://activesupport//lib/active_support/core_ext/object/blank.rb#146 class Time include ::Comparable include ::DateAndTime::Zones include ::DateAndTime::Calculations include ::DateAndTime::Compatibility + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#281 def +(other); end + + # Time#- can also be used to determine the number of seconds between two Time instances. + # We're layering on additional behavior so that ActiveSupport::TimeWithZone instances + # are coerced into values that Time#- will recognize + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#304 def -(other); end + + # Layers additional behavior on Time#<=> so that DateTime and ActiveSupport::TimeWithZone instances + # can be chronologically compared with a Time + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#313 def <=>(other); end + + # Duck-types as a Time-like class. See Object#acts_like?. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/time/acts_like.rb#7 def acts_like_time?; end + + # Uses Date to provide precise Time calculations for years, months, and days + # according to the proleptic Gregorian calendar. The +options+ parameter + # takes a hash with any of these keys: :years, :months, + # :weeks, :days, :hours, :minutes, + # :seconds. + # + # Time.new(2015, 8, 1, 14, 35, 0).advance(seconds: 1) # => 2015-08-01 14:35:01 -0700 + # Time.new(2015, 8, 1, 14, 35, 0).advance(minutes: 1) # => 2015-08-01 14:36:00 -0700 + # Time.new(2015, 8, 1, 14, 35, 0).advance(hours: 1) # => 2015-08-01 15:35:00 -0700 + # Time.new(2015, 8, 1, 14, 35, 0).advance(days: 1) # => 2015-08-02 14:35:00 -0700 + # Time.new(2015, 8, 1, 14, 35, 0).advance(weeks: 1) # => 2015-08-08 14:35:00 -0700 + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#183 def advance(options); end + + # Returns a new Time representing the time a number of seconds ago, this is basically a wrapper around the Numeric extension + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#209 def ago(seconds); end + + # source://activesupport//lib/active_support/core_ext/object/json.rb#182 def as_json(options = T.unsafe(nil)); end + + # Returns a new Time representing the start of the day (0:00) + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#222 def at_beginning_of_day; end + + # Returns a new Time representing the start of the hour (x:00) + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#251 def at_beginning_of_hour; end + + # Returns a new Time representing the start of the minute (x:xx:00) + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#267 def at_beginning_of_minute; end + + # Returns a new Time representing the end of the day, 23:59:59.999999 + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#240 def at_end_of_day; end + + # Returns a new Time representing the end of the hour, x:59:59.999999 + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#257 def at_end_of_hour; end + + # Returns a new Time representing the end of the minute, x:xx:59.999999 + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#273 def at_end_of_minute; end + + # Returns a new Time representing the middle of the day (12:00) + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#230 def at_midday; end + + # Returns a new Time representing the middle of the day (12:00) + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#230 def at_middle_of_day; end + + # Returns a new Time representing the start of the day (0:00) + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#222 def at_midnight; end + + # Returns a new Time representing the middle of the day (12:00) + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#230 def at_noon; end + + # Returns a new Time representing the start of the day (0:00) + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#222 def beginning_of_day; end + + # Returns a new Time representing the start of the hour (x:00) + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#251 def beginning_of_hour; end + + # Returns a new Time representing the start of the minute (x:xx:00) + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#267 def beginning_of_minute; end + + # No Time is blank: + # + # Time.now.blank? # => false + # + # @return [false] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#152 def blank?; end - def ceil(precision = T.unsafe(nil)); end + + # Returns a new Time where one or more of the elements have been changed according + # to the +options+ parameter. The time options (:hour, :min, + # :sec, :usec, :nsec) reset cascadingly, so if only + # the hour is passed, then minute, sec, usec and nsec is set to 0. If the hour + # and minute is passed, then sec, usec and nsec is set to 0. The +options+ parameter + # takes a hash with any of these keys: :year, :month, :day, + # :hour, :min, :sec, :usec, :nsec, + # :offset. Pass either :usec or :nsec, not both. + # + # Time.new(2012, 8, 29, 22, 35, 0).change(day: 1) # => Time.new(2012, 8, 1, 22, 35, 0) + # Time.new(2012, 8, 29, 22, 35, 0).change(year: 1981, day: 1) # => Time.new(1981, 8, 1, 22, 35, 0) + # Time.new(2012, 8, 29, 22, 35, 0).change(year: 1981, hour: 0) # => Time.new(1981, 8, 29, 0, 0, 0) + # + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#139 def change(options); end + + # Layers additional behavior on Time#<=> so that DateTime and ActiveSupport::TimeWithZone instances + # can be chronologically compared with a Time + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#313 def compare_with_coercion(other); end + + # Returns a new Time representing the end of the day, 23:59:59.999999 + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#240 def end_of_day; end + + # Returns a new Time representing the end of the hour, x:59:59.999999 + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#257 def end_of_hour; end + + # Returns a new Time representing the end of the minute, x:xx:59.999999 + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#273 def end_of_minute; end + + # Layers additional behavior on Time#eql? so that ActiveSupport::TimeWithZone instances + # can be eql? to an equivalent Time + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#328 def eql?(other); end + + # Layers additional behavior on Time#eql? so that ActiveSupport::TimeWithZone instances + # can be eql? to an equivalent Time + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#328 def eql_with_coercion(other); end - def floor(precision = T.unsafe(nil)); end + + # Returns a formatted string of the offset from UTC, or an alternative + # string if the time zone is already UTC. + # + # Time.local(2000).formatted_offset # => "-06:00" + # Time.local(2000).formatted_offset(false) # => "-0600" + # + # source://activesupport//lib/active_support/core_ext/time/conversions.rb#68 def formatted_offset(colon = T.unsafe(nil), alternate_utc_string = T.unsafe(nil)); end + + # Returns a new Time representing the time a number of seconds since the instance time + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#214 def in(seconds); end + + # Returns a new Time representing the middle of the day (12:00) + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#230 def midday; end + + # Returns a new Time representing the middle of the day (12:00) + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#230 def middle_of_day; end + + # Returns a new Time representing the start of the day (0:00) + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#222 def midnight; end + + # Time#- can also be used to determine the number of seconds between two Time instances. + # We're layering on additional behavior so that ActiveSupport::TimeWithZone instances + # are coerced into values that Time#- will recognize + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#304 def minus_with_coercion(other); end + + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#291 def minus_with_duration(other); end + + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#291 def minus_without_coercion(other); end + + # Returns a new time the specified number of days in the future. + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#342 def next_day(days = T.unsafe(nil)); end + + # Returns a new time the specified number of months in the future. + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#352 def next_month(months = T.unsafe(nil)); end + + # Returns a new time the specified number of years in the future. + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#362 def next_year(years = T.unsafe(nil)); end + + # Returns a new Time representing the middle of the day (12:00) + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#230 def noon; end + + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#281 def plus_with_duration(other); end + + # Returns a new time the specified number of days ago. + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#337 def prev_day(days = T.unsafe(nil)); end + + # Returns a new time the specified number of months ago. + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#347 def prev_month(months = T.unsafe(nil)); end + + # Returns a new time the specified number of years ago. + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#357 def prev_year(years = T.unsafe(nil)); end + + # Returns the fraction of a second as a +Rational+ + # + # Time.new(2012, 8, 29, 0, 0, 0.5).sec_fraction # => (1/2) + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#108 def sec_fraction; end + + # Returns the number of seconds since 00:00:00. + # + # Time.new(2012, 8, 29, 0, 0, 0).seconds_since_midnight # => 0.0 + # Time.new(2012, 8, 29, 12, 34, 56).seconds_since_midnight # => 45296.0 + # Time.new(2012, 8, 29, 23, 59, 59).seconds_since_midnight # => 86399.0 + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#92 def seconds_since_midnight; end + + # Returns the number of seconds until 23:59:59. + # + # Time.new(2012, 8, 29, 0, 0, 0).seconds_until_end_of_day # => 86399 + # Time.new(2012, 8, 29, 12, 34, 56).seconds_until_end_of_day # => 41103 + # Time.new(2012, 8, 29, 23, 59, 59).seconds_until_end_of_day # => 0 + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#101 def seconds_until_end_of_day; end + + # Returns a new Time representing the time a number of seconds since the instance time + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#214 def since(seconds); end + + # Converts to a formatted string. See DATE_FORMATS for built-in formats. + # + # This method is aliased to to_s. + # + # time = Time.now # => 2007-01-18 06:10:17 -06:00 + # + # time.to_formatted_s(:time) # => "06:10" + # time.to_s(:time) # => "06:10" + # + # time.to_formatted_s(:db) # => "2007-01-18 06:10:17" + # time.to_formatted_s(:number) # => "20070118061017" + # time.to_formatted_s(:short) # => "18 Jan 06:10" + # time.to_formatted_s(:long) # => "January 18, 2007 06:10" + # time.to_formatted_s(:long_ordinal) # => "January 18th, 2007 06:10" + # time.to_formatted_s(:rfc822) # => "Thu, 18 Jan 2007 06:10:17 -0600" + # time.to_formatted_s(:iso8601) # => "2007-01-18T06:10:17-06:00" + # + # == Adding your own time formats to +to_formatted_s+ + # You can add your own formats to the Time::DATE_FORMATS hash. + # Use the format name as the hash key and either a strftime string + # or Proc instance that takes a time argument as the value. + # + # # config/initializers/time_formats.rb + # Time::DATE_FORMATS[:month_and_year] = '%B %Y' + # Time::DATE_FORMATS[:short_ordinal] = ->(time) { time.strftime("%B #{time.day.ordinalize}") } + # + # source://activesupport//lib/active_support/core_ext/time/conversions.rb#53 def to_formatted_s(format = T.unsafe(nil)); end + + # Converts to a formatted string. See DATE_FORMATS for built-in formats. + # + # This method is aliased to to_s. + # + # time = Time.now # => 2007-01-18 06:10:17 -06:00 + # + # time.to_formatted_s(:time) # => "06:10" + # time.to_s(:time) # => "06:10" + # + # time.to_formatted_s(:db) # => "2007-01-18 06:10:17" + # time.to_formatted_s(:number) # => "20070118061017" + # time.to_formatted_s(:short) # => "18 Jan 06:10" + # time.to_formatted_s(:long) # => "January 18, 2007 06:10" + # time.to_formatted_s(:long_ordinal) # => "January 18th, 2007 06:10" + # time.to_formatted_s(:rfc822) # => "Thu, 18 Jan 2007 06:10:17 -0600" + # time.to_formatted_s(:iso8601) # => "2007-01-18T06:10:17-06:00" + # + # == Adding your own time formats to +to_formatted_s+ + # You can add your own formats to the Time::DATE_FORMATS hash. + # Use the format name as the hash key and either a strftime string + # or Proc instance that takes a time argument as the value. + # + # # config/initializers/time_formats.rb + # Time::DATE_FORMATS[:month_and_year] = '%B %Y' + # Time::DATE_FORMATS[:short_ordinal] = ->(time) { time.strftime("%B #{time.day.ordinalize}") } + # + # source://activesupport//lib/active_support/core_ext/time/conversions.rb#53 def to_s(format = T.unsafe(nil)); end + + # Either return +self+ or the time in the local system timezone depending + # on the setting of +ActiveSupport.to_time_preserves_timezone+. + # + # source://activesupport//lib/active_support/core_ext/time/compatibility.rb#13 def to_time; end class << self + # Overriding case equality method so that it returns true for ActiveSupport::TimeWithZone instances + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#18 def ===(other); end - def at(*args); end - def at_with_coercion(*args); end + + # Layers additional behavior on Time.at so that ActiveSupport::TimeWithZone and DateTime + # instances can be used when called with a single argument + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#45 + def at(*args, **_arg1); end + + # Layers additional behavior on Time.at so that ActiveSupport::TimeWithZone and DateTime + # instances can be used when called with a single argument + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#45 + def at_with_coercion(*args, **_arg1); end + + # Returns Time.zone.now when Time.zone or config.time_zone are set, otherwise just returns Time.now. + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#39 def current; end + + # Returns the number of days in the given month. + # If no year is specified, it will use the current year. + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#24 def days_in_month(month, year = T.unsafe(nil)); end + + # Returns the number of days in the given year. + # If no year is specified, it will use the current year. + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#34 def days_in_year(year = T.unsafe(nil)); end + + # Returns a TimeZone instance matching the time zone provided. + # Accepts the time zone in any format supported by Time.zone=. + # Returns +nil+ for invalid time zones. + # + # Time.find_zone "America/New_York" # => # + # Time.find_zone "NOT-A-TIMEZONE" # => nil + # + # source://activesupport//lib/active_support/core_ext/time/zones.rb#109 def find_zone(time_zone); end + + # Returns a TimeZone instance matching the time zone provided. + # Accepts the time zone in any format supported by Time.zone=. + # Raises an +ArgumentError+ for invalid time zones. + # + # Time.find_zone! "America/New_York" # => # + # Time.find_zone! "EST" # => # + # Time.find_zone! -5.hours # => # + # Time.find_zone! nil # => nil + # Time.find_zone! false # => false + # Time.find_zone! "NOT-A-TIMEZONE" # => ArgumentError: Invalid Timezone: NOT-A-TIMEZONE + # + # source://activesupport//lib/active_support/core_ext/time/zones.rb#82 def find_zone!(time_zone); end + + # Creates a +Time+ instance from an RFC 3339 string. + # + # Time.rfc3339('1999-12-31T14:00:00-10:00') # => 2000-01-01 00:00:00 -1000 + # + # If the time or offset components are missing then an +ArgumentError+ will be raised. + # + # Time.rfc3339('1999-12-31') # => ArgumentError: invalid date + # + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#70 def rfc3339(str); end + + # Allows override of Time.zone locally inside supplied block; + # resets Time.zone to existing value when done. + # + # class ApplicationController < ActionController::Base + # around_action :set_time_zone + # + # private + # + # def set_time_zone + # Time.use_zone(current_user.timezone) { yield } + # end + # end + # + # NOTE: This won't affect any ActiveSupport::TimeWithZone + # objects that have already been created, e.g. any model timestamp + # attributes that have been read before the block will remain in + # the application's default timezone. + # + # source://activesupport//lib/active_support/core_ext/time/zones.rb#62 def use_zone(time_zone); end + + # Returns the TimeZone for the current request, if this has been set (via Time.zone=). + # If Time.zone has not been set for the current request, returns the TimeZone specified in config.time_zone. + # + # source://activesupport//lib/active_support/core_ext/time/zones.rb#14 def zone; end + + # Sets Time.zone to a TimeZone object for the current request/thread. + # + # This method accepts any of the following: + # + # * A Rails TimeZone object. + # * An identifier for a Rails TimeZone object (e.g., "Eastern Time (US & Canada)", -5.hours). + # * A TZInfo::Timezone object. + # * An identifier for a TZInfo::Timezone object (e.g., "America/New_York"). + # + # Here's an example of how you might set Time.zone on a per request basis and reset it when the request is done. + # current_user.time_zone just needs to return a string identifying the user's preferred time zone: + # + # class ApplicationController < ActionController::Base + # around_action :set_time_zone + # + # def set_time_zone + # if logged_in? + # Time.use_zone(current_user.time_zone) { yield } + # else + # yield + # end + # end + # end + # + # source://activesupport//lib/active_support/core_ext/time/zones.rb#41 def zone=(time_zone); end + + # Returns the value of attribute zone_default. + # + # source://activesupport//lib/active_support/core_ext/time/zones.rb#10 def zone_default; end + + # Sets the attribute zone_default + # + # @param value the value to set the attribute zone_default to. + # + # source://activesupport//lib/active_support/core_ext/time/zones.rb#10 def zone_default=(_arg0); end end end +# source://activesupport//lib/active_support/core_ext/time/calculations.rb#14 Time::COMMON_YEAR_DAYS_IN_MONTH = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/core_ext/time/conversions.rb#8 Time::DATE_FORMATS = T.let(T.unsafe(nil), Hash) +# source://activesupport//lib/active_support/core_ext/object/blank.rb#72 class TrueClass - include ::JSON::Ext::Generator::GeneratorMethods::TrueClass - include ::MessagePack::CoreExt - + # source://activesupport//lib/active_support/core_ext/object/json.rb#70 def as_json(options = T.unsafe(nil)); end + + # +true+ is not blank: + # + # true.blank? # => false + # + # @return [false] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#78 def blank?; end + + # Returns +self+. + # + # source://activesupport//lib/active_support/core_ext/object/to_query.rb#27 def to_param; end end +# source://activesupport//lib/active_support/core_ext/uri.rb#19 module URI - include ::URI::RFC2396_REGEXP - extend ::URI::Escape - class << self + # source://activesupport//lib/active_support/core_ext/uri.rb#21 def parser; end end end +# source://activesupport//lib/active_support/core_ext/object/json.rb#211 class URI::Generic include ::URI::RFC2396_REGEXP - include ::URI + # source://activesupport//lib/active_support/core_ext/object/json.rb#212 def as_json(options = T.unsafe(nil)); end end +# source://activesupport//lib/active_support/core_ext/object/duplicable.rb#41 class UnboundMethod - include ::MethodSource::SourceLocation::UnboundMethodExtensions - include ::MethodSource::MethodExtensions - + # Unbound methods are not duplicable: + # + # method(:puts).unbind.duplicable? # => false + # method(:puts).unbind.dup # => TypeError: allocator undefined for UnboundMethod + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/object/duplicable.rb#46 def duplicable?; end end diff --git a/Library/Homebrew/sorbet/rbi/gems/addressable@2.8.6.rbi b/Library/Homebrew/sorbet/rbi/gems/addressable@2.8.6.rbi index bf7d23653cbc18..9b249f24f40ebd 100644 --- a/Library/Homebrew/sorbet/rbi/gems/addressable@2.8.6.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/addressable@2.8.6.rbi @@ -4,289 +4,1990 @@ # This is an autogenerated file for types exported from the `addressable` gem. # Please instead update this file by running `bin/tapioca gem addressable`. +# Addressable is a library for processing links and URIs. +# +# source://addressable//lib/addressable/version.rb#22 module Addressable; end +# source://addressable//lib/addressable/idna/pure.rb#21 module Addressable::IDNA class << self + # source://addressable//lib/addressable/idna/pure.rb#117 def _deprecated_unicode_normalize_kc(value); end + + # Converts from a Unicode internationalized domain name to an ASCII + # domain name as described in RFC 3490. + # + # source://addressable//lib/addressable/idna/pure.rb#67 def to_ascii(input); end + + # Converts from an ASCII domain name to a Unicode internationalized + # domain name as described in RFC 3490. + # + # source://addressable//lib/addressable/idna/pure.rb#93 def to_unicode(input); end + + # @deprecated Use {String#unicode_normalize(:nfkc)} instead def unicode_normalize_kc(*args, **_arg1, &block); end private + # source://addressable//lib/addressable/idna/pure.rb#140 def lookup_unicode_lowercase(codepoint); end + + # Bias adaptation method + # + # source://addressable//lib/addressable/idna/pure.rb#488 def punycode_adapt(delta, numpoints, firsttime); end + + # @return [Boolean] + # + # source://addressable//lib/addressable/idna/pure.rb#456 def punycode_basic?(codepoint); end + + # source://addressable//lib/addressable/idna/pure.rb#334 def punycode_decode(punycode); end + + # Returns the numeric value of a basic codepoint + # (for use in representing integers) in the range 0 to + # base - 1, or PUNYCODE_BASE if codepoint does not represent a value. + # + # source://addressable//lib/addressable/idna/pure.rb#474 def punycode_decode_digit(codepoint); end + + # @return [Boolean] + # + # source://addressable//lib/addressable/idna/pure.rb#461 def punycode_delimiter?(codepoint); end + + # source://addressable//lib/addressable/idna/pure.rb#213 def punycode_encode(unicode); end + + # source://addressable//lib/addressable/idna/pure.rb#466 def punycode_encode_digit(d); end + + # Unicode aware downcase method. + # + # @api private + # @param input [String] The input string. + # @return [String] The downcased result. + # + # source://addressable//lib/addressable/idna/pure.rb#132 def unicode_downcase(input); end end end +# source://addressable//lib/addressable/idna/pure.rb#183 Addressable::IDNA::ACE_MAX_LENGTH = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#40 Addressable::IDNA::ACE_PREFIX = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/idna/pure.rb#172 Addressable::IDNA::COMPOSITION_TABLE = T.let(T.unsafe(nil), Hash) + +# source://addressable//lib/addressable/idna/pure.rb#185 Addressable::IDNA::PUNYCODE_BASE = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#189 Addressable::IDNA::PUNYCODE_DAMP = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#192 Addressable::IDNA::PUNYCODE_DELIMITER = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#190 Addressable::IDNA::PUNYCODE_INITIAL_BIAS = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#191 Addressable::IDNA::PUNYCODE_INITIAL_N = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#194 Addressable::IDNA::PUNYCODE_MAXINT = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#196 Addressable::IDNA::PUNYCODE_PRINT_ASCII = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/idna/pure.rb#188 Addressable::IDNA::PUNYCODE_SKEW = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#187 Addressable::IDNA::PUNYCODE_TMAX = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#186 Addressable::IDNA::PUNYCODE_TMIN = T.let(T.unsafe(nil), Integer) + +# Input is invalid. +# +# source://addressable//lib/addressable/idna/pure.rb#207 class Addressable::IDNA::PunycodeBadInput < ::StandardError; end + +# Output would exceed the space provided. +# +# source://addressable//lib/addressable/idna/pure.rb#209 class Addressable::IDNA::PunycodeBigOutput < ::StandardError; end + +# Input needs wider integers to process. +# +# source://addressable//lib/addressable/idna/pure.rb#211 class Addressable::IDNA::PunycodeOverflow < ::StandardError; end + +# source://addressable//lib/addressable/idna/pure.rb#163 Addressable::IDNA::UNICODE_DATA = T.let(T.unsafe(nil), Hash) + +# source://addressable//lib/addressable/idna/pure.rb#150 Addressable::IDNA::UNICODE_DATA_CANONICAL = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#148 Addressable::IDNA::UNICODE_DATA_COMBINING_CLASS = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#151 Addressable::IDNA::UNICODE_DATA_COMPATIBILITY = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#149 Addressable::IDNA::UNICODE_DATA_EXCLUSION = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#153 Addressable::IDNA::UNICODE_DATA_LOWERCASE = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#154 Addressable::IDNA::UNICODE_DATA_TITLECASE = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#152 Addressable::IDNA::UNICODE_DATA_UPPERCASE = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#182 Addressable::IDNA::UNICODE_MAX_LENGTH = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#36 Addressable::IDNA::UNICODE_TABLE = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/idna/pure.rb#42 Addressable::IDNA::UTF8_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/idna/pure.rb#53 Addressable::IDNA::UTF8_REGEX_MULTIBYTE = T.let(T.unsafe(nil), Regexp) +# This is an implementation of a URI template based on +# RFC 6570 (http://tools.ietf.org/html/rfc6570). +# +# source://addressable//lib/addressable/template.rb#27 class Addressable::Template + # Creates a new Addressable::Template object. + # + # @param pattern [#to_str] The URI Template pattern. + # @return [Addressable::Template] The initialized Template object. + # + # source://addressable//lib/addressable/template.rb#234 def initialize(pattern); end + # Returns true if the Template objects are equal. This method + # does NOT normalize either Template before doing the comparison. + # + # @param template [Object] The Template to compare. + # @return [TrueClass, FalseClass] true if the Templates are equivalent, false + # otherwise. + # + # source://addressable//lib/addressable/template.rb#274 def ==(template); end + + # Returns true if the Template objects are equal. This method + # does NOT normalize either Template before doing the comparison. + # Addressable::Template makes no distinction between `==` and `eql?`. + # + # @param template [Object] The Template to compare. + # @return [TrueClass, FalseClass] true if the Templates are equivalent, false + # otherwise. + # @see #== + # + # source://addressable//lib/addressable/template.rb#274 def eql?(template); end + + # Expands a URI template into a full URI. + # + # The object should respond to either the validate or + # transform messages or both. Both the validate and + # transform methods should take two parameters: name and + # value. The validate method should return true + # or false; true if the value of the variable is valid, + # false otherwise. An InvalidTemplateValueError + # exception will be raised if the value is invalid. The transform + # method should return the transformed variable value as a String. + # If a transform method is used, the value will not be percent + # encoded automatically. Unicode normalization will be performed both + # before and after sending the value to the transform method. + # + # @example + # class ExampleProcessor + # def self.validate(name, value) + # return !!(value =~ /^[\w ]+$/) if name == "query" + # return true + # end + # + # def self.transform(name, value) + # return value.gsub(/ /, "+") if name == "query" + # return value + # end + # end + # + # Addressable::Template.new( + # "http://example.com/search/{query}/" + # ).expand( + # {"query" => "an example search query"}, + # ExampleProcessor + # ).to_str + # #=> "http://example.com/search/an+example+search+query/" + # + # Addressable::Template.new( + # "http://example.com/search/{query}/" + # ).expand( + # {"query" => "an example search query"} + # ).to_str + # #=> "http://example.com/search/an%20example%20search%20query/" + # + # Addressable::Template.new( + # "http://example.com/search/{query}/" + # ).expand( + # {"query" => "bogus!"}, + # ExampleProcessor + # ).to_str + # #=> Addressable::Template::InvalidTemplateValueError + # @param mapping [Hash] The mapping that corresponds to the pattern. + # @param processor [#validate, #transform] An optional processor object may be supplied. + # @param normalize_values [Boolean] Optional flag to enable/disable unicode normalization. Default: true + # @return [Addressable::URI] The expanded URI template. + # + # source://addressable//lib/addressable/template.rb#591 def expand(mapping, processor = T.unsafe(nil), normalize_values = T.unsafe(nil)); end + + # Extracts a mapping from the URI using a URI Template pattern. + # + # @example + # class ExampleProcessor + # def self.restore(name, value) + # return value.gsub(/\+/, " ") if name == "query" + # return value + # end + # + # def self.match(name) + # return ".*?" if name == "first" + # return ".*" + # end + # end + # + # uri = Addressable::URI.parse( + # "http://example.com/search/an+example+search+query/" + # ) + # Addressable::Template.new( + # "http://example.com/search/{query}/" + # ).extract(uri, ExampleProcessor) + # #=> {"query" => "an example search query"} + # + # uri = Addressable::URI.parse("http://example.com/a/b/c/") + # Addressable::Template.new( + # "http://example.com/{first}/{second}/" + # ).extract(uri, ExampleProcessor) + # #=> {"first" => "a", "second" => "b/c"} + # + # uri = Addressable::URI.parse("http://example.com/a/b/c/") + # Addressable::Template.new( + # "http://example.com/{first}/{-list|/|second}/" + # ).extract(uri) + # #=> {"first" => "a", "second" => ["b", "c"]} + # @param uri [Addressable::URI, #to_str] The URI to extract from. + # @param processor [#restore, #match] A template processor object may optionally be supplied. + # + # The object should respond to either the restore or + # match messages or both. The restore method should + # take two parameters: `[String] name` and `[String] value`. + # The restore method should reverse any transformations that + # have been performed on the value to ensure a valid URI. + # The match method should take a single + # parameter: `[String] name`. The match method should return + # a String containing a regular expression capture group for + # matching on that particular variable. The default value is `".*?"`. + # The match method has no effect on multivariate operator + # expansions. + # @return [Hash, NilClass] The Hash mapping that was extracted from the URI, or + # nil if the URI didn't match the template. + # + # source://addressable//lib/addressable/template.rb#342 def extract(uri, processor = T.unsafe(nil)); end + + # Freeze URI, initializing instance variables. + # + # @return [Addressable::URI] The frozen URI object. + # + # source://addressable//lib/addressable/template.rb#245 def freeze; end + + # Returns a String representation of the Template object's state. + # + # @return [String] The Template object's state, as a String. + # + # source://addressable//lib/addressable/template.rb#260 def inspect; end + + # Returns an Array of variables used within the template pattern. + # The variables are listed in the Array in the order they appear within + # the pattern. Multiple occurrences of a variable within a pattern are + # not represented in this Array. + # + # @return [Array] The variables present in the template's pattern. + # + # source://addressable//lib/addressable/template.rb#607 def keys; end + + # Extracts match data from the URI using a URI Template pattern. + # + # @example + # class ExampleProcessor + # def self.restore(name, value) + # return value.gsub(/\+/, " ") if name == "query" + # return value + # end + # + # def self.match(name) + # return ".*?" if name == "first" + # return ".*" + # end + # end + # + # uri = Addressable::URI.parse( + # "http://example.com/search/an+example+search+query/" + # ) + # match = Addressable::Template.new( + # "http://example.com/search/{query}/" + # ).match(uri, ExampleProcessor) + # match.variables + # #=> ["query"] + # match.captures + # #=> ["an example search query"] + # + # uri = Addressable::URI.parse("http://example.com/a/b/c/") + # match = Addressable::Template.new( + # "http://example.com/{first}/{+second}/" + # ).match(uri, ExampleProcessor) + # match.variables + # #=> ["first", "second"] + # match.captures + # #=> ["a", "b/c"] + # + # uri = Addressable::URI.parse("http://example.com/a/b/c/") + # match = Addressable::Template.new( + # "http://example.com/{first}{/second*}/" + # ).match(uri) + # match.variables + # #=> ["first", "second"] + # match.captures + # #=> ["a", ["b", "c"]] + # @param uri [Addressable::URI, #to_str] The URI to extract from. + # @param processor [#restore, #match] A template processor object may optionally be supplied. + # + # The object should respond to either the restore or + # match messages or both. The restore method should + # take two parameters: `[String] name` and `[String] value`. + # The restore method should reverse any transformations that + # have been performed on the value to ensure a valid URI. + # The match method should take a single + # parameter: `[String] name`. The match method should return + # a String containing a regular expression capture group for + # matching on that particular variable. The default value is `".*?"`. + # The match method has no effect on multivariate operator + # expansions. + # @return [Hash, NilClass] The Hash mapping that was extracted from the URI, or + # nil if the URI didn't match the template. + # + # source://addressable//lib/addressable/template.rb#413 def match(uri, processor = T.unsafe(nil)); end + + # Returns the named captures of the coerced `Regexp`. + # + # @api private + # @return [Hash] The named captures of the `Regexp` given by {#to_regexp}. + # + # source://addressable//lib/addressable/template.rb#651 def named_captures; end + + # Returns an Array of variables used within the template pattern. + # The variables are listed in the Array in the order they appear within + # the pattern. Multiple occurrences of a variable within a pattern are + # not represented in this Array. + # + # @return [Array] The variables present in the template's pattern. + # + # source://addressable//lib/addressable/template.rb#607 def names; end + + # Expands a URI template into another URI template. + # + # The object should respond to either the validate or + # transform messages or both. Both the validate and + # transform methods should take two parameters: name and + # value. The validate method should return true + # or false; true if the value of the variable is valid, + # false otherwise. An InvalidTemplateValueError + # exception will be raised if the value is invalid. The transform + # method should return the transformed variable value as a String. + # If a transform method is used, the value will not be percent + # encoded automatically. Unicode normalization will be performed both + # before and after sending the value to the transform method. + # + # @example + # Addressable::Template.new( + # "http://example.com/{one}/{two}/" + # ).partial_expand({"one" => "1"}).pattern + # #=> "http://example.com/1/{two}/" + # + # Addressable::Template.new( + # "http://example.com/{?one,two}/" + # ).partial_expand({"one" => "1"}).pattern + # #=> "http://example.com/?one=1{&two}/" + # + # Addressable::Template.new( + # "http://example.com/{?one,two,three}/" + # ).partial_expand({"one" => "1", "three" => 3}).pattern + # #=> "http://example.com/?one=1{&two}&three=3" + # @param mapping [Hash] The mapping that corresponds to the pattern. + # @param processor [#validate, #transform] An optional processor object may be supplied. + # @param normalize_values [Boolean] Optional flag to enable/disable unicode normalization. Default: true + # @return [Addressable::Template] The partially expanded URI template. + # + # source://addressable//lib/addressable/template.rb#524 def partial_expand(mapping, processor = T.unsafe(nil), normalize_values = T.unsafe(nil)); end + + # @return [String] The Template object's pattern. + # + # source://addressable//lib/addressable/template.rb#254 def pattern; end + + # Returns the source of the coerced `Regexp`. + # + # @api private + # @return [String] The source of the `Regexp` given by {#to_regexp}. + # + # source://addressable//lib/addressable/template.rb#641 def source; end + + # Coerces a template into a `Regexp` object. This regular expression will + # behave very similarly to the actual template, and should match the same + # URI values, but it cannot fully handle, for example, values that would + # extract to an `Array`. + # + # @return [Regexp] A regular expression which should match the template. + # + # source://addressable//lib/addressable/template.rb#630 def to_regexp; end + + # Returns a mapping of variables to their default values specified + # in the template. Variables without defaults are not returned. + # + # @return [Hash] Mapping of template variables to their defaults + # + # source://addressable//lib/addressable/template.rb#618 def variable_defaults; end + + # Returns an Array of variables used within the template pattern. + # The variables are listed in the Array in the order they appear within + # the pattern. Multiple occurrences of a variable within a pattern are + # not represented in this Array. + # + # @return [Array] The variables present in the template's pattern. + # + # source://addressable//lib/addressable/template.rb#607 def variables; end private + # Takes a set of values, and joins them together based on the + # operator. + # + # @param operator [String, Nil] One of the operators from the set + # (?,&,+,#,;,/,.), or nil if there wasn't one. + # @param return_value [Array] The set of return values (as [variable_name, value] tuples) that will + # be joined together. + # @return [String] The transformed mapped value + # + # source://addressable//lib/addressable/template.rb#861 def join_values(operator, return_value); end + + # Generates a hash with string keys + # + # @param mapping [Hash] A mapping hash to normalize + # @return [Hash] A hash with stringified keys + # + # source://addressable//lib/addressable/template.rb#924 def normalize_keys(mapping); end + + # Takes a set of values, and joins them together based on the + # operator. + # + # @param value [Hash, Array, String] Normalizes unicode keys and values with String#unicode_normalize (NFC) + # @return [Hash, Array, String] The normalized values + # + # source://addressable//lib/addressable/template.rb#898 def normalize_value(value); end + + # source://addressable//lib/addressable/template.rb#656 def ordered_variable_defaults; end + + # Generates the Regexp that parses a template pattern. + # + # @param pattern [String] The URI template pattern. + # @param processor [#match] The template processor to use. + # @return [Array, Regexp] An array of expansion variables nad a regular expression which may be + # used to parse a template pattern + # + # source://addressable//lib/addressable/template.rb#968 def parse_new_template_pattern(pattern, processor = T.unsafe(nil)); end + + # Generates the Regexp that parses a template pattern. Memoizes the + # value if template processor not set (processors may not be deterministic) + # + # @param pattern [String] The URI template pattern. + # @param processor [#match] The template processor to use. + # @return [Array, Regexp] An array of expansion variables nad a regular expression which may be + # used to parse a template pattern + # + # source://addressable//lib/addressable/template.rb#950 def parse_template_pattern(pattern, processor = T.unsafe(nil)); end + + # Transforms a mapped value so that values can be substituted into the + # template. + # + # The object should respond to either the validate or + # transform messages or both. Both the validate and + # transform methods should take two parameters: name and + # value. The validate method should return true + # or false; true if the value of the variable is valid, + # false otherwise. An InvalidTemplateValueError exception + # will be raised if the value is invalid. The transform method + # should return the transformed variable value as a String. If a + # transform method is used, the value will not be percent encoded + # automatically. Unicode normalization will be performed both before and + # after sending the value to the transform method. + # + # @param mapping [Hash] The mapping to replace captures + # @param capture [String] The expression to replace + # @param processor [#validate, #transform] An optional processor object may be supplied. + # @param normalize_values [Boolean] Optional flag to enable/disable unicode normalization. Default: true + # @return [String] The expanded expression + # + # source://addressable//lib/addressable/template.rb#753 def transform_capture(mapping, capture, processor = T.unsafe(nil), normalize_values = T.unsafe(nil)); end + + # Loops through each capture and expands any values available in mapping + # + # The object should respond to either the validate or + # transform messages or both. Both the validate and + # transform methods should take two parameters: name and + # value. The validate method should return true + # or false; true if the value of the variable is valid, + # false otherwise. An InvalidTemplateValueError exception + # will be raised if the value is invalid. The transform method + # should return the transformed variable value as a String. If a + # transform method is used, the value will not be percent encoded + # automatically. Unicode normalization will be performed both before and + # after sending the value to the transform method. + # + # @param mapping [Hash] Set of keys to expand + # @param capture [String] The expression to expand + # @param processor [#validate, #transform] An optional processor object may be supplied. + # @param normalize_values [Boolean] Optional flag to enable/disable unicode normalization. Default: true + # @return [String] The expanded expression + # + # source://addressable//lib/addressable/template.rb#694 def transform_partial_capture(mapping, capture, processor = T.unsafe(nil), normalize_values = T.unsafe(nil)); end end +# source://addressable//lib/addressable/template.rb#58 Addressable::Template::EXPRESSION = T.let(T.unsafe(nil), Regexp) + +# Raised if an invalid template operator is used in a pattern. +# +# source://addressable//lib/addressable/template.rb#85 class Addressable::Template::InvalidTemplateOperatorError < ::StandardError; end + +# Raised if an invalid template value is supplied. +# +# source://addressable//lib/addressable/template.rb#80 class Addressable::Template::InvalidTemplateValueError < ::StandardError; end + +# source://addressable//lib/addressable/template.rb#70 Addressable::Template::JOINERS = T.let(T.unsafe(nil), Hash) + +# source://addressable//lib/addressable/template.rb#62 Addressable::Template::LEADERS = T.let(T.unsafe(nil), Hash) +# This class represents the data that is extracted when a Template +# is matched against a URI. +# +# source://addressable//lib/addressable/template.rb#96 class Addressable::Template::MatchData + # Creates a new MatchData object. + # MatchData objects should never be instantiated directly. + # + # @param uri [Addressable::URI] The URI that the template was matched against. + # @return [MatchData] a new instance of MatchData + # + # source://addressable//lib/addressable/template.rb#103 def initialize(uri, template, mapping); end + # Accesses captured values by name or by index. + # + # @param key [String, Symbol, Fixnum] Capture index or name. Note that when accessing by with index + # of 0, the full URI will be returned. The intention is to mimic + # the ::MatchData#[] behavior. + # @param len [#to_int, nil] If provided, an array of values will be returend with the given + # parameter used as length. + # @return [Array, String, nil] The captured value corresponding to the index or name. If the + # value was not provided or the key is unknown, nil will be + # returned. + # + # If the second parameter is provided, an array of that length will + # be returned instead. + # + # source://addressable//lib/addressable/template.rb#170 def [](key, len = T.unsafe(nil)); end + + # @return [Array] The list of values that were captured by the Template. + # Note that this list will include nils for any variables which + # were in the Template, but did not appear in the URI. + # + # source://addressable//lib/addressable/template.rb#143 def captures; end + + # Returns a String representation of the MatchData's state. + # + # @return [String] The MatchData's state, as a String. + # + # source://addressable//lib/addressable/template.rb#213 def inspect; end + + # @return [Array] The list of variables that were present in the Template. + # Note that this list will include variables which do not appear + # in the mapping because they were not present in URI. + # + # source://addressable//lib/addressable/template.rb#132 def keys; end + + # @return [Hash] The mapping that resulted from the match. + # Note that this mapping does not include keys or values for + # variables that appear in the Template, but are not present + # in the URI. + # + # source://addressable//lib/addressable/template.rb#125 def mapping; end + + # @return [Array] The list of variables that were present in the Template. + # Note that this list will include variables which do not appear + # in the mapping because they were not present in URI. + # + # source://addressable//lib/addressable/template.rb#132 def names; end + + # Dummy method for code expecting a ::MatchData instance + # + # @return [String] An empty string. + # + # source://addressable//lib/addressable/template.rb#222 def post_match; end + + # Dummy method for code expecting a ::MatchData instance + # + # @return [String] An empty string. + # + # source://addressable//lib/addressable/template.rb#222 def pre_match; end + + # @return [String] The matched URI as String. + # + # source://addressable//lib/addressable/template.rb#191 def string; end + + # @return [Addressable::Template] The Template used for the match. + # + # source://addressable//lib/addressable/template.rb#117 def template; end + + # @return [Array] Array with the matched URI as first element followed by the captured + # values. + # + # source://addressable//lib/addressable/template.rb#184 def to_a; end + + # @return [String] The matched URI as String. + # + # source://addressable//lib/addressable/template.rb#191 def to_s; end + + # @return [Addressable::URI] The URI that the Template was matched against. + # + # source://addressable//lib/addressable/template.rb#112 def uri; end + + # @return [Array] The list of values that were captured by the Template. + # Note that this list will include nils for any variables which + # were in the Template, but did not appear in the URI. + # + # source://addressable//lib/addressable/template.rb#143 def values; end + + # Returns multiple captured values at once. + # + # @param *indexes [String, Symbol, Fixnum] Indices of the captures to be returned + # @return [Array] Values corresponding to given indices. + # @see Addressable::Template::MatchData#[] + # + # source://addressable//lib/addressable/template.rb#205 def values_at(*indexes); end + + # @return [Array] The list of variables that were present in the Template. + # Note that this list will include variables which do not appear + # in the mapping because they were not present in URI. + # + # source://addressable//lib/addressable/template.rb#132 def variables; end end +# source://addressable//lib/addressable/template.rb#40 Addressable::Template::RESERVED = T.let(T.unsafe(nil), String) + +# Raised if an invalid template operator is used in a pattern. +# +# source://addressable//lib/addressable/template.rb#90 class Addressable::Template::TemplateOperatorAbortedError < ::StandardError; end + +# source://addressable//lib/addressable/template.rb#42 Addressable::Template::UNRESERVED = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/template.rb#54 Addressable::Template::VARIABLE_LIST = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/template.rb#50 Addressable::Template::VARNAME = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/template.rb#52 Addressable::Template::VARSPEC = T.let(T.unsafe(nil), Regexp) +# This is an implementation of a URI parser based on +# RFC 3986, +# RFC 3987. +# +# source://addressable//lib/addressable/uri.rb#31 class Addressable::URI + # Creates a new uri object from component parts. + # + # @option [String, + # @option [String, + # @option [String, + # @option [String, + # @option [String, + # @option [String, + # @option [String, + # @option [String, + # @option [String, + # @option [String, + # @param [String, [Hash] a customizable set of options + # @return [Addressable::URI] The constructed URI object. + # + # source://addressable//lib/addressable/uri.rb#830 def initialize(options = T.unsafe(nil)); end + # Joins two URIs together. + # + # @param The [String, Addressable::URI, #to_str] URI to join with. + # @return [Addressable::URI] The joined URI. + # + # source://addressable//lib/addressable/uri.rb#1889 def +(uri); end + + # Returns true if the URI objects are equal. This method + # normalizes both URIs before doing the comparison. + # + # @param uri [Object] The URI to compare. + # @return [TrueClass, FalseClass] true if the URIs are equivalent, false + # otherwise. + # + # source://addressable//lib/addressable/uri.rb#2239 def ==(uri); end + + # Returns true if the URI objects are equal. This method + # normalizes both URIs before doing the comparison, and allows comparison + # against Strings. + # + # @param uri [Object] The URI to compare. + # @return [TrueClass, FalseClass] true if the URIs are equivalent, false + # otherwise. + # + # source://addressable//lib/addressable/uri.rb#2217 def ===(uri); end + + # Determines if the URI is absolute. + # + # @return [TrueClass, FalseClass] true if the URI is absolute. false + # otherwise. + # + # source://addressable//lib/addressable/uri.rb#1879 def absolute?; end + + # The authority component for this URI. + # Combines the user, password, host, and port components. + # + # @return [String] The authority component. + # + # source://addressable//lib/addressable/uri.rb#1234 def authority; end + + # Sets the authority component for this URI. + # + # @param new_authority [String, #to_str] The new authority component. + # + # source://addressable//lib/addressable/uri.rb#1274 def authority=(new_authority); end + + # The basename, if any, of the file in the path component. + # + # @return [String] The path's basename. + # + # source://addressable//lib/addressable/uri.rb#1588 def basename; end + + # The default port for this URI's scheme. + # This method will always returns the default port for the URI's scheme + # regardless of the presence of an explicit port in the URI. + # + # @return [Integer] The default port. + # + # source://addressable//lib/addressable/uri.rb#1454 def default_port; end + + # This method allows you to make several changes to a URI simultaneously, + # which separately would cause validation errors, but in conjunction, + # are valid. The URI will be revalidated as soon as the entire block has + # been executed. + # + # @param block [Proc] A set of operations to perform on a given URI. + # + # source://addressable//lib/addressable/uri.rb#2396 def defer_validation; end + + # Creates a URI suitable for display to users. If semantic attacks are + # likely, the application should try to detect these and warn the user. + # See RFC 3986, + # section 7.6 for more information. + # + # @return [Addressable::URI] A URI suitable for display purposes. + # + # source://addressable//lib/addressable/uri.rb#2201 def display_uri; end + + # Returns the public suffix domain for this host. + # + # @example + # Addressable::URI.parse("http://www.example.co.uk").domain # => "example.co.uk" + # + # source://addressable//lib/addressable/uri.rb#1225 def domain; end + + # Clones the URI object. + # + # @return [Addressable::URI] The cloned URI. + # + # source://addressable//lib/addressable/uri.rb#2271 def dup; end + + # Determines if the URI is an empty string. + # + # @return [TrueClass, FalseClass] Returns true if empty, false otherwise. + # + # source://addressable//lib/addressable/uri.rb#2333 def empty?; end + + # source://addressable//lib/addressable/uri.rb#2406 def encode_with(coder); end + + # Returns true if the URI objects are equal. This method + # does NOT normalize either URI before doing the comparison. + # + # @param uri [Object] The URI to compare. + # @return [TrueClass, FalseClass] true if the URIs are equivalent, false + # otherwise. + # + # source://addressable//lib/addressable/uri.rb#2253 def eql?(uri); end + + # The extname, if any, of the file in the path component. + # Empty string if there is no extension. + # + # @return [String] The path's extname. + # + # source://addressable//lib/addressable/uri.rb#1598 def extname; end + + # The fragment component for this URI. + # + # @return [String] The fragment component. + # + # source://addressable//lib/addressable/uri.rb#1810 def fragment; end + + # Sets the fragment component for this URI. + # + # @param new_fragment [String, #to_str] The new fragment component. + # + # source://addressable//lib/addressable/uri.rb#1835 def fragment=(new_fragment); end + + # Freeze URI, initializing instance variables. + # + # @return [Addressable::URI] The frozen URI object. + # + # source://addressable//lib/addressable/uri.rb#870 def freeze; end + + # A hash value that will make a URI equivalent to its normalized + # form. + # + # @return [Integer] A hash of the URI. + # + # source://addressable//lib/addressable/uri.rb#2263 def hash; end + + # The host component for this URI. + # + # @return [String] The host component. + # + # source://addressable//lib/addressable/uri.rb#1120 def host; end + + # Sets the host component for this URI. + # + # @param new_host [String, #to_str] The new host component. + # + # source://addressable//lib/addressable/uri.rb#1156 def host=(new_host); end + + # This method is same as URI::Generic#host except + # brackets for IPv6 (and 'IPvFuture') addresses are removed. + # + # @return [String] The hostname for this URI. + # @see Addressable::URI#host + # + # source://addressable//lib/addressable/uri.rb#1178 def hostname; end + + # This method is same as URI::Generic#host= except + # the argument can be a bare IPv6 address (or 'IPvFuture'). + # + # @param new_hostname [String, #to_str] The new hostname for this URI. + # @see Addressable::URI#host= + # + # source://addressable//lib/addressable/uri.rb#1190 def hostname=(new_hostname); end + + # The inferred port component for this URI. + # This method will normalize to the default port for the URI's scheme if + # the port isn't explicitly specified in the URI. + # + # @return [Integer] The inferred port component. + # + # source://addressable//lib/addressable/uri.rb#1440 def inferred_port; end + + # source://addressable//lib/addressable/uri.rb#2417 def init_with(coder); end + + # Returns a String representation of the URI object's state. + # + # @return [String] The URI object's state, as a String. + # + # source://addressable//lib/addressable/uri.rb#2384 def inspect; end + + # Determines if the scheme indicates an IP-based protocol. + # + # @return [TrueClass, FalseClass] true if the scheme indicates an IP-based protocol. + # false otherwise. + # + # source://addressable//lib/addressable/uri.rb#1855 def ip_based?; end + + # Joins two URIs together. + # + # @param The [String, Addressable::URI, #to_str] URI to join with. + # @return [Addressable::URI] The joined URI. + # + # source://addressable//lib/addressable/uri.rb#1889 def join(uri); end + + # Destructive form of join. + # + # @param The [String, Addressable::URI, #to_str] URI to join with. + # @return [Addressable::URI] The joined URI. + # @see Addressable::URI#join + # + # source://addressable//lib/addressable/uri.rb#1992 def join!(uri); end + + # Merges a URI with a Hash of components. + # This method has different behavior from join. Any + # components present in the hash parameter will override the + # original components. The path component is not treated specially. + # + # @param The [Hash, Addressable::URI, #to_hash] components to merge with. + # @return [Addressable::URI] The merged URI. + # @see Hash#merge + # + # source://addressable//lib/addressable/uri.rb#2007 def merge(hash); end + + # Destructive form of merge. + # + # @param The [Hash, Addressable::URI, #to_hash] components to merge with. + # @return [Addressable::URI] The merged URI. + # @see Addressable::URI#merge + # + # source://addressable//lib/addressable/uri.rb#2072 def merge!(uri); end + + # Returns a normalized URI object. + # + # NOTE: This method does not attempt to fully conform to specifications. + # It exists largely to correct other people's failures to read the + # specifications, and also to deal with caching issues since several + # different URIs may represent the same resource and should not be + # cached multiple times. + # + # @return [Addressable::URI] The normalized URI. + # + # source://addressable//lib/addressable/uri.rb#2164 def normalize; end + + # Destructively normalizes this URI object. + # + # @return [Addressable::URI] The normalized URI. + # @see Addressable::URI#normalize + # + # source://addressable//lib/addressable/uri.rb#2190 def normalize!; end + + # The authority component for this URI, normalized. + # + # @return [String] The authority component, normalized. + # + # source://addressable//lib/addressable/uri.rb#1252 def normalized_authority; end + + # The fragment component for this URI, normalized. + # + # @return [String] The fragment component, normalized. + # + # source://addressable//lib/addressable/uri.rb#1816 def normalized_fragment; end + + # The host component for this URI, normalized. + # + # @return [String] The host component, normalized. + # + # source://addressable//lib/addressable/uri.rb#1126 def normalized_host; end + + # The password component for this URI, normalized. + # + # @return [String] The password component, normalized. + # + # source://addressable//lib/addressable/uri.rb#1002 def normalized_password; end + + # The path component for this URI, normalized. + # + # @return [String] The path component, normalized. + # + # source://addressable//lib/addressable/uri.rb#1535 def normalized_path; end + + # The port component for this URI, normalized. + # + # @return [Integer] The port component, normalized. + # + # source://addressable//lib/addressable/uri.rb#1392 def normalized_port; end + + # The query component for this URI, normalized. + # + # @return [String] The query component, normalized. + # + # source://addressable//lib/addressable/uri.rb#1613 def normalized_query(*flags); end + + # The scheme component for this URI, normalized. + # + # @return [String] The scheme component, normalized. + # + # source://addressable//lib/addressable/uri.rb#896 def normalized_scheme; end + + # The normalized combination of components that represent a site. + # Combines the scheme, user, password, host, and port components. + # Primarily useful for HTTP and HTTPS. + # + # For example, "http://example.com/path?query" would have a + # site value of "http://example.com". + # + # @return [String] The normalized components that identify a site. + # + # source://addressable//lib/addressable/uri.rb#1485 def normalized_site; end + + # The user component for this URI, normalized. + # + # @return [String] The user component, normalized. + # + # source://addressable//lib/addressable/uri.rb#947 def normalized_user; end + + # The userinfo component for this URI, normalized. + # + # @return [String] The userinfo component, normalized. + # + # source://addressable//lib/addressable/uri.rb#1068 def normalized_userinfo; end + + # Omits components from a URI. + # + # @example + # uri = Addressable::URI.parse("http://example.com/path?query") + # #=> # + # uri.omit(:scheme, :authority) + # #=> # + # @param *components [Symbol] The components to be omitted. + # @return [Addressable::URI] The URI with components omitted. + # + # source://addressable//lib/addressable/uri.rb#2297 def omit(*components); end + + # Destructive form of omit. + # + # @param *components [Symbol] The components to be omitted. + # @return [Addressable::URI] The URI with components omitted. + # @see Addressable::URI#omit + # + # source://addressable//lib/addressable/uri.rb#2324 def omit!(*components); end + + # The origin for this URI, serialized to ASCII, as per + # RFC 6454, section 6.2. + # + # @return [String] The serialized origin. + # + # source://addressable//lib/addressable/uri.rb#1314 def origin; end + + # Sets the origin for this URI, serialized to ASCII, as per + # RFC 6454, section 6.2. This assignment will reset the `userinfo` + # component. + # + # @param new_origin [String, #to_str] The new origin component. + # + # source://addressable//lib/addressable/uri.rb#1333 def origin=(new_origin); end + + # The password component for this URI. + # + # @return [String] The password component. + # + # source://addressable//lib/addressable/uri.rb#996 def password; end + + # Sets the password component for this URI. + # + # @param new_password [String, #to_str] The new password component. + # + # source://addressable//lib/addressable/uri.rb#1025 def password=(new_password); end + + # The path component for this URI. + # + # @return [String] The path component. + # + # source://addressable//lib/addressable/uri.rb#1528 def path; end + + # Sets the path component for this URI. + # + # @param new_path [String, #to_str] The new path component. + # + # source://addressable//lib/addressable/uri.rb#1567 def path=(new_path); end + + # The port component for this URI. + # This is the port number actually given in the URI. This does not + # infer port numbers from default values. + # + # @return [Integer] The port component. + # + # source://addressable//lib/addressable/uri.rb#1386 def port; end + + # Sets the port component for this URI. + # + # @param new_port [String, Integer, #to_s] The new port component. + # + # source://addressable//lib/addressable/uri.rb#1408 def port=(new_port); end + + # The query component for this URI. + # + # @return [String] The query component. + # + # source://addressable//lib/addressable/uri.rb#1607 def query; end + + # Sets the query component for this URI. + # + # @param new_query [String, #to_str] The new query component. + # + # source://addressable//lib/addressable/uri.rb#1641 def query=(new_query); end + + # Converts the query component to a Hash value. + # + # @example + # Addressable::URI.parse("?one=1&two=2&three=3").query_values + # #=> {"one" => "1", "two" => "2", "three" => "3"} + # Addressable::URI.parse("?one=two&one=three").query_values(Array) + # #=> [["one", "two"], ["one", "three"]] + # Addressable::URI.parse("?one=two&one=three").query_values(Hash) + # #=> {"one" => "three"} + # Addressable::URI.parse("?").query_values + # #=> {} + # Addressable::URI.parse("").query_values + # #=> nil + # @param return_type [Class] The return type desired. Value must be either + # `Hash` or `Array`. + # @return [Hash, Array, nil] The query string parsed as a Hash or Array + # or nil if the query string is blank. + # + # source://addressable//lib/addressable/uri.rb#1672 def query_values(return_type = T.unsafe(nil)); end + + # Sets the query component for this URI from a Hash object. + # An empty Hash or Array will result in an empty query string. + # + # @example + # uri.query_values = {:a => "a", :b => ["c", "d", "e"]} + # uri.query + # # => "a=a&b=c&b=d&b=e" + # uri.query_values = [['a', 'a'], ['b', 'c'], ['b', 'd'], ['b', 'e']] + # uri.query + # # => "a=a&b=c&b=d&b=e" + # uri.query_values = [['a', 'a'], ['b', ['c', 'd', 'e']]] + # uri.query + # # => "a=a&b=c&b=d&b=e" + # uri.query_values = [['flag'], ['key', 'value']] + # uri.query + # # => "flag&key=value" + # @param new_query_values [Hash, #to_hash, Array] The new query values. + # + # source://addressable//lib/addressable/uri.rb#1723 def query_values=(new_query_values); end + + # Determines if the URI is relative. + # + # @return [TrueClass, FalseClass] true if the URI is relative. false + # otherwise. + # + # source://addressable//lib/addressable/uri.rb#1869 def relative?; end + + # The HTTP request URI for this URI. This is the path and the + # query string. + # + # @return [String] The request URI required for an HTTP request. + # + # source://addressable//lib/addressable/uri.rb#1774 def request_uri; end + + # Sets the HTTP request URI for this URI. + # + # @param new_request_uri [String, #to_str] The new HTTP request URI. + # + # source://addressable//lib/addressable/uri.rb#1786 def request_uri=(new_request_uri); end + + # Returns the shortest normalized relative form of this URI that uses the + # supplied URI as a base for resolution. Returns an absolute URI if + # necessary. This is effectively the opposite of route_to. + # + # @param uri [String, Addressable::URI, #to_str] The URI to route from. + # @return [Addressable::URI] The normalized relative URI that is equivalent to the original URI. + # + # source://addressable//lib/addressable/uri.rb#2085 def route_from(uri); end + + # Returns the shortest normalized relative form of the supplied URI that + # uses this URI as a base for resolution. Returns an absolute URI if + # necessary. This is effectively the opposite of route_from. + # + # @param uri [String, Addressable::URI, #to_str] The URI to route to. + # @return [Addressable::URI] The normalized relative URI that is equivalent to the supplied URI. + # + # source://addressable//lib/addressable/uri.rb#2150 def route_to(uri); end + + # The scheme component for this URI. + # + # @return [String] The scheme component. + # + # source://addressable//lib/addressable/uri.rb#890 def scheme; end + + # Sets the scheme component for this URI. + # + # @param new_scheme [String, #to_str] The new scheme component. + # + # source://addressable//lib/addressable/uri.rb#917 def scheme=(new_scheme); end + + # The combination of components that represent a site. + # Combines the scheme, user, password, host, and port components. + # Primarily useful for HTTP and HTTPS. + # + # For example, "http://example.com/path?query" would have a + # site value of "http://example.com". + # + # @return [String] The components that identify a site. + # + # source://addressable//lib/addressable/uri.rb#1467 def site; end + + # Sets the site value for this URI. + # + # @param new_site [String, #to_str] The new site value. + # + # source://addressable//lib/addressable/uri.rb#1506 def site=(new_site); end + + # Returns the top-level domain for this host. + # + # @example + # Addressable::URI.parse("http://www.example.co.uk").tld # => "co.uk" + # + # source://addressable//lib/addressable/uri.rb#1207 def tld; end + + # Sets the top-level domain for this URI. + # + # @param new_tld [String, #to_str] The new top-level domain. + # + # source://addressable//lib/addressable/uri.rb#1215 def tld=(new_tld); end + + # Returns a Hash of the URI components. + # + # @return [Hash] The URI as a Hash of components. + # + # source://addressable//lib/addressable/uri.rb#2367 def to_hash; end + + # Converts the URI to a String. + # + # @return [String] The URI's String representation. + # + # source://addressable//lib/addressable/uri.rb#2341 def to_s; end + + # Converts the URI to a String. + # URI's are glorified Strings. Allow implicit conversion. + # + # @return [String] The URI's String representation. + # + # source://addressable//lib/addressable/uri.rb#2341 def to_str; end + + # The user component for this URI. + # + # @return [String] The user component. + # + # source://addressable//lib/addressable/uri.rb#941 def user; end + + # Sets the user component for this URI. + # + # @param new_user [String, #to_str] The new user component. + # + # source://addressable//lib/addressable/uri.rb#970 def user=(new_user); end + + # The userinfo component for this URI. + # Combines the user and password components. + # + # @return [String] The userinfo component. + # + # source://addressable//lib/addressable/uri.rb#1052 def userinfo; end + + # Sets the userinfo component for this URI. + # + # @param new_userinfo [String, #to_str] The new userinfo component. + # + # source://addressable//lib/addressable/uri.rb#1091 def userinfo=(new_userinfo); end protected + # Converts the string to be UTF-8 if it is not already UTF-8 + # + # @api private + # + # source://addressable//lib/addressable/uri.rb#2561 def force_utf8_encoding_if_needed(str); end + + # Resets composite values for the entire URI + # + # @api private + # + # source://addressable//lib/addressable/uri.rb#2552 def remove_composite_values; end + + # Replaces the internal state of self with the specified URI's state. + # Used in destructive operations to avoid massive code repetition. + # + # @param uri [Addressable::URI] The URI to replace self with. + # @return [Addressable::URI] self. + # + # source://addressable//lib/addressable/uri.rb#2519 def replace_self(uri); end + + # Splits path string with "/" (slash). + # It is considered that there is empty string after last slash when + # path ends with slash. + # + # @param path [String] The path to split. + # @return [Array] An array of parts of path. + # + # source://addressable//lib/addressable/uri.rb#2542 def split_path(path); end + + # Ensures that the URI is valid. + # + # source://addressable//lib/addressable/uri.rb#2476 def validate; end private + # Resets instance variables + # + # @api private + # + # source://addressable//lib/addressable/uri.rb#2573 def reset_ivs; end class << self + # Converts a path to a file scheme URI. If the path supplied is + # relative, it will be returned as a relative URI. If the path supplied + # is actually a non-file URI, it will parse the URI as if it had been + # parsed with Addressable::URI.parse. Handles all of the + # various Microsoft-specific formats for specifying paths. + # + # @example + # base = Addressable::URI.convert_path("/absolute/path/") + # uri = Addressable::URI.convert_path("relative/path") + # (base + uri).to_s + # #=> "file:///absolute/path/relative/path" + # + # Addressable::URI.convert_path( + # "c:\\windows\\My Documents 100%20\\foo.txt" + # ).to_s + # #=> "file:///c:/windows/My%20Documents%20100%20/foo.txt" + # + # Addressable::URI.convert_path("http://example.com/").to_s + # #=> "http://example.com/" + # @param path [String, Addressable::URI, #to_str] Typically a String path to a file or directory, but + # will return a sensible return value if an absolute URI is supplied + # instead. + # @return [Addressable::URI] The parsed file scheme URI or the original URI if some other URI + # scheme was provided. + # + # source://addressable//lib/addressable/uri.rb#292 def convert_path(path); end + + # Percent encodes any special characters in the URI. + # + # @param uri [String, Addressable::URI, #to_str] The URI to encode. + # @param return_type [Class] The type of object to return. + # This value may only be set to String or + # Addressable::URI. All other values are invalid. Defaults + # to String. + # @return [String, Addressable::URI] The encoded URI. + # The return type is determined by the return_type + # parameter. + # + # source://addressable//lib/addressable/uri.rb#616 def encode(uri, return_type = T.unsafe(nil)); end + + # Percent encodes a URI component. + # + # '9' to be percent encoded. If a Regexp is passed, the + # value /[^b-zB-Z0-9]/ would have the same effect. A set of + # useful String values may be found in the + # Addressable::URI::CharacterClasses module. The default + # value is the reserved plus unreserved character classes specified in + # RFC 3986. + # + # @example + # Addressable::URI.encode_component("simple/example", "b-zB-Z0-9") + # => "simple%2Fex%61mple" + # Addressable::URI.encode_component("simple/example", /[^b-zB-Z0-9]/) + # => "simple%2Fex%61mple" + # Addressable::URI.encode_component( + # "simple/example", Addressable::URI::CharacterClasses::UNRESERVED + # ) + # => "simple%2Fexample" + # @param component [String, #to_str] The URI component to encode. + # @param character_class [String, Regexp] The characters which are not percent encoded. If a String + # is passed, the String must be formatted as a regular + # expression character class. (Do not include the surrounding square + # brackets.) For example, "b-zB-Z0-9" would cause + # everything but the letters 'b' through 'z' and the numbers '0' through + # @param upcase_encoded [Regexp] A string of characters that may already be percent encoded, and whose + # encodings should be upcased. This allows normalization of percent + # encodings for characters not included in the + # character_class. + # @return [String] The encoded component. + # + # source://addressable//lib/addressable/uri.rb#403 def encode_component(component, character_class = T.unsafe(nil), upcase_encoded = T.unsafe(nil)); end + + # Percent encodes any special characters in the URI. + # + # @param uri [String, Addressable::URI, #to_str] The URI to encode. + # @param return_type [Class] The type of object to return. + # This value may only be set to String or + # Addressable::URI. All other values are invalid. Defaults + # to String. + # @return [String, Addressable::URI] The encoded URI. + # The return type is determined by the return_type + # parameter. + # + # source://addressable//lib/addressable/uri.rb#616 def escape(uri, return_type = T.unsafe(nil)); end + + # Percent encodes a URI component. + # + # '9' to be percent encoded. If a Regexp is passed, the + # value /[^b-zB-Z0-9]/ would have the same effect. A set of + # useful String values may be found in the + # Addressable::URI::CharacterClasses module. The default + # value is the reserved plus unreserved character classes specified in + # RFC 3986. + # + # @example + # Addressable::URI.encode_component("simple/example", "b-zB-Z0-9") + # => "simple%2Fex%61mple" + # Addressable::URI.encode_component("simple/example", /[^b-zB-Z0-9]/) + # => "simple%2Fex%61mple" + # Addressable::URI.encode_component( + # "simple/example", Addressable::URI::CharacterClasses::UNRESERVED + # ) + # => "simple%2Fexample" + # @param component [String, #to_str] The URI component to encode. + # @param character_class [String, Regexp] The characters which are not percent encoded. If a String + # is passed, the String must be formatted as a regular + # expression character class. (Do not include the surrounding square + # brackets.) For example, "b-zB-Z0-9" would cause + # everything but the letters 'b' through 'z' and the numbers '0' through + # @param upcase_encoded [Regexp] A string of characters that may already be percent encoded, and whose + # encodings should be upcased. This allows normalization of percent + # encodings for characters not included in the + # character_class. + # @return [String] The encoded component. + # + # source://addressable//lib/addressable/uri.rb#403 def escape_component(component, character_class = T.unsafe(nil), upcase_encoded = T.unsafe(nil)); end + + # Encodes a set of key/value pairs according to the rules for the + # application/x-www-form-urlencoded MIME type. + # + # @param form_values [#to_hash, #to_ary] The form values to encode. + # @param sort [TrueClass, FalseClass] Sort the key/value pairs prior to encoding. + # Defaults to false. + # @return [String] The encoded value. + # + # source://addressable//lib/addressable/uri.rb#740 def form_encode(form_values, sort = T.unsafe(nil)); end + + # Decodes a String according to the rules for the + # application/x-www-form-urlencoded MIME type. + # + # @param encoded_value [String, #to_str] The form values to decode. + # @return [Array] The decoded values. + # This is not a Hash because of the possibility for + # duplicate keys. + # + # source://addressable//lib/addressable/uri.rb#793 def form_unencode(encoded_value); end + + # Converts an input to a URI. The input does not have to be a valid + # URI — the method will use heuristics to guess what URI was intended. + # This is not standards-compliant, merely user-friendly. + # + # @param uri [String, Addressable::URI, #to_str] The URI string to parse. + # No parsing is performed if the object is already an + # Addressable::URI. + # @param hints [Hash] A Hash of hints to the heuristic parser. + # Defaults to {:scheme => "http"}. + # @return [Addressable::URI] The parsed URI. + # + # source://addressable//lib/addressable/uri.rb#191 def heuristic_parse(uri, hints = T.unsafe(nil)); end + + # Returns an array of known ip-based schemes. These schemes typically + # use a similar URI form: + # //:@:/ + # + # source://addressable//lib/addressable/uri.rb#1369 def ip_based_schemes; end + + # Joins several URIs together. + # + # @example + # base = "http://example.com/" + # uri = Addressable::URI.parse("relative/path") + # Addressable::URI.join(base, uri) + # #=> # + # @param *uris [String, Addressable::URI, #to_str] The URIs to join. + # @return [Addressable::URI] The joined URI. + # + # source://addressable//lib/addressable/uri.rb#343 def join(*uris); end + + # Normalizes the encoding of a URI component. + # + # @example + # Addressable::URI.normalize_component("simpl%65/%65xampl%65", "b-zB-Z") + # => "simple%2Fex%61mple" + # Addressable::URI.normalize_component( + # "simpl%65/%65xampl%65", /[^b-zB-Z]/ + # ) + # => "simple%2Fex%61mple" + # Addressable::URI.normalize_component( + # "simpl%65/%65xampl%65", + # Addressable::URI::CharacterClasses::UNRESERVED + # ) + # => "simple%2Fexample" + # Addressable::URI.normalize_component( + # "one%20two%2fthree%26four", + # "0-9a-zA-Z &/", + # "/" + # ) + # => "one two%2Fthree&four" + # @param component [String, #to_str] The URI component to encode. + # @param character_class [String, Regexp] The characters which are not percent encoded. If a String + # is passed, the String must be formatted as a regular + # expression character class. (Do not include the surrounding square + # brackets.) For example, "b-zB-Z0-9" would cause + # everything but the letters 'b' through 'z' and the numbers '0' + # through '9' to be percent encoded. If a Regexp is passed, + # the value /[^b-zB-Z0-9]/ would have the same effect. A + # set of useful String values may be found in the + # Addressable::URI::CharacterClasses module. The default + # value is the reserved plus unreserved character classes specified in + # RFC 3986. + # @param leave_encoded [String] When character_class is a String then + # leave_encoded is a string of characters that should remain + # percent encoded while normalizing the component; if they appear percent + # encoded in the original component, then they will be upcased ("%2f" + # normalized to "%2F") but otherwise left alone. + # @return [String] The normalized component. + # + # source://addressable//lib/addressable/uri.rb#552 def normalize_component(component, character_class = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end + + # Resolves paths to their simplest form. + # + # @param path [String] The path to normalize. + # @return [String] The normalized path. + # + # source://addressable//lib/addressable/uri.rb#2440 def normalize_path(path); end + + # Normalizes the encoding of a URI. Characters within a hostname are + # not percent encoded to allow for internationalized domain names. + # + # @param uri [String, Addressable::URI, #to_str] The URI to encode. + # @param return_type [Class] The type of object to return. + # This value may only be set to String or + # Addressable::URI. All other values are invalid. Defaults + # to String. + # @return [String, Addressable::URI] The encoded URI. + # The return type is determined by the return_type + # parameter. + # + # source://addressable//lib/addressable/uri.rb#671 def normalized_encode(uri, return_type = T.unsafe(nil)); end + + # Returns a URI object based on the parsed string. + # + # @param uri [String, Addressable::URI, #to_str] The URI string to parse. + # No parsing is performed if the object is already an + # Addressable::URI. + # @return [Addressable::URI] The parsed URI. + # + # source://addressable//lib/addressable/uri.rb#114 def parse(uri); end + + # Returns a hash of common IP-based schemes and their default port + # numbers. Adding new schemes to this hash, as necessary, will allow + # for better URI normalization. + # + # source://addressable//lib/addressable/uri.rb#1376 def port_mapping; end + + # Unencodes any percent encoded characters within a URI component. + # This method may be used for unencoding either components or full URIs, + # however, it is recommended to use the unencode_component + # alias when unencoding components. + # + # @param uri [String, Addressable::URI, #to_str] The URI or component to unencode. + # @param return_type [Class] The type of object to return. + # This value may only be set to String or + # Addressable::URI. All other values are invalid. Defaults + # to String. + # @param leave_encoded [String] A string of characters to leave encoded. If a percent encoded character + # in this list is encountered then it will remain percent encoded. + # @return [String, Addressable::URI] The unencoded component or URI. + # The return type is determined by the return_type + # parameter. + # + # source://addressable//lib/addressable/uri.rb#472 def unencode(uri, return_type = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end + + # Unencodes any percent encoded characters within a URI component. + # This method may be used for unencoding either components or full URIs, + # however, it is recommended to use the unencode_component + # alias when unencoding components. + # + # @param uri [String, Addressable::URI, #to_str] The URI or component to unencode. + # @param return_type [Class] The type of object to return. + # This value may only be set to String or + # Addressable::URI. All other values are invalid. Defaults + # to String. + # @param leave_encoded [String] A string of characters to leave encoded. If a percent encoded character + # in this list is encountered then it will remain percent encoded. + # @return [String, Addressable::URI] The unencoded component or URI. + # The return type is determined by the return_type + # parameter. + # + # source://addressable//lib/addressable/uri.rb#472 def unencode_component(uri, return_type = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end + + # Unencodes any percent encoded characters within a URI component. + # This method may be used for unencoding either components or full URIs, + # however, it is recommended to use the unencode_component + # alias when unencoding components. + # + # @param uri [String, Addressable::URI, #to_str] The URI or component to unencode. + # @param return_type [Class] The type of object to return. + # This value may only be set to String or + # Addressable::URI. All other values are invalid. Defaults + # to String. + # @param leave_encoded [String] A string of characters to leave encoded. If a percent encoded character + # in this list is encountered then it will remain percent encoded. + # @return [String, Addressable::URI] The unencoded component or URI. + # The return type is determined by the return_type + # parameter. + # + # source://addressable//lib/addressable/uri.rb#472 def unescape(uri, return_type = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end + + # Unencodes any percent encoded characters within a URI component. + # This method may be used for unencoding either components or full URIs, + # however, it is recommended to use the unencode_component + # alias when unencoding components. + # + # @param uri [String, Addressable::URI, #to_str] The URI or component to unencode. + # @param return_type [Class] The type of object to return. + # This value may only be set to String or + # Addressable::URI. All other values are invalid. Defaults + # to String. + # @param leave_encoded [String] A string of characters to leave encoded. If a percent encoded character + # in this list is encountered then it will remain percent encoded. + # @return [String, Addressable::URI] The unencoded component or URI. + # The return type is determined by the return_type + # parameter. + # + # source://addressable//lib/addressable/uri.rb#472 def unescape_component(uri, return_type = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end end end +# Container for the character classes specified in +# RFC 3986. +# +# Note: Concatenated and interpolated `String`s are not affected by the +# `frozen_string_literal` directive and must be frozen explicitly. +# +# Interpolated `String`s *were* frozen this way before Ruby 3.0: +# https://bugs.ruby-lang.org/issues/17104 +# +# source://addressable//lib/addressable/uri.rb#46 module Addressable::URI::CharacterClasses; end + +# source://addressable//lib/addressable/uri.rb#47 Addressable::URI::CharacterClasses::ALPHA = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/uri.rb#57 Addressable::URI::CharacterClasses::AUTHORITY = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/uri.rb#48 Addressable::URI::CharacterClasses::DIGIT = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/uri.rb#60 Addressable::URI::CharacterClasses::FRAGMENT = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/uri.rb#49 Addressable::URI::CharacterClasses::GEN_DELIMS = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/uri.rb#56 Addressable::URI::CharacterClasses::HOST = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/uri.rb#58 Addressable::URI::CharacterClasses::PATH = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/uri.rb#54 Addressable::URI::CharacterClasses::PCHAR = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/uri.rb#59 Addressable::URI::CharacterClasses::QUERY = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/uri.rb#51 Addressable::URI::CharacterClasses::RESERVED = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/uri.rb#53 Addressable::URI::CharacterClasses::RESERVED_AND_UNRESERVED = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/uri.rb#55 Addressable::URI::CharacterClasses::SCHEME = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/uri.rb#50 Addressable::URI::CharacterClasses::SUB_DELIMS = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/uri.rb#52 Addressable::URI::CharacterClasses::UNRESERVED = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/uri.rb#72 module Addressable::URI::CharacterClassesRegexps; end + +# source://addressable//lib/addressable/uri.rb#73 Addressable::URI::CharacterClassesRegexps::AUTHORITY = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#74 Addressable::URI::CharacterClassesRegexps::FRAGMENT = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#75 Addressable::URI::CharacterClassesRegexps::HOST = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#76 Addressable::URI::CharacterClassesRegexps::PATH = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#77 Addressable::URI::CharacterClassesRegexps::QUERY = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#78 Addressable::URI::CharacterClassesRegexps::RESERVED = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#79 Addressable::URI::CharacterClassesRegexps::RESERVED_AND_UNRESERVED = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#80 Addressable::URI::CharacterClassesRegexps::SCHEME = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#81 Addressable::URI::CharacterClassesRegexps::UNRESERVED = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#85 Addressable::URI::EMPTY_STR = T.let(T.unsafe(nil), String) + +# Raised if something other than a uri is supplied. +# +# source://addressable//lib/addressable/uri.rb#34 class Addressable::URI::InvalidURIError < ::StandardError; end + +# source://addressable//lib/addressable/uri.rb#2598 module Addressable::URI::NONE; end + +# source://addressable//lib/addressable/uri.rb#1530 Addressable::URI::NORMPATH = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#63 module Addressable::URI::NormalizeCharacterClasses; end + +# source://addressable//lib/addressable/uri.rb#68 Addressable::URI::NormalizeCharacterClasses::FRAGMENT = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#64 Addressable::URI::NormalizeCharacterClasses::HOST = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#66 Addressable::URI::NormalizeCharacterClasses::PCHAR = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#69 Addressable::URI::NormalizeCharacterClasses::QUERY = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#67 Addressable::URI::NormalizeCharacterClasses::SCHEME = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#65 Addressable::URI::NormalizeCharacterClasses::UNRESERVED = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#2427 Addressable::URI::PARENT = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/uri.rb#89 Addressable::URI::PORT_MAPPING = T.let(T.unsafe(nil), Hash) + +# source://addressable//lib/addressable/uri.rb#2429 Addressable::URI::RULE_2A = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#2430 Addressable::URI::RULE_2B_2C = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#2431 Addressable::URI::RULE_2D = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#2432 Addressable::URI::RULE_PREFIXED_PARENT = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#2426 Addressable::URI::SELF_REF = T.let(T.unsafe(nil), String) + +# Tables used to optimize encoding operations in `self.encode_component` +# and `self.normalize_component` +# +# source://addressable//lib/addressable/uri.rb#360 Addressable::URI::SEQUENCE_ENCODING_TABLE = T.let(T.unsafe(nil), Array) + +# source://addressable//lib/addressable/uri.rb#364 Addressable::URI::SEQUENCE_UPCASED_PERCENT_ENCODING_TABLE = T.let(T.unsafe(nil), Array) + +# source://addressable//lib/addressable/uri.rb#84 Addressable::URI::SLASH = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/uri.rb#87 Addressable::URI::URIREGEX = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/version.rb#23 module Addressable::VERSION; end + +# source://addressable//lib/addressable/version.rb#24 Addressable::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/version.rb#25 Addressable::VERSION::MINOR = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/version.rb#28 Addressable::VERSION::STRING = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/version.rb#26 Addressable::VERSION::TINY = T.let(T.unsafe(nil), Integer) diff --git a/Library/Homebrew/sorbet/rbi/gems/ast@2.4.2.rbi b/Library/Homebrew/sorbet/rbi/gems/ast@2.4.2.rbi index 687dae5b0e7ce2..3fc4495da71a72 100644 --- a/Library/Homebrew/sorbet/rbi/gems/ast@2.4.2.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/ast@2.4.2.rbi @@ -4,34 +4,263 @@ # This is an autogenerated file for types exported from the `ast` gem. # Please instead update this file by running `bin/tapioca gem ast`. +# {AST} is a library for manipulating abstract syntax trees. +# +# It embraces immutability; each AST node is inherently frozen at +# creation, and updating a child node requires recreating that node +# and its every parent, recursively. +# This is a design choice. It does create some pressure on +# garbage collector, but completely eliminates all concurrency +# and aliasing problems. +# +# See also {AST::Node}, {AST::Processor::Mixin} and {AST::Sexp} for +# additional recommendations and design patterns. +# +# source://ast//lib/ast.rb#13 module AST; end +# Node is an immutable class, instances of which represent abstract +# syntax tree nodes. It combines semantic information (i.e. anything +# that affects the algorithmic properties of a program) with +# meta-information (line numbers or compiler intermediates). +# +# Notes on inheritance +# ==================== +# +# The distinction between semantics and metadata is important. Complete +# semantic information should be contained within just the {#type} and +# {#children} of a Node instance; in other words, if an AST was to be +# stripped of all meta-information, it should remain a valid AST which +# could be successfully processed to yield a result with the same +# algorithmic properties. +# +# Thus, Node should never be inherited in order to define methods which +# affect or return semantic information, such as getters for `class_name`, +# `superclass` and `body` in the case of a hypothetical `ClassNode`. The +# correct solution is to use a generic Node with a {#type} of `:class` +# and three children. See also {Processor} for tips on working with such +# ASTs. +# +# On the other hand, Node can and should be inherited to define +# application-specific metadata (see also {#initialize}) or customize the +# printing format. It is expected that an application would have one or two +# such classes and use them across the entire codebase. +# +# The rationale for this pattern is extensibility and maintainability. +# Unlike static ones, dynamic languages do not require the presence of a +# predefined, rigid structure, nor does it improve dispatch efficiency, +# and while such a structure can certainly be defined, it does not add +# any value but incurs a maintaining cost. +# For example, extending the AST even with a transformation-local +# temporary node type requires making globally visible changes to +# the codebase. +# +# source://ast//lib/ast/node.rb#40 class AST::Node + # Constructs a new instance of Node. + # + # The arguments `type` and `children` are converted with `to_sym` and + # `to_a` respectively. Additionally, the result of converting `children` + # is frozen. While mutating the arguments is generally considered harmful, + # the most common case is to pass an array literal to the constructor. If + # your code does not expect the argument to be frozen, use `#dup`. + # + # The `properties` hash is passed to {#assign_properties}. + # + # @return [Node] a new instance of Node + # + # source://ast//lib/ast/node.rb#72 def initialize(type, children = T.unsafe(nil), properties = T.unsafe(nil)); end + # Concatenates `array` with `children` and returns the resulting node. + # + # @return [AST::Node] + # + # source://ast//lib/ast/node.rb#168 def +(array); end + + # Appends `element` to `children` and returns the resulting node. + # + # @return [AST::Node] + # + # source://ast//lib/ast/node.rb#177 def <<(element); end + + # Compares `self` to `other`, possibly converting with `to_ast`. Only + # `type` and `children` are compared; metadata is deliberately ignored. + # + # @return [Boolean] + # + # source://ast//lib/ast/node.rb#153 def ==(other); end + + # Appends `element` to `children` and returns the resulting node. + # + # @return [AST::Node] + # + # source://ast//lib/ast/node.rb#177 def append(element); end + + # Returns the children of this node. + # The returned value is frozen. + # The to_a alias is useful for decomposing nodes concisely. + # For example: + # + # node = s(:gasgn, :$foo, s(:integer, 1)) + # var_name, value = *node + # p var_name # => :$foo + # p value # => (integer 1) + # + # @return [Array] + # + # source://ast//lib/ast/node.rb#56 def children; end + + # Nodes are already frozen, so there is no harm in returning the + # current node as opposed to initializing from scratch and freezing + # another one. + # + # @return self + # + # source://ast//lib/ast/node.rb#115 def clone; end + + # Concatenates `array` with `children` and returns the resulting node. + # + # @return [AST::Node] + # + # source://ast//lib/ast/node.rb#168 def concat(array); end + + # Enables matching for Node, where type is the first element + # and the children are remaining items. + # + # @return [Array] + # + # source://ast//lib/ast/node.rb#253 def deconstruct; end + + # Nodes are already frozen, so there is no harm in returning the + # current node as opposed to initializing from scratch and freezing + # another one. + # + # @return self + # + # source://ast//lib/ast/node.rb#115 def dup; end + + # Test if other object is equal to + # + # @param other [Object] + # @return [Boolean] + # + # source://ast//lib/ast/node.rb#85 def eql?(other); end + + # Returns the precomputed hash value for this node + # + # @return [Fixnum] + # + # source://ast//lib/ast/node.rb#61 def hash; end + + # Converts `self` to a s-expression ruby string. + # The code return will recreate the node, using the sexp module s() + # + # @param indent [Integer] Base indentation level. + # @return [String] + # + # source://ast//lib/ast/node.rb#211 def inspect(indent = T.unsafe(nil)); end + + # Returns the children of this node. + # The returned value is frozen. + # The to_a alias is useful for decomposing nodes concisely. + # For example: + # + # node = s(:gasgn, :$foo, s(:integer, 1)) + # var_name, value = *node + # p var_name # => :$foo + # p value # => (integer 1) + # + # @return [Array] + # + # source://ast//lib/ast/node.rb#56 def to_a; end + + # @return [AST::Node] self + # + # source://ast//lib/ast/node.rb#229 def to_ast; end + + # Converts `self` to a pretty-printed s-expression. + # + # @param indent [Integer] Base indentation level. + # @return [String] + # + # source://ast//lib/ast/node.rb#187 def to_s(indent = T.unsafe(nil)); end + + # Converts `self` to a pretty-printed s-expression. + # + # @param indent [Integer] Base indentation level. + # @return [String] + # + # source://ast//lib/ast/node.rb#187 def to_sexp(indent = T.unsafe(nil)); end + + # Converts `self` to an Array where the first element is the type as a Symbol, + # and subsequent elements are the same representation of its children. + # + # @return [Array] + # + # source://ast//lib/ast/node.rb#237 def to_sexp_array; end + + # Returns the type of this node. + # + # @return [Symbol] + # + # source://ast//lib/ast/node.rb#43 def type; end + + # Returns a new instance of Node where non-nil arguments replace the + # corresponding fields of `self`. + # + # For example, `Node.new(:foo, [ 1, 2 ]).updated(:bar)` would yield + # `(bar 1 2)`, and `Node.new(:foo, [ 1, 2 ]).updated(nil, [])` would + # yield `(foo)`. + # + # If the resulting node would be identical to `self`, does nothing. + # + # @param type [Symbol, nil] + # @param children [Array, nil] + # @param properties [Hash, nil] + # @return [AST::Node] + # + # source://ast//lib/ast/node.rb#133 def updated(type = T.unsafe(nil), children = T.unsafe(nil), properties = T.unsafe(nil)); end protected + # By default, each entry in the `properties` hash is assigned to + # an instance variable in this instance of Node. A subclass should define + # attribute readers for such variables. The values passed in the hash + # are not frozen or whitelisted; such behavior can also be implemented + # by subclassing Node and overriding this method. + # + # @return [nil] + # + # source://ast//lib/ast/node.rb#98 def assign_properties(properties); end + + # Returns `@type` with all underscores replaced by dashes. This allows + # to write symbol literals without quotes in Ruby sources and yet have + # nicely looking s-expressions. + # + # @return [String] + # + # source://ast//lib/ast/node.rb#264 def fancy_type; end private @@ -39,16 +268,317 @@ class AST::Node def original_dup; end end +# This class includes {AST::Processor::Mixin}; however, it is +# deprecated, since the module defines all of the behaviors that +# the processor includes. Any new libraries should use +# {AST::Processor::Mixin} instead of subclassing this. +# +# @deprecated Use {AST::Processor::Mixin} instead. +# +# source://ast//lib/ast/processor.rb#8 class AST::Processor include ::AST::Processor::Mixin end +# The processor module is a module which helps transforming one +# AST into another. In a nutshell, the {#process} method accepts +# a {Node} and dispatches it to a handler corresponding to its +# type, and returns a (possibly) updated variant of the node. +# +# The processor module has a set of associated design patterns. +# They are best explained with a concrete example. Let's define a +# simple arithmetic language and an AST format for it: +# +# Terminals (AST nodes which do not have other AST nodes inside): +# +# * `(integer )`, +# +# Nonterminals (AST nodes with other nodes as children): +# +# * `(add )`, +# * `(multiply )`, +# * `(divide )`, +# * `(negate )`, +# * `(store )`: stores value of `` +# into a variable named ``, +# * `(load )`: loads value of a variable named +# ``, +# * `(each ...)`: computes each of the ``s and +# prints the result. +# +# All AST nodes have the same Ruby class, and therefore they don't +# know how to traverse themselves. (A solution which dynamically +# checks the type of children is possible, but is slow and +# error-prone.) So, a class including the module which knows how +# to traverse the entire tree should be defined. Such classes +# have a handler for each nonterminal node which recursively +# processes children nodes: +# +# require 'ast' +# +# class ArithmeticsProcessor +# include AST::Processor::Mixin +# # This method traverses any binary operators such as (add) +# # or (multiply). +# def process_binary_op(node) +# # Children aren't decomposed automatically; it is +# # suggested to use Ruby multiple assignment expansion, +# # as it is very convenient here. +# left_expr, right_expr = *node +# +# # AST::Node#updated won't change node type if nil is +# # passed as a first argument, which allows to reuse the +# # same handler for multiple node types using `alias' +# # (below). +# node.updated(nil, [ +# process(left_expr), +# process(right_expr) +# ]) +# end +# alias_method :on_add, :process_binary_op +# alias_method :on_multiply, :process_binary_op +# alias_method :on_divide, :process_binary_op +# +# def on_negate(node) +# # It is also possible to use #process_all for more +# # compact code if every child is a Node. +# node.updated(nil, process_all(node)) +# end +# +# def on_store(node) +# expr, variable_name = *node +# +# # Note that variable_name is not a Node and thus isn't +# # passed to #process. +# node.updated(nil, [ +# process(expr), +# variable_name +# ]) +# end +# +# # (load) is effectively a terminal node, and so it does +# # not need an explicit handler, as the following is the +# # default behavior. Essentially, for any nodes that don't +# # have a defined handler, the node remains unchanged. +# def on_load(node) +# nil +# end +# +# def on_each(node) +# node.updated(nil, process_all(node)) +# end +# end +# +# Let's test our ArithmeticsProcessor: +# +# include AST::Sexp +# expr = s(:add, s(:integer, 2), s(:integer, 2)) +# +# p ArithmeticsProcessor.new.process(expr) == expr # => true +# +# As expected, it does not change anything at all. This isn't +# actually very useful, so let's now define a Calculator, which +# will compute the expression values: +# +# # This Processor folds nonterminal nodes and returns an +# # (integer) terminal node. +# class ArithmeticsCalculator < ArithmeticsProcessor +# def compute_op(node) +# # First, node children are processed and then unpacked +# # to local variables. +# nodes = process_all(node) +# +# if nodes.all? { |node| node.type == :integer } +# # If each of those nodes represents a literal, we can +# # fold this node! +# values = nodes.map { |node| node.children.first } +# AST::Node.new(:integer, [ +# yield(values) +# ]) +# else +# # Otherwise, we can just leave the current node in the +# # tree and only update it with processed children +# # nodes, which can be partially folded. +# node.updated(nil, nodes) +# end +# end +# +# def on_add(node) +# compute_op(node) { |left, right| left + right } +# end +# +# def on_multiply(node) +# compute_op(node) { |left, right| left * right } +# end +# end +# +# Let's check: +# +# p ArithmeticsCalculator.new.process(expr) # => (integer 4) +# +# Excellent, the calculator works! Now, a careful reader could +# notice that the ArithmeticsCalculator does not know how to +# divide numbers. What if we pass an expression with division to +# it? +# +# expr_with_division = \ +# s(:add, +# s(:integer, 1), +# s(:divide, +# s(:add, s(:integer, 8), s(:integer, 4)), +# s(:integer, 3))) # 1 + (8 + 4) / 3 +# +# folded_expr_with_division = ArithmeticsCalculator.new.process(expr_with_division) +# p folded_expr_with_division +# # => (add +# # (integer 1) +# # (divide +# # (integer 12) +# # (integer 3))) +# +# As you can see, the expression was folded _partially_: the inner +# `(add)` node which could be computed was folded to +# `(integer 12)`, the `(divide)` node is left as-is because there +# is no computing handler for it, and the root `(add)` node was +# also left as it is because some of its children were not +# literals. +# +# Note that this partial folding is only possible because the +# _data_ format, i.e. the format in which the computed values of +# the nodes are represented, is the same as the AST itself. +# +# Let's extend our ArithmeticsCalculator class further. +# +# class ArithmeticsCalculator +# def on_divide(node) +# compute_op(node) { |left, right| left / right } +# end +# +# def on_negate(node) +# # Note how #compute_op works regardless of the operator +# # arity. +# compute_op(node) { |value| -value } +# end +# end +# +# Now, let's apply our renewed ArithmeticsCalculator to a partial +# result of previous evaluation: +# +# p ArithmeticsCalculator.new.process(expr_with_division) # => (integer 5) +# +# Five! Excellent. This is also pretty much how CRuby 1.8 executed +# its programs. +# +# Now, let's do some automated bug searching. Division by zero is +# an error, right? So if we could detect that someone has divided +# by zero before the program is even run, that could save some +# debugging time. +# +# class DivisionByZeroVerifier < ArithmeticsProcessor +# class VerificationFailure < Exception; end +# +# def on_divide(node) +# # You need to process the children to handle nested divisions +# # such as: +# # (divide +# # (integer 1) +# # (divide (integer 1) (integer 0)) +# left, right = process_all(node) +# +# if right.type == :integer && +# right.children.first == 0 +# raise VerificationFailure, "Ouch! This code divides by zero." +# end +# end +# +# def divides_by_zero?(ast) +# process(ast) +# false +# rescue VerificationFailure +# true +# end +# end +# +# nice_expr = \ +# s(:divide, +# s(:add, s(:integer, 10), s(:integer, 2)), +# s(:integer, 4)) +# +# p DivisionByZeroVerifier.new.divides_by_zero?(nice_expr) +# # => false. Good. +# +# bad_expr = \ +# s(:add, s(:integer, 10), +# s(:divide, s(:integer, 1), s(:integer, 0))) +# +# p DivisionByZeroVerifier.new.divides_by_zero?(bad_expr) +# # => true. WHOOPS. DO NOT RUN THIS. +# +# Of course, this won't detect more complex cases... unless you +# use some partial evaluation before! The possibilites are +# endless. Have fun. +# +# source://ast//lib/ast/processor/mixin.rb#240 module AST::Processor::Mixin + # Default handler. Does nothing. + # + # @param node [AST::Node] + # @return [AST::Node, nil] + # + # source://ast//lib/ast/processor/mixin.rb#284 def handler_missing(node); end + + # Dispatches `node`. If a node has type `:foo`, then a handler + # named `on_foo` is invoked with one argument, the `node`; if + # there isn't such a handler, {#handler_missing} is invoked + # with the same argument. + # + # If the handler returns `nil`, `node` is returned; otherwise, + # the return value of the handler is passed along. + # + # @param node [AST::Node, nil] + # @return [AST::Node, nil] + # + # source://ast//lib/ast/processor/mixin.rb#251 def process(node); end + + # {#process}es each node from `nodes` and returns an array of + # results. + # + # @param nodes [Array] + # @return [Array] + # + # source://ast//lib/ast/processor/mixin.rb#274 def process_all(nodes); end end +# This simple module is very useful in the cases where one needs +# to define deeply nested ASTs from Ruby code, for example, in +# tests. It should be used like this: +# +# describe YourLanguage::AST do +# include Sexp +# +# it "should correctly parse expressions" do +# YourLanguage.parse("1 + 2 * 3").should == +# s(:add, +# s(:integer, 1), +# s(:multiply, +# s(:integer, 2), +# s(:integer, 3))) +# end +# end +# +# This way the amount of boilerplate code is greatly reduced. +# +# source://ast//lib/ast/sexp.rb#20 module AST::Sexp + # Creates a {Node} with type `type` and children `children`. + # Note that the resulting node is of the type AST::Node and not a + # subclass. + # This would not pose a problem with comparisons, as {Node#==} + # ignores metadata. + # + # source://ast//lib/ast/sexp.rb#26 def s(type, *children); end end diff --git a/Library/Homebrew/sorbet/rbi/gems/bindata@2.4.15.rbi b/Library/Homebrew/sorbet/rbi/gems/bindata@2.4.15.rbi index 33c16953df10a5..84fdca10457e38 100644 --- a/Library/Homebrew/sorbet/rbi/gems/bindata@2.4.15.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/bindata@2.4.15.rbi @@ -4,232 +4,811 @@ # This is an autogenerated file for types exported from the `bindata` gem. # Please instead update this file by running `bin/tapioca gem bindata`. +# source://bindata//lib/bindata/version.rb#1 module BinData extend ::BinData::BitFieldFactory extend ::BinData::IntFactory private + # @yield [@tracer] + # + # source://bindata//lib/bindata/trace.rb#40 def trace_message; end + + # Turn on trace information when reading a BinData object. + # If +block+ is given then the tracing only occurs for that block. + # This is useful for debugging a BinData declaration. + # + # source://bindata//lib/bindata/trace.rb#26 def trace_reading(io = T.unsafe(nil)); end class << self + # @yield [@tracer] + # + # source://bindata//lib/bindata/trace.rb#40 def trace_message; end + + # Turn on trace information when reading a BinData object. + # If +block+ is given then the tracing only occurs for that block. + # This is useful for debugging a BinData declaration. + # + # source://bindata//lib/bindata/trace.rb#26 def trace_reading(io = T.unsafe(nil)); end end end +# source://bindata//lib/bindata/params.rb#4 module BinData::AcceptedParametersPlugin + # source://bindata//lib/bindata/params.rb#30 def accepted_parameters; end + + # Default parameters can be overridden when instantiating a data object. + # + # source://bindata//lib/bindata/params.rb#16 def default_parameter(*args); end + + # Default parameters can be overridden when instantiating a data object. + # + # source://bindata//lib/bindata/params.rb#16 def default_parameters(*args); end + + # Mandatory parameters must be present when instantiating a data object. + # + # source://bindata//lib/bindata/params.rb#6 def mandatory_parameter(*args); end + + # Mandatory parameters must be present when instantiating a data object. + # + # source://bindata//lib/bindata/params.rb#6 def mandatory_parameters(*args); end + + # Mutually exclusive parameters may not all be present when + # instantiating a data object. + # + # source://bindata//lib/bindata/params.rb#22 def mutually_exclusive_parameters(*args); end + + # Optional parameters may be present when instantiating a data object. + # + # source://bindata//lib/bindata/params.rb#11 def optional_parameter(*args); end + + # Optional parameters may be present when instantiating a data object. + # + # source://bindata//lib/bindata/params.rb#11 def optional_parameters(*args); end end +# BinData objects accept parameters when initializing. AcceptedParameters +# allow a BinData class to declaratively identify accepted parameters as +# mandatory, optional, default or mutually exclusive. +# +# source://bindata//lib/bindata/params.rb#41 class BinData::AcceptedParametersPlugin::AcceptedParameters + # @return [AcceptedParameters] a new instance of AcceptedParameters + # + # source://bindata//lib/bindata/params.rb#42 def initialize(ancestor_parameters = T.unsafe(nil)); end + # source://bindata//lib/bindata/params.rb#94 def all; end + + # source://bindata//lib/bindata/params.rb#72 def default(args = T.unsafe(nil)); end + + # source://bindata//lib/bindata/params.rb#56 def mandatory(*args); end + + # source://bindata//lib/bindata/params.rb#82 def mutually_exclusive(*args); end + + # source://bindata//lib/bindata/params.rb#64 def optional(*args); end private + # source://bindata//lib/bindata/params.rb#107 def ensure_valid_names(names); end + + # source://bindata//lib/bindata/params.rb#101 def to_syms(args); end class << self + # source://bindata//lib/bindata/params.rb#117 def invalid_parameter_names; end end end +# An Array is a list of data objects of the same type. +# +# require 'bindata' +# +# data = "\x03\x04\x05\x06\x07\x08\x09" +# +# obj = BinData::Array.new(type: :int8, initial_length: 6) +# obj.read(data) #=> [3, 4, 5, 6, 7, 8] +# +# obj = BinData::Array.new(type: :int8, +# read_until: -> { index == 1 }) +# obj.read(data) #=> [3, 4] +# +# obj = BinData::Array.new(type: :int8, +# read_until: -> { element >= 6 }) +# obj.read(data) #=> [3, 4, 5, 6] +# +# obj = BinData::Array.new(type: :int8, +# read_until: -> { array[index] + array[index - 1] == 13 }) +# obj.read(data) #=> [3, 4, 5, 6, 7] +# +# obj = BinData::Array.new(type: :int8, read_until: :eof) +# obj.read(data) #=> [3, 4, 5, 6, 7, 8, 9] +# +# == Parameters +# +# Parameters may be provided at initialisation to control the behaviour of +# an object. These params are: +# +# :type:: The symbol representing the data type of the +# array elements. If the type is to have params +# passed to it, then it should be provided as +# [type_symbol, hash_params]. +# :initial_length:: The initial length of the array. +# :read_until:: While reading, elements are read until this +# condition is true. This is typically used to +# read an array until a sentinel value is found. +# The variables +index+, +element+ and +array+ +# are made available to any lambda assigned to +# this parameter. If the value of this parameter +# is the symbol :eof, then the array will read +# as much data from the stream as possible. +# +# Each data object in an array has the variable +index+ made available +# to any lambda evaluated as a parameter of that data object. +# +# source://bindata//lib/bindata/array.rb#50 class BinData::Array < ::BinData::Base include ::Enumerable extend ::BinData::DSLMixin + # source://bindata//lib/bindata/array.rb#106 def <<(*args); end + + # Returns the element at +index+. + # + # source://bindata//lib/bindata/array.rb#139 def [](arg1, arg2 = T.unsafe(nil)); end + + # Sets the element at +index+. + # + # source://bindata//lib/bindata/array.rb#174 def []=(index, value); end + + # @raise [ArgumentError] + # + # source://bindata//lib/bindata/array.rb#82 def assign(array); end + + # Returns the element at +index+. Unlike +slice+, if +index+ is out + # of range the array will not be automatically extended. + # + # source://bindata//lib/bindata/array.rb#169 def at(index); end + + # @return [Boolean] + # + # source://bindata//lib/bindata/array.rb#78 def clear?; end + + # source://bindata//lib/bindata/array.rb#117 def concat(array); end + + # source://bindata//lib/bindata/array.rb#223 def debug_name_of(child); end + + # source://bindata//lib/bindata/array.rb#239 def do_num_bytes; end + + # source://bindata//lib/bindata/array.rb#235 def do_write(io); end + + # source://bindata//lib/bindata/array.rb#219 def each; end + + # @return [Boolean] + # + # source://bindata//lib/bindata/array.rb#210 def empty?; end + + # source://bindata//lib/bindata/array.rb#94 def find_index(obj); end + + # Returns the first index of +obj+ in self. + # + # Uses equal? for the comparator. + # + # source://bindata//lib/bindata/array.rb#102 def find_index_of(obj); end + + # Returns the first element, or the first +n+ elements, of the array. + # If the array is empty, the first form returns nil, and the second + # form returns an empty array. + # + # source://bindata//lib/bindata/array.rb#182 def first(n = T.unsafe(nil)); end + + # source://bindata//lib/bindata/array.rb#94 def index(obj); end + + # source://bindata//lib/bindata/array.rb#74 def initialize_instance; end + + # source://bindata//lib/bindata/array.rb#61 def initialize_shared_instance; end + + # source://bindata//lib/bindata/array.rb#122 def insert(index, *objs); end + + # Returns the last element, or the last +n+ elements, of the array. + # If the array is empty, the first form returns nil, and the second + # form returns an empty array. + # + # source://bindata//lib/bindata/array.rb#196 def last(n = T.unsafe(nil)); end + + # source://bindata//lib/bindata/array.rb#205 def length; end + + # source://bindata//lib/bindata/array.rb#228 def offset_of(child); end + + # source://bindata//lib/bindata/array.rb#106 def push(*args); end + + # source://bindata//lib/bindata/array.rb#205 def size; end + + # Returns the element at +index+. + # + # source://bindata//lib/bindata/array.rb#139 def slice(arg1, arg2 = T.unsafe(nil)); end + + # source://bindata//lib/bindata/array.rb#90 def snapshot; end + + # Allow this object to be used in array context. + # + # source://bindata//lib/bindata/array.rb#215 def to_ary; end + + # source://bindata//lib/bindata/array.rb#112 def unshift(*args); end private + # source://bindata//lib/bindata/array.rb#257 def append_new_element; end + + # source://bindata//lib/bindata/array.rb#253 def elements; end + + # source://bindata//lib/bindata/array.rb#246 def extend_array(max_index); end + + # source://bindata//lib/bindata/array.rb#263 def new_element; end + + # source://bindata//lib/bindata/array.rb#153 def slice_index(index); end + + # source://bindata//lib/bindata/array.rb#162 def slice_range(range); end + + # source://bindata//lib/bindata/array.rb#158 def slice_start_length(start, length); end + + # source://bindata//lib/bindata/array.rb#271 def sum_num_bytes_below_index(index); end + + # source://bindata//lib/bindata/array.rb#267 def sum_num_bytes_for_all_elements; end end +# source://bindata//lib/bindata/array.rb#284 class BinData::ArrayArgProcessor < ::BinData::BaseArgProcessor + # source://bindata//lib/bindata/array.rb#285 def sanitize_parameters!(obj_class, params); end end +# Add these offset options to Base +# +# source://bindata//lib/bindata/base.rb#11 class BinData::Base include ::BinData::Framework include ::BinData::RegisterNamePlugin extend ::BinData::AcceptedParametersPlugin + # source://bindata//lib/bindata/warnings.rb#12 def initialize(*args); end + # source://bindata//lib/bindata/base.rb#231 def ==(other); end + + # Override and delegate =~ as it is defined in Object. + # + # source://bindata//lib/bindata/base.rb#199 def =~(other); end + + # Returns the offset (in bytes) of this object with respect to its most + # distant ancestor. + # + # source://bindata//lib/bindata/base.rb#214 def abs_offset; end + def base_respond_to?(*_arg0); end + + # Resets the internal state to that of a newly created object. + # + # source://bindata//lib/bindata/base.rb#137 def clear; end + + # Returns a user friendly name of this object for debugging purposes. + # + # source://bindata//lib/bindata/base.rb#204 def debug_name; end + + # Returns the result of evaluating the parameter identified by +key+. + # + # +overrides+ is an optional +parameters+ like hash that allow the + # parameters given at object construction to be overridden. + # + # Returns nil if +key+ does not refer to any parameter. + # + # source://bindata//lib/bindata/base.rb#110 def eval_parameter(key, overrides = T.unsafe(nil)); end + + # Returns the parameter referenced by +key+. + # Use this method if you are sure the parameter is not to be evaluated. + # You most likely want #eval_parameter. + # + # source://bindata//lib/bindata/base.rb#127 def get_parameter(key); end + + # Returns whether +key+ exists in the +parameters+ hash. + # + # @return [Boolean] + # + # source://bindata//lib/bindata/base.rb#132 def has_parameter?(key); end + + # source://bindata//lib/bindata/warnings.rb#25 def initialize_instance(*args); end + + # source://bindata//lib/bindata/warnings.rb#12 def initialize_with_warning(*args); end + + # Return a human readable representation of this data object. + # + # source://bindata//lib/bindata/base.rb#184 def inspect; end + + # Returns a lazy evaluator for this object. + # + # source://bindata//lib/bindata/base.rb#120 def lazy_evaluator; end + + # Creates a new data object based on this instance. + # + # All parameters will be be duplicated. Use this method + # when creating multiple objects with the same parameters. + # + # source://bindata//lib/bindata/base.rb#95 def new(value = T.unsafe(nil), parent = T.unsafe(nil)); end + + # Returns the number of bytes it will take to write this data object. + # + # source://bindata//lib/bindata/base.rb#167 def num_bytes; end + + # Returns the value of attribute parent. + # + # source://bindata//lib/bindata/base.rb#88 def parent; end + + # Work with Ruby's pretty-printer library. + # + # source://bindata//lib/bindata/base.rb#194 def pretty_print(pp); end + + # Reads data into this data object. + # + # source://bindata//lib/bindata/base.rb#142 def read(io, &block); end + + # Returns the offset (in bytes) of this object with respect to its parent. + # + # source://bindata//lib/bindata/base.rb#223 def rel_offset; end + + # A version of +respond_to?+ used by the lazy evaluator. It doesn't + # reinvoke the evaluator so as to avoid infinite evaluation loops. + # + # @return [Boolean] + # + # source://bindata//lib/bindata/base.rb#238 def safe_respond_to?(symbol, include_private = T.unsafe(nil)); end + + # Returns the string representation of this data object. + # + # source://bindata//lib/bindata/base.rb#172 def to_binary_s(&block); end + + # Returns the hexadecimal string representation of this data object. + # + # source://bindata//lib/bindata/base.rb#179 def to_hex(&block); end + + # Return a string representing this data object. + # + # source://bindata//lib/bindata/base.rb#189 def to_s; end + + # Writes the value for this data object to +io+. + # + # source://bindata//lib/bindata/base.rb#155 def write(io, &block); end protected + # Sets the attribute parent + # + # @param value the value to set the attribute parent to. + # + # source://bindata//lib/bindata/base.rb#88 def parent=(_arg0); end private + # source://bindata//lib/bindata/base.rb#284 def binary_string(str); end + + # source://bindata//lib/bindata/base.rb#247 def extract_args(args); end + + # Creates a new data object. + # + # Args are optional, but if present, must be in the following order. + # + # +value+ is a value that is +assign+ed immediately after initialization. + # + # +parameters+ is a hash containing symbol keys. Some parameters may + # reference callable objects (methods or procs). + # + # +parent+ is the parent data object (e.g. struct, array, choice) this + # object resides under. + # Don't override initialize. If you are defining a new kind of datatype + # (list, array, choice etc) then put your initialization code in + # #initialize_instance. BinData objects might be initialized as prototypes + # and your initialization code may not be called. + # + # If you're subclassing BinData::Record, you are definitely doing the wrong + # thing. Read the documentation on how to use BinData. + # http://github.com/dmendel/bindata/wiki/Records + # + # @return [Base] a new instance of Base + # + # source://bindata//lib/bindata/base.rb#80 def initialize_without_warning(*args); end + + # Is this object tree currently being read? Used by BasePrimitive. + # + # @return [Boolean] + # + # source://bindata//lib/bindata/base.rb#259 def reading?; end + + # source://bindata//lib/bindata/base.rb#251 def start_read; end + + # source://bindata//lib/bindata/base.rb#273 def top_level; end + + # source://bindata//lib/bindata/base.rb#267 def top_level_get(sym); end + + # source://bindata//lib/bindata/base.rb#263 def top_level_set(sym, value); end class << self + # The arg processor for this class. + # + # source://bindata//lib/bindata/base.rb#26 def arg_processor(name = T.unsafe(nil)); end + + # The +auto_call_delayed_io+ keyword sets a data object tree to perform + # multi pass I/O automatically. + # + # source://bindata//lib/bindata/delayed_io.rb#161 def auto_call_delayed_io; end + + # The name of this class as used by Records, Arrays etc. + # + # source://bindata//lib/bindata/base.rb#41 def bindata_name; end + + # source://bindata//lib/bindata/base.rb#53 def inherited(subclass); end + + # Instantiates this class and reads from +io+, returning the newly + # created data object. +args+ will be used when instantiating. + # + # source://bindata//lib/bindata/base.rb#19 def read(io, *args, &block); end private + # Registers all subclasses of this class for use + # + # source://bindata//lib/bindata/base.rb#51 def register_subclasses; end + + # Call this method if this class is abstract and not to be used. + # + # source://bindata//lib/bindata/base.rb#46 def unregister_self; end end end +# source://bindata//lib/bindata/delayed_io.rb#179 module BinData::Base::AutoCallDelayedIO + # source://bindata//lib/bindata/delayed_io.rb#180 def initialize_shared_instance; end + + # source://bindata//lib/bindata/delayed_io.rb#193 def num_bytes; end + + # source://bindata//lib/bindata/delayed_io.rb#185 def read(io); end + + # source://bindata//lib/bindata/delayed_io.rb#189 def write(io, *_); end end +# ArgProcessors process the arguments passed to BinData::Base.new into +# the form required to initialise the BinData object. +# +# Any passed parameters are sanitized so the BinData object doesn't +# need to perform error checking on the parameters. +# +# source://bindata//lib/bindata/base.rb#294 class BinData::BaseArgProcessor + # Takes the arguments passed to BinData::Base.new and + # extracts [value, sanitized_parameters, parent]. + # + # source://bindata//lib/bindata/base.rb#299 def extract_args(obj_class, obj_args); end + + # Performs sanity checks on the given parameters. + # This method converts the parameters to the form expected + # by the data object. + # + # source://bindata//lib/bindata/base.rb#332 def sanitize_parameters!(obj_class, obj_params); end + + # Separates the arguments passed to BinData::Base.new into + # [value, parameters, parent]. Called by #extract_args. + # + # source://bindata//lib/bindata/base.rb#308 def separate_args(_obj_class, obj_args); end end +# A BinData::BasePrimitive object is a container for a value that has a +# particular binary representation. A value corresponds to a primitive type +# such as as integer, float or string. Only one value can be contained by +# this object. This value can be read from or written to an IO stream. +# +# require 'bindata' +# +# obj = BinData::Uint8.new(initial_value: 42) +# obj #=> 42 +# obj.assign(5) +# obj #=> 5 +# obj.clear +# obj #=> 42 +# +# obj = BinData::Uint8.new(value: 42) +# obj #=> 42 +# obj.assign(5) +# obj #=> 42 +# +# obj = BinData::Uint8.new(assert: 3) +# obj.read("\005") #=> BinData::ValidityError: value is '5' but expected '3' +# +# obj = BinData::Uint8.new(assert: -> { value < 5 }) +# obj.read("\007") #=> BinData::ValidityError: value not as expected +# +# == Parameters +# +# Parameters may be provided at initialisation to control the behaviour of +# an object. These params include those for BinData::Base as well as: +# +# [:initial_value] This is the initial value to use before one is +# either #read or explicitly set with #value=. +# [:value] The object will always have this value. +# Calls to #value= are ignored when +# using this param. While reading, #value +# will return the value of the data read from the +# IO, not the result of the :value param. +# [:assert] Raise an error unless the value read or assigned +# meets this criteria. The variable +value+ is +# made available to any lambda assigned to this +# parameter. A boolean return indicates success +# or failure. Any other return is compared to +# the value just read in. +# [:asserted_value] Equivalent to :assert and :value. +# +# source://bindata//lib/bindata/base_primitive.rb#49 class BinData::BasePrimitive < ::BinData::Base + # source://bindata//lib/bindata/base_primitive.rb#115 def <=>(other); end + + # @raise [ArgumentError] + # + # source://bindata//lib/bindata/base_primitive.rb#72 def assign(val); end + + # @return [Boolean] + # + # source://bindata//lib/bindata/base_primitive.rb#68 def clear?; end + + # source://bindata//lib/bindata/base_primitive.rb#136 def do_num_bytes; end + + # source://bindata//lib/bindata/base_primitive.rb#128 def do_read(io); end + + # source://bindata//lib/bindata/trace.rb#58 def do_read_with_hook(io); end + + # source://bindata//lib/bindata/base_primitive.rb#132 def do_write(io); end + + # @return [Boolean] + # + # source://bindata//lib/bindata/base_primitive.rb#119 def eql?(other); end + + # source://bindata//lib/bindata/base_primitive.rb#124 def hash; end + + # source://bindata//lib/bindata/base_primitive.rb#64 def initialize_instance; end + + # source://bindata//lib/bindata/base_primitive.rb#56 def initialize_shared_instance; end + + # source://bindata//lib/bindata/base_primitive.rb#102 def method_missing(symbol, *args, &block); end + + # @return [Boolean] + # + # source://bindata//lib/bindata/base_primitive.rb#97 def respond_to?(symbol, include_private = T.unsafe(nil)); end + + # source://bindata//lib/bindata/base_primitive.rb#85 def snapshot; end + + # source://bindata//lib/bindata/trace.rb#63 def trace_value; end + + # source://bindata//lib/bindata/base_primitive.rb#89 def value; end + + # source://bindata//lib/bindata/base_primitive.rb#93 def value=(val); end private + # The unmodified value of this data object. Note that #snapshot calls this + # method. This indirection is so that #snapshot can be overridden in + # subclasses to modify the presentation value. + # + # source://bindata//lib/bindata/base_primitive.rb#146 def _value; end + + # Read a number of bytes from +io+ and return the value they represent. + # + # @raise [NotImplementedError] + # + # source://bindata//lib/bindata/base_primitive.rb#236 def read_and_return_value(io); end + + # Return a sensible default for this data. + # + # @raise [NotImplementedError] + # + # source://bindata//lib/bindata/base_primitive.rb#241 def sensible_default; end + + # Return the string representation that +val+ will take when written. + # + # @raise [NotImplementedError] + # + # source://bindata//lib/bindata/base_primitive.rb#231 def value_to_binary_string(val); end class << self + # source://bindata//lib/bindata/alignment.rb#72 def bit_aligned; end + + # source://bindata//lib/bindata/base.rb#53 def inherited(subclass); end + + # source://bindata//lib/bindata/trace.rb#53 def turn_off_tracing; end + + # source://bindata//lib/bindata/trace.rb#48 def turn_on_tracing; end end end +# Logic for the :assert parameter +# +# source://bindata//lib/bindata/base_primitive.rb#169 module BinData::BasePrimitive::AssertPlugin + # @raise [ValidityError] + # + # source://bindata//lib/bindata/base_primitive.rb#180 def assert!; end + + # source://bindata//lib/bindata/base_primitive.rb#170 def assign(val); end + + # source://bindata//lib/bindata/base_primitive.rb#175 def do_read(io); end end +# Logic for the :asserted_value parameter +# +# source://bindata//lib/bindata/base_primitive.rb#198 module BinData::BasePrimitive::AssertedValuePlugin + # source://bindata//lib/bindata/base_primitive.rb#204 def _value; end + + # source://bindata//lib/bindata/base_primitive.rb#213 def assert!; end + + # source://bindata//lib/bindata/base_primitive.rb#217 def assert_value(current_value); end + + # source://bindata//lib/bindata/base_primitive.rb#199 def assign(val); end + + # source://bindata//lib/bindata/base_primitive.rb#208 def do_read(io); end end +# Logic for the :initial_value parameter +# +# source://bindata//lib/bindata/base_primitive.rb#162 module BinData::BasePrimitive::InitialValuePlugin + # source://bindata//lib/bindata/base_primitive.rb#163 def _value; end end +# Logic for the :value parameter +# +# source://bindata//lib/bindata/base_primitive.rb#151 module BinData::BasePrimitive::ValuePlugin + # source://bindata//lib/bindata/base_primitive.rb#156 def _value; end + + # source://bindata//lib/bindata/base_primitive.rb#152 def assign(val); end end +# source://bindata//lib/bindata/bits.rb#15 class BinData::Bit < ::BinData::BasePrimitive def assign(val); end def bit_aligned?; end @@ -242,38 +821,94 @@ class BinData::Bit < ::BinData::BasePrimitive def sensible_default; end end +# A monkey patch to force byte-aligned primitives to +# become bit-aligned. This allows them to be used at +# non byte based boundaries. +# +# class BitString < BinData::String +# bit_aligned +# end +# +# class MyRecord < BinData::Record +# bit4 :preamble +# bit_string :str, length: 2 +# end +# +# source://bindata//lib/bindata/alignment.rb#43 module BinData::BitAligned + # @return [Boolean] + # + # source://bindata//lib/bindata/alignment.rb#55 def bit_aligned?; end + + # source://bindata//lib/bindata/alignment.rb#63 def do_num_bytes; end + + # source://bindata//lib/bindata/alignment.rb#67 def do_write(io); end + + # source://bindata//lib/bindata/alignment.rb#59 def read_and_return_value(io); end end +# source://bindata//lib/bindata/alignment.rb#44 class BinData::BitAligned::BitAlignedIO + # @return [BitAlignedIO] a new instance of BitAlignedIO + # + # source://bindata//lib/bindata/alignment.rb#45 def initialize(io); end + # source://bindata//lib/bindata/alignment.rb#48 def readbytes(n); end end +# Defines a number of classes that contain a bit based integer. +# The integer is defined by endian and number of bits. +# +# source://bindata//lib/bindata/bits.rb#8 module BinData::BitField class << self + # source://bindata//lib/bindata/bits.rb#92 def create_clamp_code(nbits, signed); end + + # source://bindata//lib/bindata/bits.rb#84 def create_do_num_bytes_code(nbits); end + + # source://bindata//lib/bindata/bits.rb#100 def create_dynamic_clamp_code(signed); end + + # source://bindata//lib/bindata/bits.rb#112 def create_fixed_clamp_code(nbits, signed); end + + # source://bindata//lib/bindata/bits.rb#135 def create_int2uint_code(nbits, signed); end + + # source://bindata//lib/bindata/bits.rb#76 def create_nbits_code(nbits); end + + # source://bindata//lib/bindata/bits.rb#68 def create_params_code(nbits); end + + # source://bindata//lib/bindata/bits.rb#145 def create_uint2int_code(nbits, signed); end + + # source://bindata//lib/bindata/bits.rb#12 def define_class(name, nbits, endian, signed = T.unsafe(nil)); end + + # source://bindata//lib/bindata/bits.rb#26 def define_methods(bit_class, nbits, endian, signed); end end end +# Create classes on demand +# +# source://bindata//lib/bindata/bits.rb#166 module BinData::BitFieldFactory + # source://bindata//lib/bindata/bits.rb#167 def const_missing(name); end end +# source://bindata//lib/bindata/bits.rb#15 class BinData::BitLe < ::BinData::BasePrimitive def assign(val); end def bit_aligned?; end @@ -286,35 +921,184 @@ class BinData::BitLe < ::BinData::BasePrimitive def sensible_default; end end +# A Buffer is conceptually a substream within a data stream. It has a +# defined size and it will always read or write the exact number of bytes to +# fill the buffer. Short reads will skip over unused bytes and short writes +# will pad the substream with "\0" bytes. +# +# require 'bindata' +# +# obj = BinData::Buffer.new(length: 5, type: [:string, {value: "abc"}]) +# obj.to_binary_s #=> "abc\000\000" +# +# +# class MyBuffer < BinData::Buffer +# default_parameter length: 8 +# +# endian :little +# +# uint16 :num1 +# uint16 :num2 +# # padding occurs here +# end +# +# obj = MyBuffer.read("\001\000\002\000\000\000\000\000") +# obj.num1 #=> 1 +# obj.num1 #=> 2 +# obj.raw_num_bytes #=> 4 +# obj.num_bytes #=> 8 +# +# +# class StringTable < BinData::Record +# endian :little +# +# uint16 :table_size_in_bytes +# buffer :strings, length: :table_size_in_bytes do +# array read_until: :eof do +# uint8 :len +# string :str, length: :len +# end +# end +# end +# +# +# == Parameters +# +# Parameters may be provided at initialisation to control the behaviour of +# an object. These params are: +# +# :length:: The number of bytes in the buffer. +# :type:: The single type inside the buffer. Use a struct if +# multiple fields are required. +# +# source://bindata//lib/bindata/buffer.rb#54 class BinData::Buffer < ::BinData::Base extend ::BinData::DSLMixin + # source://bindata//lib/bindata/buffer.rb#75 def assign(val); end + + # @return [Boolean] + # + # source://bindata//lib/bindata/buffer.rb#71 def clear?; end + + # source://bindata//lib/bindata/buffer.rb#103 def do_num_bytes; end + + # source://bindata//lib/bindata/buffer.rb#91 def do_read(io); end + + # source://bindata//lib/bindata/buffer.rb#97 def do_write(io); end + + # source://bindata//lib/bindata/buffer.rb#62 def initialize_instance; end + + # source://bindata//lib/bindata/buffer.rb#87 def method_missing(symbol, *args, &block); end + + # The number of bytes used, ignoring the padding imposed by the buffer. + # + # source://bindata//lib/bindata/buffer.rb#67 def raw_num_bytes; end + + # @return [Boolean] + # + # source://bindata//lib/bindata/buffer.rb#83 def respond_to?(symbol, include_private = T.unsafe(nil)); end + + # source://bindata//lib/bindata/buffer.rb#79 def snapshot; end end +# source://bindata//lib/bindata/buffer.rb#108 class BinData::BufferArgProcessor < ::BinData::BaseArgProcessor include ::BinData::MultiFieldArgSeparator + # source://bindata//lib/bindata/buffer.rb#111 def sanitize_parameters!(obj_class, params); end end +# Align fields to a multiple of :byte_align +# +# source://bindata//lib/bindata/struct.rb#294 module BinData::ByteAlignPlugin + # @return [Boolean] + # + # source://bindata//lib/bindata/struct.rb#343 def align_obj?(obj); end + + # source://bindata//lib/bindata/struct.rb#338 def bytes_to_align(obj, rel_offset); end + + # source://bindata//lib/bindata/struct.rb#295 def do_read(io); end + + # source://bindata//lib/bindata/struct.rb#308 def do_write(io); end + + # source://bindata//lib/bindata/struct.rb#321 def sum_num_bytes_below_index(index); end end +# A Choice is a collection of data objects of which only one is active +# at any particular time. Method calls will be delegated to the active +# choice. +# +# require 'bindata' +# +# type1 = [:string, {value: "Type1"}] +# type2 = [:string, {value: "Type2"}] +# +# choices = {5 => type1, 17 => type2} +# a = BinData::Choice.new(choices: choices, selection: 5) +# a # => "Type1" +# +# choices = [ type1, type2 ] +# a = BinData::Choice.new(choices: choices, selection: 1) +# a # => "Type2" +# +# choices = [ nil, nil, nil, type1, nil, type2 ] +# a = BinData::Choice.new(choices: choices, selection: 3) +# a # => "Type1" +# +# +# Chooser = Struct.new(:choice) +# mychoice = Chooser.new +# mychoice.choice = 'big' +# +# choices = {'big' => :uint16be, 'little' => :uint16le} +# a = BinData::Choice.new(choices: choices, copy_on_change: true, +# selection: -> { mychoice.choice }) +# a.assign(256) +# a.to_binary_s #=> "\001\000" +# +# mychoice.choice = 'little' +# a.to_binary_s #=> "\000\001" +# +# == Parameters +# +# Parameters may be provided at initialisation to control the behaviour of +# an object. These params are: +# +# :choices:: Either an array or a hash specifying the possible +# data objects. The format of the +# array/hash.values is a list of symbols +# representing the data object type. If a choice +# is to have params passed to it, then it should +# be provided as [type_symbol, hash_params]. An +# implementation constraint is that the hash may +# not contain symbols as keys, with the exception +# of :default. :default is to be used when then +# :selection does not exist in the :choices hash. +# :selection:: An index/key into the :choices array/hash which +# specifies the currently active choice. +# :copy_on_change:: If set to true, copy the value of the previous +# selection to the current selection whenever the +# selection changes. Default is false. +# +# source://bindata//lib/bindata/choice.rb#60 class BinData::Choice < ::BinData::Base extend ::BinData::DSLMixin @@ -322,157 +1106,491 @@ class BinData::Choice < ::BinData::Base def clear?(*args); end def do_num_bytes(*args); end def do_read(*args); end + + # source://bindata//lib/bindata/trace.rb#83 def do_read_with_hook(io); end + def do_write(*args); end + + # source://bindata//lib/bindata/choice.rb#74 def initialize_instance; end + + # source://bindata//lib/bindata/choice.rb#69 def initialize_shared_instance; end + + # source://bindata//lib/bindata/choice.rb#92 def method_missing(symbol, *args, &block); end + + # @return [Boolean] + # + # source://bindata//lib/bindata/choice.rb#88 def respond_to?(symbol, include_private = T.unsafe(nil)); end + + # Returns the current selection. + # + # source://bindata//lib/bindata/choice.rb#80 def selection; end + def snapshot(*args); end + + # source://bindata//lib/bindata/trace.rb#88 def trace_selection; end private + # source://bindata//lib/bindata/choice.rb#107 def current_choice; end + + # source://bindata//lib/bindata/choice.rb#112 def instantiate_choice(selection); end class << self + # source://bindata//lib/bindata/trace.rb#78 def turn_off_tracing; end + + # source://bindata//lib/bindata/trace.rb#73 def turn_on_tracing; end end end +# source://bindata//lib/bindata/choice.rb#121 class BinData::ChoiceArgProcessor < ::BinData::BaseArgProcessor + # source://bindata//lib/bindata/choice.rb#122 def sanitize_parameters!(obj_class, params); end private + # source://bindata//lib/bindata/choice.rb#135 def choices_as_hash(choices); end + + # source://bindata//lib/bindata/choice.rb#151 def ensure_valid_keys(choices); end + + # source://bindata//lib/bindata/choice.rb#143 def key_array_by_index(array); end end +# Logic for the :copy_on_change parameter +# +# source://bindata//lib/bindata/choice.rb#162 module BinData::CopyOnChangePlugin + # source://bindata//lib/bindata/choice.rb#169 def copy_previous_value(obj); end + + # source://bindata//lib/bindata/choice.rb#163 def current_choice; end + + # source://bindata//lib/bindata/choice.rb#176 def get_previous_choice(selection); end + + # source://bindata//lib/bindata/choice.rb#182 def remember_current_selection(selection); end end +# Counts the number of bytes remaining in the input stream from the current +# position to the end of the stream. This only makes sense for seekable +# streams. +# +# require 'bindata' +# +# class A < BinData::Record +# count_bytes_remaining :bytes_remaining +# string :all_data, read_length: :bytes_remaining +# end +# +# obj = A.read("abcdefghij") +# obj.all_data #=> "abcdefghij" +# +# source://bindata//lib/bindata/count_bytes_remaining.rb#19 class BinData::CountBytesRemaining < ::BinData::BasePrimitive private + # source://bindata//lib/bindata/count_bytes_remaining.rb#26 def read_and_return_value(io); end + + # source://bindata//lib/bindata/count_bytes_remaining.rb#30 def sensible_default; end + + # source://bindata//lib/bindata/count_bytes_remaining.rb#22 def value_to_binary_string(val); end end +# BinData classes that are part of the DSL must be extended by this. +# +# source://bindata//lib/bindata/dsl.rb#37 module BinData::DSLMixin + # source://bindata//lib/bindata/dsl.rb#38 def dsl_parser(parser_type = T.unsafe(nil)); end + + # source://bindata//lib/bindata/dsl.rb#45 def method_missing(symbol, *args, &block); end + + # Assert object is not an array or string. + # + # source://bindata//lib/bindata/dsl.rb#50 def to_ary; end + + # source://bindata//lib/bindata/dsl.rb#51 def to_str; end end +# Handles the :big_and_little endian option. +# This option creates two subclasses, each handling +# :big or :little endian. +# +# source://bindata//lib/bindata/dsl.rb#255 class BinData::DSLMixin::DSLBigAndLittleEndianHandler class << self + # source://bindata//lib/bindata/dsl.rb#323 def class_with_endian(class_name, endian); end + + # source://bindata//lib/bindata/dsl.rb#269 def create_subclasses_with_endian(bnl_class); end + + # source://bindata//lib/bindata/dsl.rb#290 def delegate_field_creation(bnl_class); end + + # source://bindata//lib/bindata/dsl.rb#303 def fixup_subclass_hierarchy(bnl_class); end + + # source://bindata//lib/bindata/dsl.rb#257 def handle(bnl_class); end + + # source://bindata//lib/bindata/dsl.rb#265 def make_class_abstract(bnl_class); end + + # source://bindata//lib/bindata/dsl.rb#331 def obj_attribute(obj, attr); end + + # source://bindata//lib/bindata/dsl.rb#274 def override_new_in_class(bnl_class); end end end +# Extracts the details from a field declaration. +# +# source://bindata//lib/bindata/dsl.rb#338 class BinData::DSLMixin::DSLFieldParser + # @return [DSLFieldParser] a new instance of DSLFieldParser + # + # source://bindata//lib/bindata/dsl.rb#339 def initialize(hints, symbol, *args, &block); end + # Returns the value of attribute name. + # + # source://bindata//lib/bindata/dsl.rb#346 def name; end + + # source://bindata//lib/bindata/dsl.rb#348 def name_from_field_declaration(args); end + + # Returns the value of attribute params. + # + # source://bindata//lib/bindata/dsl.rb#346 def params; end + + # source://bindata//lib/bindata/dsl.rb#367 def params_from_args(args); end + + # source://bindata//lib/bindata/dsl.rb#374 def params_from_block(&block); end + + # source://bindata//lib/bindata/dsl.rb#357 def params_from_field_declaration(args, &block); end + + # Returns the value of attribute type. + # + # source://bindata//lib/bindata/dsl.rb#346 def type; end end +# Validates a field defined in a DSLMixin. +# +# source://bindata//lib/bindata/dsl.rb#398 class BinData::DSLMixin::DSLFieldValidator + # @return [DSLFieldValidator] a new instance of DSLFieldValidator + # + # source://bindata//lib/bindata/dsl.rb#399 def initialize(the_class, parser); end + # @return [Boolean] + # + # source://bindata//lib/bindata/dsl.rb#448 def all_or_none_names_failed?(name); end + + # @return [Boolean] + # + # source://bindata//lib/bindata/dsl.rb#463 def duplicate_name?(name); end + + # source://bindata//lib/bindata/dsl.rb#420 def ensure_valid_name(name); end + + # source://bindata//lib/bindata/dsl.rb#475 def fields; end + + # @return [Boolean] + # + # source://bindata//lib/bindata/dsl.rb#459 def malformed_name?(name); end + + # @return [Boolean] + # + # source://bindata//lib/bindata/dsl.rb#444 def must_have_a_name_failed?(name); end + + # @return [Boolean] + # + # source://bindata//lib/bindata/dsl.rb#440 def must_not_have_a_name_failed?(name); end + + # @return [Boolean] + # + # source://bindata//lib/bindata/dsl.rb#471 def name_is_reserved?(name); end + + # @return [Boolean] + # + # source://bindata//lib/bindata/dsl.rb#467 def name_shadows_method?(name); end + + # @return [Boolean] + # + # source://bindata//lib/bindata/dsl.rb#479 def option?(opt); end + + # source://bindata//lib/bindata/dsl.rb#404 def validate_field(name); end end +# A DSLParser parses and accumulates field definitions of the form +# +# type name, params +# +# where: +# * +type+ is the under_scored name of a registered type +# * +name+ is the (possible optional) name of the field +# * +params+ is a hash containing any parameters +# +# source://bindata//lib/bindata/dsl.rb#62 class BinData::DSLMixin::DSLParser + # @return [DSLParser] a new instance of DSLParser + # + # source://bindata//lib/bindata/dsl.rb#63 def initialize(the_class, parser_type); end + # source://bindata//lib/bindata/dsl.rb#113 def dsl_params; end + + # source://bindata//lib/bindata/dsl.rb#74 def endian(endian = T.unsafe(nil)); end + + # source://bindata//lib/bindata/dsl.rb#109 def fields; end + + # source://bindata//lib/bindata/dsl.rb#98 def hide(*args); end + + # source://bindata//lib/bindata/dsl.rb#118 def method_missing(*args, &block); end + + # Returns the value of attribute parser_type. + # + # source://bindata//lib/bindata/dsl.rb#72 def parser_type; end + + # source://bindata//lib/bindata/dsl.rb#83 def search_prefix(*args); end private + # source://bindata//lib/bindata/dsl.rb#190 def append_field(type, name, params); end + + # @raise [exception] + # + # source://bindata//lib/bindata/dsl.rb#206 def dsl_raise(exception, msg); end + + # source://bindata//lib/bindata/dsl.rb#142 def ensure_hints; end + + # @return [Boolean] + # + # source://bindata//lib/bindata/dsl.rb#176 def fields?; end + + # source://bindata//lib/bindata/dsl.rb#147 def hints; end + + # @return [Boolean] + # + # source://bindata//lib/bindata/dsl.rb#138 def option?(opt); end + + # source://bindata//lib/bindata/dsl.rb#196 def parent_attribute(attr, default = T.unsafe(nil)); end + + # source://bindata//lib/bindata/dsl.rb#172 def parent_fields; end + + # source://bindata//lib/bindata/dsl.rb#180 def parse_and_append_field(*args, &block); end + + # source://bindata//lib/bindata/dsl.rb#126 def parser_abilities; end + + # source://bindata//lib/bindata/dsl.rb#151 def set_endian(endian); end + + # source://bindata//lib/bindata/dsl.rb#224 def to_choice_params(key); end + + # source://bindata//lib/bindata/dsl.rb#213 def to_object_params(key); end + + # source://bindata//lib/bindata/dsl.rb#236 def to_struct_params(*unused); end + + # @return [Boolean] + # + # source://bindata//lib/bindata/dsl.rb#168 def valid_endian?(endian); end end +# BinData declarations are evaluated in a single pass. +# However, some binary formats require multi pass processing. A common +# reason is seeking backwards in the input stream. +# +# DelayedIO supports multi pass processing. It works by ignoring the normal +# #read or #write calls. The user must explicitly call the #read_now! or +# #write_now! methods to process an additional pass. This additional pass +# must specify the abs_offset of the I/O operation. +# +# require 'bindata' +# +# obj = BinData::DelayedIO.new(read_abs_offset: 3, type: :uint16be) +# obj.read("\x00\x00\x00\x11\x12") +# obj #=> 0 +# +# obj.read_now! +# obj #=> 0x1112 +# +# - OR - +# +# obj.read("\x00\x00\x00\x11\x12") { obj.read_now! } #=> 0x1122 +# +# obj.to_binary_s { obj.write_now! } #=> "\x00\x00\x00\x11\x12" +# +# You can use the +auto_call_delayed_io+ keyword to cause #read and #write to +# automatically perform the extra passes. +# +# class ReversePascalString < BinData::Record +# auto_call_delayed_io +# +# delayed_io :str, read_abs_offset: 0 do +# string read_length: :len +# end +# count_bytes_remaining :total_size +# skip to_abs_offset: -> { total_size - 1 } +# uint8 :len, value: -> { str.length } +# end +# +# s = ReversePascalString.read("hello\x05") +# s.to_binary_s #=> "hello\x05" +# +# +# == Parameters +# +# Parameters may be provided at initialisation to control the behaviour of +# an object. These params are: +# +# :read_abs_offset:: The abs_offset to start reading at. +# :type:: The single type inside the delayed io. Use +# a struct if multiple fields are required. +# +# source://bindata//lib/bindata/delayed_io.rb#55 class BinData::DelayedIO < ::BinData::Base extend ::BinData::DSLMixin + # source://bindata//lib/bindata/delayed_io.rb#94 def abs_offset; end + + # Sets the +abs_offset+ to use when writing this object. + # + # source://bindata//lib/bindata/delayed_io.rb#99 def abs_offset=(offset); end + + # source://bindata//lib/bindata/delayed_io.rb#74 def assign(val); end + + # @return [Boolean] + # + # source://bindata//lib/bindata/delayed_io.rb#70 def clear?; end + + # source://bindata//lib/bindata/delayed_io.rb#115 def do_num_bytes; end + + # source://bindata//lib/bindata/delayed_io.rb#107 def do_read(io); end + + # source://bindata//lib/bindata/delayed_io.rb#111 def do_write(io); end + + # @return [Boolean] + # + # source://bindata//lib/bindata/delayed_io.rb#119 def include_obj?; end + + # source://bindata//lib/bindata/delayed_io.rb#63 def initialize_instance; end + + # source://bindata//lib/bindata/delayed_io.rb#90 def method_missing(symbol, *args, &block); end + + # source://bindata//lib/bindata/delayed_io.rb#82 def num_bytes; end + + # DelayedIO objects aren't read when #read is called. + # The reading is delayed until this method is called. + # + # @raise [IOError] + # + # source://bindata//lib/bindata/delayed_io.rb#125 def read_now!; end + + # source://bindata//lib/bindata/delayed_io.rb#103 def rel_offset; end + + # @return [Boolean] + # + # source://bindata//lib/bindata/delayed_io.rb#86 def respond_to?(symbol, include_private = T.unsafe(nil)); end + + # source://bindata//lib/bindata/delayed_io.rb#78 def snapshot; end + + # DelayedIO objects aren't written when #write is called. + # The writing is delayed until this method is called. + # + # @raise [IOError] + # + # source://bindata//lib/bindata/delayed_io.rb#137 def write_now!; end end +# source://bindata//lib/bindata/delayed_io.rb#146 class BinData::DelayedIoArgProcessor < ::BinData::BaseArgProcessor include ::BinData::MultiFieldArgSeparator + # source://bindata//lib/bindata/delayed_io.rb#149 def sanitize_parameters!(obj_class, params); end end +# Double precision floating point number in big endian format +# +# source://bindata//lib/bindata/float.rb#80 class BinData::DoubleBe < ::BinData::BasePrimitive def do_num_bytes; end @@ -483,6 +1601,9 @@ class BinData::DoubleBe < ::BinData::BasePrimitive def value_to_binary_string(val); end end +# Double precision floating point number in little endian format +# +# source://bindata//lib/bindata/float.rb#75 class BinData::DoubleLe < ::BinData::BasePrimitive def do_num_bytes; end @@ -493,6 +1614,9 @@ class BinData::DoubleLe < ::BinData::BasePrimitive def value_to_binary_string(val); end end +# Single precision floating point number in big endian format +# +# source://bindata//lib/bindata/float.rb#70 class BinData::FloatBe < ::BinData::BasePrimitive def do_num_bytes; end @@ -503,6 +1627,9 @@ class BinData::FloatBe < ::BinData::BasePrimitive def value_to_binary_string(val); end end +# Single precision floating point number in little endian format +# +# source://bindata//lib/bindata/float.rb#65 class BinData::FloatLe < ::BinData::BasePrimitive def do_num_bytes; end @@ -513,191 +1640,453 @@ class BinData::FloatLe < ::BinData::BasePrimitive def value_to_binary_string(val); end end +# Defines a number of classes that contain a floating point number. +# The float is defined by precision and endian. +# +# source://bindata//lib/bindata/float.rb#7 module BinData::FloatingPoint class << self + # source://bindata//lib/bindata/float.rb#44 def create_num_bytes_code(precision); end + + # source://bindata//lib/bindata/float.rb#48 def create_read_code(precision, endian); end + + # source://bindata//lib/bindata/float.rb#55 def create_to_binary_s_code(precision, endian); end + + # source://bindata//lib/bindata/float.rb#21 def define_methods(float_class, precision, endian); end end end +# All methods provided by the framework are to be implemented or overridden +# by subclasses of BinData::Base. +# +# source://bindata//lib/bindata/framework.rb#7 module BinData::Framework + # Assigns the value of +val+ to this data object. Note that +val+ must + # always be deep copied to ensure no aliasing problems can occur. + # + # @raise [NotImplementedError] + # + # source://bindata//lib/bindata/framework.rb#29 def assign(val); end + + # Is this object aligned on non-byte boundaries? + # + # @return [Boolean] + # + # source://bindata//lib/bindata/framework.rb#51 def bit_aligned?; end + + # Returns true if the object has not been changed since creation. + # + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://bindata//lib/bindata/framework.rb#23 def clear?; end + + # Returns the debug name of +child+. This only needs to be implemented + # by objects that contain child objects. + # + # source://bindata//lib/bindata/framework.rb#40 def debug_name_of(child); end + + # Returns the offset of +child+. This only needs to be implemented + # by objects that contain child objects. + # + # source://bindata//lib/bindata/framework.rb#46 def offset_of(child); end + + # Returns a snapshot of this data object. + # + # @raise [NotImplementedError] + # + # source://bindata//lib/bindata/framework.rb#34 def snapshot; end protected + # Returns the number of bytes it will take to write this data. + # + # @raise [NotImplementedError] + # + # source://bindata//lib/bindata/framework.rb#66 def do_num_bytes; end + + # Reads the data for this data object from +io+. + # + # @raise [NotImplementedError] + # + # source://bindata//lib/bindata/framework.rb#56 def do_read(io); end + + # Writes the value for this data to +io+. + # + # @raise [NotImplementedError] + # + # source://bindata//lib/bindata/framework.rb#61 def do_write(io); end + + # Initializes the state of the object. All instance variables that + # are used by the object must be initialized here. + # + # source://bindata//lib/bindata/framework.rb#10 def initialize_instance; end + + # Initialises state that is shared by objects with the same parameters. + # + # This should only be used when optimising for performance. Instance + # variables set here, and changes to the singleton class will be shared + # between all objects that are initialized with the same parameters. + # This method is called only once for a particular set of parameters. + # + # source://bindata//lib/bindata/framework.rb#19 def initialize_shared_instance; end end +# A wrapper around an IO object. The wrapper provides a consistent +# interface for BinData objects to use when accessing the IO. +# +# source://bindata//lib/bindata/io.rb#6 module BinData::IO class << self + # Creates a StringIO around +str+. + # + # source://bindata//lib/bindata/io.rb#215 def create_string_io(str = T.unsafe(nil)); end end end +# Common operations for both Read and Write. +# +# source://bindata//lib/bindata/io.rb#9 module BinData::IO::Common + # source://bindata//lib/bindata/io.rb#10 def initialize(io); end private + # source://bindata//lib/bindata/io.rb#40 def buffer_limited_n(n); end + + # source://bindata//lib/bindata/io.rb#36 def seek(n); end + + # @return [Boolean] + # + # source://bindata//lib/bindata/io.rb#30 def seekable?; end + + # source://bindata//lib/bindata/io.rb#54 def with_buffer_common(n); end end +# Use #seek and #pos on seekable streams +# +# source://bindata//lib/bindata/io.rb#69 module BinData::IO::Common::SeekableStream + # The number of bytes remaining in the input stream. + # + # source://bindata//lib/bindata/io.rb#71 def num_bytes_remaining; end + + # All io calls in +block+ are rolled back after this + # method completes. + # + # source://bindata//lib/bindata/io.rb#90 def with_readahead; end private + # source://bindata//lib/bindata/io.rb#106 def offset_raw; end + + # source://bindata//lib/bindata/io.rb#114 def read_raw(n); end + + # source://bindata//lib/bindata/io.rb#110 def seek_raw(n); end + + # source://bindata//lib/bindata/io.rb#102 def stream_init; end + + # source://bindata//lib/bindata/io.rb#118 def write_raw(data); end end +# Manually keep track of offset for unseekable streams. +# +# source://bindata//lib/bindata/io.rb#124 module BinData::IO::Common::UnSeekableStream + # The number of bytes remaining in the input stream. + # + # @raise [IOError] + # + # source://bindata//lib/bindata/io.rb#130 def num_bytes_remaining; end + + # source://bindata//lib/bindata/io.rb#125 def offset_raw; end + + # All io calls in +block+ are rolled back after this + # method completes. + # + # source://bindata//lib/bindata/io.rb#136 def with_readahead; end private + # source://bindata//lib/bindata/io.rb#161 def read_raw(n); end + + # source://bindata//lib/bindata/io.rb#167 def read_raw_with_readahead(n); end + + # @raise [IOError] + # + # source://bindata//lib/bindata/io.rb#199 def seek_raw(n); end + + # source://bindata//lib/bindata/io.rb#157 def stream_init; end + + # source://bindata//lib/bindata/io.rb#194 def write_raw(data); end end +# Create a new IO Read wrapper around +io+. +io+ must provide #read, +# #pos if reading the current stream position and #seek if setting the +# current stream position. If +io+ is a string it will be automatically +# wrapped in an StringIO object. +# +# The IO can handle bitstreams in either big or little endian format. +# +# M byte1 L M byte2 L +# S 76543210 S S fedcba98 S +# B B B B +# +# In big endian format: +# readbits(6), readbits(5) #=> [765432, 10fed] +# +# In little endian format: +# readbits(6), readbits(5) #=> [543210, a9876] +# +# source://bindata//lib/bindata/io.rb#238 class BinData::IO::Read include ::BinData::IO::Common + # @return [Read] a new instance of Read + # + # source://bindata//lib/bindata/io.rb#241 def initialize(io); end + # Returns the current offset of the io stream. Offset will be rounded + # up when reading bitfields. + # + # source://bindata//lib/bindata/io.rb#261 def offset; end + + # Reads all remaining bytes from the stream. + # + # source://bindata//lib/bindata/io.rb#282 def read_all_bytes; end + + # Reads exactly +nbits+ bits from the stream. +endian+ specifies whether + # the bits are stored in +:big+ or +:little+ endian format. + # + # source://bindata//lib/bindata/io.rb#289 def readbits(nbits, endian); end + + # Reads exactly +n+ bytes from +io+. + # + # If the data read is nil an EOFError is raised. + # + # If the data read is too short an IOError is raised. + # + # source://bindata//lib/bindata/io.rb#276 def readbytes(n); end + + # Discards any read bits so the stream becomes aligned at the + # next byte boundary. + # + # source://bindata//lib/bindata/io.rb#305 def reset_read_bits; end + + # Seek +n+ bytes from the current position in the io stream. + # + # source://bindata//lib/bindata/io.rb#266 def seekbytes(n); end + + # Sets a buffer of +n+ bytes on the io stream. Any reading or seeking + # calls inside the +block+ will be contained within this buffer. + # + # source://bindata//lib/bindata/io.rb#252 def with_buffer(n); end private + # source://bindata//lib/bindata/io.rb#334 def accumulate_big_endian_bits; end + + # source://bindata//lib/bindata/io.rb#352 def accumulate_little_endian_bits; end + + # source://bindata//lib/bindata/io.rb#358 def mask(nbits); end + + # source://bindata//lib/bindata/io.rb#313 def read(n = T.unsafe(nil)); end + + # source://bindata//lib/bindata/io.rb#322 def read_big_endian_bits(nbits); end + + # source://bindata//lib/bindata/io.rb#340 def read_little_endian_bits(nbits); end end +# Create a new IO Write wrapper around +io+. +io+ must provide #write. +# If +io+ is a string it will be automatically wrapped in an StringIO +# object. +# +# The IO can handle bitstreams in either big or little endian format. +# +# See IO::Read for more information. +# +# source://bindata//lib/bindata/io.rb#370 class BinData::IO::Write include ::BinData::IO::Common + # @return [Write] a new instance of Write + # + # source://bindata//lib/bindata/io.rb#372 def initialize(io); end + # To be called after all +writebits+ have been applied. + # + # source://bindata//lib/bindata/io.rb#428 def flush; end + + # To be called after all +writebits+ have been applied. + # + # source://bindata//lib/bindata/io.rb#428 def flushbits; end + + # Returns the current offset of the io stream. Offset will be rounded + # up when writing bitfields. + # + # source://bindata//lib/bindata/io.rb#393 def offset; end + + # Seek +n+ bytes from the current position in the io stream. + # + # source://bindata//lib/bindata/io.rb#398 def seekbytes(n); end + + # Sets a buffer of +n+ bytes on the io stream. Any writes inside the + # +block+ will be contained within this buffer. If less than +n+ bytes + # are written inside the block, the remainder will be padded with '\0' + # bytes. + # + # source://bindata//lib/bindata/io.rb#384 def with_buffer(n); end + + # Writes +nbits+ bits from +val+ to the stream. +endian+ specifies whether + # the bits are to be stored in +:big+ or +:little+ endian format. + # + # source://bindata//lib/bindata/io.rb#411 def writebits(val, nbits, endian); end + + # Writes the given string of bytes to the io stream. + # + # source://bindata//lib/bindata/io.rb#404 def writebytes(str); end private + # source://bindata//lib/bindata/io.rb#491 def mask(nbits); end + + # source://bindata//lib/bindata/io.rb#440 def write(data); end + + # source://bindata//lib/bindata/io.rb#449 def write_big_endian_bits(val, nbits); end + + # source://bindata//lib/bindata/io.rb#470 def write_little_endian_bits(val, nbits); end end +# Logic for the :initial_length parameter +# +# source://bindata//lib/bindata/array.rb#328 module BinData::InitialLengthPlugin + # source://bindata//lib/bindata/array.rb#329 def do_read(io); end + + # source://bindata//lib/bindata/array.rb#333 def elements; end end +# Defines a number of classes that contain an integer. The integer +# is defined by endian, signedness and number of bytes. +# +# source://bindata//lib/bindata/int.rb#8 module BinData::Int class << self + # source://bindata//lib/bindata/int.rb#12 def define_class(name, nbits, endian, signed); end + + # source://bindata//lib/bindata/int.rb#26 def define_methods(int_class, nbits, endian, signed); end private + # source://bindata//lib/bindata/int.rb#150 def bits_per_word(nbits); end + + # source://bindata//lib/bindata/int.rb#60 def create_clamp_code(nbits, signed); end + + # source://bindata//lib/bindata/int.rb#142 def create_int2uint_code(nbits); end + + # source://bindata//lib/bindata/int.rb#82 def create_raw_read_code(nbits, endian, signed); end + + # source://bindata//lib/bindata/int.rb#101 def create_read_assemble_code(nbits, endian, signed); end + + # source://bindata//lib/bindata/int.rb#72 def create_read_code(nbits, endian, signed); end + + # source://bindata//lib/bindata/int.rb#94 def create_read_unpack_code(nbits, endian, signed); end + + # source://bindata//lib/bindata/int.rb#115 def create_to_binary_s_code(nbits, endian, signed); end + + # source://bindata//lib/bindata/int.rb#146 def create_uint2int_code(nbits); end + + # @return [Boolean] + # + # source://bindata//lib/bindata/int.rb#172 def need_signed_conversion_code?(nbits, signed); end + + # source://bindata//lib/bindata/int.rb#157 def pack_directive(nbits, endian, signed); end + + # source://bindata//lib/bindata/int.rb#130 def val_as_packed_words(nbits, endian, signed); end end end -class BinData::Int32be < ::BinData::BasePrimitive - def assign(val); end - def do_num_bytes; end - - private - - def read_and_return_value(io); end - def sensible_default; end - def value_to_binary_string(val); end -end - -class BinData::Int32le < ::BinData::BasePrimitive - def assign(val); end - def do_num_bytes; end - - private - - def read_and_return_value(io); end - def sensible_default; end - def value_to_binary_string(val); end -end - -class BinData::Int64be < ::BinData::BasePrimitive - def assign(val); end - def do_num_bytes; end - - private - - def read_and_return_value(io); end - def sensible_default; end - def value_to_binary_string(val); end -end - -class BinData::Int64le < ::BinData::BasePrimitive - def assign(val); end - def do_num_bytes; end - - private - - def read_and_return_value(io); end - def sensible_default; end - def value_to_binary_string(val); end -end - +# Signed 1 byte integer. +# +# source://bindata//lib/bindata/int.rb#185 class BinData::Int8 < ::BinData::BasePrimitive def assign(val); end def do_num_bytes; end @@ -709,214 +2098,655 @@ class BinData::Int8 < ::BinData::BasePrimitive def value_to_binary_string(val); end end +# Create classes on demand +# +# source://bindata//lib/bindata/int.rb#190 module BinData::IntFactory + # source://bindata//lib/bindata/int.rb#191 def const_missing(name); end end +# A LazyEvaluator is bound to a data object. The evaluator will evaluate +# lambdas in the context of this data object. These lambdas +# are those that are passed to data objects as parameters, e.g.: +# +# BinData::String.new(value: -> { %w(a test message).join(" ") }) +# +# As a shortcut, :foo is the equivalent of lambda { foo }. +# +# When evaluating lambdas, unknown methods are resolved in the context of the +# parent of the bound data object. Resolution is attempted firstly as keys +# in #parameters, and secondly as methods in this parent. This +# resolution propagates up the chain of parent data objects. +# +# An evaluation will recurse until it returns a result that is not +# a lambda or a symbol. +# +# This resolution process makes the lambda easier to read as we just write +# field instead of obj.field. +# +# source://bindata//lib/bindata/lazy.rb#20 class BinData::LazyEvaluator + # Creates a new evaluator. All lazy evaluation is performed in the + # context of +obj+. + # + # @return [LazyEvaluator] a new instance of LazyEvaluator + # + # source://bindata//lib/bindata/lazy.rb#24 def initialize(obj); end + # Returns the index of this data object inside it's nearest container + # array. + # + # @raise [NoMethodError] + # + # source://bindata//lib/bindata/lazy.rb#50 def index; end + + # source://bindata//lib/bindata/lazy.rb#28 def lazy_eval(val, overrides = T.unsafe(nil)); end + + # source://bindata//lib/bindata/lazy.rb#65 def method_missing(symbol, *args); end + + # Returns a LazyEvaluator for the parent of this data object. + # + # source://bindata//lib/bindata/lazy.rb#40 def parent; end private + # @return [Boolean] + # + # source://bindata//lib/bindata/lazy.rb#105 def callable?(obj); end + + # source://bindata//lib/bindata/lazy.rb#78 def eval_symbol_in_parent_context(symbol, args); end + + # source://bindata//lib/bindata/lazy.rb#95 def recursively_eval(val, args); end + + # source://bindata//lib/bindata/lazy.rb#83 def resolve_symbol_in_parent_context(symbol, args); end end +# Extracts args for Records and Buffers. +# +# Foo.new(bar: "baz) is ambiguous as to whether :bar is a value or parameter. +# +# BaseArgExtractor always assumes :bar is parameter. This extractor correctly +# identifies it as value or parameter. +# +# source://bindata//lib/bindata/dsl.rb#8 module BinData::MultiFieldArgSeparator + # @return [Boolean] + # + # source://bindata//lib/bindata/dsl.rb#28 def field_names_in_parameters?(obj_class, parameters); end + + # @return [Boolean] + # + # source://bindata//lib/bindata/dsl.rb#20 def parameters_is_value?(obj_class, value, parameters); end + + # source://bindata//lib/bindata/dsl.rb#9 def separate_args(obj_class, obj_args); end end +# A Primitive is a declarative way to define a new BinData data type. +# The data type must contain a primitive value only, i.e numbers or strings. +# For new data types that contain multiple values see BinData::Record. +# +# To define a new data type, set fields as if for Record and add a +# #get and #set method to extract / convert the data between the fields +# and the #value of the object. +# +# require 'bindata' +# +# class PascalString < BinData::Primitive +# uint8 :len, value: -> { data.length } +# string :data, read_length: :len +# +# def get +# self.data +# end +# +# def set(v) +# self.data = v +# end +# end +# +# ps = PascalString.new(initial_value: "hello") +# ps.to_binary_s #=> "\005hello" +# ps.read("\003abcde") +# ps #=> "abc" +# +# # Unsigned 24 bit big endian integer +# class Uint24be < BinData::Primitive +# uint8 :byte1 +# uint8 :byte2 +# uint8 :byte3 +# +# def get +# (self.byte1 << 16) | (self.byte2 << 8) | self.byte3 +# end +# +# def set(v) +# v = 0 if v < 0 +# v = 0xffffff if v > 0xffffff +# +# self.byte1 = (v >> 16) & 0xff +# self.byte2 = (v >> 8) & 0xff +# self.byte3 = v & 0xff +# end +# end +# +# u24 = Uint24be.new +# u24.read("\x12\x34\x56") +# "0x%x" % u24 #=> 0x123456 +# +# == Parameters +# +# Primitive objects accept all the parameters that BinData::BasePrimitive do. +# +# source://bindata//lib/bindata/primitive.rb#62 class BinData::Primitive < ::BinData::BasePrimitive extend ::BinData::DSLMixin + # source://bindata//lib/bindata/primitive.rb#88 def assign(val); end + + # source://bindata//lib/bindata/primitive.rb#94 def debug_name_of(child); end + + # source://bindata//lib/bindata/primitive.rb#103 def do_num_bytes; end + + # source://bindata//lib/bindata/primitive.rb#98 def do_write(io); end + + # source://bindata//lib/bindata/primitive.rb#71 def initialize_instance; end + + # source://bindata//lib/bindata/primitive.rb#80 def method_missing(symbol, *args, &block); end + + # @return [Boolean] + # + # source://bindata//lib/bindata/primitive.rb#76 def respond_to?(symbol, include_private = T.unsafe(nil)); end private + # Extracts the value for this data object from the fields of the + # internal struct. + # + # @raise [NotImplementedError] + # + # source://bindata//lib/bindata/primitive.rb#125 def get; end + + # source://bindata//lib/bindata/primitive.rb#115 def read_and_return_value(io); end + + # source://bindata//lib/bindata/primitive.rb#111 def sensible_default; end + + # Sets the fields of the internal struct to represent +v+. + # + # @raise [NotImplementedError] + # + # source://bindata//lib/bindata/primitive.rb#130 def set(v); end class << self + # source://bindata//lib/bindata/alignment.rb#76 def bit_aligned; end end end +# source://bindata//lib/bindata/primitive.rb#138 class BinData::PrimitiveArgProcessor < ::BinData::BaseArgProcessor + # source://bindata//lib/bindata/primitive.rb#139 def sanitize_parameters!(obj_class, params); end end +# Logic for the read_until: :eof parameter +# +# source://bindata//lib/bindata/array.rb#313 module BinData::ReadUntilEOFPlugin + # source://bindata//lib/bindata/array.rb#314 def do_read(io); end end +# Logic for the :read_until parameter +# +# source://bindata//lib/bindata/array.rb#301 module BinData::ReadUntilPlugin + # source://bindata//lib/bindata/array.rb#302 def do_read(io); end end +# A Record is a declarative wrapper around Struct. +# +# See +Struct+ for more info. +# +# source://bindata//lib/bindata/record.rb#8 class BinData::Record < ::BinData::Struct extend ::BinData::DSLMixin class << self + # source://bindata//lib/bindata/base.rb#53 def inherited(subclass); end end end +# source://bindata//lib/bindata/record.rb#16 class BinData::RecordArgProcessor < ::BinData::StructArgProcessor include ::BinData::MultiFieldArgSeparator + # source://bindata//lib/bindata/record.rb#19 def sanitize_parameters!(obj_class, params); end end +# == Parameters +# +# Parameters may be provided at initialisation to control the behaviour of +# an object. These parameters are: +# +# :name:: The name that this object can be referred to may be +# set explicitly. This is only useful when dynamically +# generating types. +#
+#                    BinData::Struct.new(name: :my_struct, fields: ...)
+#                    array = BinData::Array.new(type: :my_struct)
+#                  
+# +# source://bindata//lib/bindata/name.rb#14 module BinData::RegisterNamePlugin + # source://bindata//lib/bindata/name.rb#21 def initialize_shared_instance; end class << self + # source://bindata//lib/bindata/name.rb#16 def included(base); end end end +# A singleton registry of all registered classes. +# +# source://bindata//lib/bindata/registry.rb#133 BinData::RegisteredClasses = T.let(T.unsafe(nil), BinData::Registry) +# This registry contains a register of name -> class mappings. +# +# Numerics (integers and floating point numbers) have an endian property as +# part of their name (e.g. int32be, float_le). +# +# Classes can be looked up based on their full name or an abbreviated +name+ +# with +hints+. +# +# There are two hints supported, :endian and :search_prefix. +# +# #lookup("int32", { endian: :big }) will return Int32Be. +# +# #lookup("my_type", { search_prefix: :ns }) will return NsMyType. +# +# Names are stored in under_score_style, not camelCase. +# +# source://bindata//lib/bindata/registry.rb#20 class BinData::Registry + # @return [Registry] a new instance of Registry + # + # source://bindata//lib/bindata/registry.rb#22 def initialize; end + # source://bindata//lib/bindata/registry.rb#39 def lookup(name, hints = T.unsafe(nil)); end + + # source://bindata//lib/bindata/registry.rb#26 def register(name, class_to_register); end + + # Convert CamelCase +name+ to underscore style. + # + # source://bindata//lib/bindata/registry.rb#51 def underscore_name(name); end + + # source://bindata//lib/bindata/registry.rb#35 def unregister(name); end private + # source://bindata//lib/bindata/registry.rb#96 def name_with_endian(name, endian); end + + # source://bindata//lib/bindata/registry.rb#87 def name_with_prefix(name, prefix); end + + # source://bindata//lib/bindata/registry.rb#64 def normalize_name(name, hints); end + + # source://bindata//lib/bindata/registry.rb#113 def register_dynamic_class(name); end + + # @return [Boolean] + # + # source://bindata//lib/bindata/registry.rb#107 def registered?(name); end + + # source://bindata//lib/bindata/registry.rb#123 def warn_if_name_is_already_registered(name, class_to_register); end end +# Rest will consume the input stream from the current position to the end of +# the stream. This will mainly be useful for debugging and developing. +# +# require 'bindata' +# +# class A < BinData::Record +# string :a, read_length: 5 +# rest :rest +# end +# +# obj = A.read("abcdefghij") +# obj.a #=> "abcde" +# obj.rest #=" "fghij" +# +# source://bindata//lib/bindata/rest.rb#19 class BinData::Rest < ::BinData::BasePrimitive private + # source://bindata//lib/bindata/rest.rb#26 def read_and_return_value(io); end + + # source://bindata//lib/bindata/rest.rb#30 def sensible_default; end + + # source://bindata//lib/bindata/rest.rb#22 def value_to_binary_string(val); end end +# Resets the stream alignment to the next byte. This is +# only useful when using bit-based primitives. +# +# class MyRec < BinData::Record +# bit4 :a +# resume_byte_alignment +# bit4 :b +# end +# +# MyRec.read("\x12\x34") #=> {"a" => 1, "b" => 3} +# +# source://bindata//lib/bindata/alignment.rb#15 class BinData::ResumeByteAlignment < ::BinData::Base + # source://bindata//lib/bindata/alignment.rb#17 def assign(val); end + + # @return [Boolean] + # + # source://bindata//lib/bindata/alignment.rb#16 def clear?; end + + # source://bindata//lib/bindata/alignment.rb#19 def do_num_bytes; end + + # source://bindata//lib/bindata/alignment.rb#21 def do_read(io); end + + # source://bindata//lib/bindata/alignment.rb#25 def do_write(io); end + + # source://bindata//lib/bindata/alignment.rb#18 def snapshot; end end +# ---------------------------------------------------------------------------- +# +# source://bindata//lib/bindata/sanitize.rb#157 class BinData::SanitizedBigEndian < ::BinData::SanitizedParameter + # source://bindata//lib/bindata/sanitize.rb#158 def endian; end end +# ---------------------------------------------------------------------------- +# +# source://bindata//lib/bindata/sanitize.rb#132 class BinData::SanitizedChoices < ::BinData::SanitizedParameter + # @return [SanitizedChoices] a new instance of SanitizedChoices + # + # source://bindata//lib/bindata/sanitize.rb#133 def initialize(choices, hints); end + # source://bindata//lib/bindata/sanitize.rb#151 def [](key); end end +# ---------------------------------------------------------------------------- +# +# source://bindata//lib/bindata/sanitize.rb#46 class BinData::SanitizedField < ::BinData::SanitizedParameter + # @return [SanitizedField] a new instance of SanitizedField + # + # source://bindata//lib/bindata/sanitize.rb#47 def initialize(name, field_type, field_params, hints); end + # @return [Boolean] + # + # source://bindata//lib/bindata/sanitize.rb#62 def has_parameter?(param); end + + # source://bindata//lib/bindata/sanitize.rb#66 def instantiate(value = T.unsafe(nil), parent = T.unsafe(nil)); end + + # source://bindata//lib/bindata/sanitize.rb#58 def name; end + + # source://bindata//lib/bindata/sanitize.rb#54 def name_as_sym; end + + # Returns the value of attribute prototype. + # + # source://bindata//lib/bindata/sanitize.rb#52 def prototype; end end +# ---------------------------------------------------------------------------- +# +# source://bindata//lib/bindata/sanitize.rb#72 class BinData::SanitizedFields < ::BinData::SanitizedParameter include ::Enumerable + # @return [SanitizedFields] a new instance of SanitizedFields + # + # source://bindata//lib/bindata/sanitize.rb#75 def initialize(hints, base_fields = T.unsafe(nil)); end + # source://bindata//lib/bindata/sanitize.rb#94 def [](idx); end + + # source://bindata//lib/bindata/sanitize.rb#84 def add_field(type, name, params); end + + # @return [Boolean] + # + # source://bindata//lib/bindata/sanitize.rb#118 def all_field_names_blank?; end + + # @return [Boolean] + # + # source://bindata//lib/bindata/sanitize.rb#126 def any_field_has_parameter?(parameter); end + + # source://bindata//lib/bindata/sanitize.rb#106 def each(&block); end + + # @return [Boolean] + # + # source://bindata//lib/bindata/sanitize.rb#98 def empty?; end + + # @return [Boolean] + # + # source://bindata//lib/bindata/sanitize.rb#114 def field_name?(name); end + + # source://bindata//lib/bindata/sanitize.rb#110 def field_names; end + + # source://bindata//lib/bindata/sanitize.rb#102 def length; end + + # @return [Boolean] + # + # source://bindata//lib/bindata/sanitize.rb#122 def no_field_names_blank?; end + + # source://bindata//lib/bindata/sanitize.rb#90 def raw_fields; end end +# source://bindata//lib/bindata/sanitize.rb#163 class BinData::SanitizedLittleEndian < ::BinData::SanitizedParameter + # source://bindata//lib/bindata/sanitize.rb#164 def endian; end end +# Subclasses of this are sanitized +# +# source://bindata//lib/bindata/sanitize.rb#6 class BinData::SanitizedParameter; end +# BinData objects are instantiated with parameters to determine their +# behaviour. These parameters must be sanitized to ensure their values +# are valid. When instantiating many objects with identical parameters, +# such as an array of records, there is much duplicated sanitizing. +# +# The purpose of the sanitizing code is to eliminate the duplicated +# validation. +# +# SanitizedParameters is a hash-like collection of parameters. Its purpose +# is to recursively sanitize the parameters of an entire BinData object chain +# at a single time. +# +# source://bindata//lib/bindata/sanitize.rb#181 class BinData::SanitizedParameters < ::Hash + # @return [SanitizedParameters] a new instance of SanitizedParameters + # + # source://bindata//lib/bindata/sanitize.rb#197 def initialize(parameters, the_class, hints); end + # source://bindata//lib/bindata/sanitize.rb#287 def create_sanitized_params(params, the_class); end + + # @return [Boolean] + # + # source://bindata//lib/bindata/sanitize.rb#215 def has_at_least_one_of?(*keys); end + def has_parameter?(_arg0); end + + # source://bindata//lib/bindata/sanitize.rb#291 def hints; end + + # def warn_renamed_parameter(old_key, new_key) + # val = delete(old_key) + # if val + # self[new_key] = val + # Kernel.warn ":#{old_key} has been renamed to :#{new_key} in #{@the_class}. " \ + # "Using :#{old_key} is now deprecated and will be removed in the future" + # end + # end + # + # source://bindata//lib/bindata/sanitize.rb#239 def must_be_integer(*keys); end + + # source://bindata//lib/bindata/sanitize.rb#253 def rename_parameter(old_key, new_key); end + + # source://bindata//lib/bindata/sanitize.rb#281 def sanitize(key, &block); end + + # source://bindata//lib/bindata/sanitize.rb#271 def sanitize_choices(key, &block); end + + # source://bindata//lib/bindata/sanitize.rb#277 def sanitize_endian(key); end + + # source://bindata//lib/bindata/sanitize.rb#263 def sanitize_fields(key, &block); end + + # source://bindata//lib/bindata/sanitize.rb#259 def sanitize_object_prototype(key); end + + # source://bindata//lib/bindata/sanitize.rb#223 def warn_replacement_parameter(bad_key, suggested_key); end private + # source://bindata//lib/bindata/sanitize.rb#359 def create_sanitized_choices(choices); end + + # source://bindata//lib/bindata/sanitize.rb#347 def create_sanitized_endian(endian); end + + # source://bindata//lib/bindata/sanitize.rb#363 def create_sanitized_fields; end + + # source://bindata//lib/bindata/sanitize.rb#367 def create_sanitized_object_prototype(obj_type, obj_params); end + + # source://bindata//lib/bindata/sanitize.rb#327 def ensure_mandatory_parameters_exist; end + + # source://bindata//lib/bindata/sanitize.rb#336 def ensure_mutual_exclusion_of_parameters; end + + # source://bindata//lib/bindata/sanitize.rb#312 def ensure_no_nil_values; end + + # source://bindata//lib/bindata/sanitize.rb#321 def merge_default_parameters!; end + + # @return [Boolean] + # + # source://bindata//lib/bindata/sanitize.rb#308 def needs_sanitizing?(key); end + + # source://bindata//lib/bindata/sanitize.rb#298 def sanitize!; end class << self + # source://bindata//lib/bindata/sanitize.rb#188 def sanitize(parameters, the_class); end end end +# Memoized constants +# +# source://bindata//lib/bindata/sanitize.rb#184 BinData::SanitizedParameters::BIG_ENDIAN = T.let(T.unsafe(nil), BinData::SanitizedBigEndian) + +# source://bindata//lib/bindata/sanitize.rb#185 BinData::SanitizedParameters::LITTLE_ENDIAN = T.let(T.unsafe(nil), BinData::SanitizedLittleEndian) +# source://bindata//lib/bindata/sanitize.rb#8 class BinData::SanitizedPrototype < ::BinData::SanitizedParameter + # @return [SanitizedPrototype] a new instance of SanitizedPrototype + # + # source://bindata//lib/bindata/sanitize.rb#9 def initialize(obj_type, obj_params, hints); end + # @return [Boolean] + # + # source://bindata//lib/bindata/sanitize.rb#30 def has_parameter?(param); end + + # source://bindata//lib/bindata/sanitize.rb#38 def instantiate(value = T.unsafe(nil), parent = T.unsafe(nil)); end end +# source://bindata//lib/bindata/bits.rb#15 class BinData::Sbit < ::BinData::BasePrimitive def assign(val); end def bit_aligned?; end @@ -929,6 +2759,7 @@ class BinData::Sbit < ::BinData::BasePrimitive def sensible_default; end end +# source://bindata//lib/bindata/bits.rb#15 class BinData::SbitLe < ::BinData::BasePrimitive def assign(val); end def bit_aligned?; end @@ -941,205 +2772,475 @@ class BinData::SbitLe < ::BinData::BasePrimitive def sensible_default; end end +# Skip will skip over bytes from the input stream. If the stream is not +# seekable, then the bytes are consumed and discarded. +# +# When writing, skip will write the appropriate number of zero bytes. +# +# require 'bindata' +# +# class A < BinData::Record +# skip length: 5 +# string :a, read_length: 5 +# end +# +# obj = A.read("abcdefghij") +# obj.a #=> "fghij" +# +# +# class B < BinData::Record +# skip until_valid: [:string, {read_length: 2, assert: "ef"} ] +# string :b, read_length: 5 +# end +# +# obj = B.read("abcdefghij") +# obj.b #=> "efghi" +# +# +# == Parameters +# +# Skip objects accept all the params that BinData::BasePrimitive +# does, as well as the following: +# +# :length:: The number of bytes to skip. +# :to_abs_offset:: Skips to the given absolute offset. +# :until_valid:: Skips untils a given byte pattern is matched. +# This parameter contains a type that will raise +# a BinData::ValidityError unless an acceptable byte +# sequence is found. The type is represented by a +# Symbol, or if the type is to have params # +# passed to it, then it should be provided as # +# [type_symbol, hash_params]. +# +# source://bindata//lib/bindata/skip.rb#44 class BinData::Skip < ::BinData::BasePrimitive + # source://bindata//lib/bindata/skip.rb#50 def initialize_shared_instance; end private + # source://bindata//lib/bindata/skip.rb#69 def read_and_return_value(io); end + + # source://bindata//lib/bindata/skip.rb#79 def sensible_default; end + + # source://bindata//lib/bindata/skip.rb#60 def value_to_binary_string(val); end end +# source://bindata//lib/bindata/skip.rb#84 class BinData::SkipArgProcessor < ::BinData::BaseArgProcessor + # source://bindata//lib/bindata/skip.rb#85 def sanitize_parameters!(obj_class, params); end end +# Logic for the :length parameter +# +# source://bindata//lib/bindata/skip.rb#96 module BinData::SkipLengthPlugin + # source://bindata//lib/bindata/skip.rb#97 def skip_length; end end +# Logic for the :to_abs_offset parameter +# +# source://bindata//lib/bindata/skip.rb#103 module BinData::SkipToAbsOffsetPlugin + # source://bindata//lib/bindata/skip.rb#104 def skip_length; end end +# Logic for the :until_valid parameter +# +# source://bindata//lib/bindata/skip.rb#110 module BinData::SkipUntilValidPlugin + # source://bindata//lib/bindata/skip.rb#116 def read_and_return_value(io); end + + # source://bindata//lib/bindata/skip.rb#111 def skip_length; end end +# A String is a sequence of bytes. This is the same as strings in Ruby 1.8. +# The issue of character encoding is ignored by this class. +# +# require 'bindata' +# +# data = "abcdefghij" +# +# obj = BinData::String.new(read_length: 5) +# obj.read(data) +# obj #=> "abcde" +# +# obj = BinData::String.new(length: 6) +# obj.read(data) +# obj #=> "abcdef" +# obj.assign("abcdefghij") +# obj #=> "abcdef" +# obj.assign("abcd") +# obj #=> "abcd\000\000" +# +# obj = BinData::String.new(length: 6, trim_padding: true) +# obj.assign("abcd") +# obj #=> "abcd" +# obj.to_binary_s #=> "abcd\000\000" +# +# obj = BinData::String.new(length: 6, pad_byte: 'A') +# obj.assign("abcd") +# obj #=> "abcdAA" +# obj.to_binary_s #=> "abcdAA" +# +# == Parameters +# +# String objects accept all the params that BinData::BasePrimitive +# does, as well as the following: +# +# :read_length:: The length in bytes to use when reading a value. +# :length:: The fixed length of the string. If a shorter +# string is set, it will be padded to this length. +# :pad_byte:: The byte to use when padding a string to a +# set length. Valid values are Integers and +# Strings of length 1. "\0" is the default. +# :pad_front:: Signifies that the padding occurs at the front +# of the string rather than the end. Default +# is false. +# :trim_padding:: Boolean, default false. If set, #value will +# return the value with all pad_bytes trimmed +# from the end of the string. The value will +# not be trimmed when writing. +# +# source://bindata//lib/bindata/string.rb#51 class BinData::String < ::BinData::BasePrimitive + # source://bindata//lib/bindata/string.rb#67 def assign(val); end + + # source://bindata//lib/bindata/string.rb#59 def initialize_shared_instance; end + + # source://bindata//lib/bindata/string.rb#71 def snapshot; end private + # source://bindata//lib/bindata/string.rb#86 def clamp_to_length(str); end + + # source://bindata//lib/bindata/string.rb#116 def read_and_return_value(io); end + + # source://bindata//lib/bindata/string.rb#121 def sensible_default; end + + # source://bindata//lib/bindata/string.rb#104 def trim_padding(str); end + + # source://bindata//lib/bindata/string.rb#112 def value_to_binary_string(val); end end +# source://bindata//lib/bindata/string.rb#126 class BinData::StringArgProcessor < ::BinData::BaseArgProcessor + # source://bindata//lib/bindata/string.rb#127 def sanitize_parameters!(obj_class, params); end private + # source://bindata//lib/bindata/string.rb#137 def sanitized_pad_byte(byte); end end +# A BinData::Stringz object is a container for a zero ("\0") terminated +# string. +# +# For convenience, the zero terminator is not necessary when setting the +# value. Likewise, the returned value will not be zero terminated. +# +# require 'bindata' +# +# data = "abcd\x00efgh" +# +# obj = BinData::Stringz.new +# obj.read(data) +# obj.snapshot #=> "abcd" +# obj.num_bytes #=> 5 +# obj.to_binary_s #=> "abcd\000" +# +# == Parameters +# +# Stringz objects accept all the params that BinData::BasePrimitive +# does, as well as the following: +# +# :max_length:: The maximum length of the string including the zero +# byte. +# +# source://bindata//lib/bindata/stringz.rb#27 class BinData::Stringz < ::BinData::BasePrimitive + # source://bindata//lib/bindata/stringz.rb#31 def assign(val); end + + # source://bindata//lib/bindata/stringz.rb#35 def snapshot; end private + # source://bindata//lib/bindata/stringz.rb#90 def append_zero_byte_if_needed!(str); end + + # source://bindata//lib/bindata/stringz.rb#48 def read_and_return_value(io); end + + # source://bindata//lib/bindata/stringz.rb#64 def sensible_default; end + + # source://bindata//lib/bindata/stringz.rb#68 def trim_and_zero_terminate(str); end + + # source://bindata//lib/bindata/stringz.rb#80 def trim_to!(str, max_length = T.unsafe(nil)); end + + # source://bindata//lib/bindata/stringz.rb#76 def truncate_after_first_zero_byte!(str); end + + # source://bindata//lib/bindata/stringz.rb#44 def value_to_binary_string(val); end end +# A Struct is an ordered collection of named data objects. +# +# require 'bindata' +# +# class Tuple < BinData::Record +# int8 :x +# int8 :y +# int8 :z +# end +# +# obj = BinData::Struct.new(hide: :a, +# fields: [ [:int32le, :a], +# [:int16le, :b], +# [:tuple, :s] ]) +# obj.field_names =># [:b, :s] +# +# +# == Parameters +# +# Parameters may be provided at initialisation to control the behaviour of +# an object. These params are: +# +# :fields:: An array specifying the fields for this struct. +# Each element of the array is of the form [type, name, +# params]. Type is a symbol representing a registered +# type. Name is the name of this field. Params is an +# optional hash of parameters to pass to this field +# when instantiating it. If name is "" or nil, then +# that field is anonymous and behaves as a hidden field. +# :hide:: A list of the names of fields that are to be hidden +# from the outside world. Hidden fields don't appear +# in #snapshot or #field_names but are still accessible +# by name. +# :endian:: Either :little or :big. This specifies the default +# endian of any numerics in this struct, or in any +# nested data objects. +# :search_prefix:: Allows abbreviated type names. If a type is +# unrecognised, then each prefix is applied until +# a match is found. +# +# == Field Parameters +# +# Fields may have have extra parameters as listed below: +# +# [:onlyif] Used to indicate a data object is optional. +# if +false+, this object will not be included in any +# calls to #read, #write, #num_bytes or #snapshot. +# [:byte_align] This field's rel_offset must be a multiple of +# :byte_align. +# +# source://bindata//lib/bindata/struct.rb#59 class BinData::Struct < ::BinData::Base + # source://bindata//lib/bindata/struct.rb#153 def [](key); end + + # source://bindata//lib/bindata/struct.rb#157 def []=(key, value); end + + # source://bindata//lib/bindata/struct.rb#101 def assign(val); end + + # source://bindata//lib/bindata/struct.rb#93 def clear; end + + # @return [Boolean] + # + # source://bindata//lib/bindata/struct.rb#97 def clear?; end + + # source://bindata//lib/bindata/struct.rb#127 def debug_name_of(child); end + + # source://bindata//lib/bindata/struct.rb#148 def do_num_bytes; end + + # source://bindata//lib/bindata/struct.rb#138 def do_read(io); end + + # :nodoc + # + # source://bindata//lib/bindata/struct.rb#143 def do_write(io); end + + # source://bindata//lib/bindata/struct.rb#168 def each_pair; end + + # Returns a list of the names of all fields accessible through this + # object. +include_hidden+ specifies whether to include hidden names + # in the listing. + # + # source://bindata//lib/bindata/struct.rb#118 def field_names(include_hidden = T.unsafe(nil)); end + + # has_key? is deprecated + # + # @return [Boolean] + # + # source://bindata//lib/bindata/struct.rb#164 def has_key?(key); end + + # source://bindata//lib/bindata/struct.rb#89 def initialize_instance; end + + # source://bindata//lib/bindata/struct.rb#81 def initialize_shared_instance; end + + # @return [Boolean] + # + # source://bindata//lib/bindata/struct.rb#164 def key?(key); end + + # source://bindata//lib/bindata/struct.rb#132 def offset_of(child); end + + # source://bindata//lib/bindata/struct.rb#106 def snapshot; end private + # source://bindata//lib/bindata/struct.rb#239 def as_stringified_hash(val); end + + # source://bindata//lib/bindata/struct.rb#228 def assign_fields(val); end + + # source://bindata//lib/bindata/struct.rb#213 def base_field_name(name); end + + # source://bindata//lib/bindata/struct.rb#177 def define_field_accessors; end + + # source://bindata//lib/bindata/struct.rb#184 def define_field_accessors_for(name, index); end + + # source://bindata//lib/bindata/struct.rb#199 def find_index_of(obj); end + + # source://bindata//lib/bindata/struct.rb#203 def find_obj_for_name(name); end + + # @return [Boolean] + # + # source://bindata//lib/bindata/struct.rb#273 def include_obj?(obj); end + + # @return [Boolean] + # + # source://bindata//lib/bindata/struct.rb#267 def include_obj_for_io?(obj); end + + # source://bindata//lib/bindata/struct.rb#217 def instantiate_all_objs; end + + # source://bindata//lib/bindata/struct.rb#221 def instantiate_obj_at(index); end + + # source://bindata//lib/bindata/struct.rb#255 def sum_num_bytes_below_index(index); end + + # source://bindata//lib/bindata/struct.rb#251 def sum_num_bytes_for_all_fields; end class << self + # source://bindata//lib/bindata/base.rb#53 def inherited(subclass); end end end +# These reserved words may not be used as field names +# +# source://bindata//lib/bindata/struct.rb#66 BinData::Struct::RESERVED = T.let(T.unsafe(nil), Hash) +# A hash that can be accessed via attributes. +# +# source://bindata//lib/bindata/struct.rb#278 class BinData::Struct::Snapshot < ::Hash + # source://bindata//lib/bindata/struct.rb#279 def []=(key, value); end + + # source://bindata//lib/bindata/struct.rb#287 def method_missing(symbol, *args); end + + # @return [Boolean] + # + # source://bindata//lib/bindata/struct.rb#283 def respond_to?(symbol, include_private = T.unsafe(nil)); end end +# source://bindata//lib/bindata/struct.rb#348 class BinData::StructArgProcessor < ::BinData::BaseArgProcessor + # source://bindata//lib/bindata/struct.rb#349 def sanitize_parameters!(obj_class, params); end private + # source://bindata//lib/bindata/struct.rb#403 def ensure_field_names_are_valid(obj_class, field_names); end + + # source://bindata//lib/bindata/struct.rb#399 def hidden_field_names(hidden); end + + # source://bindata//lib/bindata/struct.rb#359 def sanitize_endian(params); end + + # source://bindata//lib/bindata/struct.rb#375 def sanitize_fields(obj_class, params); end + + # source://bindata//lib/bindata/struct.rb#386 def sanitize_hide(params); end + + # source://bindata//lib/bindata/struct.rb#363 def sanitize_search_prefix(params); end + + # source://bindata//lib/bindata/struct.rb#395 def sanitized_field_names(sanitized_fields); end end +# source://bindata//lib/bindata/trace.rb#5 class BinData::Tracer + # @return [Tracer] a new instance of Tracer + # + # source://bindata//lib/bindata/trace.rb#6 def initialize(io); end + # source://bindata//lib/bindata/trace.rb#10 def trace(msg); end - def trace_obj(obj_name, val); end -end - -class BinData::Uint16be < ::BinData::BasePrimitive - def assign(val); end - def do_num_bytes; end - private - - def read_and_return_value(io); end - def sensible_default; end - def value_to_binary_string(val); end -end - -class BinData::Uint16le < ::BinData::BasePrimitive - def assign(val); end - def do_num_bytes; end - - private - - def read_and_return_value(io); end - def sensible_default; end - def value_to_binary_string(val); end -end - -class BinData::Uint32be < ::BinData::BasePrimitive - def assign(val); end - def do_num_bytes; end - - private - - def read_and_return_value(io); end - def sensible_default; end - def value_to_binary_string(val); end -end - -class BinData::Uint32le < ::BinData::BasePrimitive - def assign(val); end - def do_num_bytes; end - - private - - def read_and_return_value(io); end - def sensible_default; end - def value_to_binary_string(val); end -end - -class BinData::Uint64be < ::BinData::BasePrimitive - def assign(val); end - def do_num_bytes; end - - private - - def read_and_return_value(io); end - def sensible_default; end - def value_to_binary_string(val); end -end - -class BinData::Uint64le < ::BinData::BasePrimitive - def assign(val); end - def do_num_bytes; end - - private - - def read_and_return_value(io); end - def sensible_default; end - def value_to_binary_string(val); end + # source://bindata//lib/bindata/trace.rb#14 + def trace_obj(obj_name, val); end end +# Unsigned 1 byte integer. +# +# source://bindata//lib/bindata/int.rb#180 class BinData::Uint8 < ::BinData::BasePrimitive def assign(val); end def do_num_bytes; end @@ -1151,29 +3252,104 @@ class BinData::Uint8 < ::BinData::BasePrimitive def value_to_binary_string(val); end end +# Uint8Array is a specialised type of array that only contains +# bytes (Uint8). It is a faster and more memory efficient version +# of `BinData::Array.new(:type => :uint8)`. +# +# require 'bindata' +# +# obj = BinData::Uint8Array.new(initial_length: 5) +# obj.read("abcdefg") #=> [97, 98, 99, 100, 101] +# obj[2] #=> 99 +# obj.collect { |x| x.chr }.join #=> "abcde" +# +# == Parameters +# +# Parameters may be provided at initialisation to control the behaviour of +# an object. These params are: +# +# :initial_length:: The initial length of the array. +# :read_until:: May only have a value of `:eof`. This parameter +# instructs the array to read as much data from +# the stream as possible. +# +# source://bindata//lib/bindata/uint8_array.rb#24 class BinData::Uint8Array < ::BinData::BasePrimitive private + # source://bindata//lib/bindata/uint8_array.rb#36 def read_and_return_value(io); end + + # source://bindata//lib/bindata/uint8_array.rb#46 def sensible_default; end + + # source://bindata//lib/bindata/uint8_array.rb#32 def value_to_binary_string(val); end end +# source://bindata//lib/bindata/uint8_array.rb#51 class BinData::Uint8ArrayArgProcessor < ::BinData::BaseArgProcessor + # source://bindata//lib/bindata/uint8_array.rb#52 def sanitize_parameters!(obj_class, params); end end +# source://bindata//lib/bindata/registry.rb#3 class BinData::UnRegisteredTypeError < ::StandardError; end + +# source://bindata//lib/bindata/version.rb#2 BinData::VERSION = T.let(T.unsafe(nil), String) + +# Error raised when unexpected results occur when reading data from IO. +# +# source://bindata//lib/bindata/framework.rb#3 class BinData::ValidityError < ::StandardError; end +# A virtual field is one that is neither read, written nor occupies space in +# the data stream. It is used to make assertions or as a convenient label +# for determining offsets or storing values. +# +# require 'bindata' +# +# class A < BinData::Record +# string :a, read_length: 5 +# string :b, read_length: 5 +# virtual :c, assert: -> { a == b } +# end +# +# obj = A.read("abcdeabcde") +# obj.a #=> "abcde" +# obj.c.offset #=> 10 +# +# obj = A.read("abcdeABCDE") #=> BinData::ValidityError: assertion failed for obj.c +# +# == Parameters +# +# Parameters may be provided at initialisation to control the behaviour of +# an object. These params include those for BinData::Base as well as: +# +# [:assert] Raise an error when reading or assigning if the value +# of this evaluated parameter is false. +# [:value] The virtual object will always have this value. +# +# source://bindata//lib/bindata/virtual.rb#31 class BinData::Virtual < ::BinData::BasePrimitive + # source://bindata//lib/bindata/virtual.rb#39 def do_num_bytes; end + + # source://bindata//lib/bindata/virtual.rb#33 def do_read(io); end + + # source://bindata//lib/bindata/virtual.rb#36 def do_write(io); end + + # source://bindata//lib/bindata/virtual.rb#43 def sensible_default; end end +# Warns when reading if :value && no :read_length +# +# source://bindata//lib/bindata/string.rb#147 module BinData::WarnNoReadLengthPlugin + # source://bindata//lib/bindata/string.rb#148 def read_and_return_value(io); end end diff --git a/Library/Homebrew/sorbet/rbi/gems/bootsnap@1.17.0.rbi b/Library/Homebrew/sorbet/rbi/gems/bootsnap@1.17.0.rbi index ac7585225e0de4..0bdf707de62651 100644 --- a/Library/Homebrew/sorbet/rbi/gems/bootsnap@1.17.0.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/bootsnap@1.17.0.rbi @@ -4,214 +4,646 @@ # This is an autogenerated file for types exported from the `bootsnap` gem. # Please instead update this file by running `bin/tapioca gem bootsnap`. +# source://bootsnap//lib/bootsnap/version.rb#3 module Bootsnap extend ::Bootsnap + # @return [Boolean] + # + # source://bootsnap//lib/bootsnap/bundler.rb#6 def bundler?; end class << self + # source://bootsnap//lib/bootsnap.rb#34 def _instrument(event, path); end + + # source://bootsnap//lib/bootsnap.rb#122 def absolute_path?(path); end + + # source://bootsnap//lib/bootsnap.rb#70 def default_setup; end + + # source://bootsnap//lib/bootsnap.rb#27 def instrumentation=(callback); end + + # source://bootsnap//lib/bootsnap.rb#14 def log!; end + + # Returns the value of attribute logger. + # + # source://bootsnap//lib/bootsnap.rb#12 def logger; end + + # source://bootsnap//lib/bootsnap.rb#18 def logger=(logger); end + + # Allow the C extension to redefine `rb_get_path` without warning. + # Allow the C extension to redefine `rb_get_path` without warning. + # + # source://bootsnap//lib/bootsnap.rb#130 def rb_get_path(fname); end + + # source://bootsnap//lib/bootsnap.rb#38 def setup(cache_dir:, development_mode: T.unsafe(nil), load_path_cache: T.unsafe(nil), ignore_directories: T.unsafe(nil), readonly: T.unsafe(nil), compile_cache_iseq: T.unsafe(nil), compile_cache_yaml: T.unsafe(nil), compile_cache_json: T.unsafe(nil)); end + + # source://bootsnap//lib/bootsnap.rb#66 def unload_cache!; end end end +# source://bootsnap//lib/bootsnap/compile_cache.rb#4 module Bootsnap::CompileCache class << self + # source://bootsnap//lib/bootsnap/compile_cache.rb#12 def setup(cache_dir:, iseq:, yaml:, json:, readonly: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://bootsnap//lib/bootsnap/compile_cache.rb#45 def supported?; end end end +# source://bootsnap//lib/bootsnap/compile_cache.rb#10 class Bootsnap::CompileCache::Error < ::StandardError; end + +# source://bootsnap//lib/bootsnap/compile_cache.rb#5 Bootsnap::CompileCache::UNCOMPILABLE = T.let(T.unsafe(nil), BasicObject) +# source://bootsnap//lib/bootsnap/explicit_require.rb#4 module Bootsnap::ExplicitRequire class << self + # source://bootsnap//lib/bootsnap/explicit_require.rb#17 def from_archdir(feature); end + + # source://bootsnap//lib/bootsnap/explicit_require.rb#13 def from_rubylibdir(feature); end + + # source://bootsnap//lib/bootsnap/explicit_require.rb#9 def from_self(feature); end + + # Given a set of gems, run a block with the LOAD_PATH narrowed to include + # only core ruby source paths and these gems -- that is, roughly, + # temporarily remove all gems not listed in this call from the LOAD_PATH. + # + # This is useful before bootsnap is fully-initialized to load gems that it + # depends on, without forcing full LOAD_PATH traversals. + # + # source://bootsnap//lib/bootsnap/explicit_require.rb#27 def with_gems(*gems); end end end +# source://bootsnap//lib/bootsnap/explicit_require.rb#5 Bootsnap::ExplicitRequire::ARCHDIR = T.let(T.unsafe(nil), String) + +# source://bootsnap//lib/bootsnap/explicit_require.rb#7 Bootsnap::ExplicitRequire::DLEXT = T.let(T.unsafe(nil), String) + +# source://bootsnap//lib/bootsnap/explicit_require.rb#6 Bootsnap::ExplicitRequire::RUBYLIBDIR = T.let(T.unsafe(nil), String) + +# source://bootsnap//lib/bootsnap.rb#9 class Bootsnap::InvalidConfiguration < ::StandardError; end +# source://bootsnap//lib/bootsnap/load_path_cache.rb#4 module Bootsnap::LoadPathCache class << self + # Returns the value of attribute enabled. + # + # source://bootsnap//lib/bootsnap/load_path_cache.rb#27 def enabled?; end + + # Returns the value of attribute load_path_cache. + # + # source://bootsnap//lib/bootsnap/load_path_cache.rb#27 def load_path_cache; end + + # Returns the value of attribute loaded_features_index. + # + # source://bootsnap//lib/bootsnap/load_path_cache.rb#27 def loaded_features_index; end + + # source://bootsnap//lib/bootsnap/load_path_cache.rb#31 def setup(cache_path:, development_mode:, ignore_directories:, readonly: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://bootsnap//lib/bootsnap/load_path_cache.rb#56 def supported?; end + + # source://bootsnap//lib/bootsnap/load_path_cache.rb#48 def unload!; end end end +# source://bootsnap//lib/bootsnap/load_path_cache.rb#22 Bootsnap::LoadPathCache::CACHED_EXTENSIONS = T.let(T.unsafe(nil), Array) +# source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#7 class Bootsnap::LoadPathCache::Cache + # @return [Cache] a new instance of Cache + # + # source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#10 def initialize(store, path_obj, development_mode: T.unsafe(nil)); end + # Try to resolve this feature to an absolute path without traversing the + # loadpath. + # + # source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#56 def find(feature); end + + # What is the path item that contains the dir as child? + # e.g. given "/a/b/c/d" exists, and the path is ["/a/b"], load_dir("c/d") + # is "/a/b". + # + # source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#22 def load_dir(dir); end + + # source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#116 def push_paths(sender, *paths); end + + # source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#122 def reinitialize(path_obj = T.unsafe(nil)); end + + # source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#110 def unshift_paths(sender, *paths); end private + # @return [Boolean] + # + # source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#135 def dir_changed?; end + + # source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#180 def expand_path(feature); end + + # source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#211 def maybe_append_extension(feature); end + + # source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#188 def now; end + + # source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#145 def push_paths_locked(*paths); end + + # source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#207 def search_index(feature); end + + # @return [Boolean] + # + # source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#184 def stale?; end + + # source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#239 def try_ext(feature); end + + # source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#219 def try_index(feature); end + + # source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#163 def unshift_paths_locked(*paths); end end +# seconds +# +# source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#8 Bootsnap::LoadPathCache::Cache::AGE_THRESHOLD = T.let(T.unsafe(nil), Integer) + +# { 'enumerator' => nil, 'enumerator.so' => nil, ... } +# +# source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#32 Bootsnap::LoadPathCache::Cache::BUILTIN_FEATURES = T.let(T.unsafe(nil), Hash) +# source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#27 +Bootsnap::LoadPathCache::Cache::TRUFFLERUBY_LIB_DIR_PREFIX = T.let(T.unsafe(nil), T.untyped) + +# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#5 module Bootsnap::LoadPathCache::ChangeObserver class << self + # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#65 def register(arr, observer); end + + # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#74 def unregister(arr); end end end +# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#6 module Bootsnap::LoadPathCache::ChangeObserver::ArrayMixin + # For each method that adds items to one end or another of the array + # (<<, push, unshift, concat), override that method to also notify the + # observer of the change. + # + # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#10 def <<(entry); end + + # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51 def []=(*args, &block); end + + # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#15 def append(*entries); end + + # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51 def clear(*args, &block); end + + # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#58 def clone; end + + # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51 def collect!(*args, &block); end + + # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51 def compact!(*args, &block); end + + # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#27 def concat(entries); end + + # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51 def delete(*args, &block); end + + # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51 def delete_at(*args, &block); end + + # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51 def delete_if(*args, &block); end + + # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#58 def dup; end + + # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51 def fill(*args, &block); end + + # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51 def flatten!(*args, &block); end + + # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51 def insert(*args, &block); end + + # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51 def keep_if(*args, &block); end + + # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51 def map!(*args, &block); end + + # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51 def pop(*args, &block); end + + # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#21 def prepend(*entries); end + + # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#15 def push(*entries); end + + # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51 def reject!(*args, &block); end + + # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51 def replace(*args, &block); end + + # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51 def reverse!(*args, &block); end + + # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51 def rotate!(*args, &block); end + + # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51 def select!(*args, &block); end + + # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51 def shift(*args, &block); end + + # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51 def shuffle!(*args, &block); end + + # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51 def slice!(*args, &block); end + + # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51 def sort!(*args, &block); end + + # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51 def sort_by!(*args, &block); end + + # uniq! keeps the first occurrence of each path, otherwise preserving + # order, preserving the effective load path + # + # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#34 def uniq!(*args); end + + # source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#21 def unshift(*entries); end end +# source://bootsnap//lib/bootsnap/load_path_cache.rb#16 Bootsnap::LoadPathCache::DLEXT = T.let(T.unsafe(nil), String) + +# This is nil on linux and darwin, but I think it's '.o' on some other +# platform. I'm not really sure which, but it seems better to replicate +# ruby's semantics as faithfully as possible. +# +# source://bootsnap//lib/bootsnap/load_path_cache.rb#20 +Bootsnap::LoadPathCache::DLEXT2 = T.let(T.unsafe(nil), T.untyped) + +# source://bootsnap//lib/bootsnap/load_path_cache.rb#11 Bootsnap::LoadPathCache::DL_EXTENSIONS = T.let(T.unsafe(nil), Array) + +# source://bootsnap//lib/bootsnap/load_path_cache.rb#7 Bootsnap::LoadPathCache::DOT_RB = T.let(T.unsafe(nil), String) + +# source://bootsnap//lib/bootsnap/load_path_cache.rb#8 Bootsnap::LoadPathCache::DOT_SO = T.let(T.unsafe(nil), String) + +# source://bootsnap//lib/bootsnap/load_path_cache.rb#5 Bootsnap::LoadPathCache::FALLBACK_SCAN = T.let(T.unsafe(nil), BasicObject) +# LoadedFeaturesIndex partially mirrors an internal structure in ruby that +# we can't easily obtain an interface to. +# +# This works around an issue where, without bootsnap, *ruby* knows that it +# has already required a file by its short name (e.g. require 'bundler') if +# a new instance of bundler is added to the $LOAD_PATH which resolves to a +# different absolute path. This class makes bootsnap smart enough to +# realize that it has already loaded 'bundler', and not just +# '/path/to/bundler'. +# +# If you disable LoadedFeaturesIndex, you can see the problem this solves by: +# +# 1. `require 'a'` +# 2. Prepend a new $LOAD_PATH element containing an `a.rb` +# 3. `require 'a'` +# +# Ruby returns false from step 3. +# With bootsnap but with no LoadedFeaturesIndex, this loads two different +# `a.rb`s. +# With bootsnap and with LoadedFeaturesIndex, this skips the second load, +# returning false like ruby. +# +# source://bootsnap//lib/bootsnap/load_path_cache/loaded_features_index.rb#26 class Bootsnap::LoadPathCache::LoadedFeaturesIndex + # @return [LoadedFeaturesIndex] a new instance of LoadedFeaturesIndex + # + # source://bootsnap//lib/bootsnap/load_path_cache/loaded_features_index.rb#27 def initialize; end + # source://bootsnap//lib/bootsnap/load_path_cache/loaded_features_index.rb#72 def cursor(short); end + + # source://bootsnap//lib/bootsnap/load_path_cache/loaded_features_index.rb#78 def identify(short, cursor); end + + # @return [Boolean] + # + # source://bootsnap//lib/bootsnap/load_path_cache/loaded_features_index.rb#68 def key?(feature); end + + # We've optimized for initialize and register to be fast, and purge to be tolerable. + # If access patterns make this not-okay, we can lazy-invert the LFI on + # first purge and work from there. + # + # source://bootsnap//lib/bootsnap/load_path_cache/loaded_features_index.rb#54 def purge(feature); end + + # source://bootsnap//lib/bootsnap/load_path_cache/loaded_features_index.rb#61 def purge_multi(features); end + + # There is a relatively uncommon case where we could miss adding an + # entry: + # + # If the user asked for e.g. `require 'bundler'`, and we went through the + # `FALLBACK_SCAN` pathway in `kernel_require.rb` and therefore did not + # pass `long` (the full expanded absolute path), then we did are not able + # to confidently add the `bundler.rb` form to @lfi. + # + # We could either: + # + # 1. Just add `bundler.rb`, `bundler.so`, and so on, which is close but + # not quite right; or + # 2. Inspect $LOADED_FEATURES upon return from yield to find the matching + # entry. + # + # source://bootsnap//lib/bootsnap/load_path_cache/loaded_features_index.rb#105 def register(short, long); end private + # Might Ruby automatically search for this extension if + # someone tries to 'require' the file without it? E.g. Ruby + # will implicitly try 'x.rb' if you ask for 'x'. + # + # This is complex and platform-dependent, and the Ruby docs are a little + # handwavy about what will be tried when and in what order. + # So optimistically pretend that all known elidable extensions + # will be tried on all platforms, and that people are unlikely + # to name files in a way that assumes otherwise. + # (E.g. It's unlikely that someone will know that their code + # will _never_ run on MacOS, and therefore think they can get away + # with calling a Ruby file 'x.dylib.rb' and then requiring it as 'x.dylib'.) + # + # See . + # + # @return [Boolean] + # + # source://bootsnap//lib/bootsnap/load_path_cache/loaded_features_index.rb#146 def extension_elidable?(feature); end + + # source://bootsnap//lib/bootsnap/load_path_cache/loaded_features_index.rb#150 def strip_extension_if_elidable(feature); end end +# source://bootsnap//lib/bootsnap/load_path_cache/loaded_features_index.rb#129 Bootsnap::LoadPathCache::LoadedFeaturesIndex::STRIP_EXTENSION = T.let(T.unsafe(nil), Regexp) +# source://bootsnap//lib/bootsnap/load_path_cache/path.rb#7 class Bootsnap::LoadPathCache::Path + # @return [Path] a new instance of Path + # + # source://bootsnap//lib/bootsnap/load_path_cache/path.rb#24 def initialize(path, real: T.unsafe(nil)); end + # Return a list of all the requirable files and all of the subdirectories + # of this +Path+. + # + # source://bootsnap//lib/bootsnap/load_path_cache/path.rb#59 def entries_and_dirs(store); end + + # source://bootsnap//lib/bootsnap/load_path_cache/path.rb#82 def expanded_path; end + + # True if the path exists, but represents a non-directory object + # + # @return [Boolean] + # + # source://bootsnap//lib/bootsnap/load_path_cache/path.rb#47 def non_directory?; end + + # Returns the value of attribute path. + # + # source://bootsnap//lib/bootsnap/load_path_cache/path.rb#22 def path; end + + # @return [Boolean] + # + # source://bootsnap//lib/bootsnap/load_path_cache/path.rb#53 def relative?; end + + # A path is considered 'stable' if it is part of a Gem.path or the ruby + # distribution. When adding or removing files in these paths, the cache + # must be cleared before the change will be noticed. + # + # @return [Boolean] + # + # source://bootsnap//lib/bootsnap/load_path_cache/path.rb#11 def stable?; end + + # source://bootsnap//lib/bootsnap/load_path_cache/path.rb#29 def to_realpath; end + + # A path is considered volatile if it doesn't live under a Gem.path or + # the ruby distribution root. These paths are scanned for new additions + # more frequently. + # + # @return [Boolean] + # + # source://bootsnap//lib/bootsnap/load_path_cache/path.rb#18 def volatile?; end private + # last time a directory was modified in this subtree. +dirs+ should be a + # list of relative paths to directories under +path+. e.g. for /a/b and + # /a/b/c, pass ('/a/b', ['c']) + # + # source://bootsnap//lib/bootsnap/load_path_cache/path.rb#99 def latest_mtime(path, dirs); end + + # (expensive) returns [entries, dirs] + # + # source://bootsnap//lib/bootsnap/load_path_cache/path.rb#92 def scan!; end + + # source://bootsnap//lib/bootsnap/load_path_cache/path.rb#123 def stability; end end +# Built-in ruby lib stuff doesn't change, but things can occasionally be +# installed into sitedir, which generally lives under rubylibdir. +# +# source://bootsnap//lib/bootsnap/load_path_cache/path.rb#120 Bootsnap::LoadPathCache::Path::RUBY_LIBDIR = T.let(T.unsafe(nil), String) + +# source://bootsnap//lib/bootsnap/load_path_cache/path.rb#121 Bootsnap::LoadPathCache::Path::RUBY_SITEDIR = T.let(T.unsafe(nil), String) + +# a Path can be either stable of volatile, depending on how frequently we +# expect its contents may change. Stable paths aren't rescanned nearly as +# often. +# +# source://bootsnap//lib/bootsnap/load_path_cache/path.rb#115 Bootsnap::LoadPathCache::Path::STABLE = T.let(T.unsafe(nil), Symbol) + +# source://bootsnap//lib/bootsnap/load_path_cache/path.rb#116 Bootsnap::LoadPathCache::Path::VOLATILE = T.let(T.unsafe(nil), Symbol) +# source://bootsnap//lib/bootsnap/load_path_cache/path_scanner.rb#7 module Bootsnap::LoadPathCache::PathScanner class << self + # source://bootsnap//lib/bootsnap/load_path_cache/path_scanner.rb#23 def call(path); end + + # Returns the value of attribute ignored_directories. + # + # source://bootsnap//lib/bootsnap/load_path_cache/path_scanner.rb#21 def ignored_directories; end + + # Sets the attribute ignored_directories + # + # @param value the value to set the attribute ignored_directories to. + # + # source://bootsnap//lib/bootsnap/load_path_cache/path_scanner.rb#21 def ignored_directories=(_arg0); end + + # source://bootsnap//lib/bootsnap/load_path_cache/path_scanner.rb#69 def os_path(path); end + + # source://bootsnap//lib/bootsnap/load_path_cache/path_scanner.rb#49 def walk(absolute_dir_path, relative_dir_path, &block); end end end +# source://bootsnap//lib/bootsnap/load_path_cache/path_scanner.rb#10 Bootsnap::LoadPathCache::PathScanner::ALTERNATIVE_NATIVE_EXTENSIONS_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://bootsnap//lib/bootsnap/load_path_cache/path_scanner.rb#12 Bootsnap::LoadPathCache::PathScanner::BUNDLE_PATH = T.let(T.unsafe(nil), String) + +# source://bootsnap//lib/bootsnap/load_path_cache/path_scanner.rb#9 Bootsnap::LoadPathCache::PathScanner::NORMALIZE_NATIVE_EXTENSIONS = T.let(T.unsafe(nil), TrueClass) + +# source://bootsnap//lib/bootsnap/load_path_cache/path_scanner.rb#8 Bootsnap::LoadPathCache::PathScanner::REQUIRABLE_EXTENSIONS = T.let(T.unsafe(nil), Array) + +# source://bootsnap//lib/bootsnap/load_path_cache.rb#9 Bootsnap::LoadPathCache::SLASH = T.let(T.unsafe(nil), String) +# source://bootsnap//lib/bootsnap/load_path_cache/store.rb#9 class Bootsnap::LoadPathCache::Store + # @return [Store] a new instance of Store + # + # source://bootsnap//lib/bootsnap/load_path_cache/store.rb#16 def initialize(store_path, readonly: T.unsafe(nil)); end + # @raise [SetOutsideTransactionNotAllowed] + # + # source://bootsnap//lib/bootsnap/load_path_cache/store.rb#28 def fetch(key); end + + # source://bootsnap//lib/bootsnap/load_path_cache/store.rb#24 def get(key); end + + # @raise [SetOutsideTransactionNotAllowed] + # + # source://bootsnap//lib/bootsnap/load_path_cache/store.rb#40 def set(key, value); end + + # @raise [NestedTransactionError] + # + # source://bootsnap//lib/bootsnap/load_path_cache/store.rb#49 def transaction; end private + # source://bootsnap//lib/bootsnap/load_path_cache/store.rb#66 def commit_transaction; end + + # source://bootsnap//lib/bootsnap/load_path_cache/store.rb#112 def default_data; end + + # source://bootsnap//lib/bootsnap/load_path_cache/store.rb#95 def dump_data; end + + # source://bootsnap//lib/bootsnap/load_path_cache/store.rb#73 def load_data; end + + # source://bootsnap//lib/bootsnap/load_path_cache/store.rb#61 def mark_for_mutation!; end + + # source://bootsnap//lib/bootsnap/load_path_cache/store.rb#116 def mkdir_p(path); end end +# source://bootsnap//lib/bootsnap/load_path_cache/store.rb#11 Bootsnap::LoadPathCache::Store::CURRENT_VERSION = T.let(T.unsafe(nil), String) + +# source://bootsnap//lib/bootsnap/load_path_cache/store.rb#13 class Bootsnap::LoadPathCache::Store::NestedTransactionError < ::StandardError; end + +# source://bootsnap//lib/bootsnap/load_path_cache/store.rb#14 class Bootsnap::LoadPathCache::Store::SetOutsideTransactionNotAllowed < ::StandardError; end + +# source://bootsnap//lib/bootsnap/load_path_cache/store.rb#10 Bootsnap::LoadPathCache::Store::VERSION_KEY = T.let(T.unsafe(nil), String) + +# source://bootsnap//lib/bootsnap/version.rb#4 Bootsnap::VERSION = T.let(T.unsafe(nil), String) diff --git a/Library/Homebrew/sorbet/rbi/gems/byebug@11.1.3.rbi b/Library/Homebrew/sorbet/rbi/gems/byebug@11.1.3.rbi index da405adea8fed8..bbd147bdc1d3fd 100644 --- a/Library/Homebrew/sorbet/rbi/gems/byebug@11.1.3.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/byebug@11.1.3.rbi @@ -4,17 +4,35 @@ # This is an autogenerated file for types exported from the `byebug` gem. # Please instead update this file by running `bin/tapioca gem byebug`. +# Reopen main module to define the library version +# +# source://byebug//lib/byebug/attacher.rb#6 module Byebug class << self + # Starts byebug, and stops at the first line of user's code. + # + # source://byebug//lib/byebug/attacher.rb#10 def attach; end + + # source://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. +# +# source://byebug//lib/byebug/attacher.rb#34 module Kernel - extend ::Forwardable + include ::ActiveSupport::ForkTracker::CoreExt + # source://byebug//lib/byebug/attacher.rb#35 def byebug; end + + # source://byebug//lib/byebug/attacher.rb#35 def debugger; end + + # source://byebug//lib/byebug/attacher.rb#41 def remote_byebug(host = T.unsafe(nil), port = T.unsafe(nil)); end end diff --git a/Library/Homebrew/sorbet/rbi/gems/coderay@1.1.3.rbi b/Library/Homebrew/sorbet/rbi/gems/coderay@1.1.3.rbi index 1cf355998aedac..0ada31cfb6087e 100644 --- a/Library/Homebrew/sorbet/rbi/gems/coderay@1.1.3.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/coderay@1.1.3.rbi @@ -4,1002 +4,3423 @@ # This is an autogenerated file for types exported from the `coderay` gem. # Please instead update this file by running `bin/tapioca gem coderay`. +# = CodeRay Library +# +# CodeRay is a Ruby library for syntax highlighting. +# +# I try to make CodeRay easy to use and intuitive, but at the same time fully +# featured, complete, fast and efficient. +# +# See README. +# +# It consists mainly of +# * the main engine: CodeRay (Scanners::Scanner, Tokens, Encoders::Encoder) +# * the plugin system: PluginHost, Plugin +# * the scanners in CodeRay::Scanners +# * the encoders in CodeRay::Encoders +# * the styles in CodeRay::Styles +# +# Here's a fancy graphic to light up this gray docu: +# +# http://cycnus.de/raindark/coderay/scheme.png +# +# == Documentation +# +# See CodeRay, Encoders, Scanners, Tokens. +# +# == Usage +# +# Remember you need RubyGems to use CodeRay, unless you have it in your load +# path. Run Ruby with -rubygems option if required. +# +# === Highlight Ruby code in a string as html +# +# require 'coderay' +# print CodeRay.scan('puts "Hello, world!"', :ruby).html +# +# # prints something like this: +# puts "Hello, world!" +# +# +# === Highlight C code from a file in a html div +# +# require 'coderay' +# print CodeRay.scan(File.read('ruby.h'), :c).div +# print CodeRay.scan_file('ruby.h').html.div +# +# You can include this div in your page. The used CSS styles can be printed with +# +# % coderay_stylesheet +# +# === Highlight without typing too much +# +# If you are one of the hasty (or lazy, or extremely curious) people, just run this file: +# +# % ruby -rubygems /path/to/coderay/coderay.rb > example.html +# +# and look at the file it created in your browser. +# +# = CodeRay Module +# +# The CodeRay module provides convenience methods for the engine. +# +# * The +lang+ and +format+ arguments select Scanner and Encoder to use. These are +# simply lower-case symbols, like :python or :html. +# * All methods take an optional hash as last parameter, +options+, that is send to +# the Encoder / Scanner. +# * Input and language are always sorted in this order: +code+, +lang+. +# (This is in alphabetical order, if you need a mnemonic ;) +# +# You should be able to highlight everything you want just using these methods; +# so there is no need to dive into CodeRay's deep class hierarchy. +# +# The examples in the demo directory demonstrate common cases using this interface. +# +# = Basic Access Ways +# +# Read this to get a general view what CodeRay provides. +# +# == Scanning +# +# Scanning means analysing an input string, splitting it up into Tokens. +# Each Token knows about what type it is: string, comment, class name, etc. +# +# Each +lang+ (language) has its own Scanner; for example, :ruby code is +# handled by CodeRay::Scanners::Ruby. +# +# CodeRay.scan:: Scan a string in a given language into Tokens. +# This is the most common method to use. +# CodeRay.scan_file:: Scan a file and guess the language using FileType. +# +# The Tokens object you get from these methods can encode itself; see Tokens. +# +# == Encoding +# +# Encoding means compiling Tokens into an output. This can be colored HTML or +# LaTeX, a textual statistic or just the number of non-whitespace tokens. +# +# Each Encoder provides output in a specific +format+, so you select Encoders via +# formats like :html or :statistic. +# +# CodeRay.encode:: Scan and encode a string in a given language. +# CodeRay.encode_tokens:: Encode the given tokens. +# CodeRay.encode_file:: Scan a file, guess the language using FileType and encode it. +# +# == All-in-One Encoding +# +# CodeRay.encode:: Highlight a string with a given input and output format. +# +# == Instanciating +# +# You can use an Encoder instance to highlight multiple inputs. This way, the setup +# for this Encoder must only be done once. +# +# CodeRay.encoder:: Create an Encoder instance with format and options. +# CodeRay.scanner:: Create an Scanner instance for lang, with '' as default code. +# +# To make use of CodeRay.scanner, use CodeRay::Scanner::code=. +# +# The scanning methods provide more flexibility; we recommend to use these. +# +# == Reusing Scanners and Encoders +# +# If you want to re-use scanners and encoders (because that is faster), see +# CodeRay::Duo for the most convenient (and recommended) interface. +# +# source://coderay//lib/coderay.rb#126 module CodeRay class << self + # Assuming the path is a subpath of lib/coderay/ + # + # source://coderay//lib/coderay.rb#133 def coderay_path(*path); end + + # Encode a string. + # + # This scans +code+ with the the Scanner for +lang+ and then + # encodes it with the Encoder for +format+. + # +options+ will be passed to the Encoder. + # + # See CodeRay::Encoder.encode. + # + # source://coderay//lib/coderay.rb#196 def encode(code, lang, format, options = T.unsafe(nil)); end + + # Encodes +filename+ (a path to a code file) with the Scanner for +lang+. + # + # See CodeRay.scan_file. + # Notice that the second argument is the output +format+, not the input language. + # + # Example: + # require 'coderay' + # page = CodeRay.encode_file 'some_c_code.c', :html + # + # source://coderay//lib/coderay.rb#221 def encode_file(filename, format, options = T.unsafe(nil)); end + + # Encode pre-scanned Tokens. + # Use this together with CodeRay.scan: + # + # require 'coderay' + # + # # Highlight a short Ruby code example in a HTML span + # tokens = CodeRay.scan '1 + 2', :ruby + # puts CodeRay.encode_tokens(tokens, :span) + # + # source://coderay//lib/coderay.rb#209 def encode_tokens(tokens, format, options = T.unsafe(nil)); end + + # Finds the Encoder class for +format+ and creates an instance, passing + # +options+ to it. + # + # Example: + # require 'coderay' + # + # stats = CodeRay.encoder(:statistic) + # stats.encode("puts 17 + 4\n", :ruby) + # + # puts '%d out of %d tokens have the kind :integer.' % [ + # stats.type_stats[:integer].count, + # stats.real_token_count + # ] + # #-> 2 out of 4 tokens have the kind :integer. + # + # source://coderay//lib/coderay.rb#260 def encoder(format, options = T.unsafe(nil)); end + + # Extract the options for the scanner from the +options+ hash. + # + # Returns an empty Hash if :scanner_options is not set. + # + # This is used if a method like CodeRay.encode has to provide options + # for Encoder _and_ scanner. + # + # source://coderay//lib/coderay.rb#278 def get_scanner_options(options); end + + # Highlight a string into a HTML
. + # + # CSS styles use classes, so you have to include a stylesheet + # in your output. + # + # See encode. + # + # source://coderay//lib/coderay.rb#232 def highlight(code, lang, options = T.unsafe(nil), format = T.unsafe(nil)); end + + # Highlight a file into a HTML
. + # + # CSS styles use classes, so you have to include a stylesheet + # in your output. + # + # See encode. + # + # source://coderay//lib/coderay.rb#242 def highlight_file(filename, options = T.unsafe(nil), format = T.unsafe(nil)); end + + # Scans the given +code+ (a String) with the Scanner for +lang+. + # + # This is a simple way to use CodeRay. Example: + # require 'coderay' + # page = CodeRay.scan("puts 'Hello, world!'", :ruby).html + # + # See also demo/demo_simple. + # + # source://coderay//lib/coderay.rb#168 def scan(code, lang, options = T.unsafe(nil), &block); end + + # Scans +filename+ (a path to a code file) with the Scanner for +lang+. + # + # If +lang+ is :auto or omitted, the CodeRay::FileType module is used to + # determine it. If it cannot find out what type it is, it uses + # CodeRay::Scanners::Text. + # + # Calls CodeRay.scan. + # + # Example: + # require 'coderay' + # page = CodeRay.scan_file('some_c_code.c').html + # + # source://coderay//lib/coderay.rb#183 def scan_file(filename, lang = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # Finds the Scanner class for +lang+ and creates an instance, passing + # +options+ to it. + # + # See Scanner.new. + # + # source://coderay//lib/coderay.rb#268 def scanner(lang, options = T.unsafe(nil), &block); end end end +# source://coderay//lib/coderay.rb#130 CodeRay::CODERAY_PATH = T.let(T.unsafe(nil), String) +# = Duo +# +# A Duo is a convenient way to use CodeRay. You just create a Duo, +# giving it a lang (language of the input code) and a format (desired +# output format), and call Duo#highlight with the code. +# +# Duo makes it easy to re-use both scanner and encoder for a repetitive +# task. It also provides a very easy interface syntax: +# +# require 'coderay' +# CodeRay::Duo[:python, :div].highlight 'import this' +# +# Until you want to do uncommon things with CodeRay, I recommend to use +# this method, since it takes care of everything. +# +# source://coderay//lib/coderay/duo.rb#17 class CodeRay::Duo + # Create a new Duo, holding a lang and a format to highlight code. + # + # simple: + # CodeRay::Duo[:ruby, :html].highlight 'bla 42' + # + # with options: + # CodeRay::Duo[:ruby, :html, :hint => :debug].highlight '????::??' + # + # alternative syntax without options: + # CodeRay::Duo[:ruby => :statistic].encode 'class << self; end' + # + # alternative syntax with options: + # CodeRay::Duo[{ :ruby => :statistic }, :do => :something].encode 'abc' + # + # The options are forwarded to scanner and encoder + # (see CodeRay.get_scanner_options). + # + # @return [Duo] a new instance of Duo + # + # source://coderay//lib/coderay/duo.rb#37 def initialize(lang = T.unsafe(nil), format = T.unsafe(nil), options = T.unsafe(nil)); end + # Tokenize and highlight the code using +scanner+ and +encoder+. + # Allows to use Duo like a proc object: + # + # CodeRay::Duo[:python => :yaml].call(code) + # + # or, in Ruby 1.9 and later: + # + # CodeRay::Duo[:python => :yaml].(code) + # + # source://coderay//lib/coderay/duo.rb#64 def call(code, options = T.unsafe(nil)); end + + # Tokenize and highlight the code using +scanner+ and +encoder+. + # + # source://coderay//lib/coderay/duo.rb#64 def encode(code, options = T.unsafe(nil)); end + + # The encoder of the duo. Only created once. + # + # source://coderay//lib/coderay/duo.rb#59 def encoder; end + + # Returns the value of attribute format. + # + # source://coderay//lib/coderay/duo.rb#19 def format; end + + # Sets the attribute format + # + # @param value the value to set the attribute format to. + # + # source://coderay//lib/coderay/duo.rb#19 def format=(_arg0); end + + # Tokenize and highlight the code using +scanner+ and +encoder+. + # + # source://coderay//lib/coderay/duo.rb#64 def highlight(code, options = T.unsafe(nil)); end + + # Returns the value of attribute lang. + # + # source://coderay//lib/coderay/duo.rb#19 def lang; end + + # Sets the attribute lang + # + # @param value the value to set the attribute lang to. + # + # source://coderay//lib/coderay/duo.rb#19 def lang=(_arg0); end + + # Returns the value of attribute options. + # + # source://coderay//lib/coderay/duo.rb#19 def options; end + + # Sets the attribute options + # + # @param value the value to set the attribute options to. + # + # source://coderay//lib/coderay/duo.rb#19 def options=(_arg0); end + + # The scanner of the duo. Only created once. + # + # source://coderay//lib/coderay/duo.rb#54 def scanner; end class << self + # To allow calls like Duo[:ruby, :html].highlight. def [](*_arg0); end end end +# This module holds the Encoder class and its subclasses. +# For example, the HTML encoder is named CodeRay::Encoders::HTML +# can be found in coderay/encoders/html. +# +# Encoders also provides methods and constants for the register +# mechanism and the [] method that returns the Encoder class +# belonging to the given format. +# +# source://coderay//lib/coderay/encoders.rb#10 module CodeRay::Encoders extend ::CodeRay::PluginHost end +# A simple Filter that removes all tokens of the :comment kind. +# +# Alias: +remove_comments+ +# +# Usage: +# CodeRay.scan('print # foo', :ruby).comment_filter.text +# #-> "print " +# +# See also: TokenKindFilter, LinesOfCode +# +# source://coderay//lib/coderay/encoders/comment_filter.rb#15 class CodeRay::Encoders::CommentFilter < ::CodeRay::Encoders::TokenKindFilter; end + +# source://coderay//lib/coderay/encoders/comment_filter.rb#19 CodeRay::Encoders::CommentFilter::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) +# Returns the number of tokens. +# +# Text and block tokens are counted. +# +# source://coderay//lib/coderay/encoders/count.rb#7 class CodeRay::Encoders::Count < ::CodeRay::Encoders::Encoder + # source://coderay//lib/coderay/encoders/count.rb#29 def begin_group(kind); end + + # source://coderay//lib/coderay/encoders/count.rb#29 def begin_line(kind); end + + # source://coderay//lib/coderay/encoders/count.rb#29 def end_group(kind); end + + # source://coderay//lib/coderay/encoders/count.rb#29 def end_line(kind); end + + # source://coderay//lib/coderay/encoders/count.rb#25 def text_token(text, kind); end protected + # source://coderay//lib/coderay/encoders/count.rb#19 def finish(options); end + + # source://coderay//lib/coderay/encoders/count.rb#13 def setup(options); end end +# = Debug Encoder +# +# Fast encoder producing simple debug output. +# +# It is readable and diff-able and is used for testing. +# +# You cannot fully restore the tokens information from the +# output, because consecutive :space tokens are merged. +# +# See also: Scanners::Debug +# +# source://coderay//lib/coderay/encoders/debug.rb#14 class CodeRay::Encoders::Debug < ::CodeRay::Encoders::Encoder + # source://coderay//lib/coderay/encoders/debug.rb#30 def begin_group(kind); end + + # source://coderay//lib/coderay/encoders/debug.rb#38 def begin_line(kind); end + + # source://coderay//lib/coderay/encoders/debug.rb#34 def end_group(kind); end + + # source://coderay//lib/coderay/encoders/debug.rb#42 def end_line(kind); end + + # source://coderay//lib/coderay/encoders/debug.rb#20 def text_token(text, kind); end end +# source://coderay//lib/coderay/encoders/debug.rb#18 CodeRay::Encoders::Debug::FILE_EXTENSION = T.let(T.unsafe(nil), String) +# = Debug Lint Encoder +# +# Debug encoder with additional checks for: +# +# - empty tokens +# - incorrect nesting +# +# It will raise an InvalidTokenStream exception when any of the above occurs. +# +# See also: Encoders::Debug +# +# source://coderay//lib/coderay/encoders/debug_lint.rb#16 class CodeRay::Encoders::DebugLint < ::CodeRay::Encoders::Debug + # source://coderay//lib/coderay/encoders/debug_lint.rb#26 def begin_group(kind); end + + # source://coderay//lib/coderay/encoders/debug_lint.rb#37 def begin_line(kind); end + + # @raise [Lint::IncorrectTokenGroupNesting] + # + # source://coderay//lib/coderay/encoders/debug_lint.rb#31 def end_group(kind); end + + # @raise [Lint::IncorrectTokenGroupNesting] + # + # source://coderay//lib/coderay/encoders/debug_lint.rb#42 def end_line(kind); end + + # @raise [Lint::EmptyToken] + # + # source://coderay//lib/coderay/encoders/debug_lint.rb#20 def text_token(text, kind); end protected + # source://coderay//lib/coderay/encoders/debug_lint.rb#55 def finish(options); end + + # source://coderay//lib/coderay/encoders/debug_lint.rb#50 def setup(options); end end +# Wraps HTML output into a DIV element, using inline styles by default. +# +# See Encoders::HTML for available options. +# +# source://coderay//lib/coderay/encoders/div.rb#9 class CodeRay::Encoders::Div < ::CodeRay::Encoders::HTML; end + +# source://coderay//lib/coderay/encoders/div.rb#15 CodeRay::Encoders::Div::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/encoders/div.rb#11 CodeRay::Encoders::Div::FILE_EXTENSION = T.let(T.unsafe(nil), String) +# = Encoder +# +# The Encoder base class. Together with Scanner and +# Tokens, it forms the highlighting triad. +# +# Encoder instances take a Tokens object and do something with it. +# +# The most common Encoder is surely the HTML encoder +# (CodeRay::Encoders::HTML). It highlights the code in a colorful +# html page. +# If you want the highlighted code in a div or a span instead, +# use its subclasses Div and Span. +# +# source://coderay//lib/coderay/encoders/encoder.rb#16 class CodeRay::Encoders::Encoder extend ::CodeRay::Plugin + # Creates a new Encoder. + # +options+ is saved and used for all encode operations, as long + # as you don't overwrite it there by passing additional options. + # + # Encoder objects provide three encode methods: + # - encode simply takes a +code+ string and a +lang+ + # - encode_tokens expects a +tokens+ object instead + # + # Each method has an optional +options+ parameter. These are + # added to the options you passed at creation. + # + # @return [Encoder] a new instance of Encoder + # + # source://coderay//lib/coderay/encoders/encoder.rb#55 def initialize(options = T.unsafe(nil)); end + # source://coderay//lib/coderay/encoders/encoder.rb#87 def <<(token); end + + # Starts a token group with the given +kind+. + # + # source://coderay//lib/coderay/encoders/encoder.rb#123 def begin_group(kind); end + + # Starts a new line token group with the given +kind+. + # + # source://coderay//lib/coderay/encoders/encoder.rb#131 def begin_line(kind); end + + # Encode the given +code+ using the Scanner for +lang+. + # + # source://coderay//lib/coderay/encoders/encoder.rb#70 def encode(code, lang, options = T.unsafe(nil)); end + + # Encode a Tokens object. + # + # source://coderay//lib/coderay/encoders/encoder.rb#61 def encode_tokens(tokens, options = T.unsafe(nil)); end + + # Ends a token group with the given +kind+. + # + # source://coderay//lib/coderay/encoders/encoder.rb#127 def end_group(kind); end + + # Ends a new line token group with the given +kind+. + # + # source://coderay//lib/coderay/encoders/encoder.rb#135 def end_line(kind); end + + # The default file extension for this encoder. + # + # source://coderay//lib/coderay/encoders/encoder.rb#83 def file_extension; end + + # Encode the given +code+ using the Scanner for +lang+. + # You can use highlight instead of encode, if that seems + # more clear to you. + # + # source://coderay//lib/coderay/encoders/encoder.rb#70 def highlight(code, lang, options = T.unsafe(nil)); end + + # The options you gave the Encoder at creating. + # + # source://coderay//lib/coderay/encoders/encoder.rb#43 def options; end + + # The options you gave the Encoder at creating. + # + # source://coderay//lib/coderay/encoders/encoder.rb#43 def options=(_arg0); end + + # The options you gave the Encoder at creating. + # + # source://coderay//lib/coderay/encoders/encoder.rb#43 def scanner; end + + # The options you gave the Encoder at creating. + # + # source://coderay//lib/coderay/encoders/encoder.rb#43 def scanner=(_arg0); end + + # Called for each text token ([text, kind]), where text is a String. + # + # source://coderay//lib/coderay/encoders/encoder.rb#118 def text_token(text, kind); end + + # Called with +content+ and +kind+ of the currently scanned token. + # For simple scanners, it's enougth to implement this method. + # + # By default, it calls text_token, begin_group, end_group, begin_line, + # or end_line, depending on the +content+. + # + # source://coderay//lib/coderay/encoders/encoder.rb#100 def token(content, kind); end + + # Do the encoding. + # + # The already created +tokens+ object must be used; it must be a + # Tokens object. + # + # source://coderay//lib/coderay/encoders/encoder.rb#168 def tokens(tokens, options = T.unsafe(nil)); end protected + # Do the encoding. + # + # The already created +tokens+ object must be used; it must be a + # Tokens object. + # + # source://coderay//lib/coderay/encoders/encoder.rb#168 def compile(tokens, options = T.unsafe(nil)); end + + # Called with merged options after encoding starts. + # The return value is the result of encoding, typically @out. + # + # source://coderay//lib/coderay/encoders/encoder.rb#160 def finish(options); end + + # source://coderay//lib/coderay/encoders/encoder.rb#148 def get_output(options); end + + # Append data.to_s to the output. Returns the argument. + # + # source://coderay//lib/coderay/encoders/encoder.rb#153 def output(data); end + + # Called with merged options before encoding starts. + # Sets @out to an empty string. + # + # See the HTML Encoder for an example of option caching. + # + # source://coderay//lib/coderay/encoders/encoder.rb#144 def setup(options); end class << self + # If FILE_EXTENSION isn't defined, this method returns the + # downcase class name instead. + # + # source://coderay//lib/coderay/encoders/encoder.rb#24 def const_missing(sym); end + + # The default file extension for output file of this encoder class. + # + # source://coderay//lib/coderay/encoders/encoder.rb#33 def file_extension; end end end +# Subclasses are to store their default options in this constant. +# +# source://coderay//lib/coderay/encoders/encoder.rb#40 CodeRay::Encoders::Encoder::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/helpers/plugin.rb#41 CodeRay::Encoders::Encoder::PLUGIN_HOST = CodeRay::Encoders +# A Filter encoder has another Tokens instance as output. +# It can be subclass to select, remove, or modify tokens in the stream. +# +# Subclasses of Filter are called "Filters" and can be chained. +# +# == Options +# +# === :tokens +# +# The Tokens object which will receive the output. +# +# Default: Tokens.new +# +# See also: TokenKindFilter +# +# source://coderay//lib/coderay/encoders/filter.rb#18 class CodeRay::Encoders::Filter < ::CodeRay::Encoders::Encoder + # source://coderay//lib/coderay/encoders/filter.rb#39 def begin_group(kind); end + + # source://coderay//lib/coderay/encoders/filter.rb#43 def begin_line(kind); end + + # source://coderay//lib/coderay/encoders/filter.rb#47 def end_group(kind); end + + # source://coderay//lib/coderay/encoders/filter.rb#51 def end_line(kind); end + + # source://coderay//lib/coderay/encoders/filter.rb#35 def text_token(text, kind); end protected + # source://coderay//lib/coderay/encoders/filter.rb#29 def finish(options); end + + # source://coderay//lib/coderay/encoders/filter.rb#23 def setup(options); end end +# = HTML Encoder +# +# This is CodeRay's most important highlighter: +# It provides save, fast XHTML generation and CSS support. +# +# == Usage +# +# require 'coderay' +# puts CodeRay.scan('Some /code/', :ruby).html #-> a HTML page +# puts CodeRay.scan('Some /code/', :ruby).html(:wrap => :span) +# #-> Some /code/ +# puts CodeRay.scan('Some /code/', :ruby).span #-> the same +# +# puts CodeRay.scan('Some code', :ruby).html( +# :wrap => nil, +# :line_numbers => :inline, +# :css => :style +# ) +# +# == Options +# +# === :tab_width +# Convert \t characters to +n+ spaces (a number or false.) +# false will keep tab characters untouched. +# +# Default: 8 +# +# === :css +# How to include the styles; can be :class or :style. +# +# Default: :class +# +# === :wrap +# Wrap in :page, :div, :span or nil. +# +# You can also use Encoders::Div and Encoders::Span. +# +# Default: nil +# +# === :title +# +# The title of the HTML page (works only when :wrap is set to :page.) +# +# Default: 'CodeRay output' +# +# === :break_lines +# +# Split multiline blocks at line breaks. +# Forced to true if :line_numbers option is set to :inline. +# +# Default: false +# +# === :line_numbers +# Include line numbers in :table, :inline, or nil (no line numbers) +# +# Default: nil +# +# === :line_number_anchors +# Adds anchors and links to the line numbers. Can be false (off), true (on), +# or a prefix string that will be prepended to the anchor name. +# +# The prefix must consist only of letters, digits, and underscores. +# +# Default: true, default prefix name: "line" +# +# === :line_number_start +# Where to start with line number counting. +# +# Default: 1 +# +# === :bold_every +# Make every +n+-th number appear bold. +# +# Default: 10 +# +# === :highlight_lines +# +# Highlights certain line numbers. +# Can be any Enumerable, typically just an Array or Range, of numbers. +# +# Bolding is deactivated when :highlight_lines is set. It only makes sense +# in combination with :line_numbers. +# +# Default: nil +# +# === :hint +# Include some information into the output using the title attribute. +# Can be :info (show token kind on mouse-over), :info_long (with full path) +# or :debug (via inspect). +# +# Default: false +# +# source://coderay//lib/coderay/encoders/html.rb#97 class CodeRay::Encoders::HTML < ::CodeRay::Encoders::Encoder + # token groups, eg. strings + # + # source://coderay//lib/coderay/encoders/html.rb#235 def begin_group(kind); end + + # whole lines to be highlighted, eg. a deleted line in a diff + # + # source://coderay//lib/coderay/encoders/html.rb#247 def begin_line(kind); end + + # Returns the value of attribute css. + # + # source://coderay//lib/coderay/encoders/html.rb#126 def css; end + + # source://coderay//lib/coderay/encoders/html.rb#241 def end_group(kind); end + + # source://coderay//lib/coderay/encoders/html.rb#261 def end_line(kind); end + + # source://coderay//lib/coderay/encoders/html.rb#221 def text_token(text, kind); end protected + # source://coderay//lib/coderay/encoders/html.rb#316 def break_lines(text, style); end + + # source://coderay//lib/coderay/encoders/html.rb#310 def check_group_nesting(name, kind); end + + # source://coderay//lib/coderay/encoders/html.rb#268 def check_options!(options); end + + # source://coderay//lib/coderay/encoders/html.rb#324 def close_span; end + + # source://coderay//lib/coderay/encoders/html.rb#280 def css_class_for_kinds(kinds); end + + # source://coderay//lib/coderay/encoders/html.rb#195 def finish(options); end + + # source://coderay//lib/coderay/encoders/html.rb#289 def make_span_for_kinds(method, hint); end + + # source://coderay//lib/coderay/encoders/html.rb#172 def setup(options); end + + # source://coderay//lib/coderay/encoders/html.rb#284 def style_for_kinds(kinds); end class << self + # source://coderay//lib/coderay/encoders/html.rb#130 def make_html_escape_hash; end + + # Generate a hint about the given +kinds+ in a +hint+ style. + # + # +hint+ may be :info, :info_long or :debug. + # + # source://coderay//lib/coderay/encoders/html.rb#157 def token_path_to_hint(hint, kinds); end end end +# source://coderay//lib/coderay/encoders/html/css.rb#5 class CodeRay::Encoders::HTML::CSS + # @return [CSS] a new instance of CSS + # + # source://coderay//lib/coderay/encoders/html/css.rb#13 def initialize(style = T.unsafe(nil)); end + # source://coderay//lib/coderay/encoders/html/css.rb#23 def get_style_for_css_classes(css_classes); end + + # Returns the value of attribute stylesheet. + # + # source://coderay//lib/coderay/encoders/html/css.rb#7 def stylesheet; end private + # source://coderay//lib/coderay/encoders/html/css.rb#49 def parse(stylesheet); end class << self + # source://coderay//lib/coderay/encoders/html/css.rb#9 def load_stylesheet(style = T.unsafe(nil)); end end end +# source://coderay//lib/coderay/encoders/html/css.rb#36 CodeRay::Encoders::HTML::CSS::CSS_CLASS_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/encoders/html.rb#103 CodeRay::Encoders::HTML::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/encoders/html.rb#101 CodeRay::Encoders::HTML::FILE_EXTENSION = T.let(T.unsafe(nil), String) + +# source://coderay//lib/coderay/encoders/html.rb#143 CodeRay::Encoders::HTML::HTML_ESCAPE = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/encoders/html.rb#144 CodeRay::Encoders::HTML::HTML_ESCAPE_PATTERN = T.let(T.unsafe(nil), Regexp) +# source://coderay//lib/coderay/encoders/html/numbering.rb#6 module CodeRay::Encoders::HTML::Numbering class << self + # source://coderay//lib/coderay/encoders/html/numbering.rb#8 def number!(output, mode = T.unsafe(nil), options = T.unsafe(nil)); end end end +# This module is included in the output String of the HTML Encoder. +# +# It provides methods like wrap, div, page etc. +# +# Remember to use #clone instead of #dup to keep the modules the object was +# extended with. +# +# TODO: Rewrite this without monkey patching. +# +# source://coderay//lib/coderay/encoders/html/output.rb#14 module CodeRay::Encoders::HTML::Output + # source://coderay//lib/coderay/encoders/html/output.rb#57 def apply_title!(title); end + + # Returns the value of attribute css. + # + # source://coderay//lib/coderay/encoders/html/output.rb#16 def css; end + + # Sets the attribute css + # + # @param value the value to set the attribute css to. + # + # source://coderay//lib/coderay/encoders/html/output.rb#16 def css=(_arg0); end + + # source://coderay//lib/coderay/encoders/html/output.rb#86 def stylesheet(in_tag = T.unsafe(nil)); end + + # source://coderay//lib/coderay/encoders/html/output.rb#62 def wrap!(element, *args); end + + # source://coderay//lib/coderay/encoders/html/output.rb#52 def wrap_in!(template); end + + # source://coderay//lib/coderay/encoders/html/output.rb#47 def wrapped_in; end + + # Sets the attribute wrapped_in + # + # @param value the value to set the attribute wrapped_in to. + # + # source://coderay//lib/coderay/encoders/html/output.rb#50 def wrapped_in=(_arg0); end + + # @return [Boolean] + # + # source://coderay//lib/coderay/encoders/html/output.rb#43 def wrapped_in?(element); end class << self + # Raises an exception if an object that doesn't respond to to_str is extended by Output, + # to prevent users from misuse. Use Module#remove_method to disable. + # + # source://coderay//lib/coderay/encoders/html/output.rb#22 def extended(o); end + + # source://coderay//lib/coderay/encoders/html/output.rb#26 def make_stylesheet(css, in_tag = T.unsafe(nil)); end + + # source://coderay//lib/coderay/encoders/html/output.rb#36 def page_template_for_css(css); end end end +# source://coderay//lib/coderay/encoders/html/output.rb#117 CodeRay::Encoders::HTML::Output::DIV = T.let(T.unsafe(nil), CodeRay::Encoders::HTML::Output::Template) + +# source://coderay//lib/coderay/encoders/html/output.rb#130 CodeRay::Encoders::HTML::Output::PAGE = T.let(T.unsafe(nil), CodeRay::Encoders::HTML::Output::Template) + +# source://coderay//lib/coderay/encoders/html/output.rb#115 CodeRay::Encoders::HTML::Output::SPAN = T.let(T.unsafe(nil), CodeRay::Encoders::HTML::Output::Template) + +# source://coderay//lib/coderay/encoders/html/output.rb#123 CodeRay::Encoders::HTML::Output::TABLE = T.let(T.unsafe(nil), CodeRay::Encoders::HTML::Output::Template) +# -- don't include the templates in docu +# +# source://coderay//lib/coderay/encoders/html/output.rb#92 class CodeRay::Encoders::HTML::Output::Template < ::String + # source://coderay//lib/coderay/encoders/html/output.rb#104 def apply(target, replacement); end class << self + # source://coderay//lib/coderay/encoders/html/output.rb#94 def wrap!(str, template, target); end end end +# source://coderay//lib/coderay/encoders/html.rb#146 CodeRay::Encoders::HTML::TOKEN_KIND_TO_INFO = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/encoders/html.rb#150 CodeRay::Encoders::HTML::TRANSPARENT_TOKEN_KINDS = T.let(T.unsafe(nil), Set) +# A simple JSON Encoder. +# +# Example: +# CodeRay.scan('puts "Hello world!"', :ruby).json +# yields +# [ +# {"type"=>"text", "text"=>"puts", "kind"=>"ident"}, +# {"type"=>"text", "text"=>" ", "kind"=>"space"}, +# {"type"=>"block", "action"=>"open", "kind"=>"string"}, +# {"type"=>"text", "text"=>"\"", "kind"=>"delimiter"}, +# {"type"=>"text", "text"=>"Hello world!", "kind"=>"content"}, +# {"type"=>"text", "text"=>"\"", "kind"=>"delimiter"}, +# {"type"=>"block", "action"=>"close", "kind"=>"string"}, +# ] +# +# source://coderay//lib/coderay/encoders/json.rb#18 class CodeRay::Encoders::JSON < ::CodeRay::Encoders::Encoder + # source://coderay//lib/coderay/encoders/json.rb#64 def begin_group(kind); end + + # source://coderay//lib/coderay/encoders/json.rb#72 def begin_line(kind); end + + # source://coderay//lib/coderay/encoders/json.rb#68 def end_group(kind); end + + # source://coderay//lib/coderay/encoders/json.rb#76 def end_line(kind); end + + # source://coderay//lib/coderay/encoders/json.rb#60 def text_token(text, kind); end protected + # source://coderay//lib/coderay/encoders/json.rb#49 def append(data); end + + # source://coderay//lib/coderay/encoders/json.rb#45 def finish(options); end + + # source://coderay//lib/coderay/encoders/json.rb#38 def setup(options); end end +# source://coderay//lib/coderay/encoders/json.rb#35 CodeRay::Encoders::JSON::FILE_EXTENSION = T.let(T.unsafe(nil), String) +# Counts the LoC (Lines of Code). Returns an Integer >= 0. +# +# Alias: +loc+ +# +# Everything that is not comment, markup, doctype/shebang, or an empty line, +# is considered to be code. +# +# For example, +# * HTML files not containing JavaScript have 0 LoC +# * in a Java class without comments, LoC is the number of non-empty lines +# +# A Scanner class should define the token kinds that are not code in the +# KINDS_NOT_LOC constant, which defaults to [:comment, :doctype]. +# +# source://coderay//lib/coderay/encoders/lines_of_code.rb#17 class CodeRay::Encoders::LinesOfCode < ::CodeRay::Encoders::TokenKindFilter protected + # source://coderay//lib/coderay/encoders/lines_of_code.rb#38 def finish(options); end + + # source://coderay//lib/coderay/encoders/lines_of_code.rb#25 def setup(options); end end +# source://coderay//lib/coderay/encoders/lines_of_code.rb#21 CodeRay::Encoders::LinesOfCode::NON_EMPTY_LINE = T.let(T.unsafe(nil), Regexp) +# = Lint Encoder +# +# Checks for: +# +# - empty tokens +# - incorrect nesting +# +# It will raise an InvalidTokenStream exception when any of the above occurs. +# +# See also: Encoders::DebugLint +# +# source://coderay//lib/coderay/encoders/lint.rb#14 class CodeRay::Encoders::Lint < ::CodeRay::Encoders::Debug + # source://coderay//lib/coderay/encoders/lint.rb#28 def begin_group(kind); end + + # source://coderay//lib/coderay/encoders/lint.rb#37 def begin_line(kind); end + + # @raise [IncorrectTokenGroupNesting] + # + # source://coderay//lib/coderay/encoders/lint.rb#32 def end_group(kind); end + + # @raise [IncorrectTokenGroupNesting] + # + # source://coderay//lib/coderay/encoders/lint.rb#41 def end_line(kind); end + + # @raise [EmptyToken] + # + # source://coderay//lib/coderay/encoders/lint.rb#23 def text_token(text, kind); end protected + # source://coderay//lib/coderay/encoders/lint.rb#52 def finish(options); end + + # source://coderay//lib/coderay/encoders/lint.rb#48 def setup(options); end end +# source://coderay//lib/coderay/encoders/lint.rb#19 class CodeRay::Encoders::Lint::EmptyToken < ::CodeRay::Encoders::Lint::InvalidTokenStream; end + +# source://coderay//lib/coderay/encoders/lint.rb#21 class CodeRay::Encoders::Lint::IncorrectTokenGroupNesting < ::CodeRay::Encoders::Lint::InvalidTokenStream; end + +# source://coderay//lib/coderay/encoders/lint.rb#18 class CodeRay::Encoders::Lint::InvalidTokenStream < ::StandardError; end + +# source://coderay//lib/coderay/encoders/lint.rb#20 class CodeRay::Encoders::Lint::UnknownTokenKind < ::CodeRay::Encoders::Lint::InvalidTokenStream; end +# = Null Encoder +# +# Does nothing and returns an empty string. +# +# source://coderay//lib/coderay/encoders/null.rb#7 class CodeRay::Encoders::Null < ::CodeRay::Encoders::Encoder + # source://coderay//lib/coderay/encoders/null.rb#11 def text_token(text, kind); end end +# Wraps the output into a HTML page, using CSS classes and +# line numbers in the table format by default. +# +# See Encoders::HTML for available options. +# +# source://coderay//lib/coderay/encoders/page.rb#10 class CodeRay::Encoders::Page < ::CodeRay::Encoders::HTML; end + +# source://coderay//lib/coderay/encoders/page.rb#16 CodeRay::Encoders::Page::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/encoders/page.rb#12 CodeRay::Encoders::Page::FILE_EXTENSION = T.let(T.unsafe(nil), String) + +# Wraps HTML output into a SPAN element, using inline styles by default. +# +# See Encoders::HTML for available options. +# +# source://coderay//lib/coderay/encoders/span.rb#9 class CodeRay::Encoders::Span < ::CodeRay::Encoders::HTML; end + +# source://coderay//lib/coderay/encoders/span.rb#15 CodeRay::Encoders::Span::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/encoders/span.rb#11 CodeRay::Encoders::Span::FILE_EXTENSION = T.let(T.unsafe(nil), String) +# Makes a statistic for the given tokens. +# +# Alias: +stats+ +# +# source://coderay//lib/coderay/encoders/statistic.rb#7 class CodeRay::Encoders::Statistic < ::CodeRay::Encoders::Encoder + # source://coderay//lib/coderay/encoders/statistic.rb#70 def begin_group(kind); end + + # source://coderay//lib/coderay/encoders/statistic.rb#78 def begin_line(kind); end + + # source://coderay//lib/coderay/encoders/statistic.rb#86 def block_token(action, kind); end + + # source://coderay//lib/coderay/encoders/statistic.rb#74 def end_group(kind); end + + # source://coderay//lib/coderay/encoders/statistic.rb#82 def end_line(kind); end + + # source://coderay//lib/coderay/encoders/statistic.rb#11 def real_token_count; end + + # source://coderay//lib/coderay/encoders/statistic.rb#62 def text_token(text, kind); end + + # source://coderay//lib/coderay/encoders/statistic.rb#11 def type_stats; end protected + # source://coderay//lib/coderay/encoders/statistic.rb#42 def finish(options); end + + # source://coderay//lib/coderay/encoders/statistic.rb#17 def setup(options); end end +# source://coderay//lib/coderay/encoders/statistic.rb#24 CodeRay::Encoders::Statistic::STATS = T.let(T.unsafe(nil), String) + +# source://coderay//lib/coderay/encoders/statistic.rb#38 CodeRay::Encoders::Statistic::TOKEN_TYPES_ROW = T.let(T.unsafe(nil), String) +# source://coderay//lib/coderay/encoders/statistic.rb#13 class CodeRay::Encoders::Statistic::TypeStats < ::Struct + # Returns the value of attribute count + # + # @return [Object] the current value of count def count; end + + # Sets the attribute count + # + # @param value [Object] the value to set the attribute count to. + # @return [Object] the newly set value def count=(_); end + + # Returns the value of attribute size + # + # @return [Object] the current value of size def size; end + + # Sets the attribute size + # + # @param value [Object] the value to set the attribute size to. + # @return [Object] the newly set value def size=(_); end class << self def [](*_arg0); end def inspect; end + def keyword_init?; end def members; end def new(*_arg0); end end end +# source://coderay//lib/coderay/encoders/terminal.rb#17 class CodeRay::Encoders::Terminal < ::CodeRay::Encoders::Encoder + # source://coderay//lib/coderay/encoders/terminal.rb#156 def begin_group(kind); end + + # source://coderay//lib/coderay/encoders/terminal.rb#156 def begin_line(kind); end + + # source://coderay//lib/coderay/encoders/terminal.rb#162 def end_group(kind); end + + # source://coderay//lib/coderay/encoders/terminal.rb#172 def end_line(kind); end + + # source://coderay//lib/coderay/encoders/terminal.rb#141 def text_token(text, kind); end protected + # source://coderay//lib/coderay/encoders/terminal.rb#133 def setup(options); end private + # source://coderay//lib/coderay/encoders/terminal.rb#179 def open_token(kind); end end +# source://coderay//lib/coderay/encoders/terminal.rb#21 CodeRay::Encoders::Terminal::TOKEN_COLORS = T.let(T.unsafe(nil), Hash) +# Concats the tokens into a single string, resulting in the original +# code string if no tokens were removed. +# +# Alias: +plain+, +plaintext+ +# +# == Options +# +# === :separator +# A separator string to join the tokens. +# +# Default: empty String +# +# source://coderay//lib/coderay/encoders/text.rb#15 class CodeRay::Encoders::Text < ::CodeRay::Encoders::Encoder + # source://coderay//lib/coderay/encoders/text.rb#25 def text_token(text, kind); end protected + # source://coderay//lib/coderay/encoders/text.rb#36 def setup(options); end end +# source://coderay//lib/coderay/encoders/text.rb#21 CodeRay::Encoders::Text::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/encoders/text.rb#19 CodeRay::Encoders::Text::FILE_EXTENSION = T.let(T.unsafe(nil), String) +# A Filter that selects tokens based on their token kind. +# +# == Options +# +# === :exclude +# +# One or many symbols (in an Array) which shall be excluded. +# +# Default: [] +# +# === :include +# +# One or many symbols (in an array) which shall be included. +# +# Default: :all, which means all tokens are included. +# +# Exclusion wins over inclusion. +# +# See also: CommentFilter +# +# source://coderay//lib/coderay/encoders/token_kind_filter.rb#25 class CodeRay::Encoders::TokenKindFilter < ::CodeRay::Encoders::Filter + # Add the token group to the output stream if +kind+ matches the + # conditions. + # + # If it does not, all tokens inside the group are excluded from the + # stream, even if their kinds match. + # + # source://coderay//lib/coderay/encoders/token_kind_filter.rb#66 def begin_group(kind); end + + # See +begin_group+. + # + # source://coderay//lib/coderay/encoders/token_kind_filter.rb#77 def begin_line(kind); end + + # Take care of re-enabling the delegation of tokens to the output stream + # if an exluded group has ended. + # + # source://coderay//lib/coderay/encoders/token_kind_filter.rb#89 def end_group(kind); end + + # See +end_group+. + # + # source://coderay//lib/coderay/encoders/token_kind_filter.rb#99 def end_line(kind); end + + # Add the token to the output stream if +kind+ matches the conditions. + # + # source://coderay//lib/coderay/encoders/token_kind_filter.rb#57 def text_token(text, kind); end protected + # @return [Boolean] + # + # source://coderay//lib/coderay/encoders/token_kind_filter.rb#49 def include_group?(kind); end + + # @return [Boolean] + # + # source://coderay//lib/coderay/encoders/token_kind_filter.rb#45 def include_text_token?(text, kind); end + + # source://coderay//lib/coderay/encoders/token_kind_filter.rb#35 def setup(options); end end +# source://coderay//lib/coderay/encoders/token_kind_filter.rb#29 CodeRay::Encoders::TokenKindFilter::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) +# = XML Encoder +# +# Uses REXML. Very slow. +# +# source://coderay//lib/coderay/encoders/xml.rb#7 class CodeRay::Encoders::XML < ::CodeRay::Encoders::Encoder + # source://coderay//lib/coderay/encoders/xml.rb#58 def begin_group(kind); end + + # source://coderay//lib/coderay/encoders/xml.rb#62 def end_group(kind); end + + # source://coderay//lib/coderay/encoders/xml.rb#38 def text_token(text, kind); end protected + # source://coderay//lib/coderay/encoders/xml.rb#31 def finish(options); end + + # source://coderay//lib/coderay/encoders/xml.rb#22 def setup(options); end end +# source://coderay//lib/coderay/encoders/xml.rb#15 CodeRay::Encoders::XML::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/encoders/xml.rb#11 CodeRay::Encoders::XML::FILE_EXTENSION = T.let(T.unsafe(nil), String) +# = YAML Encoder +# +# Slow. +# +# source://coderay//lib/coderay/encoders/yaml.rb#9 class CodeRay::Encoders::YAML < ::CodeRay::Encoders::Encoder + # source://coderay//lib/coderay/encoders/yaml.rb#31 def begin_group(kind); end + + # source://coderay//lib/coderay/encoders/yaml.rb#39 def begin_line(kind); end + + # source://coderay//lib/coderay/encoders/yaml.rb#35 def end_group(kind); end + + # source://coderay//lib/coderay/encoders/yaml.rb#43 def end_line(kind); end + + # source://coderay//lib/coderay/encoders/yaml.rb#27 def text_token(text, kind); end protected + # source://coderay//lib/coderay/encoders/yaml.rb#22 def finish(options); end + + # source://coderay//lib/coderay/encoders/yaml.rb#16 def setup(options); end end +# source://coderay//lib/coderay/encoders/yaml.rb#13 CodeRay::Encoders::YAML::FILE_EXTENSION = T.let(T.unsafe(nil), String) +# = FileType +# +# A simple filetype recognizer. +# +# == Usage +# +# # determine the type of the given +# lang = FileType[file_name] +# +# # return :text if the file type is unknown +# lang = FileType.fetch file_name, :text +# +# # try the shebang line, too +# lang = FileType.fetch file_name, :text, true +# +# source://coderay//lib/coderay/helpers/file_type.rb#17 module CodeRay::FileType class << self + # Try to determine the file type of the file. + # + # +filename+ is a relative or absolute path to a file. + # + # The file itself is only accessed when +read_shebang+ is set to true. + # That means you can get filetypes from files that don't exist. + # + # source://coderay//lib/coderay/helpers/file_type.rb#29 def [](filename, read_shebang = T.unsafe(nil)); end + + # This works like Hash#fetch. + # + # If the filetype cannot be found, the +default+ value + # is returned. + # + # source://coderay//lib/coderay/helpers/file_type.rb#50 def fetch(filename, default = T.unsafe(nil), read_shebang = T.unsafe(nil)); end protected + # source://coderay//lib/coderay/helpers/file_type.rb#66 def type_from_shebang(filename); end end end +# source://coderay//lib/coderay/helpers/file_type.rb#79 CodeRay::FileType::TypeFromExt = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/helpers/file_type.rb#139 CodeRay::FileType::TypeFromName = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/helpers/file_type.rb#137 CodeRay::FileType::TypeFromShebang = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/helpers/file_type.rb#19 class CodeRay::FileType::UnknownFileType < ::Exception; end +# = Plugin +# +# Plugins have to include this module. +# +# IMPORTANT: Use extend for this module. +# +# See CodeRay::PluginHost for examples. +# +# source://coderay//lib/coderay/helpers/plugin.rb#10 module CodeRay::Plugin + # source://coderay//lib/coderay/helpers/plugin.rb#46 def aliases; end + + # The PluginHost for this Plugin class. + # + # source://coderay//lib/coderay/helpers/plugin.rb#39 def plugin_host(host = T.unsafe(nil)); end + + # Returns the value of attribute plugin_id. + # + # source://coderay//lib/coderay/helpers/plugin.rb#12 def plugin_id; end + + # Register this class for the given +id+. + # + # Example: + # class MyPlugin < PluginHost::BaseClass + # register_for :my_id + # ... + # end + # + # See PluginHost.register. + # + # source://coderay//lib/coderay/helpers/plugin.rb#23 def register_for(id); end + + # Returns the title of the plugin, or sets it to the + # optional argument +title+. + # + # source://coderay//lib/coderay/helpers/plugin.rb#30 def title(title = T.unsafe(nil)); end end +# = PluginHost +# +# A simple subclass/subfolder plugin system. +# +# Example: +# class Generators +# extend PluginHost +# plugin_path 'app/generators' +# end +# +# class Generator +# extend Plugin +# PLUGIN_HOST = Generators +# end +# +# class FancyGenerator < Generator +# register_for :fancy +# end +# +# Generators[:fancy] #-> FancyGenerator +# # or +# CodeRay.require_plugin 'Generators/fancy' +# # or +# Generators::Fancy +# +# source://coderay//lib/coderay/helpers/plugin_host.rb#27 module CodeRay::PluginHost + # Returns the Plugin for +id+. + # + # Example: + # yaml_plugin = MyPluginHost[:yaml] + # + # source://coderay//lib/coderay/helpers/plugin_host.rb#49 def [](id, *args, &blk); end + + # Returns an array of all Plugins. + # + # Note: This loads all plugins using load_all. + # + # source://coderay//lib/coderay/helpers/plugin_host.rb#151 def all_plugins; end + + # Tries to +load+ the missing plugin by translating +const+ to the + # underscore form (eg. LinesOfCode becomes lines_of_code). + # + # source://coderay//lib/coderay/helpers/plugin_host.rb#61 def const_missing(const); end + + # Define the default plugin to use when no plugin is found + # for a given id, or return the default plugin. + # + # See also map. + # + # class MyColorHost < PluginHost + # map :navy => :dark_blue + # default :gray + # end + # + # MyColorHost.default # loads and returns the Gray plugin + # + # source://coderay//lib/coderay/helpers/plugin_host.rb#114 def default(id = T.unsafe(nil)); end + + # Returns an array of all .rb files in the plugin path. + # + # The extension .rb is not included. + # + # source://coderay//lib/coderay/helpers/plugin_host.rb#140 def list; end + + # Returns the Plugin for +id+. + # + # Example: + # yaml_plugin = MyPluginHost[:yaml] + # + # source://coderay//lib/coderay/helpers/plugin_host.rb#49 def load(id, *args, &blk); end + + # Loads all plugins using list and load. + # + # source://coderay//lib/coderay/helpers/plugin_host.rb#39 def load_all; end + + # Loads the map file (see map). + # + # This is done automatically when plugin_path is called. + # + # source://coderay//lib/coderay/helpers/plugin_host.rb#159 def load_plugin_map; end + + # Map a plugin_id to another. + # + # Usage: Put this in a file plugin_path/_map.rb. + # + # class MyColorHost < PluginHost + # map :navy => :dark_blue, + # :maroon => :brown, + # :luna => :moon + # end + # + # source://coderay//lib/coderay/helpers/plugin_host.rb#95 def map(hash); end + + # A Hash of plugion_id => Plugin pairs. + # + # source://coderay//lib/coderay/helpers/plugin_host.rb#133 def plugin_hash; end + + # The path where the plugins can be found. + # + # source://coderay//lib/coderay/helpers/plugin_host.rb#79 def plugin_path(*args); end + + # Every plugin must register itself for +id+ by calling register_for, + # which calls this method. + # + # See Plugin#register_for. + # + # source://coderay//lib/coderay/helpers/plugin_host.rb#128 def register(plugin, id); end protected + # Return a plugin hash that automatically loads plugins. + # + # source://coderay//lib/coderay/helpers/plugin_host.rb#172 def make_plugin_hash; end + + # Returns the expected path to the plugin file for the given id. + # + # source://coderay//lib/coderay/helpers/plugin_host.rb#196 def path_to(plugin_id); end + + # Converts +id+ to a valid plugin ID String, or returns +nil+. + # + # Raises +ArgumentError+ for all other objects, or if the + # given String includes non-alphanumeric characters (\W). + # + # source://coderay//lib/coderay/helpers/plugin_host.rb#204 def validate_id(id); end class << self + # Adds the module/class to the PLUGIN_HOSTS list. + # + # source://coderay//lib/coderay/helpers/plugin_host.rb#72 def extended(mod); end end end +# source://coderay//lib/coderay/helpers/plugin_host.rb#33 class CodeRay::PluginHost::HostNotFound < ::LoadError; end + +# source://coderay//lib/coderay/helpers/plugin_host.rb#35 CodeRay::PluginHost::PLUGIN_HOSTS = T.let(T.unsafe(nil), Array) + +# dummy hash +# +# source://coderay//lib/coderay/helpers/plugin_host.rb#36 CodeRay::PluginHost::PLUGIN_HOSTS_BY_ID = T.let(T.unsafe(nil), Hash) + +# Raised if Encoders::[] fails because: +# * a file could not be found +# * the requested Plugin is not registered +# +# source://coderay//lib/coderay/helpers/plugin_host.rb#32 class CodeRay::PluginHost::PluginNotFound < ::LoadError; end +# = Scanners +# +# This module holds the Scanner class and its subclasses. +# For example, the Ruby scanner is named CodeRay::Scanners::Ruby +# can be found in coderay/scanners/ruby. +# +# Scanner also provides methods and constants for the register +# mechanism and the [] method that returns the Scanner class +# belonging to the given lang. +# +# See PluginHost. +# +# source://coderay//lib/coderay/scanners.rb#18 module CodeRay::Scanners extend ::CodeRay::PluginHost end +# Scanner for C. +# +# source://coderay//lib/coderay/scanners/c.rb#5 class CodeRay::Scanners::C < ::CodeRay::Scanners::Scanner protected + # source://coderay//lib/coderay/scanners/c.rb#44 def scan_tokens(encoder, options); end end +# source://coderay//lib/coderay/scanners/c.rb#27 CodeRay::Scanners::C::DIRECTIVES = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/c.rb#39 CodeRay::Scanners::C::ESCAPE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/c.rb#33 CodeRay::Scanners::C::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList) + +# source://coderay//lib/coderay/scanners/c.rb#10 CodeRay::Scanners::C::KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/c.rb#23 CodeRay::Scanners::C::PREDEFINED_CONSTANTS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/c.rb#17 CodeRay::Scanners::C::PREDEFINED_TYPES = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/c.rb#40 CodeRay::Scanners::C::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp) + +# Scanner for C++. +# +# Aliases: +cplusplus+, c++ CodeRay::Scanners::CPlusPlus = CodeRay::Scanners::Text +# source://coderay//lib/coderay/scanners/css.rb#4 class CodeRay::Scanners::CSS < ::CodeRay::Scanners::Scanner protected + # source://coderay//lib/coderay/scanners/css.rb#55 def scan_tokens(encoder, options); end + + # source://coderay//lib/coderay/scanners/css.rb#50 def setup; end end +# source://coderay//lib/coderay/scanners/css.rb#8 CodeRay::Scanners::CSS::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/css.rb#16 module CodeRay::Scanners::CSS::RE; end + +# source://coderay//lib/coderay/scanners/css.rb#31 CodeRay::Scanners::CSS::RE::AtKeyword = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#45 CodeRay::Scanners::CSS::RE::AttributeSelector = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#43 CodeRay::Scanners::CSS::RE::Class = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#38 CodeRay::Scanners::CSS::RE::Dimension = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#19 CodeRay::Scanners::CSS::RE::Escape = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#40 CodeRay::Scanners::CSS::RE::Function = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#17 CodeRay::Scanners::CSS::RE::Hex = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#26 CodeRay::Scanners::CSS::RE::HexColor = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#42 CodeRay::Scanners::CSS::RE::Id = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#30 CodeRay::Scanners::CSS::RE::Ident = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#20 CodeRay::Scanners::CSS::RE::NMChar = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#21 CodeRay::Scanners::CSS::RE::NMStart = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#29 CodeRay::Scanners::CSS::RE::Name = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#28 CodeRay::Scanners::CSS::RE::Num = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#32 CodeRay::Scanners::CSS::RE::Percentage = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#44 CodeRay::Scanners::CSS::RE::PseudoClass = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#24 CodeRay::Scanners::CSS::RE::String = T.let(T.unsafe(nil), Regexp) + +# TODO: buggy regexp +# +# source://coderay//lib/coderay/scanners/css.rb#22 CodeRay::Scanners::CSS::RE::String1 = T.let(T.unsafe(nil), Regexp) + +# TODO: buggy regexp +# +# source://coderay//lib/coderay/scanners/css.rb#23 CodeRay::Scanners::CSS::RE::String2 = T.let(T.unsafe(nil), Regexp) + +# differs from standard because it allows uppercase hex too +# +# source://coderay//lib/coderay/scanners/css.rb#18 CodeRay::Scanners::CSS::RE::Unicode = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#36 CodeRay::Scanners::CSS::RE::Unit = T.let(T.unsafe(nil), Regexp) +# source://coderay//lib/coderay/scanners/clojure.rb#6 class CodeRay::Scanners::Clojure < ::CodeRay::Scanners::Scanner protected + # source://coderay//lib/coderay/scanners/clojure.rb#145 def scan_tokens(encoder, options); end end +# source://coderay//lib/coderay/scanners/clojure.rb#95 CodeRay::Scanners::Clojure::BASIC_IDENTIFIER = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#133 CodeRay::Scanners::Clojure::COMPLEX10 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#134 CodeRay::Scanners::Clojure::COMPLEX16 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#136 CodeRay::Scanners::Clojure::COMPLEX2 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#135 CodeRay::Scanners::Clojure::COMPLEX8 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#16 CodeRay::Scanners::Clojure::CORE_FORMS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/clojure.rb#120 CodeRay::Scanners::Clojure::DECIMAL = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#98 CodeRay::Scanners::Clojure::DIGIT = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#99 CodeRay::Scanners::Clojure::DIGIT10 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#100 CodeRay::Scanners::Clojure::DIGIT16 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#102 CodeRay::Scanners::Clojure::DIGIT2 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#101 CodeRay::Scanners::Clojure::DIGIT8 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#107 CodeRay::Scanners::Clojure::EXACTNESS = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#110 CodeRay::Scanners::Clojure::EXP = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#109 CodeRay::Scanners::Clojure::EXP_MARK = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#96 CodeRay::Scanners::Clojure::IDENTIFIER = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#85 CodeRay::Scanners::Clojure::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList) + +# source://coderay//lib/coderay/scanners/clojure.rb#129 CodeRay::Scanners::Clojure::IMAG10 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#130 CodeRay::Scanners::Clojure::IMAG16 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#132 CodeRay::Scanners::Clojure::IMAG2 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#131 CodeRay::Scanners::Clojure::IMAG8 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#90 CodeRay::Scanners::Clojure::KEYWORD_NEXT_TOKEN_KIND = T.let(T.unsafe(nil), CodeRay::WordList) + +# source://coderay//lib/coderay/scanners/clojure.rb#141 CodeRay::Scanners::Clojure::NUM = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#137 CodeRay::Scanners::Clojure::NUM10 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#138 CodeRay::Scanners::Clojure::NUM16 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#140 CodeRay::Scanners::Clojure::NUM2 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#139 CodeRay::Scanners::Clojure::NUM8 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#78 CodeRay::Scanners::Clojure::PREDEFINED_CONSTANTS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/clojure.rb#112 CodeRay::Scanners::Clojure::PREFIX10 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#113 CodeRay::Scanners::Clojure::PREFIX16 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#115 CodeRay::Scanners::Clojure::PREFIX2 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#114 CodeRay::Scanners::Clojure::PREFIX8 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#106 CodeRay::Scanners::Clojure::RADIX10 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#103 CodeRay::Scanners::Clojure::RADIX16 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#105 CodeRay::Scanners::Clojure::RADIX2 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#104 CodeRay::Scanners::Clojure::RADIX8 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#125 CodeRay::Scanners::Clojure::REAL10 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#126 CodeRay::Scanners::Clojure::REAL16 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#128 CodeRay::Scanners::Clojure::REAL2 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#127 CodeRay::Scanners::Clojure::REAL8 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#108 CodeRay::Scanners::Clojure::SIGN = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#11 CodeRay::Scanners::Clojure::SPECIAL_FORMS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/clojure.rb#111 CodeRay::Scanners::Clojure::SUFFIX = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#97 CodeRay::Scanners::Clojure::SYMBOL = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#116 CodeRay::Scanners::Clojure::UINT10 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#117 CodeRay::Scanners::Clojure::UINT16 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#119 CodeRay::Scanners::Clojure::UINT2 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#118 CodeRay::Scanners::Clojure::UINT8 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#121 CodeRay::Scanners::Clojure::UREAL10 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#122 CodeRay::Scanners::Clojure::UREAL16 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#124 CodeRay::Scanners::Clojure::UREAL2 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#123 CodeRay::Scanners::Clojure::UREAL8 = T.let(T.unsafe(nil), Regexp) +# = Debug Scanner +# +# Interprets the output of the Encoders::Debug encoder (basically the inverse function). +# +# source://coderay//lib/coderay/scanners/debug.rb#9 class CodeRay::Scanners::Debug < ::CodeRay::Scanners::Scanner protected + # source://coderay//lib/coderay/scanners/debug.rb#21 def scan_tokens(encoder, options); end + + # source://coderay//lib/coderay/scanners/debug.rb#16 def setup; end end +# Scanner for the Delphi language (Object Pascal). +# +# Alias: +pascal+ +# +# source://coderay//lib/coderay/scanners/delphi.rb#7 class CodeRay::Scanners::Delphi < ::CodeRay::Scanners::Scanner protected + # source://coderay//lib/coderay/scanners/delphi.rb#45 def scan_tokens(encoder, options); end end +# source://coderay//lib/coderay/scanners/delphi.rb#25 CodeRay::Scanners::Delphi::DIRECTIVES = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/delphi.rb#36 CodeRay::Scanners::Delphi::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList::CaseIgnoring) + +# source://coderay//lib/coderay/scanners/delphi.rb#12 CodeRay::Scanners::Delphi::KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/delphi.rb#40 CodeRay::Scanners::Delphi::NAME_FOLLOWS = T.let(T.unsafe(nil), CodeRay::WordList::CaseIgnoring) +# Scanner for output of the diff command. +# +# Alias: +patch+ +# +# source://coderay//lib/coderay/scanners/diff.rb#7 class CodeRay::Scanners::Diff < ::CodeRay::Scanners::Scanner protected + # source://coderay//lib/coderay/scanners/diff.rb#19 def scan_tokens(encoder, options); end private + # source://coderay//lib/coderay/scanners/diff.rb#204 def diff(a, b); end end +# source://coderay//lib/coderay/scanners/diff.rb#12 CodeRay::Scanners::Diff::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) +# Scanner for HTML ERB templates. +# +# source://coderay//lib/coderay/scanners/erb.rb#8 class CodeRay::Scanners::ERB < ::CodeRay::Scanners::Scanner protected + # source://coderay//lib/coderay/scanners/erb.rb#38 def reset_instance; end + + # source://coderay//lib/coderay/scanners/erb.rb#43 def scan_tokens(encoder, options); end + + # source://coderay//lib/coderay/scanners/erb.rb#33 def setup; end end +# source://coderay//lib/coderay/scanners/erb.rb#15 CodeRay::Scanners::ERB::ERB_RUBY_BLOCK = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/erb.rb#13 CodeRay::Scanners::ERB::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/erb.rb#27 CodeRay::Scanners::ERB::START_OF_ERB = T.let(T.unsafe(nil), Regexp) +# source://coderay//lib/coderay/scanners/go.rb#4 class CodeRay::Scanners::Go < ::CodeRay::Scanners::Scanner protected + # source://coderay//lib/coderay/scanners/go.rb#50 def scan_tokens(encoder, options); end end +# source://coderay//lib/coderay/scanners/go.rb#45 CodeRay::Scanners::Go::ESCAPE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/go.rb#39 CodeRay::Scanners::Go::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList) + +# http://golang.org/ref/spec#Keywords +# +# source://coderay//lib/coderay/scanners/go.rb#10 CodeRay::Scanners::Go::KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/go.rb#29 CodeRay::Scanners::Go::PREDEFINED_CONSTANTS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/go.rb#34 CodeRay::Scanners::Go::PREDEFINED_FUNCTIONS = T.let(T.unsafe(nil), Array) + +# http://golang.org/ref/spec#Types +# +# source://coderay//lib/coderay/scanners/go.rb#19 CodeRay::Scanners::Go::PREDEFINED_TYPES = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/go.rb#46 CodeRay::Scanners::Go::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp) +# Scanner for Groovy. +# +# source://coderay//lib/coderay/scanners/groovy.rb#7 class CodeRay::Scanners::Groovy < ::CodeRay::Scanners::Java protected + # source://coderay//lib/coderay/scanners/groovy.rb#43 def scan_tokens(encoder, options); end + + # source://coderay//lib/coderay/scanners/groovy.rb#39 def setup; end end +# source://coderay//lib/coderay/scanners/groovy.rb#24 CodeRay::Scanners::Groovy::ESCAPE = T.let(T.unsafe(nil), Regexp) + +# TODO: check list of keywords +# +# source://coderay//lib/coderay/scanners/groovy.rb#12 CodeRay::Scanners::Groovy::GROOVY_KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/groovy.rb#18 CodeRay::Scanners::Groovy::GROOVY_MAGIC_VARIABLES = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/groovy.rb#20 CodeRay::Scanners::Groovy::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList) + +# source://coderay//lib/coderay/scanners/groovy.rb#15 CodeRay::Scanners::Groovy::KEYWORDS_EXPECTING_VALUE = T.let(T.unsafe(nil), CodeRay::WordList) + +# source://coderay//lib/coderay/scanners/groovy.rb#26 CodeRay::Scanners::Groovy::REGEXP_ESCAPE = T.let(T.unsafe(nil), Regexp) + +# TODO: interpretation inside ', ", / +# +# source://coderay//lib/coderay/scanners/groovy.rb#29 CodeRay::Scanners::Groovy::STRING_CONTENT_PATTERN = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/scanners/groovy.rb#25 CodeRay::Scanners::Groovy::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp) +# source://coderay//lib/coderay/scanners/haml.rb#8 class CodeRay::Scanners::HAML < ::CodeRay::Scanners::Scanner protected + # source://coderay//lib/coderay/scanners/haml.rb#24 def scan_tokens(encoder, options); end + + # source://coderay//lib/coderay/scanners/haml.rb#17 def setup; end end +# source://coderay//lib/coderay/scanners/haml.rb#13 CodeRay::Scanners::HAML::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array) +# HTML Scanner +# +# Alias: +xhtml+ +# +# See also: Scanners::XML +# +# source://coderay//lib/coderay/scanners/html.rb#9 class CodeRay::Scanners::HTML < ::CodeRay::Scanners::Scanner + # source://coderay//lib/coderay/scanners/html.rb#62 def reset; end protected + # source://coderay//lib/coderay/scanners/html.rb#83 def scan_css(encoder, code, state = T.unsafe(nil)); end + + # source://coderay//lib/coderay/scanners/html.rb#76 def scan_java_script(encoder, code); end + + # source://coderay//lib/coderay/scanners/html.rb#90 def scan_tokens(encoder, options); end + + # source://coderay//lib/coderay/scanners/html.rb#70 def setup; end end +# source://coderay//lib/coderay/scanners/html.rb#39 CodeRay::Scanners::HTML::ATTR_NAME = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/html.rb#42 CodeRay::Scanners::HTML::ENTITY = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/html.rb#20 CodeRay::Scanners::HTML::EVENT_ATTRIBUTES = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/html.rb#41 CodeRay::Scanners::HTML::HEX = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/html.rb#35 CodeRay::Scanners::HTML::IN_ATTRIBUTE = T.let(T.unsafe(nil), CodeRay::WordList::CaseIgnoring) + +# source://coderay//lib/coderay/scanners/html.rb#13 CodeRay::Scanners::HTML::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/html.rb#57 CodeRay::Scanners::HTML::PLAIN_STRING_CONTENT = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/scanners/html.rb#40 CodeRay::Scanners::HTML::TAG_END = T.let(T.unsafe(nil), Regexp) +# Scanner for JSON (JavaScript Object Notation). +# +# source://coderay//lib/coderay/scanners/json.rb#5 class CodeRay::Scanners::JSON < ::CodeRay::Scanners::Scanner protected + # See http://json.org/ for a definition of the JSON lexic/grammar. + # + # source://coderay//lib/coderay/scanners/json.rb#26 def scan_tokens(encoder, options); end + + # source://coderay//lib/coderay/scanners/json.rb#21 def setup; end end +# source://coderay//lib/coderay/scanners/json.rb#15 CodeRay::Scanners::JSON::ESCAPE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/json.rb#17 CodeRay::Scanners::JSON::KEY = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/json.rb#10 CodeRay::Scanners::JSON::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/json.rb#16 CodeRay::Scanners::JSON::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp) +# Scanner for Java. +# +# source://coderay//lib/coderay/scanners/java.rb#5 class CodeRay::Scanners::Java < ::CodeRay::Scanners::Scanner protected + # source://coderay//lib/coderay/scanners/java.rb#51 def scan_tokens(encoder, options); end end +# source://coderay//lib/coderay/scanners/java/builtin_types.rb#4 module CodeRay::Scanners::Java::BuiltinTypes; end + +# source://coderay//lib/coderay/scanners/java/builtin_types.rb#7 CodeRay::Scanners::Java::BuiltinTypes::List = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/java.rb#19 CodeRay::Scanners::Java::CONSTANTS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/java.rb#25 CodeRay::Scanners::Java::DIRECTIVES = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/java.rb#40 CodeRay::Scanners::Java::ESCAPE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/java.rb#47 CodeRay::Scanners::Java::IDENT = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/java.rb#30 CodeRay::Scanners::Java::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList) + +# http://java.sun.com/docs/books/tutorial/java/nutsandbolts/_keywords.html +# +# source://coderay//lib/coderay/scanners/java.rb#12 CodeRay::Scanners::Java::KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/java.rb#20 CodeRay::Scanners::Java::MAGIC_VARIABLES = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/java.rb#18 CodeRay::Scanners::Java::RESERVED = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/java.rb#42 CodeRay::Scanners::Java::STRING_CONTENT_PATTERN = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/scanners/java.rb#21 CodeRay::Scanners::Java::TYPES = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/java.rb#41 CodeRay::Scanners::Java::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp) +# Scanner for JavaScript. +# +# Aliases: +ecmascript+, +ecma_script+, +javascript+ +# +# source://coderay//lib/coderay/scanners/java_script.rb#7 class CodeRay::Scanners::JavaScript < ::CodeRay::Scanners::Scanner protected + # source://coderay//lib/coderay/scanners/java_script.rb#224 def reset_instance; end + + # source://coderay//lib/coderay/scanners/java_script.rb#61 def scan_tokens(encoder, options); end + + # source://coderay//lib/coderay/scanners/java_script.rb#57 def setup; end + + # source://coderay//lib/coderay/scanners/java_script.rb#229 def xml_scanner; end end +# source://coderay//lib/coderay/scanners/java_script.rb#42 CodeRay::Scanners::JavaScript::ESCAPE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/java_script.rb#36 CodeRay::Scanners::JavaScript::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList) + +# The actual JavaScript keywords. +# +# source://coderay//lib/coderay/scanners/java_script.rb#13 CodeRay::Scanners::JavaScript::KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/java_script.rb#24 CodeRay::Scanners::JavaScript::KEYWORDS_EXPECTING_VALUE = T.let(T.unsafe(nil), CodeRay::WordList) + +# source://coderay//lib/coderay/scanners/java_script.rb#50 CodeRay::Scanners::JavaScript::KEY_CHECK_PATTERN = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/scanners/java_script.rb#22 CodeRay::Scanners::JavaScript::MAGIC_VARIABLES = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/java_script.rb#18 CodeRay::Scanners::JavaScript::PREDEFINED_CONSTANTS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/java_script.rb#44 CodeRay::Scanners::JavaScript::REGEXP_ESCAPE = T.let(T.unsafe(nil), Regexp) + +# Reserved for future use. +# +# source://coderay//lib/coderay/scanners/java_script.rb#29 CodeRay::Scanners::JavaScript::RESERVED_WORDS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/java_script.rb#45 CodeRay::Scanners::JavaScript::STRING_CONTENT_PATTERN = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/scanners/java_script.rb#43 CodeRay::Scanners::JavaScript::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp) +# Scanner for the Lua[http://lua.org] programming lanuage. +# +# The language’s complete syntax is defined in +# {the Lua manual}[http://www.lua.org/manual/5.2/manual.html], +# which is what this scanner tries to conform to. +# +# source://coderay//lib/coderay/scanners/lua.rb#11 class CodeRay::Scanners::Lua < ::CodeRay::Scanners::Scanner protected + # CodeRay entry hook. Starts parsing. + # + # source://coderay//lib/coderay/scanners/lua.rb#60 def scan_tokens(encoder, options); end + + # Scanner initialization. + # + # source://coderay//lib/coderay/scanners/lua.rb#54 def setup; end end +# Automatic token kind selection for normal words. +# +# source://coderay//lib/coderay/scanners/lua.rb#46 CodeRay::Scanners::Lua::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList) + +# Keywords used in Lua. +# +# source://coderay//lib/coderay/scanners/lua.rb#18 CodeRay::Scanners::Lua::KEYWORDS = T.let(T.unsafe(nil), Array) + +# Constants set by the Lua core. +# +# source://coderay//lib/coderay/scanners/lua.rb#25 CodeRay::Scanners::Lua::PREDEFINED_CONSTANTS = T.let(T.unsafe(nil), Array) + +# The expressions contained in this array are parts of Lua’s `basic' +# library. Although it’s not entirely necessary to load that library, +# it is highly recommended and one would have to provide own implementations +# of some of these expressions if one does not do so. They however aren’t +# keywords, neither are they constants, but nearly predefined, so they +# get tagged as `predefined' rather than anything else. +# +# This list excludes values of form `_UPPERCASE' because the Lua manual +# requires such identifiers to be reserved by Lua anyway and they are +# highlighted directly accordingly, without the need for specific +# identifiers to be listed here. +# +# source://coderay//lib/coderay/scanners/lua.rb#38 CodeRay::Scanners::Lua::PREDEFINED_EXPRESSIONS = T.let(T.unsafe(nil), Array) +# Scanner for PHP. +# +# Original by Stefan Walk. +# +# source://coderay//lib/coderay/scanners/php.rb#10 class CodeRay::Scanners::PHP < ::CodeRay::Scanners::Scanner protected + # source://coderay//lib/coderay/scanners/php.rb#23 def reset_instance; end + + # source://coderay//lib/coderay/scanners/php.rb#234 def scan_tokens(encoder, options); end + + # source://coderay//lib/coderay/scanners/php.rb#19 def setup; end end +# source://coderay//lib/coderay/scanners/php.rb#15 CodeRay::Scanners::PHP::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/php.rb#197 module CodeRay::Scanners::PHP::RE; end + +# source://coderay//lib/coderay/scanners/php.rb#211 CodeRay::Scanners::PHP::RE::HTML_INDICATOR = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/php.rb#213 CodeRay::Scanners::PHP::RE::IDENTIFIER = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/php.rb#216 CodeRay::Scanners::PHP::RE::OPERATOR = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/php.rb#206 CodeRay::Scanners::PHP::RE::PHP_END = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/php.rb#199 CodeRay::Scanners::PHP::RE::PHP_START = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/php.rb#214 CodeRay::Scanners::PHP::RE::VARIABLE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/php.rb#28 module CodeRay::Scanners::PHP::Words; end + +# according to http://php.net/quickref.php on 2009-04-21; +# all functions with _ excluded (module functions) and selected additional functions +# +# source://coderay//lib/coderay/scanners/php.rb#50 CodeRay::Scanners::PHP::Words::BUILTIN_FUNCTIONS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/php.rb#46 CodeRay::Scanners::PHP::Words::CLASSES = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/php.rb#145 CodeRay::Scanners::PHP::Words::CONSTANTS = T.let(T.unsafe(nil), Array) + +# TODO: more built-in PHP functions? +# +# source://coderay//lib/coderay/scanners/php.rb#140 CodeRay::Scanners::PHP::Words::EXCEPTIONS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/php.rb#184 CodeRay::Scanners::PHP::Words::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList::CaseIgnoring) + +# according to http://www.php.net/manual/en/reserved.keywords.php +# +# source://coderay//lib/coderay/scanners/php.rb#31 CodeRay::Scanners::PHP::Words::KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/php.rb#41 CodeRay::Scanners::PHP::Words::LANGUAGE_CONSTRUCTS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/php.rb#178 CodeRay::Scanners::PHP::Words::PREDEFINED = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/php.rb#39 CodeRay::Scanners::PHP::Words::TYPES = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/php.rb#193 CodeRay::Scanners::PHP::Words::VARIABLE_KIND = T.let(T.unsafe(nil), CodeRay::WordList) +# Scanner for Python. Supports Python 3. +# +# Based on pygments' PythonLexer, see +# http://dev.pocoo.org/projects/pygments/browser/pygments/lexers/agile.py. +# +# source://coderay//lib/coderay/scanners/python.rb#8 class CodeRay::Scanners::Python < ::CodeRay::Scanners::Scanner protected + # source://coderay//lib/coderay/scanners/python.rb#103 def scan_tokens(encoder, options); end end +# source://coderay//lib/coderay/scanners/python.rb#86 CodeRay::Scanners::Python::DEF_NEW_STATE = T.let(T.unsafe(nil), CodeRay::WordList) + +# source://coderay//lib/coderay/scanners/python.rb#91 CodeRay::Scanners::Python::DESCRIPTOR = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/python.rb#97 CodeRay::Scanners::Python::DOCSTRING_COMING = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/python.rb#65 CodeRay::Scanners::Python::ESCAPE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/python.rb#57 CodeRay::Scanners::Python::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList) + +# source://coderay//lib/coderay/scanners/python.rb#13 CodeRay::Scanners::Python::KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/python.rb#64 CodeRay::Scanners::Python::NAME = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/python.rb#21 CodeRay::Scanners::Python::OLD_KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/python.rb#68 CodeRay::Scanners::Python::OPERATOR = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/python.rb#37 CodeRay::Scanners::Python::PREDEFINED_EXCEPTIONS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/python.rb#25 CodeRay::Scanners::Python::PREDEFINED_METHODS_AND_TYPES = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/python.rb#52 CodeRay::Scanners::Python::PREDEFINED_VARIABLES_AND_CONSTANTS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/python.rb#82 CodeRay::Scanners::Python::STRING_CONTENT_REGEXP = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/scanners/python.rb#78 CodeRay::Scanners::Python::STRING_DELIMITER_REGEXP = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/scanners/python.rb#66 CodeRay::Scanners::Python::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp) +# = Raydebug Scanner +# +# Highlights the output of the Encoders::Debug encoder. +# +# source://coderay//lib/coderay/scanners/raydebug.rb#9 class CodeRay::Scanners::Raydebug < ::CodeRay::Scanners::Scanner protected + # source://coderay//lib/coderay/scanners/raydebug.rb#22 def scan_tokens(encoder, options); end + + # source://coderay//lib/coderay/scanners/raydebug.rb#17 def setup; end end +# This scanner is really complex, since Ruby _is_ a complex language! +# +# It tries to highlight 100% of all common code, +# and 90% of strange codes. +# +# It is optimized for HTML highlighting, and is not very useful for +# parsing or pretty printing. +# +# source://coderay//lib/coderay/scanners/ruby.rb#11 class CodeRay::Scanners::Ruby < ::CodeRay::Scanners::Scanner + # source://coderay//lib/coderay/scanners/ruby.rb#19 def interpreted_string_state; end protected + # source://coderay//lib/coderay/scanners/ruby.rb#29 def scan_tokens(encoder, options); end + + # source://coderay//lib/coderay/scanners/ruby.rb#25 def setup; end end +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#5 module CodeRay::Scanners::Ruby::Patterns; end + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#72 CodeRay::Scanners::Ruby::Patterns::BINARY = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#106 CodeRay::Scanners::Ruby::Patterns::CHARACTER = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#55 CodeRay::Scanners::Ruby::Patterns::CLASS_VARIABLE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#96 CodeRay::Scanners::Ruby::Patterns::CONTROL_META_ESCAPE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#132 CodeRay::Scanners::Ruby::Patterns::DATA = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#69 CodeRay::Scanners::Ruby::Patterns::DECIMAL = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#102 CodeRay::Scanners::Ruby::Patterns::ESCAPE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#74 CodeRay::Scanners::Ruby::Patterns::EXPONENT = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#168 CodeRay::Scanners::Ruby::Patterns::FANCY_STRING_INTERPRETED = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#161 CodeRay::Scanners::Ruby::Patterns::FANCY_STRING_KIND = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#160 CodeRay::Scanners::Ruby::Patterns::FANCY_STRING_START = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#76 CodeRay::Scanners::Ruby::Patterns::FLOAT_OR_INT = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#75 CodeRay::Scanners::Ruby::Patterns::FLOAT_SUFFIX = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#57 CodeRay::Scanners::Ruby::Patterns::GLOBAL_VARIABLE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#116 CodeRay::Scanners::Ruby::Patterns::HEREDOC_OPEN = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#71 CodeRay::Scanners::Ruby::Patterns::HEXADECIMAL = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#38 CodeRay::Scanners::Ruby::Patterns::IDENT = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#28 CodeRay::Scanners::Ruby::Patterns::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#54 CodeRay::Scanners::Ruby::Patterns::INSTANCE_VARIABLE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#7 CodeRay::Scanners::Ruby::Patterns::KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#151 CodeRay::Scanners::Ruby::Patterns::KEYWORDS_EXPECTING_VALUE = T.let(T.unsafe(nil), CodeRay::WordList) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#32 CodeRay::Scanners::Ruby::Patterns::KEYWORD_NEW_STATE = T.let(T.unsafe(nil), CodeRay::WordList) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#53 CodeRay::Scanners::Ruby::Patterns::METHOD_AFTER_DOT = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#40 CodeRay::Scanners::Ruby::Patterns::METHOD_NAME = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#52 CodeRay::Scanners::Ruby::Patterns::METHOD_NAME_EX = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#41 CodeRay::Scanners::Ruby::Patterns::METHOD_NAME_OPERATOR = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#87 CodeRay::Scanners::Ruby::Patterns::METHOD_NAME_OR_SYMBOL = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#51 CodeRay::Scanners::Ruby::Patterns::METHOD_SUFFIX = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#77 CodeRay::Scanners::Ruby::Patterns::NUMERIC = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#56 CodeRay::Scanners::Ruby::Patterns::OBJECT_VARIABLE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#70 CodeRay::Scanners::Ruby::Patterns::OCTAL = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#17 CodeRay::Scanners::Ruby::Patterns::PREDEFINED_CONSTANTS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#58 CodeRay::Scanners::Ruby::Patterns::PREFIX_VARIABLE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#61 CodeRay::Scanners::Ruby::Patterns::QUOTE_TO_TYPE = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#67 CodeRay::Scanners::Ruby::Patterns::REGEXP_MODIFIERS = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#126 CodeRay::Scanners::Ruby::Patterns::RUBYDOC = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#138 CodeRay::Scanners::Ruby::Patterns::RUBYDOC_OR_DATA = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#89 CodeRay::Scanners::Ruby::Patterns::SIMPLE_ESCAPE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#79 CodeRay::Scanners::Ruby::Patterns::SYMBOL = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#142 CodeRay::Scanners::Ruby::Patterns::VALUE_FOLLOWS = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#59 CodeRay::Scanners::Ruby::Patterns::VARIABLE = T.let(T.unsafe(nil), Regexp) +# source://coderay//lib/coderay/scanners/ruby/string_state.rb#8 class CodeRay::Scanners::Ruby::StringState < ::Struct + # @return [StringState] a new instance of StringState + # + # source://coderay//lib/coderay/scanners/ruby/string_state.rb#48 def initialize(kind, interpreted, delim, heredoc = T.unsafe(nil)); end + # source://coderay//lib/coderay/scanners/ruby/string_state.rb#63 def heredoc_pattern(delim, interpreted, indented); end class << self + # source://coderay//lib/coderay/scanners/ruby/string_state.rb#40 def simple_key_pattern(delim); end end end +# source://coderay//lib/coderay/scanners/ruby/string_state.rb#10 CodeRay::Scanners::Ruby::StringState::CLOSING_PAREN = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/scanners/ruby/string_state.rb#17 CodeRay::Scanners::Ruby::StringState::STRING_PATTERN = T.let(T.unsafe(nil), Hash) +# by Josh Goebel +# +# source://coderay//lib/coderay/scanners/sql.rb#5 class CodeRay::Scanners::SQL < ::CodeRay::Scanners::Scanner + # source://coderay//lib/coderay/scanners/sql.rb#66 def scan_tokens(encoder, options); end end +# source://coderay//lib/coderay/scanners/sql.rb#23 CodeRay::Scanners::SQL::COMMANDS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/sql.rb#38 CodeRay::Scanners::SQL::DIRECTIVES = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/sql.rb#55 CodeRay::Scanners::SQL::ESCAPE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/sql.rb#46 CodeRay::Scanners::SQL::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList::CaseIgnoring) + +# source://coderay//lib/coderay/scanners/sql.rb#9 CodeRay::Scanners::SQL::KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/sql.rb#18 CodeRay::Scanners::SQL::OBJECTS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/sql.rb#44 CodeRay::Scanners::SQL::PREDEFINED_CONSTANTS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/sql.rb#36 CodeRay::Scanners::SQL::PREDEFINED_FUNCTIONS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/sql.rb#28 CodeRay::Scanners::SQL::PREDEFINED_TYPES = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/sql.rb#60 CodeRay::Scanners::SQL::STRING_CONTENT_PATTERN = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/scanners/sql.rb#58 CodeRay::Scanners::SQL::STRING_PREFIXES = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/sql.rb#56 CodeRay::Scanners::SQL::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp) +# A scanner for Sass. +# +# source://coderay//lib/coderay/scanners/sass.rb#5 class CodeRay::Scanners::Sass < ::CodeRay::Scanners::CSS protected + # source://coderay//lib/coderay/scanners/sass.rb#16 def scan_tokens(encoder, options); end + + # source://coderay//lib/coderay/scanners/sass.rb#12 def setup; end end +# = Scanner +# +# The base class for all Scanners. +# +# It is a subclass of Ruby's great +StringScanner+, which +# makes it easy to access the scanning methods inside. +# +# It is also +Enumerable+, so you can use it like an Array of +# Tokens: +# +# require 'coderay' +# +# c_scanner = CodeRay::Scanners[:c].new "if (*p == '{') nest++;" +# +# for text, kind in c_scanner +# puts text if kind == :operator +# end +# +# # prints: (*==)++; +# +# OK, this is a very simple example :) +# You can also use +map+, +any?+, +find+ and even +sort_by+, +# if you want. +# +# source://coderay//lib/coderay/scanners/scanner.rb#29 class CodeRay::Scanners::Scanner < ::StringScanner include ::Enumerable extend ::CodeRay::Plugin + # Create a new Scanner. + # + # * +code+ is the input String and is handled by the superclass + # StringScanner. + # * +options+ is a Hash with Symbols as keys. + # It is merged with the default options of the class (you can + # overwrite default options here.) + # + # Else, a Tokens object is used. + # + # @return [Scanner] a new instance of Scanner + # + # source://coderay//lib/coderay/scanners/scanner.rb#125 def initialize(code = T.unsafe(nil), options = T.unsafe(nil)); end + # The string in binary encoding. + # + # To be used with #pos, which is the index of the byte the scanner + # will scan next. + # + # source://coderay//lib/coderay/scanners/scanner.rb#218 def binary_string; end + + # The current column position of the scanner, starting with 1. + # See also: #line. + # + # source://coderay//lib/coderay/scanners/scanner.rb#209 def column(pos = T.unsafe(nil)); end + + # Traverse the tokens. + # + # source://coderay//lib/coderay/scanners/scanner.rb#192 def each(&block); end + + # the default file extension for this scanner + # + # source://coderay//lib/coderay/scanners/scanner.rb#160 def file_extension; end + + # the Plugin ID for this scanner + # + # source://coderay//lib/coderay/scanners/scanner.rb#155 def lang; end + + # The current line position of the scanner, starting with 1. + # See also: #column. + # + # Beware, this is implemented inefficiently. It should be used + # for debugging only. + # + # source://coderay//lib/coderay/scanners/scanner.rb#202 def line(pos = T.unsafe(nil)); end + + # Sets back the scanner. Subclasses should redefine the reset_instance + # method instead of this one. + # + # source://coderay//lib/coderay/scanners/scanner.rb#142 def reset; end + + # Returns the value of attribute state. + # + # source://coderay//lib/coderay/scanners/scanner.rb#44 def state; end + + # Sets the attribute state + # + # @param value the value to set the attribute state to. + # + # source://coderay//lib/coderay/scanners/scanner.rb#44 def state=(_arg0); end + + # Set a new string to be scanned. + # + # source://coderay//lib/coderay/scanners/scanner.rb#148 def string=(code); end + + # Scan the code and returns all tokens in a Tokens object. + # + # source://coderay//lib/coderay/scanners/scanner.rb#165 def tokenize(source = T.unsafe(nil), options = T.unsafe(nil)); end + + # Cache the result of tokenize. + # + # source://coderay//lib/coderay/scanners/scanner.rb#187 def tokens; end protected + # Scanner error with additional status information + # + # @raise [ScanError] + # + # source://coderay//lib/coderay/scanners/scanner.rb#314 def raise_inspect(message, tokens, state = T.unsafe(nil), ambit = T.unsafe(nil), backtrace = T.unsafe(nil)); end + + # source://coderay//lib/coderay/scanners/scanner.rb#289 def raise_inspect_arguments(message, tokens, state, ambit); end + + # Resets the scanner. + # + # source://coderay//lib/coderay/scanners/scanner.rb#265 def reset_instance; end + + # Shorthand for scan_until(/\z/). + # This method also avoids a JRuby 1.9 mode bug. + # + # source://coderay//lib/coderay/scanners/scanner.rb#328 def scan_rest; end + + # This is the central method, and commonly the only one a + # subclass implements. + # + # Subclasses must implement this method; it must return +tokens+ + # and must only use Tokens#<< for storing scanned tokens! + # + # @raise [NotImplementedError] + # + # source://coderay//lib/coderay/scanners/scanner.rb#260 def scan_tokens(tokens, options); end + + # source://coderay//lib/coderay/scanners/scanner.rb#305 def scanner_state_info(state); end + + # source://coderay//lib/coderay/scanners/scanner.rb#239 def set_string_from_source(source); end + + # source://coderay//lib/coderay/scanners/scanner.rb#250 def set_tokens_from_options(options); end + + # Can be implemented by subclasses to do some initialization + # that has to be done once per instance. + # + # Use reset for initialization that has to be done once per + # scan. + # + # source://coderay//lib/coderay/scanners/scanner.rb#236 def setup; end + + # source://coderay//lib/coderay/scanners/scanner.rb#322 def tokens_last(tokens, n); end + + # source://coderay//lib/coderay/scanners/scanner.rb#318 def tokens_size(tokens); end class << self + # The encoding used internally by this scanner. + # + # source://coderay//lib/coderay/scanners/scanner.rb#71 def encoding(name = T.unsafe(nil)); end + + # The typical filename suffix for this scanner's language. + # + # source://coderay//lib/coderay/scanners/scanner.rb#66 def file_extension(extension = T.unsafe(nil)); end + + # The lang of this Scanner class, which is equal to its Plugin ID. + # + # source://coderay//lib/coderay/scanners/scanner.rb#76 def lang; end + + # Normalizes the given code into a string with UNIX newlines, in the + # scanner's internal encoding, with invalid and undefined charachters + # replaced by placeholders. Always returns a new object. + # + # source://coderay//lib/coderay/scanners/scanner.rb#51 def normalize(code); end protected + # source://coderay//lib/coderay/scanners/scanner.rb#82 def encode_with_encoding(code, target_encoding); end + + # source://coderay//lib/coderay/scanners/scanner.rb#100 def guess_encoding(s); end + + # source://coderay//lib/coderay/scanners/scanner.rb#96 def to_unix(code); end end end +# The default options for all scanner classes. +# +# Define @default_options for subclasses. +# +# source://coderay//lib/coderay/scanners/scanner.rb#40 CodeRay::Scanners::Scanner::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/scanners/scanner.rb#42 CodeRay::Scanners::Scanner::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/helpers/plugin.rb#41 CodeRay::Scanners::Scanner::PLUGIN_HOST = CodeRay::Scanners + +# source://coderay//lib/coderay/scanners/scanner.rb#299 CodeRay::Scanners::Scanner::SCANNER_STATE_INFO = T.let(T.unsafe(nil), String) + +# source://coderay//lib/coderay/scanners/scanner.rb#271 CodeRay::Scanners::Scanner::SCAN_ERROR_MESSAGE = T.let(T.unsafe(nil), String) + +# Raised if a Scanner fails while scanning +# +# source://coderay//lib/coderay/scanners/scanner.rb#35 class CodeRay::Scanners::Scanner::ScanError < ::StandardError; end +# source://coderay//lib/coderay/scanners/taskpaper.rb#4 class CodeRay::Scanners::Taskpaper < ::CodeRay::Scanners::Scanner protected + # source://coderay//lib/coderay/scanners/taskpaper.rb#11 def scan_tokens(encoder, options); end end +# Scanner for plain text. +# +# Yields just one token of the kind :plain. +# +# Alias: +plaintext+, +plain+ +# +# source://coderay//lib/coderay/scanners/text.rb#9 class CodeRay::Scanners::Text < ::CodeRay::Scanners::Scanner protected + # source://coderay//lib/coderay/scanners/text.rb#18 def scan_tokens(encoder, options); end end +# source://coderay//lib/coderay/scanners/text.rb#14 CodeRay::Scanners::Text::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array) + +# Scanner for XML. +# +# Currently this is the same scanner as Scanners::HTML. +# +# source://coderay//lib/coderay/scanners/xml.rb#9 class CodeRay::Scanners::XML < ::CodeRay::Scanners::HTML; end +# Scanner for YAML. +# +# Based on the YAML scanner from Syntax by Jamis Buck. +# +# source://coderay//lib/coderay/scanners/yaml.rb#7 class CodeRay::Scanners::YAML < ::CodeRay::Scanners::Scanner protected + # source://coderay//lib/coderay/scanners/yaml.rb#16 def scan_tokens(encoder, options); end end +# source://coderay//lib/coderay/scanners/yaml.rb#12 CodeRay::Scanners::YAML::KINDS_NOT_LOC = T.let(T.unsafe(nil), Symbol) +# This module holds the Style class and its subclasses. +# +# See Plugin. +# +# source://coderay//lib/coderay/styles.rb#6 module CodeRay::Styles extend ::CodeRay::PluginHost end +# A colorful theme using CSS 3 colors (with alpha channel). +# +# source://coderay//lib/coderay/styles/alpha.rb#5 class CodeRay::Styles::Alpha < ::CodeRay::Styles::Style; end + +# source://coderay//lib/coderay/styles/alpha.rb#14 CodeRay::Styles::Alpha::CSS_MAIN_STYLES = T.let(T.unsafe(nil), String) + +# source://coderay//lib/coderay/styles/alpha.rb#53 CodeRay::Styles::Alpha::TOKEN_COLORS = T.let(T.unsafe(nil), String) +# Base class for styles. +# +# Styles are used by Encoders::HTML to colorize tokens. +# +# source://coderay//lib/coderay/styles/style.rb#8 class CodeRay::Styles::Style extend ::CodeRay::Plugin end +# source://coderay//lib/coderay/styles/style.rb#12 CodeRay::Styles::Style::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/helpers/plugin.rb#41 CodeRay::Styles::Style::PLUGIN_HOST = CodeRay::Styles + +# A Hash of all known token kinds and their associated CSS classes. +# +# source://coderay//lib/coderay/token_kinds.rb#4 CodeRay::TokenKinds = T.let(T.unsafe(nil), Hash) +# The Tokens class represents a list of tokens returned from +# a Scanner. It's actually just an Array with a few helper methods. +# +# A token itself is not a special object, just two elements in an Array: +# * the _token_ _text_ (the original source of the token in a String) or +# a _token_ _action_ (begin_group, end_group, begin_line, end_line) +# * the _token_ _kind_ (a Symbol representing the type of the token) +# +# It looks like this: +# +# ..., '# It looks like this', :comment, ... +# ..., '3.1415926', :float, ... +# ..., '$^', :error, ... +# +# Some scanners also yield sub-tokens, represented by special +# token actions, for example :begin_group and :end_group. +# +# The Ruby scanner, for example, splits "a string" into: +# +# [ +# :begin_group, :string, +# '"', :delimiter, +# 'a string', :content, +# '"', :delimiter, +# :end_group, :string +# ] +# +# Tokens can be used to save the output of a Scanners in a simple +# Ruby object that can be send to an Encoder later: +# +# tokens = CodeRay.scan('price = 2.59', :ruby).tokens +# tokens.encode(:html) +# tokens.html +# CodeRay.encoder(:html).encode_tokens(tokens) +# +# Tokens gives you the power to handle pre-scanned code very easily: +# You can serialize it to a JSON string and store it in a database, pass it +# around to encode it more than once, send it to other algorithms... +# +# source://coderay//lib/coderay/tokens.rb#43 class CodeRay::Tokens < ::Array + # source://coderay//lib/coderay/tokens.rb#156 def begin_group(kind); end + + # source://coderay//lib/coderay/tokens.rb#158 def begin_line(kind); end + + # Return the actual number of tokens. + # + # source://coderay//lib/coderay/tokens.rb#151 def count; end + + # Encode the tokens using encoder. + # + # encoder can be + # * a plugin name like :html oder 'statistic' + # * an Encoder object + # + # options are passed to the encoder. + # + # source://coderay//lib/coderay/tokens.rb#56 def encode(encoder, options = T.unsafe(nil)); end + + # source://coderay//lib/coderay/tokens.rb#157 def end_group(kind); end + + # source://coderay//lib/coderay/tokens.rb#159 def end_line(kind); end + + # Redirects unknown methods to encoder calls. + # + # For example, if you call +tokens.html+, the HTML encoder + # is used to highlight the tokens. + # + # source://coderay//lib/coderay/tokens.rb#70 def method_missing(meth, options = T.unsafe(nil)); end + + # The Scanner instance that created the tokens. + # + # source://coderay//lib/coderay/tokens.rb#47 def scanner; end + + # The Scanner instance that created the tokens. + # + # source://coderay//lib/coderay/tokens.rb#47 def scanner=(_arg0); end + + # Split the tokens into parts of the given +sizes+. + # + # The result will be an Array of Tokens objects. The parts have + # the text size specified by the parameter. In addition, each + # part closes all opened tokens. This is useful to insert tokens + # betweem them. + # + # This method is used by @Scanner#tokenize@ when called with an Array + # of source strings. The Diff encoder uses it for inline highlighting. + # + # source://coderay//lib/coderay/tokens.rb#85 def split_into_parts(*sizes); end + def text_token(*_arg0); end + + # Turn tokens into a string by concatenating them. + # + # source://coderay//lib/coderay/tokens.rb#62 def to_s; end + def tokens(*_arg0); end end +# The result of a scan operation is a TokensProxy, but should act like Tokens. +# +# This proxy makes it possible to use the classic CodeRay.scan.encode API +# while still providing the benefits of direct streaming. +# +# source://coderay//lib/coderay/tokens_proxy.rb#7 class CodeRay::TokensProxy + # Create a new TokensProxy with the arguments of CodeRay.scan. + # + # @return [TokensProxy] a new instance of TokensProxy + # + # source://coderay//lib/coderay/tokens_proxy.rb#12 def initialize(input, lang, options = T.unsafe(nil), block = T.unsafe(nil)); end + # Returns the value of attribute block. + # + # source://coderay//lib/coderay/tokens_proxy.rb#9 def block; end + + # Sets the attribute block + # + # @param value the value to set the attribute block to. + # + # source://coderay//lib/coderay/tokens_proxy.rb#9 def block=(_arg0); end + + # Overwrite Struct#each. + # + # source://coderay//lib/coderay/tokens_proxy.rb#48 def each(*args, &blk); end + + # Call CodeRay.encode if +encoder+ is a Symbol; + # otherwise, convert the receiver to tokens and call encoder.encode_tokens. + # + # source://coderay//lib/coderay/tokens_proxy.rb#21 def encode(encoder, options = T.unsafe(nil)); end + + # Returns the value of attribute input. + # + # source://coderay//lib/coderay/tokens_proxy.rb#9 def input; end + + # Sets the attribute input + # + # @param value the value to set the attribute input to. + # + # source://coderay//lib/coderay/tokens_proxy.rb#9 def input=(_arg0); end + + # Returns the value of attribute lang. + # + # source://coderay//lib/coderay/tokens_proxy.rb#9 def lang; end + + # Sets the attribute lang + # + # @param value the value to set the attribute lang to. + # + # source://coderay//lib/coderay/tokens_proxy.rb#9 def lang=(_arg0); end + + # Tries to call encode; + # delegates to tokens otherwise. + # + # source://coderay//lib/coderay/tokens_proxy.rb#31 def method_missing(method, *args, &blk); end + + # Returns the value of attribute options. + # + # source://coderay//lib/coderay/tokens_proxy.rb#9 def options; end + + # Sets the attribute options + # + # @param value the value to set the attribute options to. + # + # source://coderay//lib/coderay/tokens_proxy.rb#9 def options=(_arg0); end + + # A (cached) scanner instance to use for the scan task. + # + # source://coderay//lib/coderay/tokens_proxy.rb#43 def scanner; end + + # The (cached) result of the tokenized input; a Tokens instance. + # + # source://coderay//lib/coderay/tokens_proxy.rb#38 def tokens; end end +# source://coderay//lib/coderay/version.rb#2 CodeRay::VERSION = T.let(T.unsafe(nil), String) +# = WordList +# +# A Hash subclass designed for mapping word lists to token types. +# +# A WordList is a Hash with some additional features. +# It is intended to be used for keyword recognition. +# +# WordList is optimized to be used in Scanners, +# typically to decide whether a given ident is a special token. +# +# For case insensitive words use WordList::CaseIgnoring. +# +# Example: +# +# # define word arrays +# RESERVED_WORDS = %w[ +# asm break case continue default do else +# ] +# +# PREDEFINED_TYPES = %w[ +# int long short char void +# ] +# +# # make a WordList +# IDENT_KIND = WordList.new(:ident). +# add(RESERVED_WORDS, :reserved). +# add(PREDEFINED_TYPES, :predefined_type) +# +# ... +# +# def scan_tokens tokens, options +# ... +# +# elsif scan(/[A-Za-z_][A-Za-z_0-9]*/) +# # use it +# kind = IDENT_KIND[match] +# ... +# +# source://coderay//lib/coderay/helpers/word_list.rb#40 class CodeRay::WordList < ::Hash + # Create a new WordList with +default+ as default value. + # + # @return [WordList] a new instance of WordList + # + # source://coderay//lib/coderay/helpers/word_list.rb#43 def initialize(default = T.unsafe(nil)); end + # Add words to the list and associate them with +value+. + # + # Returns +self+, so you can concat add calls. + # + # source://coderay//lib/coderay/helpers/word_list.rb#50 def add(words, value = T.unsafe(nil)); end end +# A CaseIgnoring WordList is like a WordList, only that +# keys are compared case-insensitively (normalizing keys using +downcase+). +# +# source://coderay//lib/coderay/helpers/word_list.rb#60 class CodeRay::WordList::CaseIgnoring < ::CodeRay::WordList + # source://coderay//lib/coderay/helpers/word_list.rb#62 def [](key); end + + # source://coderay//lib/coderay/helpers/word_list.rb#66 def []=(key, value); end end diff --git a/Library/Homebrew/sorbet/rbi/gems/commander@4.6.0.rbi b/Library/Homebrew/sorbet/rbi/gems/commander@4.6.0.rbi index a0da6d393ca4a7..79579a361a3b4b 100644 --- a/Library/Homebrew/sorbet/rbi/gems/commander@4.6.0.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/commander@4.6.0.rbi @@ -4,265 +4,1241 @@ # This is an autogenerated file for types exported from the `commander` gem. # Please instead update this file by running `bin/tapioca gem commander`. -::RUBY19 = T.let(T.unsafe(nil), TrueClass) +# source://commander//lib/commander/core_ext/array.rb#3 +class Array + include ::Enumerable + class << self + # Split _string_ into an array. Used in + # conjunction with HighLine's #ask, or #ask_for_array + # methods, which must respond to #parse. + # + # This method allows escaping of whitespace. For example + # the arguments foo bar\ baz will become ['foo', 'bar baz'] + # + # === Example + # + # # ask invokes Array#parse + # list = ask 'Favorite cookies:', Array + # + # # or use ask_for_CLASS + # list = ask_for_array 'Favorite cookies: ' + # + # source://commander//lib/commander/core_ext/array.rb#21 + def parse(string); end + end +end + +# source://commander//lib/commander/blank.rb#3 module Blank class << self + # @private + # + # source://commander//lib/commander/blank.rb#4 def included(base); end end end +# source://commander//lib/commander/version.rb#3 module Commander private + # source://commander//lib/commander/configure.rb#4 def configure(*configuration_opts, &configuration_block); end class << self + # source://commander//lib/commander/configure.rb#4 def configure(*configuration_opts, &configuration_block); end end end +# source://commander//lib/commander/command.rb#6 class Commander::Command + # Initialize new command with specified _name_. + # + # @return [Command] a new instance of Command + # + # source://commander//lib/commander/command.rb#40 def initialize(name); end + # Handle execution of command. The handler may be a class, + # object, or block (see examples below). + # + # === Examples + # + # # Simple block handling + # c.when_called do |args, options| + # # do something + # end + # + # # Create inst of Something and pass args / options + # c.when_called MyLib::Command::Something + # + # # Create inst of Something and use arbitrary method + # c.when_called MyLib::Command::Something, :some_method + # + # # Pass an object to handle callback (requires method symbol) + # c.when_called SomeObject, :some_method + # + # source://commander//lib/commander/command.rb#142 def action(*args, &block); end + + # Call the commands when_called block with _args_. + # + # source://commander//lib/commander/command.rb#181 def call(args = T.unsafe(nil)); end + + # Returns the value of attribute description. + # + # source://commander//lib/commander/command.rb#7 def description; end + + # Sets the attribute description + # + # @param value the value to set the attribute description to. + # + # source://commander//lib/commander/command.rb#7 def description=(_arg0); end + + # Add a usage example for this command. + # + # Usage examples are later displayed in help documentation + # created by the help formatters. + # + # === Examples + # + # command :something do |c| + # c.example "Should do something", "my_command something" + # end + # + # source://commander//lib/commander/command.rb#59 def example(description, command); end + + # Returns the value of attribute examples. + # + # source://commander//lib/commander/command.rb#7 def examples; end + + # Sets the attribute examples + # + # @param value the value to set the attribute examples to. + # + # source://commander//lib/commander/command.rb#7 def examples=(_arg0); end + + # Returns the value of attribute global_options. + # + # source://commander//lib/commander/command.rb#8 def global_options; end + + # source://commander//lib/commander/command.rb#215 def inspect; end + + # Returns the value of attribute name. + # + # source://commander//lib/commander/command.rb#7 def name; end + + # Sets the attribute name + # + # @param value the value to set the attribute name to. + # + # source://commander//lib/commander/command.rb#7 def name=(_arg0); end + + # Add an option. + # + # Options are parsed via OptionParser so view it + # for additional usage documentation. A block may optionally be + # passed to handle the option, otherwise the _options_ struct seen below + # contains the results of this option. This handles common formats such as: + # + # -h, --help options.help # => bool + # --[no-]feature options.feature # => bool + # --large-switch options.large_switch # => bool + # --file FILE options.file # => file passed + # --list WORDS options.list # => array + # --date [DATE] options.date # => date or nil when optional argument not set + # + # === Examples + # + # command :something do |c| + # c.option '--recursive', 'Do something recursively' + # c.option '--file FILE', 'Specify a file' + # c.option('--info', 'Display info') { puts "handle with block" } + # c.option '--[no-]feature', 'With or without feature' + # c.option '--list FILES', Array, 'List the files specified' + # + # c.when_called do |args, options| + # do_something_recursively if options.recursive + # do_something_with_file options.file if options.file + # end + # end + # + # === Help Formatters + # + # This method also parses the arguments passed in order to determine + # which were switches, and which were descriptions for the + # option which can later be used within help formatters + # using option[:switches] and option[:description]. + # + # === Input Parsing + # + # Since Commander utilizes OptionParser you can pre-parse and evaluate + # option arguments. Simply require 'optparse/time', or 'optparse/date', as these + # objects must respond to #parse. + # + # c.option '--time TIME', Time + # c.option '--date [DATE]', Date + # + # source://commander//lib/commander/command.rb#110 def option(*args, &block); end + + # Option proxy proc used when a block is not explicitly passed + # via the #option method. This allows commander to auto-populate + # and work with option values. + # + # source://commander//lib/commander/command.rb#211 def option_proc(switches); end + + # Returns the value of attribute options. + # + # source://commander//lib/commander/command.rb#7 def options; end + + # Sets the attribute options + # + # @param value the value to set the attribute options to. + # + # source://commander//lib/commander/command.rb#7 def options=(_arg0); end + + # Parses options and calls associated procs, + # returning the arguments remaining. + # + # source://commander//lib/commander/command.rb#166 def parse_options_and_call_procs(*args); end + + # Creates an Options instance populated with the option values + # collected by the #option_proc. + # + # source://commander//lib/commander/command.rb#197 def proxy_option_struct; end + + # Returns the value of attribute proxy_options. + # + # source://commander//lib/commander/command.rb#7 def proxy_options; end + + # Sets the attribute proxy_options + # + # @param value the value to set the attribute proxy_options to. + # + # source://commander//lib/commander/command.rb#7 def proxy_options=(_arg0); end + + # Run the command with _args_. + # + # * parses options, call option blocks + # * invokes when_called proc + # + # source://commander//lib/commander/command.rb#156 def run(*args); end + + # Returns the value of attribute summary. + # + # source://commander//lib/commander/command.rb#7 def summary; end + + # Sets the attribute summary + # + # @param value the value to set the attribute summary to. + # + # source://commander//lib/commander/command.rb#7 def summary=(_arg0); end + + # Returns the value of attribute syntax. + # + # source://commander//lib/commander/command.rb#7 def syntax; end + + # Sets the attribute syntax + # + # @param value the value to set the attribute syntax to. + # + # source://commander//lib/commander/command.rb#7 def syntax=(_arg0); end + + # Handle execution of command. The handler may be a class, + # object, or block (see examples below). + # + # === Examples + # + # # Simple block handling + # c.when_called do |args, options| + # # do something + # end + # + # # Create inst of Something and pass args / options + # c.when_called MyLib::Command::Something + # + # # Create inst of Something and use arbitrary method + # c.when_called MyLib::Command::Something, :some_method + # + # # Pass an object to handle callback (requires method symbol) + # c.when_called SomeObject, :some_method + # + # source://commander//lib/commander/command.rb#142 def when_called(*args, &block); end end +# Options struct. +# +# source://commander//lib/commander/command.rb#13 class Commander::Command::Options include ::Blank + # @return [Options] a new instance of Options + # + # source://commander//lib/commander/command.rb#16 def initialize; end + # source://commander//lib/commander/command.rb#20 def __hash__; end + + # source://commander//lib/commander/command.rb#28 def default(defaults = T.unsafe(nil)); end + + # source://commander//lib/commander/command.rb#32 def inspect; end + + # source://commander//lib/commander/command.rb#24 def method_missing(meth, *args); end end +# source://commander//lib/commander/delegates.rb#4 module Commander::Delegates + # source://commander//lib/commander/delegates.rb#17 def add_command(*args, &block); end + + # source://commander//lib/commander/delegates.rb#17 def alias_command(*args, &block); end + + # source://commander//lib/commander/delegates.rb#17 def always_trace!(*args, &block); end + + # source://commander//lib/commander/delegates.rb#17 def command(*args, &block); end + + # source://commander//lib/commander/delegates.rb#17 def default_command(*args, &block); end + + # source://commander//lib/commander/delegates.rb#23 def defined_commands(*args, &block); end + + # source://commander//lib/commander/delegates.rb#17 def global_option(*args, &block); end + + # source://commander//lib/commander/delegates.rb#17 def never_trace!(*args, &block); end + + # source://commander//lib/commander/delegates.rb#17 def program(*args, &block); end + + # source://commander//lib/commander/delegates.rb#17 def run!(*args, &block); end end +# = Help Formatter +# +# Commander's help formatters control the output when +# either the help command, or --help switch are called. +# The default formatter is Commander::HelpFormatter::Terminal. +# +# source://commander//lib/commander/help_formatters.rb#4 module Commander::HelpFormatter private + # source://commander//lib/commander/help_formatters.rb#47 def indent(amount, text); end class << self + # source://commander//lib/commander/help_formatters.rb#47 def indent(amount, text); end end end +# source://commander//lib/commander/help_formatters/base.rb#12 class Commander::HelpFormatter::Base + # @return [Base] a new instance of Base + # + # source://commander//lib/commander/help_formatters/base.rb#13 def initialize(runner); end + # source://commander//lib/commander/help_formatters/base.rb#17 def render; end + + # source://commander//lib/commander/help_formatters/base.rb#21 def render_command(command); end end +# source://commander//lib/commander/help_formatters.rb#9 class Commander::HelpFormatter::Context + # @return [Context] a new instance of Context + # + # source://commander//lib/commander/help_formatters.rb#10 def initialize(target); end + # No-op, override in subclasses. + # + # source://commander//lib/commander/help_formatters.rb#21 def decorate_binding(_bind); end + + # source://commander//lib/commander/help_formatters.rb#14 def get_binding; end end +# source://commander//lib/commander/help_formatters.rb#25 class Commander::HelpFormatter::ProgramContext < ::Commander::HelpFormatter::Context + # source://commander//lib/commander/help_formatters.rb#26 def decorate_binding(bind); end + + # source://commander//lib/commander/help_formatters.rb#35 def max_aliases_length(bind); end + + # source://commander//lib/commander/help_formatters.rb#31 def max_command_length(bind); end + + # source://commander//lib/commander/help_formatters.rb#39 def max_key_length(hash, default = T.unsafe(nil)); end end +# source://commander//lib/commander/help_formatters/terminal.rb#7 class Commander::HelpFormatter::Terminal < ::Commander::HelpFormatter::Base + # source://commander//lib/commander/help_formatters/terminal.rb#8 def render; end + + # source://commander//lib/commander/help_formatters/terminal.rb#12 def render_command(command); end + + # source://commander//lib/commander/help_formatters/terminal.rb#16 def template(name); end end +# source://commander//lib/commander/help_formatters/terminal_compact.rb#7 class Commander::HelpFormatter::TerminalCompact < ::Commander::HelpFormatter::Terminal + # source://commander//lib/commander/help_formatters/terminal_compact.rb#8 def template(name); end end +# source://commander//lib/commander/methods.rb#4 module Commander::Methods include ::Commander::UI include ::Commander::UI::AskForClass include ::Commander::Delegates end +# source://commander//lib/commander/platform.rb#4 module Commander::Platform class << self + # @return [Boolean] + # + # source://commander//lib/commander/platform.rb#5 def jruby?; end end end +# source://commander//lib/commander/runner.rb#6 class Commander::Runner + # Initialize a new command runner. Optionally + # supplying _args_ for mocking, or arbitrary usage. + # + # @return [Runner] a new instance of Runner + # + # source://commander//lib/commander/runner.rb#21 def initialize(args = T.unsafe(nil)); end + # Get active command within arguments passed to this runner. + # + # source://commander//lib/commander/runner.rb#223 def active_command; end + + # Add a command object to this runner. + # + # source://commander//lib/commander/runner.rb#200 def add_command(command); end + + # Check if command _name_ is an alias. + # + # @return [Boolean] + # + # source://commander//lib/commander/runner.rb#207 def alias?(name); end + + # Alias command _name_ with _alias_name_. Optionally _args_ may be passed + # as if they were being passed straight to the original command via the command-line. + # + # source://commander//lib/commander/runner.rb#184 def alias_command(alias_name, name, *args); end + + # Enable tracing on all executions (bypasses --trace) + # + # source://commander//lib/commander/runner.rb#89 def always_trace!; end + + # Return arguments without the command name. + # + # source://commander//lib/commander/runner.rb#255 def args_without_command_name; end + + # Creates and yields a command instance when a block is passed. + # Otherwise attempts to return the command, raising InvalidCommandError when + # it does not exist. + # + # === Examples + # + # command :my_command do |c| + # c.when_called do |args| + # # Code + # end + # end + # + # @yield [add_command(Commander::Command.new(name))] + # + # source://commander//lib/commander/runner.rb#161 def command(name, &block); end + + # Check if a command _name_ exists. + # + # @return [Boolean] + # + # source://commander//lib/commander/runner.rb#214 def command_exists?(name); end + + # Attempts to locate a command name from within the arguments. + # Supports multi-word commands, using the largest possible match. + # Returns the default command, if no valid commands found in the args. + # + # source://commander//lib/commander/runner.rb#232 def command_name_from_args; end + + # Returns the value of attribute commands. + # + # source://commander//lib/commander/runner.rb#15 def commands; end + + # Creates default commands such as 'help' which is + # essentially the same as using the --help switch. + # + # source://commander//lib/commander/runner.rb#287 def create_default_commands; end + + # Default command _name_ to be used when no other + # command is found in the arguments. + # + # source://commander//lib/commander/runner.rb#193 def default_command(name); end + + # expand switches of the style '--[no-]blah' into both their + # '--blah' and '--no-blah' variants, so that they can be + # properly detected and removed + # + # source://commander//lib/commander/runner.rb#358 def expand_optionally_negative_switches(switches); end + + # Add a global option; follows the same syntax as Command#option + # This would be used for switches such as --version, --trace, etc. + # + # source://commander//lib/commander/runner.rb#170 def global_option(*args, &block); end + + # Returns a proc allowing for commands to inherit global options. + # This functionality works whether a block is present for the global + # option or not, so simple switches such as --verbose can be used + # without a block, and used throughout all commands. + # + # source://commander//lib/commander/runner.rb#393 def global_option_proc(switches, &block); end + + # Help formatter instance. + # + # source://commander//lib/commander/runner.rb#248 def help_formatter; end + + # Returns hash of help formatter alias defaults. + # + # source://commander//lib/commander/runner.rb#266 def help_formatter_alias_defaults; end + + # Returns the value of attribute help_formatter_aliases. + # + # source://commander//lib/commander/runner.rb#15 def help_formatter_aliases; end + + # Hide the trace option from the help menus and don't add it as a global option + # + # source://commander//lib/commander/runner.rb#97 def never_trace!; end + + # Returns the value of attribute options. + # + # source://commander//lib/commander/runner.rb#15 def options; end + + # Parse global command options. + # + # source://commander//lib/commander/runner.rb#372 def parse_global_options; end + + # source://commander//lib/commander/runner.rb#131 def program(key, *args, &block); end + + # Returns hash of program defaults. + # + # source://commander//lib/commander/runner.rb#275 def program_defaults; end + + # Removes global _options_ from _args_. This prevents an invalid + # option error from occurring when options are parsed + # again for the command. + # + # source://commander//lib/commander/runner.rb#322 def remove_global_options(options, args); end + + # Raises a CommandError when the program any of the _keys_ are not present, or empty. + # + # source://commander//lib/commander/runner.rb#405 def require_program(*keys); end + + # Raises InvalidCommandError when a _command_ is not found. + # + # source://commander//lib/commander/runner.rb#313 def require_valid_command(command = T.unsafe(nil)); end + + # Run command parsing and execution process. + # + # source://commander//lib/commander/runner.rb#40 def run!; end + + # Run the active command. + # + # source://commander//lib/commander/runner.rb#439 def run_active_command; end + + # source://commander//lib/commander/runner.rb#448 def say(*args); end + + # Returns array of valid command names found within _args_. + # + # source://commander//lib/commander/runner.rb#239 def valid_command_names_from(*args); end + + # Return program version. + # + # source://commander//lib/commander/runner.rb#82 def version; end private + # Attempts to locate a command name from within the provided arguments. + # Supports multi-word commands, using the largest possible match. + # + # source://commander//lib/commander/runner.rb#458 def longest_valid_command_name_from(args); end class << self + # Return singleton Runner instance. + # + # source://commander//lib/commander/runner.rb#33 def instance; end + + # Return switches and description separated from the _args_ passed. + # + # source://commander//lib/commander/runner.rb#414 def separate_switches_from_description(*args); end + + # Attempts to generate a method name symbol from +switch+. + # For example: + # + # -h # => :h + # --trace # => :trace + # --some-switch # => :some_switch + # --[no-]feature # => :feature + # --file FILE # => :file + # --list of,things # => :list + # + # source://commander//lib/commander/runner.rb#432 def switch_to_sym(switch); end end end +# -- +# Exceptions +# ++ +# +# source://commander//lib/commander/runner.rb#11 class Commander::Runner::CommandError < ::StandardError; end + +# source://commander//lib/commander/runner.rb#13 class Commander::Runner::InvalidCommandError < ::Commander::Runner::CommandError; end +# = User Interaction +# +# Commander's user interaction module mixes in common +# methods which extend HighLine's functionality such +# as a #password method rather than calling #ask directly. +# +# source://commander//lib/commander/user_interaction.rb#14 module Commander::UI private + # Execute apple _script_. + # + # source://commander//lib/commander/user_interaction.rb#193 def applescript(script); end + + # Prompt an editor for input. Optionally supply initial + # _input_ which is written to the editor. + # + # _preferred_editor_ can be hinted. + # + # === Examples + # + # ask_editor # => prompts EDITOR with no input + # ask_editor('foo') # => prompts EDITOR with default text of 'foo' + # ask_editor('foo', 'mate -w') # => prompts TextMate with default text of 'foo' + # + # source://commander//lib/commander/user_interaction.rb#256 def ask_editor(input = T.unsafe(nil), preferred_editor = T.unsafe(nil)); end + + # Find an editor available in path. Optionally supply the _preferred_ + # editor. Returns the name as a string, nil if none is available. + # + # source://commander//lib/commander/user_interaction.rb#237 def available_editor(preferred = T.unsafe(nil)); end + + # Choose from a set array of _choices_. + # + # source://commander//lib/commander/user_interaction.rb#43 def choose(message = T.unsafe(nil), *choices, &block); end + + # 'Say' something using the specified color + # + # === Examples + # color 'I am blue', :blue + # color 'I am bold', :bold + # color 'White on Red', :white, :on_red + # + # === Notes + # You may use: + # * color: black blue cyan green magenta red white yellow + # * style: blink bold clear underline + # * highligh: on_ + # + # source://commander//lib/commander/user_interaction.rb#117 def color(*args); end + + # Converse with speech recognition. + # + # Currently a "poorman's" DSL to utilize applescript and + # the MacOS speech recognition server. + # + # === Examples + # + # case converse 'What is the best food?', :cookies => 'Cookies', :unknown => 'Nothing' + # when :cookies + # speak 'o.m.g. you are awesome!' + # else + # case converse 'That is lame, shall I convince you cookies are the best?', :yes => 'Ok', :no => 'No', :maybe => 'Maybe another time' + # when :yes + # speak 'Well you see, cookies are just fantastic.' + # else + # speak 'Ok then, bye.' + # end + # end + # + # === Notes + # + # * MacOS only + # + # source://commander//lib/commander/user_interaction.rb#168 def converse(prompt, responses = T.unsafe(nil)); end + + # Enable paging of output after called. + # + # source://commander//lib/commander/user_interaction.rb#272 def enable_paging; end + + # Normalize IO streams, allowing for redirection of + # +input+ and/or +output+, for example: + # + # $ foo # => read from terminal I/O + # $ foo in # => read from 'in' file, output to terminal output stream + # $ foo in out # => read from 'in' file, output to 'out' file + # $ foo < in > out # => equivalent to above (essentially) + # + # Optionally a +block+ may be supplied, in which case + # IO will be reset once the block has executed. + # + # === Examples + # + # command :foo do |c| + # c.syntax = 'foo [input] [output]' + # c.when_called do |args, options| + # # or io(args.shift, args.shift) + # io *args + # str = $stdin.gets + # puts 'input was: ' + str.inspect + # end + # end + # + # source://commander//lib/commander/user_interaction.rb#222 def io(input = T.unsafe(nil), output = T.unsafe(nil), &block); end + + # 'Log' an _action_ to the terminal. This is typically used + # for verbose output regarding actions performed. For example: + # + # create path/to/file.rb + # remove path/to/old_file.rb + # remove path/to/old_file2.rb + # + # source://commander//lib/commander/user_interaction.rb#57 def log(action, *args); end + + # Ask the user for a password. Specify a custom + # _message_ other than 'Password: ' or override the + # default _mask_ of '*'. + # + # source://commander//lib/commander/user_interaction.rb#34 def password(message = T.unsafe(nil), mask = T.unsafe(nil)); end + + # Output progress while iterating _arr_. + # + # === Examples + # + # uris = %w( http://vision-media.ca http://google.com ) + # progress uris, :format => "Remaining: :time_remaining" do |uri| + # res = open uri + # end + # + # source://commander//lib/commander/user_interaction.rb#316 def progress(arr, options = T.unsafe(nil)); end + + # Substitute _hash_'s keys with their associated values in _str_. + # + # source://commander//lib/commander/user_interaction.rb#376 def replace_tokens(str, hash); end + + # 'Say' something using the ERROR color (red). + # + # === Examples + # say_error 'Everything is not fine' + # say_error 'It is not ok', 'This is not ok too' + # + # source://commander//lib/commander/user_interaction.rb#97 def say_error(*args); end + + # 'Say' something using the OK color (green). + # + # === Examples + # say_ok 'Everything is fine' + # say_ok 'It is ok', 'This is ok too' + # + # source://commander//lib/commander/user_interaction.rb#69 def say_ok(*args); end + + # 'Say' something using the WARNING color (yellow). + # + # === Examples + # say_warning 'This is a warning' + # say_warning 'Be careful', 'Think about it' + # + # source://commander//lib/commander/user_interaction.rb#83 def say_warning(*args); end + + # Speak _message_ using _voice_ at a speaking rate of _rate_ + # + # Voice defaults to 'Alex', which is one of the better voices. + # Speaking rate defaults to 175 words per minute + # + # === Examples + # + # speak 'What is your favorite food? ' + # food = ask 'favorite food?: ' + # speak "Wow, I like #{food} too. We have so much in common." + # speak "I like #{food} as well!", "Victoria", 190 + # + # === Notes + # + # * MacOS only + # + # source://commander//lib/commander/user_interaction.rb#139 def speak(message, voice = T.unsafe(nil), rate = T.unsafe(nil)); end class << self + # Execute apple _script_. + # + # source://commander//lib/commander/user_interaction.rb#193 def applescript(script); end + + # Prompt an editor for input. Optionally supply initial + # _input_ which is written to the editor. + # + # _preferred_editor_ can be hinted. + # + # === Examples + # + # ask_editor # => prompts EDITOR with no input + # ask_editor('foo') # => prompts EDITOR with default text of 'foo' + # ask_editor('foo', 'mate -w') # => prompts TextMate with default text of 'foo' + # + # source://commander//lib/commander/user_interaction.rb#256 def ask_editor(input = T.unsafe(nil), preferred_editor = T.unsafe(nil)); end + + # Find an editor available in path. Optionally supply the _preferred_ + # editor. Returns the name as a string, nil if none is available. + # + # source://commander//lib/commander/user_interaction.rb#237 def available_editor(preferred = T.unsafe(nil)); end + + # Choose from a set array of _choices_. + # + # source://commander//lib/commander/user_interaction.rb#43 def choose(message = T.unsafe(nil), *choices, &block); end + + # 'Say' something using the specified color + # + # === Examples + # color 'I am blue', :blue + # color 'I am bold', :bold + # color 'White on Red', :white, :on_red + # + # === Notes + # You may use: + # * color: black blue cyan green magenta red white yellow + # * style: blink bold clear underline + # * highligh: on_ + # + # source://commander//lib/commander/user_interaction.rb#117 def color(*args); end + + # Converse with speech recognition. + # + # Currently a "poorman's" DSL to utilize applescript and + # the MacOS speech recognition server. + # + # === Examples + # + # case converse 'What is the best food?', :cookies => 'Cookies', :unknown => 'Nothing' + # when :cookies + # speak 'o.m.g. you are awesome!' + # else + # case converse 'That is lame, shall I convince you cookies are the best?', :yes => 'Ok', :no => 'No', :maybe => 'Maybe another time' + # when :yes + # speak 'Well you see, cookies are just fantastic.' + # else + # speak 'Ok then, bye.' + # end + # end + # + # === Notes + # + # * MacOS only + # + # source://commander//lib/commander/user_interaction.rb#168 def converse(prompt, responses = T.unsafe(nil)); end + + # Enable paging of output after called. + # + # source://commander//lib/commander/user_interaction.rb#272 def enable_paging; end + + # Normalize IO streams, allowing for redirection of + # +input+ and/or +output+, for example: + # + # $ foo # => read from terminal I/O + # $ foo in # => read from 'in' file, output to terminal output stream + # $ foo in out # => read from 'in' file, output to 'out' file + # $ foo < in > out # => equivalent to above (essentially) + # + # Optionally a +block+ may be supplied, in which case + # IO will be reset once the block has executed. + # + # === Examples + # + # command :foo do |c| + # c.syntax = 'foo [input] [output]' + # c.when_called do |args, options| + # # or io(args.shift, args.shift) + # io *args + # str = $stdin.gets + # puts 'input was: ' + str.inspect + # end + # end + # + # source://commander//lib/commander/user_interaction.rb#222 def io(input = T.unsafe(nil), output = T.unsafe(nil), &block); end + + # 'Log' an _action_ to the terminal. This is typically used + # for verbose output regarding actions performed. For example: + # + # create path/to/file.rb + # remove path/to/old_file.rb + # remove path/to/old_file2.rb + # + # source://commander//lib/commander/user_interaction.rb#57 def log(action, *args); end + + # Ask the user for a password. Specify a custom + # _message_ other than 'Password: ' or override the + # default _mask_ of '*'. + # + # source://commander//lib/commander/user_interaction.rb#34 def password(message = T.unsafe(nil), mask = T.unsafe(nil)); end + + # Output progress while iterating _arr_. + # + # === Examples + # + # uris = %w( http://vision-media.ca http://google.com ) + # progress uris, :format => "Remaining: :time_remaining" do |uri| + # res = open uri + # end + # + # source://commander//lib/commander/user_interaction.rb#316 def progress(arr, options = T.unsafe(nil)); end + + # Substitute _hash_'s keys with their associated values in _str_. + # + # source://commander//lib/commander/user_interaction.rb#376 def replace_tokens(str, hash); end + + # 'Say' something using the ERROR color (red). + # + # === Examples + # say_error 'Everything is not fine' + # say_error 'It is not ok', 'This is not ok too' + # + # source://commander//lib/commander/user_interaction.rb#97 def say_error(*args); end + + # 'Say' something using the OK color (green). + # + # === Examples + # say_ok 'Everything is fine' + # say_ok 'It is ok', 'This is ok too' + # + # source://commander//lib/commander/user_interaction.rb#69 def say_ok(*args); end + + # 'Say' something using the WARNING color (yellow). + # + # === Examples + # say_warning 'This is a warning' + # say_warning 'Be careful', 'Think about it' + # + # source://commander//lib/commander/user_interaction.rb#83 def say_warning(*args); end + + # Speak _message_ using _voice_ at a speaking rate of _rate_ + # + # Voice defaults to 'Alex', which is one of the better voices. + # Speaking rate defaults to 175 words per minute + # + # === Examples + # + # speak 'What is your favorite food? ' + # food = ask 'favorite food?: ' + # speak "Wow, I like #{food} too. We have so much in common." + # speak "I like #{food} as well!", "Victoria", 190 + # + # === Notes + # + # * MacOS only + # + # source://commander//lib/commander/user_interaction.rb#139 def speak(message, voice = T.unsafe(nil), rate = T.unsafe(nil)); end end end +# Implements ask_for_CLASS methods. +# +# source://commander//lib/commander/user_interaction.rb#325 module Commander::UI::AskForClass + # source://commander//lib/commander/user_interaction.rb#330 def ask_for_array(prompt); end + + # source://commander//lib/commander/user_interaction.rb#330 def ask_for_file(prompt); end + + # source://commander//lib/commander/user_interaction.rb#330 def ask_for_float(prompt); end + + # source://commander//lib/commander/user_interaction.rb#330 def ask_for_integer(prompt); end + + # source://commander//lib/commander/user_interaction.rb#330 def ask_for_pathname(prompt); end + + # source://commander//lib/commander/user_interaction.rb#330 def ask_for_regexp(prompt); end + + # source://commander//lib/commander/user_interaction.rb#330 def ask_for_string(prompt); end + + # source://commander//lib/commander/user_interaction.rb#330 def ask_for_symbol(prompt); end + + # source://commander//lib/commander/user_interaction.rb#335 def method_missing(method_name, *arguments, &block); end private + # @return [Boolean] + # + # source://commander//lib/commander/user_interaction.rb#368 def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end end +# source://commander//lib/commander/user_interaction.rb#326 Commander::UI::AskForClass::DEPRECATED_CONSTANTS = T.let(T.unsafe(nil), Array) +# = Progress Bar +# +# Terminal progress bar utility. In its most basic form +# requires that the developer specifies when the bar should +# be incremented. Note that a hash of tokens may be passed to +# #increment, (or returned when using Object#progress). +# +# uris = %w( +# http://vision-media.ca +# http://yahoo.com +# http://google.com +# ) +# +# bar = Commander::UI::ProgressBar.new uris.length, options +# threads = [] +# uris.each do |uri| +# threads << Thread.new do +# begin +# res = open uri +# bar.increment :uri => uri +# rescue Exception => e +# bar.increment :uri => "#{uri} failed" +# end +# end +# end +# threads.each { |t| t.join } +# +# The Object method #progress is also available: +# +# progress uris, :width => 10 do |uri| +# res = open uri +# { :uri => uri } # Can now use :uri within :format option +# end +# +# source://commander//lib/commander/user_interaction.rb#418 class Commander::UI::ProgressBar + # Creates a new progress bar. + # + # === Options + # + # :title Title, defaults to "Progress" + # :width Width of :progress_bar + # :progress_str Progress string, defaults to "=" + # :incomplete_str Incomplete bar string, defaults to '.' + # :format Defaults to ":title |:progress_bar| :percent_complete% complete " + # :tokens Additional tokens replaced within the format string + # :complete_message Defaults to "Process complete" + # + # === Tokens + # + # :title + # :percent_complete + # :progress_bar + # :step + # :steps_remaining + # :total_steps + # :time_elapsed + # :time_remaining + # + # @return [ProgressBar] a new instance of ProgressBar + # + # source://commander//lib/commander/user_interaction.rb#444 def initialize(total, options = T.unsafe(nil)); end + # Whether or not the operation has completed. + # + # @return [Boolean] + # + # source://commander//lib/commander/user_interaction.rb#534 def completed?; end + + # Erase previous terminal line. + # + # source://commander//lib/commander/user_interaction.rb#551 def erase_line; end + + # Whether or not the operation is complete, and we have finished. + # + # @return [Boolean] + # + # source://commander//lib/commander/user_interaction.rb#527 def finished?; end + + # Generates tokens for this step. + # + # source://commander//lib/commander/user_interaction.rb#497 def generate_tokens; end + + # Increment progress. Optionally pass _tokens_ which + # can be displayed in the output format. + # + # source://commander//lib/commander/user_interaction.rb#542 def increment(tokens = T.unsafe(nil)); end + + # Completion percentage. + # + # source://commander//lib/commander/user_interaction.rb#458 def percent_complete; end + + # Formatted progress bar. + # + # source://commander//lib/commander/user_interaction.rb#490 def progress_bar; end + + # Output the progress bar. + # + # source://commander//lib/commander/user_interaction.rb#513 def show; end + + # Number of steps left. + # + # source://commander//lib/commander/user_interaction.rb#483 def steps_remaining; end + + # Time that has elapsed since the operation started. + # + # source://commander//lib/commander/user_interaction.rb#469 def time_elapsed; end + + # Estimated time remaining. + # + # source://commander//lib/commander/user_interaction.rb#476 def time_remaining; end end +# source://commander//lib/commander/version.rb#4 Commander::VERSION = T.let(T.unsafe(nil), String) +# source://commander//lib/commander/core_ext/object.rb#3 class Object < ::BasicObject - include ::ActiveSupport::ToJsonWithActiveSupportEncoder include ::ActiveSupport::ForkTracker::CoreExt - include ::ActiveSupport::ForkTracker::CoreExtPrivate include ::Kernel - include ::JSON::Ext::Generator::GeneratorMethods::Object include ::PP::ObjectMixin - include ::ActiveSupport::Dependencies::Loadable - include ::ActiveSupport::Tryable + # Return the current binding. + # + # source://commander//lib/commander/core_ext/object.rb#7 def get_binding; end end diff --git a/Library/Homebrew/sorbet/rbi/gems/concurrent-ruby@1.2.2.rbi b/Library/Homebrew/sorbet/rbi/gems/concurrent-ruby@1.2.2.rbi index 12a0de6c9c46db..95c9a8e091884d 100644 --- a/Library/Homebrew/sorbet/rbi/gems/concurrent-ruby@1.2.2.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/concurrent-ruby@1.2.2.rbi @@ -4,6 +4,9 @@ # This is an autogenerated file for types exported from the `concurrent-ruby` gem. # Please instead update this file by running `bin/tapioca gem concurrent-ruby`. +# {include:file:README.md} +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/constants.rb#1 module Concurrent extend ::Concurrent::Utility::EngineDetector extend ::Concurrent::Utility::NativeExtensionLoader @@ -13,525 +16,3115 @@ module Concurrent private + # Abort a currently running transaction - see `Concurrent::atomically`. + # + # @raise [Transaction::AbortError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#139 def abort_transaction; end + + # Run a block that reads and writes `TVar`s as a single atomic transaction. + # With respect to the value of `TVar` objects, the transaction is atomic, in + # that it either happens or it does not, consistent, in that the `TVar` + # objects involved will never enter an illegal state, and isolated, in that + # transactions never interfere with each other. You may recognise these + # properties from database transactions. + # + # There are some very important and unusual semantics that you must be aware of: + # + # * Most importantly, the block that you pass to atomically may be executed + # more than once. In most cases your code should be free of + # side-effects, except for via TVar. + # + # * If an exception escapes an atomically block it will abort the transaction. + # + # * It is undefined behaviour to use callcc or Fiber with atomically. + # + # * If you create a new thread within an atomically, it will not be part of + # the transaction. Creating a thread counts as a side-effect. + # + # Transactions within transactions are flattened to a single transaction. + # + # @example + # a = new TVar(100_000) + # b = new TVar(100) + # + # Concurrent::atomically do + # a.value -= 10 + # b.value += 10 + # end + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#82 def atomically; end + + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#56 def call_dataflow(method, executor, *inputs, &block); end + + # Dataflow allows you to create a task that will be scheduled when all of its data dependencies are available. + # {include:file:docs-source/dataflow.md} + # + # @param inputs [Future] zero or more `Future` operations that this dataflow depends upon + # @raise [ArgumentError] if no block is given + # @raise [ArgumentError] if any of the inputs are not `IVar`s + # @return [Object] the result of all the operations + # @yield The operation to perform once all the dependencies are met + # @yieldparam inputs [Future] each of the `Future` inputs to the dataflow + # @yieldreturn [Object] the result of the block operation + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#34 def dataflow(*inputs, &block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#44 def dataflow!(*inputs, &block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#39 def dataflow_with(executor, *inputs, &block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#49 def dataflow_with!(executor, *inputs, &block); end + + # Leave a transaction without committing or aborting - see `Concurrent::atomically`. + # + # @raise [Transaction::LeaveError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#144 def leave_transaction; end + + # Returns the current time as tracked by the application monotonic clock. + # + # @param unit [Symbol] the time unit to be returned, can be either + # :float_second, :float_millisecond, :float_microsecond, :second, + # :millisecond, :microsecond, or :nanosecond default to :float_second. + # @return [Float] The current monotonic time since some unspecified + # starting point + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/monotonic_time.rb#15 def monotonic_time(unit = T.unsafe(nil)); end class << self + # Abort a currently running transaction - see `Concurrent::atomically`. + # + # @raise [Transaction::AbortError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#139 def abort_transaction; end + + # Run a block that reads and writes `TVar`s as a single atomic transaction. + # With respect to the value of `TVar` objects, the transaction is atomic, in + # that it either happens or it does not, consistent, in that the `TVar` + # objects involved will never enter an illegal state, and isolated, in that + # transactions never interfere with each other. You may recognise these + # properties from database transactions. + # + # There are some very important and unusual semantics that you must be aware of: + # + # * Most importantly, the block that you pass to atomically may be executed + # more than once. In most cases your code should be free of + # side-effects, except for via TVar. + # + # * If an exception escapes an atomically block it will abort the transaction. + # + # * It is undefined behaviour to use callcc or Fiber with atomically. + # + # * If you create a new thread within an atomically, it will not be part of + # the transaction. Creating a thread counts as a side-effect. + # + # Transactions within transactions are flattened to a single transaction. + # + # @example + # a = new TVar(100_000) + # b = new TVar(100) + # + # Concurrent::atomically do + # a.value -= 10 + # b.value += 10 + # end + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#82 def atomically; end + + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#56 def call_dataflow(method, executor, *inputs, &block); end + + # @return [Logger] Logger with provided level and output. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#37 def create_simple_logger(level = T.unsafe(nil), output = T.unsafe(nil)); end + + # @deprecated + # @return [Logger] Logger with provided level and output. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#69 def create_stdlib_logger(level = T.unsafe(nil), output = T.unsafe(nil)); end + + # Dataflow allows you to create a task that will be scheduled when all of its data dependencies are available. + # {include:file:docs-source/dataflow.md} + # + # @param inputs [Future] zero or more `Future` operations that this dataflow depends upon + # @raise [ArgumentError] if no block is given + # @raise [ArgumentError] if any of the inputs are not `IVar`s + # @return [Object] the result of all the operations + # @yield The operation to perform once all the dependencies are met + # @yieldparam inputs [Future] each of the `Future` inputs to the dataflow + # @yieldreturn [Object] the result of the block operation + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#34 def dataflow(*inputs, &block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#44 def dataflow!(*inputs, &block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#39 def dataflow_with(executor, *inputs, &block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#49 def dataflow_with!(executor, *inputs, &block); end + + # Disables AtExit handlers including pool auto-termination handlers. + # When disabled it will be the application programmer's responsibility + # to ensure that the handlers are shutdown properly prior to application + # exit by calling `AtExit.run` method. + # + # @deprecated Has no effect since it is no longer needed, see https://github.com/ruby-concurrency/concurrent-ruby/pull/841. + # @note this option should be needed only because of `at_exit` ordering + # issues which may arise when running some of the testing frameworks. + # E.g. Minitest's test-suite runs itself in `at_exit` callback which + # executes after the pools are already terminated. Then auto termination + # needs to be disabled and called manually after test-suite ends. + # @note This method should *never* be called + # from within a gem. It should *only* be used from within the main + # application and even then it should be used only when necessary. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#48 def disable_at_exit_handlers!; end + + # General access point to global executors. + # + # @param executor_identifier [Symbol, Executor] symbols: + # - :fast - {Concurrent.global_fast_executor} + # - :io - {Concurrent.global_io_executor} + # - :immediate - {Concurrent.global_immediate_executor} + # @return [Executor] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#83 def executor(executor_identifier); end + + # Global thread pool optimized for short, fast *operations*. + # + # @return [ThreadPoolExecutor] the thread pool + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#55 def global_fast_executor; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#66 def global_immediate_executor; end + + # Global thread pool optimized for long, blocking (IO) *tasks*. + # + # @return [ThreadPoolExecutor] the thread pool + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#62 def global_io_executor; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#109 def global_logger; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#113 def global_logger=(value); end + + # Global thread pool user for global *timers*. + # + # @return [Concurrent::TimerSet] the thread pool + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#73 def global_timer_set; end + + # Leave a transaction without committing or aborting - see `Concurrent::atomically`. + # + # @raise [Transaction::LeaveError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#144 def leave_transaction; end + + # Returns the current time as tracked by the application monotonic clock. + # + # @param unit [Symbol] the time unit to be returned, can be either + # :float_second, :float_millisecond, :float_microsecond, :second, + # :millisecond, :microsecond, or :nanosecond default to :float_second. + # @return [Float] The current monotonic time since some unspecified + # starting point + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/monotonic_time.rb#15 def monotonic_time(unit = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/lock_local_var.rb#7 def mutex_owned_per_thread?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#87 def new_fast_executor(opts = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#98 def new_io_executor(opts = T.unsafe(nil)); end + + # Number of physical processor cores on the current system. For performance + # reasons the calculated value will be memoized on the first call. + # + # On Windows the Win32 API will be queried for the `NumberOfCores from + # Win32_Processor`. This will return the total number "of cores for the + # current instance of the processor." On Unix-like operating systems either + # the `hwprefs` or `sysctl` utility will be called in a subshell and the + # returned value will be used. In the rare case where none of these methods + # work or an exception is raised the function will simply return 1. + # + # @return [Integer] number physical processor cores on the current system + # @see https://github.com/grosser/parallel/blob/4fc8b89d08c7091fe0419ca8fba1ec3ce5a8d185/lib/parallel.rb + # @see http://msdn.microsoft.com/en-us/library/aa394373(v=vs.85).aspx + # @see http://www.unix.com/man-page/osx/1/HWPREFS/ + # @see http://linux.die.net/man/8/sysctl + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#107 def physical_processor_count; end + + # Number of processors seen by the OS and used for process scheduling. For + # performance reasons the calculated value will be memoized on the first + # call. + # + # When running under JRuby the Java runtime call + # `java.lang.Runtime.getRuntime.availableProcessors` will be used. According + # to the Java documentation this "value may change during a particular + # invocation of the virtual machine... [applications] should therefore + # occasionally poll this property." Subsequently the result will NOT be + # memoized under JRuby. + # + # Otherwise Ruby's Etc.nprocessors will be used. + # + # @return [Integer] number of processors seen by the OS or Java runtime + # @see http://docs.oracle.com/javase/6/docs/api/java/lang/Runtime.html#availableProcessors() + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#86 def processor_count; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#68 def processor_counter; end + + # Use logger created by #create_simple_logger to log concurrent-ruby messages. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#63 def use_simple_logger(level = T.unsafe(nil), output = T.unsafe(nil)); end + + # Use logger created by #create_stdlib_logger to log concurrent-ruby messages. + # + # @deprecated + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#96 def use_stdlib_logger(level = T.unsafe(nil), output = T.unsafe(nil)); end end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#38 class Concurrent::AbstractExchanger < ::Concurrent::Synchronization::Object + # @return [AbstractExchanger] a new instance of AbstractExchanger + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#44 def initialize; end + # Waits for another thread to arrive at this exchange point (unless the + # current thread is interrupted), and then transfers the given object to + # it, receiving its object in return. The timeout value indicates the + # approximate number of seconds the method should block while waiting + # for the exchange. When the timeout value is `nil` the method will + # block indefinitely. + # + # + # In some edge cases when a `timeout` is given a return value of `nil` may be + # ambiguous. Specifically, if `nil` is a valid value in the exchange it will + # be impossible to tell whether `nil` is the actual return value or if it + # signifies timeout. When `nil` is a valid value in the exchange consider + # using {#exchange!} or {#try_exchange} instead. + # + # @param value [Object] the value to exchange with another thread + # @param timeout [Numeric, nil] in seconds, `nil` blocks indefinitely + # @return [Object] the value exchanged by the other thread or `nil` on timeout + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#69 def exchange(value, timeout = T.unsafe(nil)); end + + # Waits for another thread to arrive at this exchange point (unless the + # current thread is interrupted), and then transfers the given object to + # it, receiving its object in return. The timeout value indicates the + # approximate number of seconds the method should block while waiting + # for the exchange. When the timeout value is `nil` the method will + # block indefinitely. + # + # + # On timeout a {Concurrent::TimeoutError} exception will be raised. + # + # @param value [Object] the value to exchange with another thread + # @param timeout [Numeric, nil] in seconds, `nil` blocks indefinitely + # @raise [Concurrent::TimeoutError] on timeout + # @return [Object] the value exchanged by the other thread + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#80 def exchange!(value, timeout = T.unsafe(nil)); end + + # Waits for another thread to arrive at this exchange point (unless the + # current thread is interrupted), and then transfers the given object to + # it, receiving its object in return. The timeout value indicates the + # approximate number of seconds the method should block while waiting + # for the exchange. When the timeout value is `nil` the method will + # block indefinitely. + # + # + # The return value will be a {Concurrent::Maybe} set to `Just` on success or + # `Nothing` on timeout. + # + # @example + # + # exchanger = Concurrent::Exchanger.new + # + # result = exchanger.exchange(:foo, 0.5) + # + # if result.just? + # puts result.value #=> :bar + # else + # puts 'timeout' + # end + # @param value [Object] the value to exchange with another thread + # @param timeout [Numeric, nil] in seconds, `nil` blocks indefinitely + # @return [Concurrent::Maybe] on success a `Just` maybe will be returned with + # the item exchanged by the other thread as `#value`; on timeout a + # `Nothing` maybe will be returned with {Concurrent::TimeoutError} as `#reason` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#109 def try_exchange(value, timeout = T.unsafe(nil)); end private + # Waits for another thread to arrive at this exchange point (unless the + # current thread is interrupted), and then transfers the given object to + # it, receiving its object in return. The timeout value indicates the + # approximate number of seconds the method should block while waiting + # for the exchange. When the timeout value is `nil` the method will + # block indefinitely. + # + # @param value [Object] the value to exchange with another thread + # @param timeout [Numeric, nil] in seconds, `nil` blocks indefinitely + # @raise [NotImplementedError] + # @return [Object, CANCEL] the value exchanged by the other thread; {CANCEL} on timeout + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#122 def do_exchange(value, timeout); end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#41 Concurrent::AbstractExchanger::CANCEL = T.let(T.unsafe(nil), Object) +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#10 class Concurrent::AbstractExecutorService < ::Concurrent::Synchronization::LockableObject include ::Logger::Severity include ::Concurrent::Concern::Logging include ::Concurrent::ExecutorService include ::Concurrent::Concern::Deprecation + # Create a new thread pool. + # + # @return [AbstractExecutorService] a new instance of AbstractExecutorService + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#23 def initialize(opts = T.unsafe(nil), &block); end + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#72 def auto_terminate=(value); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#67 def auto_terminate?; end + + # Returns the value of attribute fallback_policy. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#18 def fallback_policy; end + + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#42 def kill; end + + # Returns the value of attribute name. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#20 def name; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#52 def running?; end + + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#37 def shutdown; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#62 def shutdown?; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#57 def shuttingdown?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#32 def to_s; end + + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#47 def wait_for_termination(timeout = T.unsafe(nil)); end private + # Returns an action which executes the `fallback_policy` once the queue + # size reaches `max_queue`. The reason for the indirection of an action + # is so that the work can be deferred outside of synchronization. + # + # @param args [Array] the arguments to the task which is being handled. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#85 def fallback_action(*args); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#126 def ns_auto_terminate?; end + + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#106 def ns_execute(*args, &task); end + + # Callback method called when the executor has been killed. + # The default behavior is to do nothing. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#122 def ns_kill_execution; end + + # Callback method called when an orderly shutdown has completed. + # The default behavior is to signal all waiting threads. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#114 def ns_shutdown_execution; end end +# The set of possible fallback policies that may be set at thread pool creation. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#15 Concurrent::AbstractExecutorService::FALLBACK_POLICIES = T.let(T.unsafe(nil), Array) +# An abstract implementation of local storage, with sub-classes for +# per-thread and per-fiber locals. +# +# Each execution context (EC, thread or fiber) has a lazily initialized array +# of local variable values. Each time a new local variable is created, we +# allocate an "index" for it. +# +# For example, if the allocated index is 1, that means slot #1 in EVERY EC's +# locals array will be used for the value of that variable. +# +# The good thing about using a per-EC structure to hold values, rather than +# a global, is that no synchronization is needed when reading and writing +# those values (since the structure is only ever accessed by a single +# thread). +# +# Of course, when a local variable is GC'd, 1) we need to recover its index +# for use by other new local variables (otherwise the locals arrays could +# get bigger and bigger with time), and 2) we need to null out all the +# references held in the now-unused slots (both to avoid blocking GC of those +# objects, and also to prevent "stale" values from being passed on to a new +# local when the index is reused). +# +# Because we need to null out freed slots, we need to keep references to +# ALL the locals arrays, so we can null out the appropriate slots in all of +# them. This is why we need to use a finalizer to clean up the locals array +# when the EC goes out of scope. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#35 class Concurrent::AbstractLocals + # @return [AbstractLocals] a new instance of AbstractLocals + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#36 def initialize; end + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#89 def fetch(index); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#71 def free_index(index); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#55 def next_index(local); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#102 def set(index, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#43 def synchronize; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#48 def weak_synchronize; end private + # When the local goes out of scope, clean up that slot across all locals currently assigned. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#112 def local_finalizer(index); end + + # Returns the locals for the current scope, or nil if none exist. + # + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#128 def locals; end + + # Returns the locals for the current scope, creating them if necessary. + # + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#133 def locals!; end + + # When a thread/fiber goes out of scope, remove the array from @all_arrays. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#119 def thread_fiber_finalizer(array_object_id); end end +# `Agent` is inspired by Clojure's [agent](http://clojure.org/agents) +# function. An agent is a shared, mutable variable providing independent, +# uncoordinated, *asynchronous* change of individual values. Best used when +# the value will undergo frequent, complex updates. Suitable when the result +# of an update does not need to be known immediately. `Agent` is (mostly) +# functionally equivalent to Clojure's agent, except where the runtime +# prevents parity. +# +# Agents are reactive, not autonomous - there is no imperative message loop +# and no blocking receive. The state of an Agent should be itself immutable +# and the `#value` of an Agent is always immediately available for reading by +# any thread without any messages, i.e. observation does not require +# cooperation or coordination. +# +# Agent action dispatches are made using the various `#send` methods. These +# methods always return immediately. At some point later, in another thread, +# the following will happen: +# +# 1. The given `action` will be applied to the state of the Agent and the +# `args`, if any were supplied. +# 2. The return value of `action` will be passed to the validator lambda, +# if one has been set on the Agent. +# 3. If the validator succeeds or if no validator was given, the return value +# of the given `action` will become the new `#value` of the Agent. See +# `#initialize` for details. +# 4. If any observers were added to the Agent, they will be notified. See +# `#add_observer` for details. +# 5. If during the `action` execution any other dispatches are made (directly +# or indirectly), they will be held until after the `#value` of the Agent +# has been changed. +# +# If any exceptions are thrown by an action function, no nested dispatches +# will occur, and the exception will be cached in the Agent itself. When an +# Agent has errors cached, any subsequent interactions will immediately throw +# an exception, until the agent's errors are cleared. Agent errors can be +# examined with `#error` and the agent restarted with `#restart`. +# +# The actions of all Agents get interleaved amongst threads in a thread pool. +# At any point in time, at most one action for each Agent is being executed. +# Actions dispatched to an agent from another single agent or thread will +# occur in the order they were sent, potentially interleaved with actions +# dispatched to the same agent from other sources. The `#send` method should +# be used for actions that are CPU limited, while the `#send_off` method is +# appropriate for actions that may block on IO. +# +# Unlike in Clojure, `Agent` cannot participate in `Concurrent::TVar` transactions. +# +# ## Example +# +# ``` +# def next_fibonacci(set = nil) +# return [0, 1] if set.nil? +# set + [set[-2..-1].reduce{|sum,x| sum + x }] +# end +# +# # create an agent with an initial value +# agent = Concurrent::Agent.new(next_fibonacci) +# +# # send a few update requests +# 5.times do +# agent.send{|set| next_fibonacci(set) } +# end +# +# # wait for them to complete +# agent.await +# +# # get the current value +# agent.value #=> [0, 1, 1, 2, 3, 5, 8] +# ``` +# +# ## Observation +# +# Agents support observers through the {Concurrent::Observable} mixin module. +# Notification of observers occurs every time an action dispatch returns and +# the new value is successfully validated. Observation will *not* occur if the +# action raises an exception, if validation fails, or when a {#restart} occurs. +# +# When notified the observer will receive three arguments: `time`, `old_value`, +# and `new_value`. The `time` argument is the time at which the value change +# occurred. The `old_value` is the value of the Agent when the action began +# processing. The `new_value` is the value to which the Agent was set when the +# action completed. Note that `old_value` and `new_value` may be the same. +# This is not an error. It simply means that the action returned the same +# value. +# +# ## Nested Actions +# +# It is possible for an Agent action to post further actions back to itself. +# The nested actions will be enqueued normally then processed *after* the +# outer action completes, in the order they were sent, possibly interleaved +# with action dispatches from other threads. Nested actions never deadlock +# with one another and a failure in a nested action will never affect the +# outer action. +# +# Nested actions can be called using the Agent reference from the enclosing +# scope or by passing the reference in as a "send" argument. Nested actions +# cannot be post using `self` from within the action block/proc/lambda; `self` +# in this context will not reference the Agent. The preferred method for +# dispatching nested actions is to pass the Agent as an argument. This allows +# Ruby to more effectively manage the closing scope. +# +# Prefer this: +# +# ``` +# agent = Concurrent::Agent.new(0) +# agent.send(agent) do |value, this| +# this.send {|v| v + 42 } +# 3.14 +# end +# agent.value #=> 45.14 +# ``` +# +# Over this: +# +# ``` +# agent = Concurrent::Agent.new(0) +# agent.send do |value| +# agent.send {|v| v + 42 } +# 3.14 +# end +# ``` +# +# +# **NOTE** Never, *under any circumstances*, call any of the "await" methods +# ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action +# block/proc/lambda. The call will block the Agent and will always fail. +# Calling either {#await} or {#wait} (with a timeout of `nil`) will +# hopelessly deadlock the Agent with no possibility of recovery. +# +# @see http://clojure.org/Agents Clojure Agents +# @see http://clojure.org/state Values and Change - Clojure's approach to Identity and State +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#145 class Concurrent::Agent < ::Concurrent::Synchronization::LockableObject include ::Concurrent::Concern::Observable + # Create a new `Agent` with the given initial value and options. + # + # The `:validator` option must be `nil` or a side-effect free proc/lambda + # which takes one argument. On any intended value change the validator, if + # provided, will be called. If the new value is invalid the validator should + # return `false` or raise an error. + # + # The `:error_handler` option must be `nil` or a proc/lambda which takes two + # arguments. When an action raises an error or validation fails, either by + # returning false or raising an error, the error handler will be called. The + # arguments to the error handler will be a reference to the agent itself and + # the error object which was raised. + # + # The `:error_mode` may be either `:continue` (the default if an error + # handler is given) or `:fail` (the default if error handler nil or not + # given). + # + # If an action being run by the agent throws an error or doesn't pass + # validation the error handler, if present, will be called. After the + # handler executes if the error mode is `:continue` the Agent will continue + # as if neither the action that caused the error nor the error itself ever + # happened. + # + # If the mode is `:fail` the Agent will become {#failed?} and will stop + # accepting new action dispatches. Any previously queued actions will be + # held until {#restart} is called. The {#value} method will still work, + # returning the value of the Agent before the error. + # + # @option opts + # @option opts + # @option opts + # @param initial [Object] the initial value + # @param opts [Hash] the configuration options + # @return [Agent] a new instance of Agent + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#220 def initialize(initial, opts = T.unsafe(nil)); end + # Dispatches an action to the Agent and returns immediately. Subsequently, + # in a thread from a thread pool, the {#value} will be set to the return + # value of the action. Appropriate for actions that may block on IO. + # + # @param action [Proc] the action dispatch to be enqueued + # @return [Concurrent::Agent] self + # @see #send_off + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#331 def <<(action); end + + # Blocks the current thread (indefinitely!) until all actions dispatched + # thus far, from this thread or nested by the Agent, have occurred. Will + # block when {#failed?}. Will never return if a failed Agent is {#restart} + # with `:clear_actions` true. + # + # Returns a reference to `self` to support method chaining: + # + # ``` + # current_value = agent.await.value + # ``` + # + # + # **NOTE** Never, *under any circumstances*, call any of the "await" methods + # ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action + # block/proc/lambda. The call will block the Agent and will always fail. + # Calling either {#await} or {#wait} (with a timeout of `nil`) will + # hopelessly deadlock the Agent with no possibility of recovery. + # + # @return [Boolean] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#350 def await; end + + # Blocks the current thread until all actions dispatched thus far, from this + # thread or nested by the Agent, have occurred, or the timeout (in seconds) + # has elapsed. + # + # + # **NOTE** Never, *under any circumstances*, call any of the "await" methods + # ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action + # block/proc/lambda. The call will block the Agent and will always fail. + # Calling either {#await} or {#wait} (with a timeout of `nil`) will + # hopelessly deadlock the Agent with no possibility of recovery. + # + # @param timeout [Float] the maximum number of seconds to wait + # @return [Boolean] true if all actions complete before timeout else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#363 def await_for(timeout); end + + # Blocks the current thread until all actions dispatched thus far, from this + # thread or nested by the Agent, have occurred, or the timeout (in seconds) + # has elapsed. + # + # + # **NOTE** Never, *under any circumstances*, call any of the "await" methods + # ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action + # block/proc/lambda. The call will block the Agent and will always fail. + # Calling either {#await} or {#wait} (with a timeout of `nil`) will + # hopelessly deadlock the Agent with no possibility of recovery. + # + # @param timeout [Float] the maximum number of seconds to wait + # @raise [Concurrent::TimeoutError] when timout is reached + # @return [Boolean] true if all actions complete before timeout + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#377 def await_for!(timeout); end + + # The current value (state) of the Agent, irrespective of any pending or + # in-progress actions. The value is always available and is non-blocking. + # + # @return [Object] the current value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#229 def deref; end + + # When {#failed?} and {#error_mode} is `:fail`, returns the error object + # which caused the failure, else `nil`. When {#error_mode} is `:continue` + # will *always* return `nil`. + # + # @return [nil, Error] the error which caused the failure when {#failed?} + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#240 def error; end + + # The error mode this Agent is operating in. See {#initialize} for details. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#184 def error_mode; end + + # Is the Agent in a failed state? + # + # @return [Boolean] + # @see #restart + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#402 def failed?; end + + # Dispatches an action to the Agent and returns immediately. Subsequently, + # in a thread from a thread pool, the {#value} will be set to the return + # value of the action. Action dispatches are only allowed when the Agent + # is not {#failed?}. + # + # The action must be a block/proc/lambda which takes 1 or more arguments. + # The first argument is the current {#value} of the Agent. Any arguments + # passed to the send method via the `args` parameter will be passed to the + # action as the remaining arguments. The action must return the new value + # of the Agent. + # + # * {#send} and {#send!} should be used for actions that are CPU limited + # * {#send_off}, {#send_off!}, and {#<<} are appropriate for actions that + # may block on IO + # * {#send_via} and {#send_via!} are used when a specific executor is to + # be used for the action + # + # @param args [Array] zero or more arguments to be passed to + # the action + # @param action [Proc] the action dispatch to be enqueued + # @return [Boolean] true if the action is successfully enqueued, false if + # the Agent is {#failed?} + # @yield [agent, value, *args] process the old value and return the new + # @yieldparam value [Object] the current {#value} of the Agent + # @yieldparam args [Array] zero or more arguments to pass to the + # action + # @yieldreturn [Object] the new value of the Agent + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#294 def post(*args, &action); end + + # When {#failed?} and {#error_mode} is `:fail`, returns the error object + # which caused the failure, else `nil`. When {#error_mode} is `:continue` + # will *always* return `nil`. + # + # @return [nil, Error] the error which caused the failure when {#failed?} + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#240 def reason; end + + # When an Agent is {#failed?}, changes the Agent {#value} to `new_value` + # then un-fails the Agent so that action dispatches are allowed again. If + # the `:clear_actions` option is give and true, any actions queued on the + # Agent that were being held while it was failed will be discarded, + # otherwise those held actions will proceed. The `new_value` must pass the + # validator if any, or `restart` will raise an exception and the Agent will + # remain failed with its old {#value} and {#error}. Observers, if any, will + # not be notified of the new state. + # + # @option opts + # @param new_value [Object] the new value for the Agent once restarted + # @param opts [Hash] the configuration options + # @raise [Concurrent:AgentError] when not failed + # @return [Boolean] true + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#424 def restart(new_value, opts = T.unsafe(nil)); end + + # Dispatches an action to the Agent and returns immediately. Subsequently, + # in a thread from a thread pool, the {#value} will be set to the return + # value of the action. Action dispatches are only allowed when the Agent + # is not {#failed?}. + # + # The action must be a block/proc/lambda which takes 1 or more arguments. + # The first argument is the current {#value} of the Agent. Any arguments + # passed to the send method via the `args` parameter will be passed to the + # action as the remaining arguments. The action must return the new value + # of the Agent. + # + # * {#send} and {#send!} should be used for actions that are CPU limited + # * {#send_off}, {#send_off!}, and {#<<} are appropriate for actions that + # may block on IO + # * {#send_via} and {#send_via!} are used when a specific executor is to + # be used for the action + # + # @param args [Array] zero or more arguments to be passed to + # the action + # @param action [Proc] the action dispatch to be enqueued + # @return [Boolean] true if the action is successfully enqueued, false if + # the Agent is {#failed?} + # @yield [agent, value, *args] process the old value and return the new + # @yieldparam value [Object] the current {#value} of the Agent + # @yieldparam args [Array] zero or more arguments to pass to the + # action + # @yieldreturn [Object] the new value of the Agent + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#278 def send(*args, &action); end + + # Dispatches an action to the Agent and returns immediately. Subsequently, + # in a thread from a thread pool, the {#value} will be set to the return + # value of the action. Action dispatches are only allowed when the Agent + # is not {#failed?}. + # + # The action must be a block/proc/lambda which takes 1 or more arguments. + # The first argument is the current {#value} of the Agent. Any arguments + # passed to the send method via the `args` parameter will be passed to the + # action as the remaining arguments. The action must return the new value + # of the Agent. + # + # * {#send} and {#send!} should be used for actions that are CPU limited + # * {#send_off}, {#send_off!}, and {#<<} are appropriate for actions that + # may block on IO + # * {#send_via} and {#send_via!} are used when a specific executor is to + # be used for the action + # + # @param args [Array] zero or more arguments to be passed to + # the action + # @param action [Proc] the action dispatch to be enqueued + # @raise [Concurrent::Agent::Error] if the Agent is {#failed?} + # @return [Boolean] true if the action is successfully enqueued + # @yield [agent, value, *args] process the old value and return the new + # @yieldparam value [Object] the current {#value} of the Agent + # @yieldparam args [Array] zero or more arguments to pass to the + # action + # @yieldreturn [Object] the new value of the Agent + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#287 def send!(*args, &action); end + + # Dispatches an action to the Agent and returns immediately. Subsequently, + # in a thread from a thread pool, the {#value} will be set to the return + # value of the action. Action dispatches are only allowed when the Agent + # is not {#failed?}. + # + # The action must be a block/proc/lambda which takes 1 or more arguments. + # The first argument is the current {#value} of the Agent. Any arguments + # passed to the send method via the `args` parameter will be passed to the + # action as the remaining arguments. The action must return the new value + # of the Agent. + # + # * {#send} and {#send!} should be used for actions that are CPU limited + # * {#send_off}, {#send_off!}, and {#<<} are appropriate for actions that + # may block on IO + # * {#send_via} and {#send_via!} are used when a specific executor is to + # be used for the action + # + # @param args [Array] zero or more arguments to be passed to + # the action + # @param action [Proc] the action dispatch to be enqueued + # @return [Boolean] true if the action is successfully enqueued, false if + # the Agent is {#failed?} + # @yield [agent, value, *args] process the old value and return the new + # @yieldparam value [Object] the current {#value} of the Agent + # @yieldparam args [Array] zero or more arguments to pass to the + # action + # @yieldreturn [Object] the new value of the Agent + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#294 def send_off(*args, &action); end + + # Dispatches an action to the Agent and returns immediately. Subsequently, + # in a thread from a thread pool, the {#value} will be set to the return + # value of the action. Action dispatches are only allowed when the Agent + # is not {#failed?}. + # + # The action must be a block/proc/lambda which takes 1 or more arguments. + # The first argument is the current {#value} of the Agent. Any arguments + # passed to the send method via the `args` parameter will be passed to the + # action as the remaining arguments. The action must return the new value + # of the Agent. + # + # * {#send} and {#send!} should be used for actions that are CPU limited + # * {#send_off}, {#send_off!}, and {#<<} are appropriate for actions that + # may block on IO + # * {#send_via} and {#send_via!} are used when a specific executor is to + # be used for the action + # + # @param args [Array] zero or more arguments to be passed to + # the action + # @param action [Proc] the action dispatch to be enqueued + # @raise [Concurrent::Agent::Error] if the Agent is {#failed?} + # @return [Boolean] true if the action is successfully enqueued + # @yield [agent, value, *args] process the old value and return the new + # @yieldparam value [Object] the current {#value} of the Agent + # @yieldparam args [Array] zero or more arguments to pass to the + # action + # @yieldreturn [Object] the new value of the Agent + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#302 def send_off!(*args, &action); end + + # Dispatches an action to the Agent and returns immediately. Subsequently, + # in a thread from a thread pool, the {#value} will be set to the return + # value of the action. Action dispatches are only allowed when the Agent + # is not {#failed?}. + # + # The action must be a block/proc/lambda which takes 1 or more arguments. + # The first argument is the current {#value} of the Agent. Any arguments + # passed to the send method via the `args` parameter will be passed to the + # action as the remaining arguments. The action must return the new value + # of the Agent. + # + # * {#send} and {#send!} should be used for actions that are CPU limited + # * {#send_off}, {#send_off!}, and {#<<} are appropriate for actions that + # may block on IO + # * {#send_via} and {#send_via!} are used when a specific executor is to + # be used for the action + # + # @param args [Array] zero or more arguments to be passed to + # the action + # @param action [Proc] the action dispatch to be enqueued + # @param executor [Concurrent::ExecutorService] the executor on which the + # action is to be dispatched + # @return [Boolean] true if the action is successfully enqueued, false if + # the Agent is {#failed?} + # @yield [agent, value, *args] process the old value and return the new + # @yieldparam value [Object] the current {#value} of the Agent + # @yieldparam args [Array] zero or more arguments to pass to the + # action + # @yieldreturn [Object] the new value of the Agent + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#311 def send_via(executor, *args, &action); end + + # Dispatches an action to the Agent and returns immediately. Subsequently, + # in a thread from a thread pool, the {#value} will be set to the return + # value of the action. Action dispatches are only allowed when the Agent + # is not {#failed?}. + # + # The action must be a block/proc/lambda which takes 1 or more arguments. + # The first argument is the current {#value} of the Agent. Any arguments + # passed to the send method via the `args` parameter will be passed to the + # action as the remaining arguments. The action must return the new value + # of the Agent. + # + # * {#send} and {#send!} should be used for actions that are CPU limited + # * {#send_off}, {#send_off!}, and {#<<} are appropriate for actions that + # may block on IO + # * {#send_via} and {#send_via!} are used when a specific executor is to + # be used for the action + # + # @param args [Array] zero or more arguments to be passed to + # the action + # @param action [Proc] the action dispatch to be enqueued + # @param executor [Concurrent::ExecutorService] the executor on which the + # action is to be dispatched + # @raise [Concurrent::Agent::Error] if the Agent is {#failed?} + # @return [Boolean] true if the action is successfully enqueued + # @yield [agent, value, *args] process the old value and return the new + # @yieldparam value [Object] the current {#value} of the Agent + # @yieldparam args [Array] zero or more arguments to pass to the + # action + # @yieldreturn [Object] the new value of the Agent + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#319 def send_via!(executor, *args, &action); end + + # Is the Agent in a failed state? + # + # @return [Boolean] + # @see #restart + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#402 def stopped?; end + + # The current value (state) of the Agent, irrespective of any pending or + # in-progress actions. The value is always available and is non-blocking. + # + # @return [Object] the current value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#229 def value; end + + # Blocks the current thread until all actions dispatched thus far, from this + # thread or nested by the Agent, have occurred, or the timeout (in seconds) + # has elapsed. Will block indefinitely when timeout is nil or not given. + # + # Provided mainly for consistency with other classes in this library. Prefer + # the various `await` methods instead. + # + # + # **NOTE** Never, *under any circumstances*, call any of the "await" methods + # ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action + # block/proc/lambda. The call will block the Agent and will always fail. + # Calling either {#await} or {#wait} (with a timeout of `nil`) will + # hopelessly deadlock the Agent with no possibility of recovery. + # + # @param timeout [Float] the maximum number of seconds to wait + # @return [Boolean] true if all actions complete before timeout else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#393 def wait(timeout = T.unsafe(nil)); end private + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#510 def enqueue_action_job(action, args, executor); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#516 def enqueue_await_job(latch); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#543 def execute_next_job; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#576 def handle_error(error); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#529 def ns_enqueue_job(job, index = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#584 def ns_find_last_job_for_thread; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#490 def ns_initialize(initial, opts); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#539 def ns_post_next_job; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#570 def ns_validate(value); end class << self + # Blocks the current thread (indefinitely!) until all actions dispatched + # thus far to all the given Agents, from this thread or nested by the + # given Agents, have occurred. Will block when any of the agents are + # failed. Will never return if a failed Agent is restart with + # `:clear_actions` true. + # + # + # **NOTE** Never, *under any circumstances*, call any of the "await" methods + # ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action + # block/proc/lambda. The call will block the Agent and will always fail. + # Calling either {#await} or {#wait} (with a timeout of `nil`) will + # hopelessly deadlock the Agent with no possibility of recovery. + # + # @param agents [Array] the Agents on which to wait + # @return [Boolean] true + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#449 def await(*agents); end + + # Blocks the current thread until all actions dispatched thus far to all + # the given Agents, from this thread or nested by the given Agents, have + # occurred, or the timeout (in seconds) has elapsed. + # + # + # **NOTE** Never, *under any circumstances*, call any of the "await" methods + # ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action + # block/proc/lambda. The call will block the Agent and will always fail. + # Calling either {#await} or {#wait} (with a timeout of `nil`) will + # hopelessly deadlock the Agent with no possibility of recovery. + # + # @param timeout [Float] the maximum number of seconds to wait + # @param agents [Array] the Agents on which to wait + # @return [Boolean] true if all actions complete before timeout else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#463 def await_for(timeout, *agents); end + + # Blocks the current thread until all actions dispatched thus far to all + # the given Agents, from this thread or nested by the given Agents, have + # occurred, or the timeout (in seconds) has elapsed. + # + # + # **NOTE** Never, *under any circumstances*, call any of the "await" methods + # ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action + # block/proc/lambda. The call will block the Agent and will always fail. + # Calling either {#await} or {#wait} (with a timeout of `nil`) will + # hopelessly deadlock the Agent with no possibility of recovery. + # + # @param timeout [Float] the maximum number of seconds to wait + # @param agents [Array] the Agents on which to wait + # @raise [Concurrent::TimeoutError] when timout is reached + # @return [Boolean] true if all actions complete before timeout + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#482 def await_for!(timeout, *agents); end end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#154 Concurrent::Agent::AWAIT_ACTION = T.let(T.unsafe(nil), Proc) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#151 Concurrent::Agent::AWAIT_FLAG = T.let(T.unsafe(nil), Object) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#157 Concurrent::Agent::DEFAULT_ERROR_HANDLER = T.let(T.unsafe(nil), Proc) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#160 Concurrent::Agent::DEFAULT_VALIDATOR = T.let(T.unsafe(nil), Proc) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#148 Concurrent::Agent::ERROR_MODES = T.let(T.unsafe(nil), Array) +# Raised during action processing or any other time in an Agent's lifecycle. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#167 class Concurrent::Agent::Error < ::StandardError + # @return [Error] a new instance of Error + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#168 def initialize(message = T.unsafe(nil)); end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#163 class Concurrent::Agent::Job < ::Struct + # Returns the value of attribute action + # + # @return [Object] the current value of action def action; end + + # Sets the attribute action + # + # @param value [Object] the value to set the attribute action to. + # @return [Object] the newly set value def action=(_); end + + # Returns the value of attribute args + # + # @return [Object] the current value of args def args; end + + # Sets the attribute args + # + # @param value [Object] the value to set the attribute args to. + # @return [Object] the newly set value def args=(_); end + + # Returns the value of attribute caller + # + # @return [Object] the current value of caller def caller; end + + # Sets the attribute caller + # + # @param value [Object] the value to set the attribute caller to. + # @return [Object] the newly set value def caller=(_); end + + # Returns the value of attribute executor + # + # @return [Object] the current value of executor def executor; end + + # Sets the attribute executor + # + # @param value [Object] the value to set the attribute executor to. + # @return [Object] the newly set value def executor=(_); end class << self def [](*_arg0); end def inspect; end + def keyword_init?; end def members; end def new(*_arg0); end end end +# Raised when a new value obtained during action processing or at `#restart` +# fails validation. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#176 class Concurrent::Agent::ValidationError < ::Concurrent::Agent::Error + # @return [ValidationError] a new instance of ValidationError + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#177 def initialize(message = T.unsafe(nil)); end end +# A thread-safe subclass of Array. This version locks against the object +# itself for every method call, ensuring only one thread can be reading +# or writing at a time. This includes iteration methods like `#each`. +# +# @note `a += b` is **not** a **thread-safe** operation on +# `Concurrent::Array`. It reads array `a`, then it creates new `Concurrent::Array` +# which is concatenation of `a` and `b`, then it writes the concatenation to `a`. +# The read and write are independent operations they do not form a single atomic +# operation therefore when two `+=` operations are executed concurrently updates +# may be lost. Use `#concat` instead. +# @see http://ruby-doc.org/core/Array.html Ruby standard library `Array` +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/array.rb#53 class Concurrent::Array < ::Array; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/array.rb#22 Concurrent::ArrayImplementation = Array +# A mixin module that provides simple asynchronous behavior to a class, +# turning it into a simple actor. Loosely based on Erlang's +# [gen_server](http://www.erlang.org/doc/man/gen_server.html), but without +# supervision or linking. +# +# A more feature-rich {Concurrent::Actor} is also available when the +# capabilities of `Async` are too limited. +# +# ```cucumber +# Feature: +# As a stateful, plain old Ruby class +# I want safe, asynchronous behavior +# So my long-running methods don't block the main thread +# ``` +# +# The `Async` module is a way to mix simple yet powerful asynchronous +# capabilities into any plain old Ruby object or class, turning each object +# into a simple Actor. Method calls are processed on a background thread. The +# caller is free to perform other actions while processing occurs in the +# background. +# +# Method calls to the asynchronous object are made via two proxy methods: +# `async` (alias `cast`) and `await` (alias `call`). These proxy methods post +# the method call to the object's background thread and return a "future" +# which will eventually contain the result of the method call. +# +# This behavior is loosely patterned after Erlang's `gen_server` behavior. +# When an Erlang module implements the `gen_server` behavior it becomes +# inherently asynchronous. The `start` or `start_link` function spawns a +# process (similar to a thread but much more lightweight and efficient) and +# returns the ID of the process. Using the process ID, other processes can +# send messages to the `gen_server` via the `cast` and `call` methods. Unlike +# Erlang's `gen_server`, however, `Async` classes do not support linking or +# supervision trees. +# +# ## Basic Usage +# +# When this module is mixed into a class, objects of the class become inherently +# asynchronous. Each object gets its own background thread on which to post +# asynchronous method calls. Asynchronous method calls are executed in the +# background one at a time in the order they are received. +# +# To create an asynchronous class, simply mix in the `Concurrent::Async` module: +# +# ``` +# class Hello +# include Concurrent::Async +# +# def hello(name) +# "Hello, #{name}!" +# end +# end +# ``` +# +# Mixing this module into a class provides each object two proxy methods: +# `async` and `await`. These methods are thread safe with respect to the +# enclosing object. The former proxy allows methods to be called +# asynchronously by posting to the object's internal thread. The latter proxy +# allows a method to be called synchronously but does so safely with respect +# to any pending asynchronous method calls and ensures proper ordering. Both +# methods return a {Concurrent::IVar} which can be inspected for the result +# of the proxied method call. Calling a method with `async` will return a +# `:pending` `IVar` whereas `await` will return a `:complete` `IVar`. +# +# ``` +# class Echo +# include Concurrent::Async +# +# def echo(msg) +# print "#{msg}\n" +# end +# end +# +# horn = Echo.new +# horn.echo('zero') # synchronous, not thread-safe +# # returns the actual return value of the method +# +# horn.async.echo('one') # asynchronous, non-blocking, thread-safe +# # returns an IVar in the :pending state +# +# horn.await.echo('two') # synchronous, blocking, thread-safe +# # returns an IVar in the :complete state +# ``` +# +# ## Let It Fail +# +# The `async` and `await` proxy methods have built-in error protection based +# on Erlang's famous "let it fail" philosophy. Instance methods should not be +# programmed defensively. When an exception is raised by a delegated method +# the proxy will rescue the exception, expose it to the caller as the `reason` +# attribute of the returned future, then process the next method call. +# +# ## Calling Methods Internally +# +# External method calls should *always* use the `async` and `await` proxy +# methods. When one method calls another method, the `async` proxy should +# rarely be used and the `await` proxy should *never* be used. +# +# When an object calls one of its own methods using the `await` proxy the +# second call will be enqueued *behind* the currently running method call. +# Any attempt to wait on the result will fail as the second call will never +# run until after the current call completes. +# +# Calling a method using the `await` proxy from within a method that was +# itself called using `async` or `await` will irreversibly deadlock the +# object. Do *not* do this, ever. +# +# ## Instance Variables and Attribute Accessors +# +# Instance variables do not need to be thread-safe so long as they are private. +# Asynchronous method calls are processed in the order they are received and +# are processed one at a time. Therefore private instance variables can only +# be accessed by one thread at a time. This is inherently thread-safe. +# +# When using private instance variables within asynchronous methods, the best +# practice is to read the instance variable into a local variable at the start +# of the method then update the instance variable at the *end* of the method. +# This way, should an exception be raised during method execution the internal +# state of the object will not have been changed. +# +# ### Reader Attributes +# +# The use of `attr_reader` is discouraged. Internal state exposed externally, +# when necessary, should be done through accessor methods. The instance +# variables exposed by these methods *must* be thread-safe, or they must be +# called using the `async` and `await` proxy methods. These two approaches are +# subtly different. +# +# When internal state is accessed via the `async` and `await` proxy methods, +# the returned value represents the object's state *at the time the call is +# processed*, which may *not* be the state of the object at the time the call +# is made. +# +# To get the state *at the current* time, irrespective of an enqueued method +# calls, a reader method must be called directly. This is inherently unsafe +# unless the instance variable is itself thread-safe, preferably using one +# of the thread-safe classes within this library. Because the thread-safe +# classes within this library are internally-locking or non-locking, they can +# be safely used from within asynchronous methods without causing deadlocks. +# +# Generally speaking, the best practice is to *not* expose internal state via +# reader methods. The best practice is to simply use the method's return value. +# +# ### Writer Attributes +# +# Writer attributes should never be used with asynchronous classes. Changing +# the state externally, even when done in the thread-safe way, is not logically +# consistent. Changes to state need to be timed with respect to all asynchronous +# method calls which my be in-process or enqueued. The only safe practice is to +# pass all necessary data to each method as arguments and let the method update +# the internal state as necessary. +# +# ## Class Constants, Variables, and Methods +# +# ### Class Constants +# +# Class constants do not need to be thread-safe. Since they are read-only and +# immutable they may be safely read both externally and from within +# asynchronous methods. +# +# ### Class Variables +# +# Class variables should be avoided. Class variables represent shared state. +# Shared state is anathema to concurrency. Should there be a need to share +# state using class variables they *must* be thread-safe, preferably +# using the thread-safe classes within this library. When updating class +# variables, never assign a new value/object to the variable itself. Assignment +# is not thread-safe in Ruby. Instead, use the thread-safe update functions +# of the variable itself to change the value. +# +# The best practice is to *never* use class variables with `Async` classes. +# +# ### Class Methods +# +# Class methods which are pure functions are safe. Class methods which modify +# class variables should be avoided, for all the reasons listed above. +# +# ## An Important Note About Thread Safe Guarantees +# +# > Thread safe guarantees can only be made when asynchronous method calls +# > are not mixed with direct method calls. Use only direct method calls +# > when the object is used exclusively on a single thread. Use only +# > `async` and `await` when the object is shared between threads. Once you +# > call a method using `async` or `await`, you should no longer call methods +# > directly on the object. Use `async` and `await` exclusively from then on. +# +# @example +# +# class Echo +# include Concurrent::Async +# +# def echo(msg) +# print "#{msg}\n" +# end +# end +# +# horn = Echo.new +# horn.echo('zero') # synchronous, not thread-safe +# # returns the actual return value of the method +# +# horn.async.echo('one') # asynchronous, non-blocking, thread-safe +# # returns an IVar in the :pending state +# +# horn.await.echo('two') # synchronous, blocking, thread-safe +# # returns an IVar in the :complete state +# @see Concurrent::Actor +# @see https://en.wikipedia.org/wiki/Actor_model "Actor Model" at Wikipedia +# @see http://www.erlang.org/doc/man/gen_server.html Erlang gen_server +# @see http://c2.com/cgi/wiki?LetItCrash "Let It Crash" at http://c2.com/ +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#217 module Concurrent::Async mixes_in_class_methods ::Concurrent::Async::ClassMethods + # Causes the chained method call to be performed asynchronously on the + # object's thread. The delegated method will return a future in the + # `:pending` state and the method call will have been scheduled on the + # object's thread. The final disposition of the method call can be obtained + # by inspecting the returned future. + # + # @note The method call is guaranteed to be thread safe with respect to + # all other method calls against the same object that are called with + # either `async` or `await`. The mutable nature of Ruby references + # (and object orientation in general) prevent any other thread safety + # guarantees. Do NOT mix direct method calls with delegated method calls. + # Use *only* delegated method calls when sharing the object between threads. + # @raise [NameError] the object does not respond to the requested method + # @raise [ArgumentError] the given `args` do not match the arity of + # the requested method + # @return [Concurrent::IVar] the pending result of the asynchronous operation + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#412 def async; end + + # Causes the chained method call to be performed synchronously on the + # current thread. The delegated will return a future in either the + # `:fulfilled` or `:rejected` state and the delegated method will have + # completed. The final disposition of the delegated method can be obtained + # by inspecting the returned future. + # + # @note The method call is guaranteed to be thread safe with respect to + # all other method calls against the same object that are called with + # either `async` or `await`. The mutable nature of Ruby references + # (and object orientation in general) prevent any other thread safety + # guarantees. Do NOT mix direct method calls with delegated method calls. + # Use *only* delegated method calls when sharing the object between threads. + # @raise [NameError] the object does not respond to the requested method + # @raise [ArgumentError] the given `args` do not match the arity of the + # requested method + # @return [Concurrent::IVar] the completed result of the synchronous operation + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#430 def await; end + + # Causes the chained method call to be performed synchronously on the + # current thread. The delegated will return a future in either the + # `:fulfilled` or `:rejected` state and the delegated method will have + # completed. The final disposition of the delegated method can be obtained + # by inspecting the returned future. + # + # @note The method call is guaranteed to be thread safe with respect to + # all other method calls against the same object that are called with + # either `async` or `await`. The mutable nature of Ruby references + # (and object orientation in general) prevent any other thread safety + # guarantees. Do NOT mix direct method calls with delegated method calls. + # Use *only* delegated method calls when sharing the object between threads. + # @raise [NameError] the object does not respond to the requested method + # @raise [ArgumentError] the given `args` do not match the arity of the + # requested method + # @return [Concurrent::IVar] the completed result of the synchronous operation + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#430 def call; end + + # Causes the chained method call to be performed asynchronously on the + # object's thread. The delegated method will return a future in the + # `:pending` state and the method call will have been scheduled on the + # object's thread. The final disposition of the method call can be obtained + # by inspecting the returned future. + # + # @note The method call is guaranteed to be thread safe with respect to + # all other method calls against the same object that are called with + # either `async` or `await`. The mutable nature of Ruby references + # (and object orientation in general) prevent any other thread safety + # guarantees. Do NOT mix direct method calls with delegated method calls. + # Use *only* delegated method calls when sharing the object between threads. + # @raise [NameError] the object does not respond to the requested method + # @raise [ArgumentError] the given `args` do not match the arity of + # the requested method + # @return [Concurrent::IVar] the pending result of the asynchronous operation + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#412 def cast; end + + # Initialize the internal serializer and other stnchronization mechanisms. + # + # @note This method *must* be called immediately upon object construction. + # This is the only way thread-safe initialization can be guaranteed. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#441 def init_synchronization; end class << self + # @private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#262 def included(base); end + + # Check for the presence of a method on an object and determine if a given + # set of arguments matches the required arity. + # + # @note This check is imperfect because of the way Ruby reports the arity of + # methods with a variable number of arguments. It is possible to determine + # if too few arguments are given but impossible to determine if too many + # arguments are given. This check may also fail to recognize dynamic behavior + # of the object, such as methods simulated with `method_missing`. + # @param obj [Object] the object to check against + # @param method [Symbol] the method to check the object for + # @param args [Array] zero or more arguments for the arity check + # @raise [NameError] the object does not respond to `method` method + # @raise [ArgumentError] the given `args` do not match the arity of `method` + # @see http://www.ruby-doc.org/core-2.1.1/Method.html#method-i-arity Method#arity + # @see http://ruby-doc.org/core-2.1.0/Object.html#method-i-respond_to-3F Object#respond_to? + # @see http://www.ruby-doc.org/core-2.1.0/BasicObject.html#method-i-method_missing BasicObject#method_missing + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#250 def validate_argc(obj, method, *args); end end end +# Delegates asynchronous, thread-safe method calls to the wrapped object. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#282 class Concurrent::Async::AsyncDelegator < ::Concurrent::Synchronization::LockableObject + # Create a new delegator object wrapping the given delegate. + # + # @param delegate [Object] the object to wrap and delegate method calls to + # @return [AsyncDelegator] a new instance of AsyncDelegator + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#288 def initialize(delegate); end + # Delegates method calls to the wrapped object. + # + # @param method [Symbol] the method being called + # @param args [Array] zero or more arguments to the method + # @raise [NameError] the object does not respond to `method` method + # @raise [ArgumentError] the given `args` do not match the arity of `method` + # @return [IVar] the result of the method call + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#305 def method_missing(method, *args, &block); end + + # Perform all enqueued tasks. + # + # This method must be called from within the executor. It must not be + # called while already running. It will loop until the queue is empty. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#330 def perform; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#348 def reset_if_forked; end private + # Check whether the method is responsive + # + # @param method [Symbol] the method being called + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#322 def respond_to_missing?(method, include_private = T.unsafe(nil)); end end +# Delegates synchronous, thread-safe method calls to the wrapped object. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#360 class Concurrent::Async::AwaitDelegator + # Create a new delegator object wrapping the given delegate. + # + # @param delegate [AsyncDelegator] the object to wrap and delegate method calls to + # @return [AwaitDelegator] a new instance of AwaitDelegator + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#365 def initialize(delegate); end + # Delegates method calls to the wrapped object. + # + # @param method [Symbol] the method being called + # @param args [Array] zero or more arguments to the method + # @raise [NameError] the object does not respond to `method` method + # @raise [ArgumentError] the given `args` do not match the arity of `method` + # @return [IVar] the result of the method call + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#378 def method_missing(method, *args, &block); end private + # Check whether the method is responsive + # + # @param method [Symbol] the method being called + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#387 def respond_to_missing?(method, include_private = T.unsafe(nil)); end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#269 module Concurrent::Async::ClassMethods - def new(*args, &block); end -end - + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#270 + def new(*args, **_arg1, &block); end +end + +# Atoms provide a way to manage shared, synchronous, independent state. +# +# An atom is initialized with an initial value and an optional validation +# proc. At any time the value of the atom can be synchronously and safely +# changed. If a validator is given at construction then any new value +# will be checked against the validator and will be rejected if the +# validator returns false or raises an exception. +# +# There are two ways to change the value of an atom: {#compare_and_set} and +# {#swap}. The former will set the new value if and only if it validates and +# the current value matches the new value. The latter will atomically set the +# new value to the result of running the given block if and only if that +# value validates. +# +# ## Example +# +# ``` +# def next_fibonacci(set = nil) +# return [0, 1] if set.nil? +# set + [set[-2..-1].reduce{|sum,x| sum + x }] +# end +# +# # create an atom with an initial value +# atom = Concurrent::Atom.new(next_fibonacci) +# +# # send a few update requests +# 5.times do +# atom.swap{|set| next_fibonacci(set) } +# end +# +# # get the current value +# atom.value #=> [0, 1, 1, 2, 3, 5, 8] +# ``` +# +# ## Observation +# +# Atoms support observers through the {Concurrent::Observable} mixin module. +# Notification of observers occurs every time the value of the Atom changes. +# When notified the observer will receive three arguments: `time`, `old_value`, +# and `new_value`. The `time` argument is the time at which the value change +# occurred. The `old_value` is the value of the Atom when the change began +# The `new_value` is the value to which the Atom was set when the change +# completed. Note that `old_value` and `new_value` may be the same. This is +# not an error. It simply means that the change operation returned the same +# value. +# +# Unlike in Clojure, `Atom` cannot participate in {Concurrent::TVar} transactions. +# +# +# ## Thread-safe Variable Classes +# +# Each of the thread-safe variable classes is designed to solve a different +# problem. In general: +# +# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, +# uncoordinated, *asynchronous* change of individual values. Best used when +# the value will undergo frequent, complex updates. Suitable when the result +# of an update does not need to be known immediately. +# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, +# uncoordinated, *synchronous* change of individual values. Best used when +# the value will undergo frequent reads but only occasional, though complex, +# updates. Suitable when the result of an update must be known immediately. +# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated +# atomically. Updates are synchronous but fast. Best used when updates a +# simple set operations. Not suitable when updates are complex. +# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar +# but optimized for the given data type. +# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used +# when two or more threads need to exchange data. The threads will pair then +# block on each other until the exchange is complete. +# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread +# must give a value to another, which must take the value. The threads will +# block on each other until the exchange is complete. +# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which +# holds a different value for each thread which has access. Often used as +# an instance variable in objects which must maintain different state +# for different threads. +# * *{Concurrent::TVar}:* Shared, mutable variables which provide +# *coordinated*, *synchronous*, change of *many* stated. Used when multiple +# value must change together, in an all-or-nothing transaction. +# +# @see http://clojure.org/atoms Clojure Atoms +# @see http://clojure.org/state Values and Change - Clojure's approach to Identity and State +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atom.rb#95 class Concurrent::Atom < ::Concurrent::Synchronization::Object include ::Concurrent::Concern::Observable extend ::Concurrent::Synchronization::SafeInitialization + # Create a new atom with the given initial value. + # + # @option opts + # @param value [Object] The initial value + # @param opts [Hash] The options used to configure the atom + # @raise [ArgumentError] if the validator is not a `Proc` (when given) + # @return [Atom] a new instance of Atom + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atom.rb#121 def initialize(value, opts = T.unsafe(nil)); end + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#137 def __initialize_atomic_fields__; end + + # Atomically sets the value of atom to the new value if and only if the + # current value of the atom is identical to the old value and the new + # value successfully validates against the (optional) validator given + # at construction. + # + # @param old_value [Object] The expected current value. + # @param new_value [Object] The intended new value. + # @return [Boolean] True if the value is changed else false. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atom.rb#181 def compare_and_set(old_value, new_value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#93 def deref; end + + # Atomically sets the value of atom to the new value without regard for the + # current value so long as the new value successfully validates against the + # (optional) validator given at construction. + # + # @param new_value [Object] The intended new value. + # @return [Object] The final value of the atom after all operations and + # validations are complete. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atom.rb#198 def reset(new_value); end + + # Atomically swaps the value of atom using the given block. The current + # value will be passed to the block, as will any arguments passed as + # arguments to the function. The new value will be validated against the + # (optional) validator proc given at construction. If validation fails the + # value will not be changed. + # + # Internally, {#swap} reads the current value, applies the block to it, and + # attempts to compare-and-set it in. Since another thread may have changed + # the value in the intervening time, it may have to retry, and does so in a + # spin loop. The net effect is that the value will always be the result of + # the application of the supplied block to a current value, atomically. + # However, because the block might be called multiple times, it must be free + # of side effects. + # + # @note The given block may be called multiple times, and thus should be free + # of side effects. + # @param args [Object] Zero or more arguments passed to the block. + # @raise [ArgumentError] When no block is given. + # @return [Object] The final value of the atom after all operations and + # validations are complete. + # @yield [value, args] Calculates a new value for the atom based on the + # current value and any supplied arguments. + # @yieldparam value [Object] The current value of the atom. + # @yieldparam args [Object] All arguments passed to the function, in order. + # @yieldreturn [Object] The intended new value of the atom. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atom.rb#157 def swap(*args); end + + # The current value of the atom. + # + # @return [Object] The current value. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#93 def value; end private + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#105 def compare_and_set_value(expected, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#101 def swap_value(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#109 def update_value(&block); end + + # Is the new value valid? + # + # @param new_value [Object] The intended new value. + # @return [Boolean] false if the validator function returns false or raises + # an exception else true + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atom.rb#216 def valid?(new_value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#97 def value=(value); end end +# A boolean value that can be updated atomically. Reads and writes to an atomic +# boolean and thread-safe and guaranteed to succeed. Reads and writes may block +# briefly but no explicit locking is required. +# +# +# ## Thread-safe Variable Classes +# +# Each of the thread-safe variable classes is designed to solve a different +# problem. In general: +# +# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, +# uncoordinated, *asynchronous* change of individual values. Best used when +# the value will undergo frequent, complex updates. Suitable when the result +# of an update does not need to be known immediately. +# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, +# uncoordinated, *synchronous* change of individual values. Best used when +# the value will undergo frequent reads but only occasional, though complex, +# updates. Suitable when the result of an update must be known immediately. +# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated +# atomically. Updates are synchronous but fast. Best used when updates a +# simple set operations. Not suitable when updates are complex. +# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar +# but optimized for the given data type. +# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used +# when two or more threads need to exchange data. The threads will pair then +# block on each other until the exchange is complete. +# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread +# must give a value to another, which must take the value. The threads will +# block on each other until the exchange is complete. +# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which +# holds a different value for each thread which has access. Often used as +# an instance variable in objects which must maintain different state +# for different threads. +# * *{Concurrent::TVar}:* Shared, mutable variables which provide +# *coordinated*, *synchronous*, change of *many* stated. Used when multiple +# value must change together, in an all-or-nothing transaction. +# Performance: +# +# ``` +# Testing with ruby 2.1.2 +# Testing with Concurrent::MutexAtomicBoolean... +# 2.790000 0.000000 2.790000 ( 2.791454) +# Testing with Concurrent::CAtomicBoolean... +# 0.740000 0.000000 0.740000 ( 0.740206) +# +# Testing with jruby 1.9.3 +# Testing with Concurrent::MutexAtomicBoolean... +# 5.240000 2.520000 7.760000 ( 3.683000) +# Testing with Concurrent::JavaAtomicBoolean... +# 3.340000 0.010000 3.350000 ( 0.855000) +# ``` +# +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/atomic/AtomicBoolean.html java.util.concurrent.atomic.AtomicBoolean +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_boolean.rb#120 class Concurrent::AtomicBoolean < ::Concurrent::MutexAtomicBoolean + # @return [String] Short string representation. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_boolean.rb#121 def inspect; end + + # @return [String] Short string representation. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_boolean.rb#121 def to_s; end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_boolean.rb#82 Concurrent::AtomicBooleanImplementation = Concurrent::MutexAtomicBoolean +# Define update methods that use direct paths +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/atomic_direct_update.rb#9 module Concurrent::AtomicDirectUpdate + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/atomic_direct_update.rb#15 def try_update; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/atomic_direct_update.rb#24 def try_update!; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/atomic_direct_update.rb#10 def update; end end +# A numeric value that can be updated atomically. Reads and writes to an atomic +# fixnum and thread-safe and guaranteed to succeed. Reads and writes may block +# briefly but no explicit locking is required. +# +# +# ## Thread-safe Variable Classes +# +# Each of the thread-safe variable classes is designed to solve a different +# problem. In general: +# +# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, +# uncoordinated, *asynchronous* change of individual values. Best used when +# the value will undergo frequent, complex updates. Suitable when the result +# of an update does not need to be known immediately. +# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, +# uncoordinated, *synchronous* change of individual values. Best used when +# the value will undergo frequent reads but only occasional, though complex, +# updates. Suitable when the result of an update must be known immediately. +# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated +# atomically. Updates are synchronous but fast. Best used when updates a +# simple set operations. Not suitable when updates are complex. +# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar +# but optimized for the given data type. +# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used +# when two or more threads need to exchange data. The threads will pair then +# block on each other until the exchange is complete. +# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread +# must give a value to another, which must take the value. The threads will +# block on each other until the exchange is complete. +# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which +# holds a different value for each thread which has access. Often used as +# an instance variable in objects which must maintain different state +# for different threads. +# * *{Concurrent::TVar}:* Shared, mutable variables which provide +# *coordinated*, *synchronous*, change of *many* stated. Used when multiple +# value must change together, in an all-or-nothing transaction. +# Performance: +# +# ``` +# Testing with ruby 2.1.2 +# Testing with Concurrent::MutexAtomicFixnum... +# 3.130000 0.000000 3.130000 ( 3.136505) +# Testing with Concurrent::CAtomicFixnum... +# 0.790000 0.000000 0.790000 ( 0.785550) +# +# Testing with jruby 1.9.3 +# Testing with Concurrent::MutexAtomicFixnum... +# 5.460000 2.460000 7.920000 ( 3.715000) +# Testing with Concurrent::JavaAtomicFixnum... +# 4.520000 0.030000 4.550000 ( 1.187000) +# ``` +# +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/atomic/AtomicLong.html java.util.concurrent.atomic.AtomicLong +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_fixnum.rb#137 class Concurrent::AtomicFixnum < ::Concurrent::MutexAtomicFixnum + # @return [String] Short string representation. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_fixnum.rb#138 def inspect; end + + # @return [String] Short string representation. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_fixnum.rb#138 def to_s; end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_fixnum.rb#99 Concurrent::AtomicFixnumImplementation = Concurrent::MutexAtomicFixnum +# An atomic reference which maintains an object reference along with a mark bit +# that can be updated atomically. +# +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/atomic/AtomicMarkableReference.html java.util.concurrent.atomic.AtomicMarkableReference +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#10 class Concurrent::AtomicMarkableReference < ::Concurrent::Synchronization::Object extend ::Concurrent::Synchronization::SafeInitialization + # @return [AtomicMarkableReference] a new instance of AtomicMarkableReference + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#15 def initialize(value = T.unsafe(nil), mark = T.unsafe(nil)); end + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#137 def __initialize_atomic_fields__; end + + # Atomically sets the value and mark to the given updated value and + # mark given both: + # - the current value == the expected value && + # - the current mark == the expected mark + # + # that the actual value was not equal to the expected value or the + # actual mark was not equal to the expected mark + # + # @param expected_val [Object] the expected value + # @param new_val [Object] the new value + # @param expected_mark [Boolean] the expected mark + # @param new_mark [Boolean] the new mark + # @return [Boolean] `true` if successful. A `false` return indicates + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#33 def compare_and_set(expected_val, new_val, expected_mark, new_mark); end + + # Atomically sets the value and mark to the given updated value and + # mark given both: + # - the current value == the expected value && + # - the current mark == the expected mark + # + # that the actual value was not equal to the expected value or the + # actual mark was not equal to the expected mark + # + # @param expected_val [Object] the expected value + # @param new_val [Object] the new value + # @param expected_mark [Boolean] the expected mark + # @param new_mark [Boolean] the new mark + # @return [Boolean] `true` if successful. A `false` return indicates + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#33 def compare_and_swap(expected_val, new_val, expected_mark, new_mark); end + + # Gets the current reference and marked values. + # + # @return [Array] the current reference and marked values + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#64 def get; end + + # Gets the current marked value + # + # @return [Boolean] the current marked value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#78 def mark; end + + # Gets the current marked value + # + # @return [Boolean] the current marked value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#78 def marked?; end + + # _Unconditionally_ sets to the given value of both the reference and + # the mark. + # + # @param new_val [Object] the new value + # @param new_mark [Boolean] the new mark + # @return [Array] both the new value and the new mark + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#91 def set(new_val, new_mark); end + + # Pass the current value to the given block, replacing it with the + # block's result. Simply return nil if update fails. + # + # the update failed + # + # @return [Array] the new value and marked state, or nil if + # @yield [Object] Calculate a new value and marked state for the atomic + # reference using given (old) value and (old) marked + # @yieldparam old_val [Object] the starting value of the atomic reference + # @yieldparam old_mark [Boolean] the starting state of marked + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#152 def try_update; end + + # Pass the current value to the given block, replacing it + # with the block's result. Raise an exception if the update + # fails. + # + # @raise [Concurrent::ConcurrentUpdateError] if the update fails + # @return [Array] the new value and marked state + # @yield [Object] Calculate a new value and marked state for the atomic + # reference using given (old) value and (old) marked + # @yieldparam old_val [Object] the starting value of the atomic reference + # @yieldparam old_mark [Boolean] the starting state of marked + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#128 def try_update!; end + + # Pass the current value and marked state to the given block, replacing it + # with the block's results. May retry if the value changes during the + # block's execution. + # + # @return [Array] the new value and new mark + # @yield [Object] Calculate a new value and marked state for the atomic + # reference using given (old) value and (old) marked + # @yieldparam old_val [Object] the starting value of the atomic reference + # @yieldparam old_mark [Boolean] the starting state of marked + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#105 def update; end + + # Gets the current value of the reference + # + # @return [Object] the current value of the reference + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#71 def value; end private + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#105 def compare_and_set_reference(expected, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#163 def immutable_array(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#93 def reference; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#97 def reference=(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#101 def swap_reference(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#109 def update_reference(&block); end end +# Special "compare and set" handling of numeric values. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/numeric_cas_wrapper.rb#7 module Concurrent::AtomicNumericCompareAndSetWrapper + # Atomically sets the value to the given updated value if + # the current value == the expected value. + # + # that the actual value was not equal to the expected value. + # + # @param old_value [Object] the expected value + # @param new_value [Object] the new value + # @return [Boolean] `true` if successful. A `false` return indicates + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/numeric_cas_wrapper.rb#10 def compare_and_set(old_value, new_value); end end +# An object reference that may be updated atomically. All read and write +# operations have java volatile semantic. +# +# +# ## Thread-safe Variable Classes +# +# Each of the thread-safe variable classes is designed to solve a different +# problem. In general: +# +# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, +# uncoordinated, *asynchronous* change of individual values. Best used when +# the value will undergo frequent, complex updates. Suitable when the result +# of an update does not need to be known immediately. +# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, +# uncoordinated, *synchronous* change of individual values. Best used when +# the value will undergo frequent reads but only occasional, though complex, +# updates. Suitable when the result of an update must be known immediately. +# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated +# atomically. Updates are synchronous but fast. Best used when updates a +# simple set operations. Not suitable when updates are complex. +# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar +# but optimized for the given data type. +# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used +# when two or more threads need to exchange data. The threads will pair then +# block on each other until the exchange is complete. +# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread +# must give a value to another, which must take the value. The threads will +# block on each other until the exchange is complete. +# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which +# holds a different value for each thread which has access. Often used as +# an instance variable in objects which must maintain different state +# for different threads. +# * *{Concurrent::TVar}:* Shared, mutable variables which provide +# *coordinated*, *synchronous*, change of *many* stated. Used when multiple +# value must change together, in an all-or-nothing transaction. +# +# @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/AtomicReference.html +# @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/package-summary.html +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_reference.rb#126 class Concurrent::AtomicReference < ::Concurrent::MutexAtomicReference + # @return [String] Short string representation. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_reference.rb#129 def inspect; end + + # @return [String] Short string representation. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_reference.rb#129 def to_s; end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_reference.rb#18 Concurrent::AtomicReferenceImplementation = Concurrent::MutexAtomicReference +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#30 class Concurrent::CRubySet < ::Set + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#18 def initialize(*args, &block); end + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def &(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def +(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def -(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def <(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def <<(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def <=(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def <=>(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def ==(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def ===(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def >(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def >=(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def ^(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def add(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def add?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def classify(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def clear(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def collect!(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def compare_by_identity(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def compare_by_identity?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def delete(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def delete?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def delete_if(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def difference(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def disjoint?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def divide(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def each(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def empty?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def eql?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def filter!(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def flatten(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def flatten!(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def flatten_merge(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def freeze(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def hash(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def include?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def inspect(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def intersect?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def intersection(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def join(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def keep_if(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def length(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def map!(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def member?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def merge(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def pretty_print(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def pretty_print_cycle(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def proper_subset?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def proper_superset?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def reject!(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def replace(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def reset(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def select!(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def size(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def subset?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def subtract(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def superset?(*args); end - def taint(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def to_a(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def to_s(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def to_set(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def union(*args); end - def untaint(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 def |(*args); end private + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#23 def initialize_copy(other); end end +# A thread pool that dynamically grows and shrinks to fit the current workload. +# New threads are created as needed, existing threads are reused, and threads +# that remain idle for too long are killed and removed from the pool. These +# pools are particularly suited to applications that perform a high volume of +# short-lived tasks. +# +# On creation a `CachedThreadPool` has zero running threads. New threads are +# created on the pool as new operations are `#post`. The size of the pool +# will grow until `#max_length` threads are in the pool or until the number +# of threads exceeds the number of running and pending operations. When a new +# operation is post to the pool the first available idle thread will be tasked +# with the new operation. +# +# Should a thread crash for any reason the thread will immediately be removed +# from the pool. Similarly, threads which remain idle for an extended period +# of time will be killed and reclaimed. Thus these thread pools are very +# efficient at reclaiming unused resources. +# +# The API and behavior of this class are based on Java's `CachedThreadPool` +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/cached_thread_pool.rb#27 class Concurrent::CachedThreadPool < ::Concurrent::ThreadPoolExecutor + # Create a new thread pool. + # + # @option opts + # @param opts [Hash] the options defining pool behavior. + # @raise [ArgumentError] if `fallback_policy` is not a known policy + # @return [CachedThreadPool] a new instance of CachedThreadPool + # @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executors.html#newCachedThreadPool-- + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/cached_thread_pool.rb#39 def initialize(opts = T.unsafe(nil)); end private + # Create a new thread pool. + # + # @option opts + # @param opts [Hash] the options defining pool behavior. + # @raise [ArgumentError] if `fallback_policy` is not a known policy + # @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executors.html#newCachedThreadPool-- + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/cached_thread_pool.rb#51 def ns_initialize(opts); end end +# Raised when an asynchronous operation is cancelled before execution. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#9 class Concurrent::CancelledOperationError < ::Concurrent::Error; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#7 module Concurrent::Collection; end +# A thread safe observer set implemented using copy-on-read approach: +# observers are added and removed from a thread safe collection; every time +# a notification is required the internal data structure is copied to +# prevent concurrency issues +# +# @api private +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#12 class Concurrent::Collection::CopyOnNotifyObserverSet < ::Concurrent::Synchronization::LockableObject + # @api private + # @return [CopyOnNotifyObserverSet] a new instance of CopyOnNotifyObserverSet + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#14 def initialize; end + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#20 def add_observer(observer = T.unsafe(nil), func = T.unsafe(nil), &block); end + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#55 def count_observers; end + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#39 def delete_observer(observer); end + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#47 def delete_observers; end + + # Notifies all registered observers with optional args and deletes them. + # + # @api private + # @param args [Object] arguments to be passed to each observer + # @return [CopyOnWriteObserverSet] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#72 def notify_and_delete_observers(*args, &block); end + + # Notifies all registered observers with optional args + # + # @api private + # @param args [Object] arguments to be passed to each observer + # @return [CopyOnWriteObserverSet] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#62 def notify_observers(*args, &block); end protected + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#80 def ns_initialize; end private + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#86 def duplicate_and_clear_observers; end + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#94 def duplicate_observers; end + + # @api private + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#98 def notify_to(observers, *args); end end +# A thread safe observer set implemented using copy-on-write approach: +# every time an observer is added or removed the whole internal data structure is +# duplicated and replaced with a new one. +# +# @api private +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#11 class Concurrent::Collection::CopyOnWriteObserverSet < ::Concurrent::Synchronization::LockableObject + # @api private + # @return [CopyOnWriteObserverSet] a new instance of CopyOnWriteObserverSet + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#13 def initialize; end + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#19 def add_observer(observer = T.unsafe(nil), func = T.unsafe(nil), &block); end + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#56 def count_observers; end + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#40 def delete_observer(observer); end + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#50 def delete_observers; end + + # Notifies all registered observers with optional args and deletes them. + # + # @api private + # @param args [Object] arguments to be passed to each observer + # @return [CopyOnWriteObserverSet] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#72 def notify_and_delete_observers(*args, &block); end + + # Notifies all registered observers with optional args + # + # @api private + # @param args [Object] arguments to be passed to each observer + # @return [CopyOnWriteObserverSet] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#63 def notify_observers(*args, &block); end protected + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#80 def ns_initialize; end private + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#102 def clear_observers_and_return_old; end + + # @api private + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#86 def notify_to(observers, *args); end + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#94 def observers; end + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#98 def observers=(new_set); end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#10 Concurrent::Collection::MapImplementation = Concurrent::Collection::MriMapBackend +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#10 class Concurrent::Collection::MriMapBackend < ::Concurrent::Collection::NonConcurrentMapBackend + # @return [MriMapBackend] a new instance of MriMapBackend + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#12 def initialize(options = T.unsafe(nil), &default_proc); end + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#17 def []=(key, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#61 def clear; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#33 def compute(key); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#21 def compute_if_absent(key); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#29 def compute_if_present(key); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#53 def delete(key); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#57 def delete_pair(key, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#49 def get_and_set(key, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#37 def merge_pair(key, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#45 def replace_if_exists(key, new_value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#41 def replace_pair(key, old_value, new_value); end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#9 class Concurrent::Collection::NonConcurrentMapBackend + # WARNING: all public methods of the class must operate on the @backend + # directly without calling each other. This is important because of the + # SynchronizedMapBackend which uses a non-reentrant mutex for performance + # reasons. + # + # @return [NonConcurrentMapBackend] a new instance of NonConcurrentMapBackend + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#15 def initialize(options = T.unsafe(nil), &default_proc); end + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#21 def [](key); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#25 def []=(key, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#94 def clear; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#59 def compute(key); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#29 def compute_if_absent(key); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#53 def compute_if_present(key); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#81 def delete(key); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#85 def delete_pair(key, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#99 def each_pair; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#71 def get_and_set(key, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#110 def get_or_default(key, default_value); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#77 def key?(key); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#63 def merge_pair(key, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#46 def replace_if_exists(key, new_value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#37 def replace_pair(key, old_value, new_value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#106 def size; end private + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#130 def dupped_backend; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#124 def initialize_copy(other); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#134 def pair?(key, expected_value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#116 def set_backend(default_proc); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#138 def store_computed_value(key, new_value); end end +# A queue collection in which the elements are sorted based on their +# comparison (spaceship) operator `<=>`. Items are added to the queue +# at a position relative to their priority. On removal the element +# with the "highest" priority is removed. By default the sort order is +# from highest to lowest, but a lowest-to-highest sort order can be +# set on construction. +# +# The API is based on the `Queue` class from the Ruby standard library. +# +# The pure Ruby implementation, `RubyNonConcurrentPriorityQueue` uses a heap algorithm +# stored in an array. The algorithm is based on the work of Robert Sedgewick +# and Kevin Wayne. +# +# The JRuby native implementation is a thin wrapper around the standard +# library `java.util.NonConcurrentPriorityQueue`. +# +# When running under JRuby the class `NonConcurrentPriorityQueue` extends `JavaNonConcurrentPriorityQueue`. +# When running under all other interpreters it extends `RubyNonConcurrentPriorityQueue`. +# +# @note This implementation is *not* thread safe. +# @see http://en.wikipedia.org/wiki/Priority_queue +# @see http://ruby-doc.org/stdlib-2.0.0/libdoc/thread/rdoc/Queue.html +# @see http://algs4.cs.princeton.edu/24pq/index.php#2.6 +# @see http://algs4.cs.princeton.edu/24pq/MaxPQ.java.html +# @see http://docs.oracle.com/javase/7/docs/api/java/util/PriorityQueue.html +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/non_concurrent_priority_queue.rb#50 class Concurrent::Collection::NonConcurrentPriorityQueue < ::Concurrent::Collection::RubyNonConcurrentPriorityQueue + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#78 def <<(item); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#65 def deq; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#78 def enq(item); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#48 def has_priority?(item); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#65 def shift; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#54 def size; end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/non_concurrent_priority_queue.rb#10 Concurrent::Collection::NonConcurrentPriorityQueueImplementation = Concurrent::Collection::RubyNonConcurrentPriorityQueue +# A queue collection in which the elements are sorted based on their +# comparison (spaceship) operator `<=>`. Items are added to the queue +# at a position relative to their priority. On removal the element +# with the "highest" priority is removed. By default the sort order is +# from highest to lowest, but a lowest-to-highest sort order can be +# set on construction. +# +# The API is based on the `Queue` class from the Ruby standard library. +# +# The pure Ruby implementation, `RubyNonConcurrentPriorityQueue` uses a heap algorithm +# stored in an array. The algorithm is based on the work of Robert Sedgewick +# and Kevin Wayne. +# +# The JRuby native implementation is a thin wrapper around the standard +# library `java.util.NonConcurrentPriorityQueue`. +# +# When running under JRuby the class `NonConcurrentPriorityQueue` extends `JavaNonConcurrentPriorityQueue`. +# When running under all other interpreters it extends `RubyNonConcurrentPriorityQueue`. +# +# @note This implementation is *not* thread safe. +# @see http://en.wikipedia.org/wiki/Priority_queue +# @see http://ruby-doc.org/stdlib-2.0.0/libdoc/thread/rdoc/Queue.html +# @see http://algs4.cs.princeton.edu/24pq/index.php#2.6 +# @see http://algs4.cs.princeton.edu/24pq/MaxPQ.java.html +# @see http://docs.oracle.com/javase/7/docs/api/java/util/PriorityQueue.html +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#8 class Concurrent::Collection::RubyNonConcurrentPriorityQueue + # Create a new priority queue with no items. + # + # @option opts + # @param opts [Hash] the options for creating the queue + # @return [RubyNonConcurrentPriorityQueue] a new instance of RubyNonConcurrentPriorityQueue + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#11 def initialize(opts = T.unsafe(nil)); end + # Inserts the specified element into this priority queue. + # + # @param item [Object] the item to insert onto the queue + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#78 def <<(item); end + + # Removes all of the elements from this priority queue. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#18 def clear; end + + # Deletes all items from `self` that are equal to `item`. + # + # @param item [Object] the item to be removed from the queue + # @return [Object] true if the item is found else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#25 def delete(item); end + + # Retrieves and removes the head of this queue, or returns `nil` if this + # queue is empty. + # + # @return [Object] the head of the queue or `nil` when empty + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#65 def deq; end + + # Returns `true` if `self` contains no elements. + # + # @return [Boolean] true if there are no items in the queue else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#43 def empty?; end + + # Inserts the specified element into this priority queue. + # + # @param item [Object] the item to insert onto the queue + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#78 def enq(item); end + + # Returns `true` if the given item is present in `self` (that is, if any + # element == `item`), otherwise returns false. + # + # @param item [Object] the item to search for + # @return [Boolean] true if the item is found else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#48 def has_priority?(item); end + + # Returns `true` if the given item is present in `self` (that is, if any + # element == `item`), otherwise returns false. + # + # @param item [Object] the item to search for + # @return [Boolean] true if the item is found else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#48 def include?(item); end + + # The current length of the queue. + # + # @return [Fixnum] the number of items in the queue + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#54 def length; end + + # Retrieves, but does not remove, the head of this queue, or returns `nil` + # if this queue is empty. + # + # @return [Object] the head of the queue or `nil` when empty + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#60 def peek; end + + # Retrieves and removes the head of this queue, or returns `nil` if this + # queue is empty. + # + # @return [Object] the head of the queue or `nil` when empty + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#65 def pop; end + + # Inserts the specified element into this priority queue. + # + # @param item [Object] the item to insert onto the queue + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#78 def push(item); end + + # Retrieves and removes the head of this queue, or returns `nil` if this + # queue is empty. + # + # @return [Object] the head of the queue or `nil` when empty + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#65 def shift; end + + # The current length of the queue. + # + # @return [Fixnum] the number of items in the queue + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#54 def size; end private + # Are the items at the given indexes ordered based on the priority + # order specified at construction? + # + # @param x [Integer] the first index from which to retrieve a comparable value + # @param y [Integer] the second index from which to retrieve a comparable value + # @return [Boolean] true if the two elements are in the correct priority order + # else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#119 def ordered?(x, y); end + + # Percolate down to maintain heap invariant. + # + # @param k [Integer] the index at which to start the percolation + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#128 def sink(k); end + + # Exchange the values at the given indexes within the internal array. + # + # @param x [Integer] the first index to swap + # @param y [Integer] the second index to swap + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#103 def swap(x, y); end + + # Percolate up to maintain heap invariant. + # + # @param k [Integer] the index at which to start the percolation + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#147 def swim(k); end class << self + # @!macro priority_queue_method_from_list + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#89 def from_list(list, opts = T.unsafe(nil)); end end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/dereferenceable.rb#2 module Concurrent::Concern; end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/deprecation.rb#8 module Concurrent::Concern::Deprecation include ::Logger::Severity include ::Concurrent::Concern::Logging @@ -539,334 +3132,1627 @@ module Concurrent::Concern::Deprecation extend ::Concurrent::Concern::Logging extend ::Concurrent::Concern::Deprecation + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/deprecation.rb#12 def deprecated(message, strip = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/deprecation.rb#27 def deprecated_method(old_name, new_name); end end +# Object references in Ruby are mutable. This can lead to serious problems when +# the `#value` of a concurrent object is a mutable reference. Which is always the +# case unless the value is a `Fixnum`, `Symbol`, or similar "primitive" data type. +# Most classes in this library that expose a `#value` getter method do so using the +# `Dereferenceable` mixin module. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/dereferenceable.rb#11 module Concurrent::Concern::Dereferenceable + # Return the value this object represents after applying the options specified + # by the `#set_deref_options` method. + # + # @return [Object] the current value of the object + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/dereferenceable.rb#21 def deref; end + + # Return the value this object represents after applying the options specified + # by the `#set_deref_options` method. + # + # @return [Object] the current value of the object + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/dereferenceable.rb#21 def value; end protected + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/dereferenceable.rb#63 def apply_deref_options(value); end + + # Set the options which define the operations #value performs before + # returning data to the caller (dereferencing). + # + # @note Most classes that include this module will call `#set_deref_options` + # from within the constructor, thus allowing these options to be set at + # object creation. + # @option opts + # @option opts + # @option opts + # @param opts [Hash] the options defining dereference behavior. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/dereferenceable.rb#54 def ns_set_deref_options(opts); end + + # Set the options which define the operations #value performs before + # returning data to the caller (dereferencing). + # + # @note Most classes that include this module will call `#set_deref_options` + # from within the constructor, thus allowing these options to be set at + # object creation. + # @option opts + # @option opts + # @option opts + # @param opts [Hash] the options defining dereference behavior. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/dereferenceable.rb#48 def set_deref_options(opts = T.unsafe(nil)); end + + # Set the internal value of this object + # + # @param value [Object] the new value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/dereferenceable.rb#31 def value=(value); end end +# Include where logging is needed +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#10 module Concurrent::Concern::Logging include ::Logger::Severity + # Logs through {Concurrent.global_logger}, it can be overridden by setting @logger + # + # @param level [Integer] one of Logger::Severity constants + # @param progname [String] e.g. a path of an Actor + # @param message [String, nil] when nil block is used to generate the message + # @yieldreturn [String] a message + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#18 def log(level, progname, message = T.unsafe(nil), &block); end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#10 module Concurrent::Concern::Obligation include ::Concurrent::Concern::Dereferenceable + # Has the obligation completed processing? + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#49 def complete?; end + + # @example allows Obligation to be risen + # rejected_ivar = Ivar.new.fail + # raise rejected_ivar + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#126 def exception(*args); end + + # Has the obligation been fulfilled? + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#20 def fulfilled?; end + + # Is the obligation still awaiting completion of processing? + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#56 def incomplete?; end + + # Wait until obligation is complete or the timeout is reached. Will re-raise + # any exceptions raised during processing (but will not raise an exception + # on timeout). + # + # @param timeout [Numeric] the maximum time in seconds to wait. + # @raise [Exception] raises the reason when rejected + # @return [Obligation] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#86 def no_error!(timeout = T.unsafe(nil)); end + + # Is obligation completion still pending? + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#35 def pending?; end + + # Has the obligation been fulfilled? + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#20 def realized?; end + + # If an exception was raised during processing this will return the + # exception object. Will return `nil` when the state is pending or if + # the obligation has been successfully fulfilled. + # + # @return [Exception] the exception raised during processing or `nil` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#119 def reason; end + + # Has the obligation been rejected? + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#28 def rejected?; end + + # The current state of the obligation. + # + # @return [Symbol] the current state + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#110 def state; end + + # Is the obligation still unscheduled? + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#42 def unscheduled?; end + + # The current value of the obligation. Will be `nil` while the state is + # pending or the operation has been rejected. + # + # @param timeout [Numeric] the maximum time in seconds to wait. + # @return [Object] see Dereferenceable#deref + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#65 def value(timeout = T.unsafe(nil)); end + + # The current value of the obligation. Will be `nil` while the state is + # pending or the operation has been rejected. Will re-raise any exceptions + # raised during processing (but will not raise an exception on timeout). + # + # @param timeout [Numeric] the maximum time in seconds to wait. + # @raise [Exception] raises the reason when rejected + # @return [Object] see Dereferenceable#deref + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#98 def value!(timeout = T.unsafe(nil)); end + + # Wait until obligation is complete or the timeout has been reached. + # + # @param timeout [Numeric] the maximum time in seconds to wait. + # @return [Obligation] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#74 def wait(timeout = T.unsafe(nil)); end + + # Wait until obligation is complete or the timeout is reached. Will re-raise + # any exceptions raised during processing (but will not raise an exception + # on timeout). + # + # @param timeout [Numeric] the maximum time in seconds to wait. + # @raise [Exception] raises the reason when rejected + # @return [Obligation] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#86 def wait!(timeout = T.unsafe(nil)); end protected + # Atomic compare and set operation + # State is set to `next_state` only if `current state == expected_current`. + # + # @param next_state [Symbol] + # @param expected_current [Symbol] + # @return [Boolean] true is state is changed, false otherwise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#174 def compare_and_set_state(next_state, *expected_current); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#145 def event; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#134 def get_arguments_from(opts = T.unsafe(nil)); end + + # Executes the block within mutex if current state is included in expected_states + # + # @return block value if executed, false otherwise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#190 def if_state(*expected_states); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#139 def init_obligation; end + + # Am I in the current state? + # + # @param expected [Symbol] The state to check against + # @return [Boolean] true if in the expected state else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#210 def ns_check_state?(expected); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#215 def ns_set_state(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#150 def set_state(success, value, reason); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#161 def state=(value); end end +# The [observer pattern](http://en.wikipedia.org/wiki/Observer_pattern) is one +# of the most useful design patterns. +# +# The workflow is very simple: +# - an `observer` can register itself to a `subject` via a callback +# - many `observers` can be registered to the same `subject` +# - the `subject` notifies all registered observers when its status changes +# - an `observer` can deregister itself when is no more interested to receive +# event notifications +# +# In a single threaded environment the whole pattern is very easy: the +# `subject` can use a simple data structure to manage all its subscribed +# `observer`s and every `observer` can react directly to every event without +# caring about synchronization. +# +# In a multi threaded environment things are more complex. The `subject` must +# synchronize the access to its data structure and to do so currently we're +# using two specialized ObserverSet: {Concurrent::Concern::CopyOnWriteObserverSet} +# and {Concurrent::Concern::CopyOnNotifyObserverSet}. +# +# When implementing and `observer` there's a very important rule to remember: +# **there are no guarantees about the thread that will execute the callback** +# +# Let's take this example +# ``` +# class Observer +# def initialize +# @count = 0 +# end +# +# def update +# @count += 1 +# end +# end +# +# obs = Observer.new +# [obj1, obj2, obj3, obj4].each { |o| o.add_observer(obs) } +# # execute [obj1, obj2, obj3, obj4] +# ``` +# +# `obs` is wrong because the variable `@count` can be accessed by different +# threads at the same time, so it should be synchronized (using either a Mutex +# or an AtomicFixum) +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/observable.rb#50 module Concurrent::Concern::Observable + # Adds an observer to this set. If a block is passed, the observer will be + # created by this method and no other params should be passed. + # + # @param observer [Object] the observer to add + # @param func [Symbol] the function to call on the observer during notification. + # Default is :update + # @return [Object] the added observer + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/observable.rb#61 def add_observer(observer = T.unsafe(nil), func = T.unsafe(nil), &block); end + + # Return the number of observers associated with this object. + # + # @return [Integer] the observers count + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/observable.rb#101 def count_observers; end + + # Remove `observer` as an observer on this object so that it will no + # longer receive notifications. + # + # @param observer [Object] the observer to remove + # @return [Object] the deleted observer + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/observable.rb#82 def delete_observer(observer); end + + # Remove all observers associated with this object. + # + # @return [Observable] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/observable.rb#91 def delete_observers; end + + # As `#add_observer` but can be used for chaining. + # + # @param observer [Object] the observer to add + # @param func [Symbol] the function to call on the observer during notification. + # @return [Observable] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/observable.rb#70 def with_observer(observer = T.unsafe(nil), func = T.unsafe(nil), &block); end protected + # Returns the value of attribute observers. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/observable.rb#107 def observers; end + + # Sets the attribute observers + # + # @param value the value to set the attribute observers to. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/observable.rb#107 def observers=(_arg0); end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#71 class Concurrent::ConcurrentUpdateError < ::ThreadError; end + +# frozen pre-allocated backtrace to speed ConcurrentUpdateError +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#72 Concurrent::ConcurrentUpdateError::CONC_UP_ERR_BACKTRACE = T.let(T.unsafe(nil), Array) + +# Raised when errors occur during configuration. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#6 class Concurrent::ConfigurationError < ::Concurrent::Error; end + +# A synchronization object that allows one thread to wait on multiple other threads. +# The thread that will wait creates a `CountDownLatch` and sets the initial value +# (normally equal to the number of other threads). The initiating thread passes the +# latch to the other threads then waits for the other threads by calling the `#wait` +# method. Each of the other threads calls `#count_down` when done with its work. +# When the latch counter reaches zero the waiting thread is unblocked and continues +# with its work. A `CountDownLatch` can be used only once. Its value cannot be reset. +# +# @example Waiter and Decrementer +# latch = Concurrent::CountDownLatch.new(3) +# +# waiter = Thread.new do +# latch.wait() +# puts ("Waiter released") +# end +# +# decrementer = Thread.new do +# sleep(1) +# latch.count_down +# puts latch.count +# +# sleep(1) +# latch.count_down +# puts latch.count +# +# sleep(1) +# latch.count_down +# puts latch.count +# end +# +# [waiter, decrementer].each(&:join) +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/count_down_latch.rb#98 class Concurrent::CountDownLatch < ::Concurrent::MutexCountDownLatch; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/count_down_latch.rb#56 Concurrent::CountDownLatchImplementation = Concurrent::MutexCountDownLatch +# A synchronization aid that allows a set of threads to all wait for each +# other to reach a common barrier point. +# +# @example +# barrier = Concurrent::CyclicBarrier.new(3) +# jobs = Array.new(3) { |i| -> { sleep i; p done: i } } +# process = -> (i) do +# # waiting to start at the same time +# barrier.wait +# # execute job +# jobs[i].call +# # wait for others to finish +# barrier.wait +# end +# threads = 2.times.map do |i| +# Thread.new(i, &process) +# end +# +# # use main as well +# process.call 2 +# +# # here we can be sure that all jobs are processed +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#27 class Concurrent::CyclicBarrier < ::Concurrent::Synchronization::LockableObject + # Create a new `CyclicBarrier` that waits for `parties` threads + # + # @param parties [Fixnum] the number of parties + # @raise [ArgumentError] if `parties` is not an integer or is less than zero + # @return [CyclicBarrier] a new instance of CyclicBarrier + # @yield an optional block that will be executed that will be executed after + # the last thread arrives and before the others are released + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#40 def initialize(parties, &block); end + # A barrier can be broken when: + # - a thread called the `reset` method while at least one other thread was waiting + # - at least one thread timed out on `wait` method + # + # A broken barrier can be restored using `reset` it's safer to create a new one + # + # @return [Boolean] true if the barrier is broken otherwise false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#105 def broken?; end + + # @return [Fixnum] the number of threads currently waiting on the barrier + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#54 def number_waiting; end + + # @return [Fixnum] the number of threads needed to pass the barrier + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#49 def parties; end + + # resets the barrier to its initial state + # If there is at least one waiting thread, it will be woken up, the `wait` + # method will return false and the barrier will be broken + # If the barrier is broken, this method restores it to the original state + # + # @return [nil] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#95 def reset; end + + # Blocks on the barrier until the number of waiting threads is equal to + # `parties` or until `timeout` is reached or `reset` is called + # If a block has been passed to the constructor, it will be executed once by + # the last arrived thread before releasing the others + # + # @param timeout [Fixnum] the number of seconds to wait for the counter or + # `nil` to block indefinitely + # @return [Boolean] `true` if the `count` reaches zero else false on + # `timeout` or on `reset` or if the barrier is broken + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#66 def wait(timeout = T.unsafe(nil)); end protected + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#111 def ns_generation_done(generation, status, continue = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#122 def ns_initialize(parties, &block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#117 def ns_next_generation; end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#30 class Concurrent::CyclicBarrier::Generation < ::Struct + # Returns the value of attribute status + # + # @return [Object] the current value of status def status; end + + # Sets the attribute status + # + # @param value [Object] the value to set the attribute status to. + # @return [Object] the newly set value def status=(_); end class << self def [](*_arg0); end def inspect; end + def keyword_init?; end def members; end def new(*_arg0); end end end +# Lazy evaluation of a block yielding an immutable result. Useful for +# expensive operations that may never be needed. It may be non-blocking, +# supports the `Concern::Obligation` interface, and accepts the injection of +# custom executor upon which to execute the block. Processing of +# block will be deferred until the first time `#value` is called. +# At that time the caller can choose to return immediately and let +# the block execute asynchronously, block indefinitely, or block +# with a timeout. +# +# When a `Delay` is created its state is set to `pending`. The value and +# reason are both `nil`. The first time the `#value` method is called the +# enclosed opration will be run and the calling thread will block. Other +# threads attempting to call `#value` will block as well. Once the operation +# is complete the *value* will be set to the result of the operation or the +# *reason* will be set to the raised exception, as appropriate. All threads +# blocked on `#value` will return. Subsequent calls to `#value` will immediately +# return the cached value. The operation will only be run once. This means that +# any side effects created by the operation will only happen once as well. +# +# `Delay` includes the `Concurrent::Concern::Dereferenceable` mixin to support thread +# safety of the reference returned by `#value`. +# +# @note The default behavior of `Delay` is to block indefinitely when +# calling either `value` or `wait`, executing the delayed operation on +# the current thread. This makes the `timeout` value completely +# irrelevant. To enable non-blocking behavior, use the `executor` +# constructor option. This will cause the delayed operation to be +# execute on the given executor, allowing the call to timeout. +# @see Concurrent::Concern::Dereferenceable +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/delay.rb#44 class Concurrent::Delay < ::Concurrent::Synchronization::LockableObject include ::Concurrent::Concern::Dereferenceable include ::Concurrent::Concern::Obligation + # Create a new `Delay` in the `:pending` state. + # + # @raise [ArgumentError] if no block is given + # @return [Delay] a new instance of Delay + # @yield the delayed operation to perform + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/delay.rb#62 def initialize(opts = T.unsafe(nil), &block); end + # Reconfigures the block returning the value if still `#incomplete?` + # + # @return [true, false] if success + # @yield the delayed operation to perform + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/delay.rb#146 def reconfigure(&block); end + + # Return the value this object represents after applying the options + # specified by the `#set_deref_options` method. If the delayed operation + # raised an exception this method will return nil. The exception object + # can be accessed via the `#reason` method. + # + # @note The default behavior of `Delay` is to block indefinitely when + # calling either `value` or `wait`, executing the delayed operation on + # the current thread. This makes the `timeout` value completely + # irrelevant. To enable non-blocking behavior, use the `executor` + # constructor option. This will cause the delayed operation to be + # execute on the given executor, allowing the call to timeout. + # @param timeout [Numeric] the maximum number of seconds to wait + # @return [Object] the current value of the object + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/delay.rb#77 def value(timeout = T.unsafe(nil)); end + + # Return the value this object represents after applying the options + # specified by the `#set_deref_options` method. If the delayed operation + # raised an exception, this method will raise that exception (even when) + # the operation has already been executed). + # + # @note The default behavior of `Delay` is to block indefinitely when + # calling either `value` or `wait`, executing the delayed operation on + # the current thread. This makes the `timeout` value completely + # irrelevant. To enable non-blocking behavior, use the `executor` + # constructor option. This will cause the delayed operation to be + # execute on the given executor, allowing the call to timeout. + # @param timeout [Numeric] the maximum number of seconds to wait + # @raise [Exception] when `#rejected?` raises `#reason` + # @return [Object] the current value of the object + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/delay.rb#113 def value!(timeout = T.unsafe(nil)); end + + # Return the value this object represents after applying the options + # specified by the `#set_deref_options` method. + # + # @note The default behavior of `Delay` is to block indefinitely when + # calling either `value` or `wait`, executing the delayed operation on + # the current thread. This makes the `timeout` value completely + # irrelevant. To enable non-blocking behavior, use the `executor` + # constructor option. This will cause the delayed operation to be + # execute on the given executor, allowing the call to timeout. + # @param timeout [Integer] (nil) the maximum number of seconds to wait for + # the value to be computed. When `nil` the caller will block indefinitely. + # @return [Object] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/delay.rb#132 def wait(timeout = T.unsafe(nil)); end protected + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/delay.rb#160 def ns_initialize(opts, &block); end private + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/delay.rb#173 def execute_task_once; end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#7 class Concurrent::DependencyCounter + # @return [DependencyCounter] a new instance of DependencyCounter + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#9 def initialize(count, &block); end + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#14 def update(time, value, reason); end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#3 class Concurrent::Error < ::StandardError; end +# Old school kernel-style event reminiscent of Win32 programming in C++. +# +# When an `Event` is created it is in the `unset` state. Threads can choose to +# `#wait` on the event, blocking until released by another thread. When one +# thread wants to alert all blocking threads it calls the `#set` method which +# will then wake up all listeners. Once an `Event` has been set it remains set. +# New threads calling `#wait` will return immediately. An `Event` may be +# `#reset` at any time once it has been set. +# +# @example +# event = Concurrent::Event.new +# +# t1 = Thread.new do +# puts "t1 is waiting" +# event.wait(1) +# puts "event occurred" +# end +# +# t2 = Thread.new do +# puts "t2 calling set" +# event.set +# end +# +# [t1, t2].each(&:join) +# +# # prints: +# # t1 is waiting +# # t2 calling set +# # event occurred +# @see http://msdn.microsoft.com/en-us/library/windows/desktop/ms682655.aspx +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/event.rb#36 class Concurrent::Event < ::Concurrent::Synchronization::LockableObject + # Creates a new `Event` in the unset state. Threads calling `#wait` on the + # `Event` will block. + # + # @return [Event] a new instance of Event + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/event.rb#40 def initialize; end + # Reset a previously set event back to the `unset` state. + # Has no effect if the `Event` has not yet been set. + # + # @return [Boolean] should always return `true` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/event.rb#68 def reset; end + + # Trigger the event, setting the state to `set` and releasing all threads + # waiting on the event. Has no effect if the `Event` has already been set. + # + # @return [Boolean] should always return `true` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/event.rb#56 def set; end + + # Is the object in the set state? + # + # @return [Boolean] indicating whether or not the `Event` has been set + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/event.rb#48 def set?; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/event.rb#60 def try?; end + + # Wait a given number of seconds for the `Event` to be set by another + # thread. Will wait forever when no `timeout` value is given. Returns + # immediately if the `Event` has already been set. + # + # @return [Boolean] true if the `Event` was set before timeout else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/event.rb#83 def wait(timeout = T.unsafe(nil)); end protected + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/event.rb#104 def ns_initialize; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/event.rb#96 def ns_set; end end +# A synchronization point at which threads can pair and swap elements within +# pairs. Each thread presents some object on entry to the exchange method, +# matches with a partner thread, and receives its partner's object on return. +# +# +# ## Thread-safe Variable Classes +# +# Each of the thread-safe variable classes is designed to solve a different +# problem. In general: +# +# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, +# uncoordinated, *asynchronous* change of individual values. Best used when +# the value will undergo frequent, complex updates. Suitable when the result +# of an update does not need to be known immediately. +# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, +# uncoordinated, *synchronous* change of individual values. Best used when +# the value will undergo frequent reads but only occasional, though complex, +# updates. Suitable when the result of an update must be known immediately. +# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated +# atomically. Updates are synchronous but fast. Best used when updates a +# simple set operations. Not suitable when updates are complex. +# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar +# but optimized for the given data type. +# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used +# when two or more threads need to exchange data. The threads will pair then +# block on each other until the exchange is complete. +# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread +# must give a value to another, which must take the value. The threads will +# block on each other until the exchange is complete. +# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which +# holds a different value for each thread which has access. Often used as +# an instance variable in objects which must maintain different state +# for different threads. +# * *{Concurrent::TVar}:* Shared, mutable variables which provide +# *coordinated*, *synchronous*, change of *many* stated. Used when multiple +# value must change together, in an all-or-nothing transaction. +# This implementation is very simple, using only a single slot for each +# exchanger (unlike more advanced implementations which use an "arena"). +# This approach will work perfectly fine when there are only a few threads +# accessing a single `Exchanger`. Beyond a handful of threads the performance +# will degrade rapidly due to contention on the single slot, but the algorithm +# will remain correct. +# +# @example +# +# exchanger = Concurrent::Exchanger.new +# +# threads = [ +# Thread.new { puts "first: " << exchanger.exchange('foo', 1) }, #=> "first: bar" +# Thread.new { puts "second: " << exchanger.exchange('bar', 1) } #=> "second: foo" +# ] +# threads.each {|t| t.join(2) } +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Exchanger.html java.util.concurrent.Exchanger +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#336 class Concurrent::Exchanger < ::Concurrent::RubyExchanger; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#327 Concurrent::ExchangerImplementation = Concurrent::RubyExchanger +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/executor_service.rb#157 module Concurrent::ExecutorService include ::Logger::Severity include ::Concurrent::Concern::Logging + # Submit a task to the executor for asynchronous processing. + # + # @param task [Proc] the asynchronous task to perform + # @return [self] returns itself + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/executor_service.rb#166 def <<(task); end + + # Does the task queue have a maximum size? + # + # @note Always returns `false` + # @return [Boolean] True if the task queue has a maximum size else false. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/executor_service.rb#174 def can_overflow?; end + + # Submit a task to the executor for asynchronous processing. + # + # @param args [Array] zero or more arguments to be passed to the task + # @raise [ArgumentError] if no task is given + # @return [Boolean] `true` if the task is queued, `false` if the executor + # is not running + # @yield the asynchronous task to perform + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/executor_service.rb#161 def post(*args, &task); end + + # Does this executor guarantee serialization of its operations? + # + # @note Always returns `false` + # @return [Boolean] True if the executor guarantees that all operations + # will be post in the order they are received and no two operations may + # occur simultaneously. Else false. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/executor_service.rb#181 def serialized?; end end +# A `FiberLocalVar` is a variable where the value is different for each fiber. +# Each variable may have a default value, but when you modify the variable only +# the current fiber will ever see that change. +# +# This is similar to Ruby's built-in fiber-local variables (`Thread.current[:name]`), +# but with these major advantages: +# * `FiberLocalVar` has its own identity, it doesn't need a Symbol. +# * Each Ruby's built-in fiber-local variable leaks some memory forever (it's a Symbol held forever on the fiber), +# so it's only OK to create a small amount of them. +# `FiberLocalVar` has no such issue and it is fine to create many of them. +# * Ruby's built-in fiber-local variables leak forever the value set on each fiber (unless set to nil explicitly). +# `FiberLocalVar` automatically removes the mapping for each fiber once the `FiberLocalVar` instance is GC'd. +# +# @example +# v = FiberLocalVar.new(14) +# v.value #=> 14 +# v.value = 2 +# v.value #=> 2 +# @example +# v = FiberLocalVar.new(14) +# +# Fiber.new do +# v.value #=> 14 +# v.value = 1 +# v.value #=> 1 +# end.resume +# +# Fiber.new do +# v.value #=> 14 +# v.value = 2 +# v.value #=> 2 +# end.resume +# +# v.value #=> 14 +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb#41 class Concurrent::FiberLocalVar + # Creates a fiber local variable. + # + # @param default [Object] the default value when otherwise unset + # @param default_block [Proc] Optional block that gets called to obtain the + # default value for each fiber + # @return [FiberLocalVar] a new instance of FiberLocalVar + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb#49 def initialize(default = T.unsafe(nil), &default_block); end + # Bind the given value to fiber local storage during + # execution of the given block. + # + # @param value [Object] the value to bind + # @return [Object] the value + # @yield the operation to be performed with the bound variable + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb#86 def bind(value); end + + # Returns the value in the current fiber's copy of this fiber-local variable. + # + # @return [Object] the current value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb#68 def value; end + + # Sets the current fiber's copy of this fiber-local variable to the specified value. + # + # @param value [Object] the value to set + # @return [Object] the new value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb#76 def value=(value); end protected + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb#101 def default; end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb#42 Concurrent::FiberLocalVar::LOCALS = T.let(T.unsafe(nil), Concurrent::FiberLocals) +# An array-backed storage of indexed variables per fiber. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#166 class Concurrent::FiberLocals < ::Concurrent::AbstractLocals + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#167 def locals; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#171 def locals!; end end +# A thread pool that reuses a fixed number of threads operating off an unbounded queue. +# At any point, at most `num_threads` will be active processing tasks. When all threads are busy new +# tasks `#post` to the thread pool are enqueued until a thread becomes available. +# Should a thread crash for any reason the thread will immediately be removed +# from the pool and replaced. +# +# The API and behavior of this class are based on Java's `FixedThreadPool` +# +# **Thread Pool Options** +# +# Thread pools support several configuration options: +# +# * `idletime`: The number of seconds that a thread may be idle before being reclaimed. +# * `name`: The name of the executor (optional). Printed in the executor's `#to_s` output and +# a `-worker-` name is given to its threads if supported by used Ruby +# implementation. `` is uniq for each thread. +# * `max_queue`: The maximum number of tasks that may be waiting in the work queue at +# any one time. When the queue size reaches `max_queue` and no new threads can be created, +# subsequent tasks will be rejected in accordance with the configured `fallback_policy`. +# * `auto_terminate`: When true (default), the threads started will be marked as daemon. +# * `fallback_policy`: The policy defining how rejected tasks are handled. +# +# Three fallback policies are supported: +# +# * `:abort`: Raise a `RejectedExecutionError` exception and discard the task. +# * `:discard`: Discard the task and return false. +# * `:caller_runs`: Execute the task on the calling thread. +# +# **Shutting Down Thread Pools** +# +# Killing a thread pool while tasks are still being processed, either by calling +# the `#kill` method or at application exit, will have unpredictable results. There +# is no way for the thread pool to know what resources are being used by the +# in-progress tasks. When those tasks are killed the impact on those resources +# cannot be predicted. The *best* practice is to explicitly shutdown all thread +# pools using the provided methods: +# +# * Call `#shutdown` to initiate an orderly termination of all in-progress tasks +# * Call `#wait_for_termination` with an appropriate timeout interval an allow +# the orderly shutdown to complete +# * Call `#kill` *only when* the thread pool fails to shutdown in the allotted time +# +# On some runtime platforms (most notably the JVM) the application will not +# exit until all thread pools have been shutdown. To prevent applications from +# "hanging" on exit, all threads can be marked as daemon according to the +# `:auto_terminate` option. +# +# ```ruby +# pool1 = Concurrent::FixedThreadPool.new(5) # threads will be marked as daemon +# pool2 = Concurrent::FixedThreadPool.new(5, auto_terminate: false) # mark threads as non-daemon +# ``` +# +# @note Failure to properly shutdown a thread pool can lead to unpredictable results. +# Please read *Shutting Down Thread Pools* for more information. +# @see http://docs.oracle.com/javase/tutorial/essential/concurrency/pools.html Java Tutorials: Thread Pools +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executors.html Java Executors class +# @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ExecutorService.html Java ExecutorService interface +# @see https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html#setDaemon-boolean- +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/fixed_thread_pool.rb#197 class Concurrent::FixedThreadPool < ::Concurrent::ThreadPoolExecutor + # Create a new thread pool. + # + # @option opts + # @param num_threads [Integer] the number of threads to allocate + # @param opts [Hash] the options defining pool behavior. + # @raise [ArgumentError] if `num_threads` is less than or equal to zero + # @raise [ArgumentError] if `fallback_policy` is not a known policy + # @return [FixedThreadPool] a new instance of FixedThreadPool + # @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executors.html#newFixedThreadPool-int- + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/fixed_thread_pool.rb#211 def initialize(num_threads, opts = T.unsafe(nil)); end end +# {include:file:docs-source/future.md} +# +# @see http://ruby-doc.org/stdlib-2.1.1/libdoc/observer/rdoc/Observable.html Ruby Observable module +# @see http://clojuredocs.org/clojure_core/clojure.core/future Clojure's future function +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Future.html java.util.concurrent.Future +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/future.rb#21 class Concurrent::Future < ::Concurrent::IVar + # Create a new `Future` in the `:unscheduled` state. + # + # @option opts + # @param opts [Hash] a customizable set of options + # @raise [ArgumentError] if no block is given + # @return [Future] a new instance of Future + # @yield the asynchronous operation to perform + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/future.rb#33 def initialize(opts = T.unsafe(nil), &block); end + # Attempt to cancel the operation if it has not already processed. + # The operation can only be cancelled while still `pending`. It cannot + # be cancelled once it has begun processing or has completed. + # + # @return [Boolean] was the operation successfully cancelled. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/future.rb#99 def cancel; end + + # Has the operation been successfully cancelled? + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/future.rb#111 def cancelled?; end + + # Execute an `:unscheduled` `Future`. Immediately sets the state to `:pending` and + # passes the block to a new thread/thread pool for eventual execution. + # Does nothing if the `Future` is in any state other than `:unscheduled`. + # + # @example Instance and execute in separate steps + # future = Concurrent::Future.new{ sleep(1); 42 } + # future.state #=> :unscheduled + # future.execute + # future.state #=> :pending + # @example Instance and execute in one line + # future = Concurrent::Future.new{ sleep(1); 42 }.execute + # future.state #=> :pending + # @return [Future] a reference to `self` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/future.rb#53 def execute; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/future.rb#82 def set(value = T.unsafe(nil), &block); end + + # Wait the given number of seconds for the operation to complete. + # On timeout attempt to cancel the operation. + # + # @param timeout [Numeric] the maximum time in seconds to wait. + # @return [Boolean] true if the operation completed before the timeout + # else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/future.rb#121 def wait_or_cancel(timeout); end protected + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/future.rb#133 def ns_initialize(value, opts); end class << self + # Create a new `Future` object with the given block, execute it, and return the + # `:pending` object. + # + # @example + # future = Concurrent::Future.execute{ sleep(1); 42 } + # future.state #=> :pending + # @option opts + # @param opts [Hash] a customizable set of options + # @raise [ArgumentError] if no block is given + # @return [Future] the newly created `Future` in the `:pending` state + # @yield the asynchronous operation to perform + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/future.rb#77 def execute(opts = T.unsafe(nil), &block); end end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#18 Concurrent::GLOBAL_FAST_EXECUTOR = T.let(T.unsafe(nil), Concurrent::Delay) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#30 Concurrent::GLOBAL_IMMEDIATE_EXECUTOR = T.let(T.unsafe(nil), Concurrent::ImmediateExecutor) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#22 Concurrent::GLOBAL_IO_EXECUTOR = T.let(T.unsafe(nil), Concurrent::Delay) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#106 Concurrent::GLOBAL_LOGGER = T.let(T.unsafe(nil), Concurrent::AtomicReference) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#26 Concurrent::GLOBAL_TIMER_SET = T.let(T.unsafe(nil), Concurrent::Delay) + +# A thread-safe subclass of Hash. This version locks against the object +# itself for every method call, ensuring only one thread can be reading +# or writing at a time. This includes iteration methods like `#each`, +# which takes the lock repeatedly when reading an item. +# +# @see http://ruby-doc.org/core/Hash.html Ruby standard library `Hash` +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/hash.rb#47 class Concurrent::Hash < ::Hash; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/hash.rb#16 Concurrent::HashImplementation = Hash +# An `IVar` is like a future that you can assign. As a future is a value that +# is being computed that you can wait on, an `IVar` is a value that is waiting +# to be assigned, that you can wait on. `IVars` are single assignment and +# deterministic. +# +# Then, express futures as an asynchronous computation that assigns an `IVar`. +# The `IVar` becomes the primitive on which [futures](Future) and +# [dataflow](Dataflow) are built. +# +# An `IVar` is a single-element container that is normally created empty, and +# can only be set once. The I in `IVar` stands for immutable. Reading an +# `IVar` normally blocks until it is set. It is safe to set and read an `IVar` +# from different threads. +# +# If you want to have some parallel task set the value in an `IVar`, you want +# a `Future`. If you want to create a graph of parallel tasks all executed +# when the values they depend on are ready you want `dataflow`. `IVar` is +# generally a low-level primitive. +# +# ## Examples +# +# Create, set and get an `IVar` +# +# ```ruby +# ivar = Concurrent::IVar.new +# ivar.set 14 +# ivar.value #=> 14 +# ivar.set 2 # would now be an error +# ``` +# +# ## See Also +# +# 1. For the theory: Arvind, R. Nikhil, and K. Pingali. +# [I-Structures: Data structures for parallel computing](http://dl.acm.org/citation.cfm?id=69562). +# In Proceedings of Workshop on Graph Reduction, 1986. +# 2. For recent application: +# [DataDrivenFuture in Habanero Java from Rice](http://www.cs.rice.edu/~vs3/hjlib/doc/edu/rice/hj/api/HjDataDrivenFuture.html). +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#48 class Concurrent::IVar < ::Concurrent::Synchronization::LockableObject include ::Concurrent::Concern::Dereferenceable include ::Concurrent::Concern::Obligation include ::Concurrent::Concern::Observable + # Create a new `IVar` in the `:pending` state with the (optional) initial value. + # + # @option opts + # @option opts + # @option opts + # @param value [Object] the initial value + # @param opts [Hash] the options to create a message with + # @return [IVar] a new instance of IVar + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#62 def initialize(value = T.unsafe(nil), opts = T.unsafe(nil), &block); end + # Add an observer on this object that will receive notification on update. + # + # Upon completion the `IVar` will notify all observers in a thread-safe way. + # The `func` method of the observer will be called with three arguments: the + # `Time` at which the `Future` completed the asynchronous operation, the + # final `value` (or `nil` on rejection), and the final `reason` (or `nil` on + # fulfillment). + # + # @param observer [Object] the object that will be notified of changes + # @param func [Symbol] symbol naming the method to call when this + # `Observable` has changes` + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#81 def add_observer(observer = T.unsafe(nil), func = T.unsafe(nil), &block); end + + # Set the `IVar` to failed due to some error and wake or notify all threads waiting on it. + # + # @param reason [Object] for the failure + # @raise [Concurrent::MultipleAssignmentError] if the `IVar` has already + # been set or otherwise completed + # @return [IVar] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#135 def fail(reason = T.unsafe(nil)); end + + # Set the `IVar` to a value and wake or notify all threads waiting on it. + # + # @param value [Object] the value to store in the `IVar` + # @raise [ArgumentError] if both a value and a block are given + # @raise [Concurrent::MultipleAssignmentError] if the `IVar` has already + # been set or otherwise completed + # @return [IVar] self + # @yield A block operation to use for setting the value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#113 def set(value = T.unsafe(nil)); end + + # Attempt to set the `IVar` with the given value or block. Return a + # boolean indicating the success or failure of the set operation. + # + # @param value [Object] the value to store in the `IVar` + # @raise [ArgumentError] if both a value and a block are given + # @raise [Concurrent::MultipleAssignmentError] if the `IVar` has already + # been set or otherwise completed + # @return [Boolean] true if the value was set else false + # @yield A block operation to use for setting the value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#145 def try_set(value = T.unsafe(nil), &block); end protected + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#202 def check_for_block_or_value!(block_given, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#177 def complete(success, value, reason); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#184 def complete_without_notification(success, value, reason); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#190 def notify_observers(value, reason); end + + # @raise [MultipleAssignmentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#195 def ns_complete_without_notification(success, value, reason); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#155 def ns_initialize(value, opts); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#168 def safe_execute(task, args = T.unsafe(nil)); end end +# Raised when an operation is attempted which is not legal given the +# receiver's current state +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#20 class Concurrent::IllegalOperationError < ::Concurrent::Error; end +# An executor service which runs all operations on the current thread, +# blocking as necessary. Operations are performed in the order they are +# received and no two operations can be performed simultaneously. +# +# This executor service exists mainly for testing an debugging. When used +# it immediately runs every `#post` operation on the current thread, blocking +# that thread until the operation is complete. This can be very beneficial +# during testing because it makes all operations deterministic. +# +# @note Intended for use primarily in testing and debugging. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#17 class Concurrent::ImmediateExecutor < ::Concurrent::AbstractExecutorService include ::Concurrent::SerialExecutorService + # Creates a new executor + # + # @return [ImmediateExecutor] a new instance of ImmediateExecutor + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#21 def initialize; end + # Submit a task to the executor for asynchronous processing. + # + # @param task [Proc] the asynchronous task to perform + # @return [self] returns itself + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#34 def <<(task); end + + # Begin an orderly shutdown. Tasks already in the queue will be executed, + # but no new tasks will be accepted. Has no additional effect if the + # thread pool is not running. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#55 def kill; end + + # Submit a task to the executor for asynchronous processing. + # + # @param args [Array] zero or more arguments to be passed to the task + # @raise [ArgumentError] if no task is given + # @return [Boolean] `true` if the task is queued, `false` if the executor + # is not running + # @yield the asynchronous task to perform + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#26 def post(*args, &task); end + + # Is the executor running? + # + # @return [Boolean] `true` when running, `false` when shutting down or shutdown + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#40 def running?; end + + # Begin an orderly shutdown. Tasks already in the queue will be executed, + # but no new tasks will be accepted. Has no additional effect if the + # thread pool is not running. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#55 def shutdown; end + + # Is the executor shutdown? + # + # @return [Boolean] `true` when shutdown, `false` when shutting down or running + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#50 def shutdown?; end + + # Is the executor shuttingdown? + # + # @return [Boolean] `true` when not running and not shutdown, else `false` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#45 def shuttingdown?; end + + # Block until executor shutdown is complete or until `timeout` seconds have + # passed. + # + # @note Does not initiate shutdown or termination. Either `shutdown` or `kill` + # must be called before this method (or on another thread). + # @param timeout [Integer] the maximum number of seconds to wait for shutdown to complete + # @return [Boolean] `true` if shutdown complete or false on `timeout` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#62 def wait_for_termination(timeout = T.unsafe(nil)); end end +# Raised when an attempt is made to violate an immutability guarantee. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#16 class Concurrent::ImmutabilityError < ::Concurrent::Error; end +# A thread-safe, immutable variation of Ruby's standard `Struct`. +# +# @see http://ruby-doc.org/core/Struct.html Ruby standard library `Struct` +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#9 module Concurrent::ImmutableStruct include ::Concurrent::Synchronization::AbstractStruct + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#51 def ==(other); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#46 def [](member); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#56 def each(&block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#62 def each_pair(&block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#29 def inspect; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#36 def merge(other, &block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#68 def select(&block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#17 def to_a; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#41 def to_h; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#29 def to_s; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#17 def values; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#24 def values_at(*indexes); end private + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#76 def initialize_copy(original); end class << self + # @private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#12 def included(base); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#82 def new(*args, &block); end end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#92 Concurrent::ImmutableStruct::FACTORY = T.let(T.unsafe(nil), T.untyped) +# An executor service which runs all operations on a new thread, blocking +# until it completes. Operations are performed in the order they are received +# and no two operations can be performed simultaneously. +# +# This executor service exists mainly for testing an debugging. When used it +# immediately runs every `#post` operation on a new thread, blocking the +# current thread until the operation is complete. This is similar to how the +# ImmediateExecutor works, but the operation has the full stack of the new +# thread at its disposal. This can be helpful when the operations will spawn +# more operations on the same executor and so on - such a situation might +# overflow the single stack in case of an ImmediateExecutor, which is +# inconsistent with how it would behave for a threaded executor. +# +# @note Intended for use primarily in testing and debugging. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/indirect_immediate_executor.rb#20 class Concurrent::IndirectImmediateExecutor < ::Concurrent::ImmediateExecutor + # Creates a new executor + # + # @return [IndirectImmediateExecutor] a new instance of IndirectImmediateExecutor + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/indirect_immediate_executor.rb#21 def initialize; end + # Submit a task to the executor for asynchronous processing. + # + # @param args [Array] zero or more arguments to be passed to the task + # @raise [ArgumentError] if no task is given + # @return [Boolean] `true` if the task is queued, `false` if the executor + # is not running + # @yield the asynchronous task to perform + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/indirect_immediate_executor.rb#27 def post(*args, &task); end end +# Raised when an object's methods are called when it has not been +# properly initialized. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#24 class Concurrent::InitializationError < ::Concurrent::Error; end + +# Raised when a lifecycle method (such as `stop`) is called in an improper +# sequence or when the object is in an inappropriate state. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#13 class Concurrent::LifecycleError < ::Concurrent::Error; end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#6 class Concurrent::LockFreeStack < ::Concurrent::Synchronization::Object include ::Enumerable extend ::Concurrent::Synchronization::SafeInitialization + # @param head [Node] + # @return [LockFreeStack] a new instance of LockFreeStack + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#51 def initialize(head = T.unsafe(nil)); end + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#137 def __initialize_atomic_fields__; end + + # @return [true, false] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#118 def clear; end + + # @return [self] + # @yield over the cleared stack + # @yieldparam value [Object] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#142 def clear_each(&block); end + + # @param head [Node] + # @return [true, false] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#128 def clear_if(head); end + + # @param head [Node] + # @return [true, false] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#99 def compare_and_clear(head); end + + # @param head [Node] + # @return [true, false] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#85 def compare_and_pop(head); end + + # @param head [Node] + # @param value [Object] + # @return [true, false] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#65 def compare_and_push(head, value); end + + # @param head [Node] + # @return [self] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#107 def each(head = T.unsafe(nil)); end + + # @param head [Node] + # @return [true, false] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#58 def empty?(head = T.unsafe(nil)); end + + # @return [String] Short string representation. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#154 def inspect; end + + # @return [Node] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#79 def peek; end + + # @return [Object] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#90 def pop; end + + # @param value [Object] + # @return [self] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#71 def push(value); end + + # @param head [Node] + # @param new_head [Node] + # @return [true, false] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#135 def replace_if(head, new_head); end + + # @return [String] Short string representation. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#154 def to_s; end private + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#105 def compare_and_set_head(expected, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#93 def head; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#97 def head=(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#101 def swap_head(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#109 def update_head(&block); end class << self + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#41 def of1(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#46 def of2(value1, value2); end end end +# The singleton for empty node +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#32 Concurrent::LockFreeStack::EMPTY = T.let(T.unsafe(nil), Concurrent::LockFreeStack::Node) +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#10 class Concurrent::LockFreeStack::Node + # @return [Node] a new instance of Node + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#23 def initialize(value, next_node); end + # @return [Node] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#14 def next_node; end + + # @return [Object] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#17 def value; end + + # allow to nil-ify to free GC when the entry is no longer relevant, not synchronised + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#21 def value=(_arg0); end class << self @@ -874,1444 +4760,6786 @@ class Concurrent::LockFreeStack::Node end end -Concurrent::LockLocalVar = Concurrent::ThreadLocalVar - +# Either {FiberLocalVar} or {ThreadLocalVar} depending on whether Mutex (and Monitor) +# are held, respectively, per Fiber or per Thread. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/lock_local_var.rb#21 +Concurrent::LockLocalVar = Concurrent::FiberLocalVar + +# An `MVar` is a synchronized single element container. They are empty or +# contain one item. Taking a value from an empty `MVar` blocks, as does +# putting a value into a full one. You can either think of them as blocking +# queue of length one, or a special kind of mutable variable. +# +# On top of the fundamental `#put` and `#take` operations, we also provide a +# `#mutate` that is atomic with respect to operations on the same instance. +# These operations all support timeouts. +# +# We also support non-blocking operations `#try_put!` and `#try_take!`, a +# `#set!` that ignores existing values, a `#value` that returns the value +# without removing it or returns `MVar::EMPTY`, and a `#modify!` that yields +# `MVar::EMPTY` if the `MVar` is empty and can be used to set `MVar::EMPTY`. +# You shouldn't use these operations in the first instance. +# +# `MVar` is a [Dereferenceable](Dereferenceable). +# +# `MVar` is related to M-structures in Id, `MVar` in Haskell and `SyncVar` in Scala. +# +# Note that unlike the original Haskell paper, our `#take` is blocking. This is how +# Haskell and Scala do it today. +# +# ## See Also +# +# 1. P. Barth, R. Nikhil, and Arvind. [M-Structures: Extending a parallel, non- strict, functional language with state](http://dl.acm.org/citation.cfm?id=652538). In Proceedings of the 5th +# ACM Conference on Functional Programming Languages and Computer Architecture (FPCA), 1991. +# +# 2. S. Peyton Jones, A. Gordon, and S. Finne. [Concurrent Haskell](http://dl.acm.org/citation.cfm?id=237794). +# In Proceedings of the 23rd Symposium on Principles of Programming Languages +# (PoPL), 1996. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#38 class Concurrent::MVar < ::Concurrent::Synchronization::Object include ::Concurrent::Concern::Dereferenceable extend ::Concurrent::Synchronization::SafeInitialization + # Create a new `MVar`, either empty or with an initial value. + # + # @param opts [Hash] the options controlling how the future will be processed + # @return [MVar] a new instance of MVar + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#54 def initialize(value = T.unsafe(nil), opts = T.unsafe(nil)); end + # acquires lock on the from an `MVAR`, yields the value to provided block, + # and release lock. A timeout can be set to limit the time spent blocked, + # in which case it returns `TIMEOUT` if the time is exceeded. + # + # @return [Object] the value returned by the block, or `TIMEOUT` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#86 def borrow(timeout = T.unsafe(nil)); end + + # Returns if the `MVar` is currently empty. + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#195 def empty?; end + + # Returns if the `MVar` currently contains a value. + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#200 def full?; end + + # Atomically `take`, yield the value to a block for transformation, and then + # `put` the transformed value. Returns the transformed value. A timeout can + # be set to limit the time spent blocked, in which case it returns `TIMEOUT` + # if the time is exceeded. + # + # @raise [ArgumentError] + # @return [Object] the transformed value, or `TIMEOUT` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#123 def modify(timeout = T.unsafe(nil)); end + + # Non-blocking version of `modify` that will yield with `EMPTY` if there is no value yet. + # + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#179 def modify!; end + + # Put a value into an `MVar`, blocking if there is already a value until + # it is empty. A timeout can be set to limit the time spent blocked, in + # which case it returns `TIMEOUT` if the time is exceeded. + # + # @return [Object] the value that was put, or `TIMEOUT` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#103 def put(value, timeout = T.unsafe(nil)); end + + # Non-blocking version of `put` that will overwrite an existing value. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#169 def set!(value); end + + # Remove the value from an `MVar`, leaving it empty, and blocking if there + # isn't a value. A timeout can be set to limit the time spent blocked, in + # which case it returns `TIMEOUT` if the time is exceeded. + # + # @return [Object] the value that was taken, or `TIMEOUT` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#66 def take(timeout = T.unsafe(nil)); end + + # Non-blocking version of `put`, that returns whether or not it was successful. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#156 def try_put!(value); end + + # Non-blocking version of `take`, that returns `EMPTY` instead of blocking. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#142 def try_take!; end protected + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#206 def synchronize(&block); end private + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#212 def unlocked_empty?; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#216 def unlocked_full?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#224 def wait_for_empty(timeout); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#220 def wait_for_full(timeout); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#228 def wait_while(condition, timeout); end end +# Unique value that represents that an `MVar` was empty +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#43 Concurrent::MVar::EMPTY = T.let(T.unsafe(nil), Object) + +# Unique value that represents that an `MVar` timed out before it was able +# to produce a value. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#47 Concurrent::MVar::TIMEOUT = T.let(T.unsafe(nil), Object) +# `Concurrent::Map` is a hash-like object and should have much better performance +# characteristics, especially under high concurrency, than `Concurrent::Hash`. +# However, `Concurrent::Map `is not strictly semantically equivalent to a ruby `Hash` +# -- for instance, it does not necessarily retain ordering by insertion time as `Hash` +# does. For most uses it should do fine though, and we recommend you consider +# `Concurrent::Map` instead of `Concurrent::Hash` for your concurrency-safe hash needs. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#39 class Concurrent::Map < ::Concurrent::Collection::MriMapBackend + # Iterates over each key value pair. + # This method is atomic. + # + # @note Atomic methods taking a block do not allow the `self` instance + # to be used within the block. Doing so will cause a deadlock. + # @return [self] + # @yield for each key value pair in the map + # @yieldparam key [Object] + # @yieldparam value [Object] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#274 def each; end + + # Iterates over each key. + # This method is atomic. + # + # @note Atomic methods taking a block do not allow the `self` instance + # to be used within the block. Doing so will cause a deadlock. + # @return [self] + # @yield for each key in the map + # @yieldparam key [Object] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#255 def each_key; end + + # Iterates over each key value pair. + # This method is atomic. + # + # @note Atomic methods taking a block do not allow the `self` instance + # to be used within the block. Doing so will cause a deadlock. + # @return [self] + # @yield for each key value pair in the map + # @yieldparam key [Object] + # @yieldparam value [Object] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#274 def each_pair; end + + # Iterates over each value. + # This method is atomic. + # + # @note Atomic methods taking a block do not allow the `self` instance + # to be used within the block. Doing so will cause a deadlock. + # @return [self] + # @yield for each value in the map + # @yieldparam value [Object] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#264 def each_value; end + + # Is map empty? + # + # @return [true, false] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#291 def empty?; end + + # Get a value with key, or default_value when key is absent, + # or fail when no default_value is given. + # + # @note The "fetch-then-act" methods of `Map` are not atomic. `Map` is intended + # to be use as a concurrency primitive with strong happens-before + # guarantees. It is not intended to be used as a high-level abstraction + # supporting complex operations. All read and write operations are + # thread safe, but no guarantees are made regarding race conditions + # between the fetch operation and yielding to the block. Additionally, + # this method does not support recursion. This is due to internal + # constraints that are very unlikely to change in the near future. + # @param key [Object] + # @param default_value [Object] + # @raise [KeyError] when key is missing and no default_value is provided + # @return [Object] the value or default value + # @yield default value for a key + # @yieldparam key [Object] + # @yieldreturn [Object] default value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#183 def fetch(key, default_value = T.unsafe(nil)); end + + # Fetch value with key, or store default value when key is absent, + # or fail when no default_value is given. This is a two step operation, + # therefore not atomic. The store can overwrite other concurrently + # stored value. + # + # @param key [Object] + # @param default_value [Object] + # @return [Object] the value or default value + # @yield default value for a key + # @yieldparam key [Object] + # @yieldreturn [Object] default value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#205 def fetch_or_store(key, default_value = T.unsafe(nil)); end + + # Get a value with key + # + # @param key [Object] + # @return [Object] the value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#21 def get(key); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#321 def inspect; end + + # Find key of a value. + # + # @param value [Object] + # @return [Object, nil] key or nil when not found + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#284 def key(value); end + + # All keys + # + # @return [::Array] keys + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#236 def keys; end + + # @raise [TypeError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#305 def marshal_dump; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#313 def marshal_load(hash); end + + # Set a value with key + # + # @param key [Object] + # @param value [Object] + # @return [Object] the new value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#17 def put(key, value); end + + # Insert value into map with key if key is absent in one atomic step. + # + # @param key [Object] + # @param value [Object] + # @return [Object, nil] the previous value when key was present or nil when there was no key + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#215 def put_if_absent(key, value); end + + # Is the value stored in the map. Iterates over all values. + # + # @param value [Object] + # @return [true, false] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#227 def value?(value); end + + # All values + # + # @return [::Array] values + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#244 def values; end private + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#331 def initialize_copy(other); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#336 def populate_from(hash); end + + # @raise [KeyError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#327 def raise_fetch_no_key; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#341 def validate_options_hash!(options); end end +# Raised when an object with a start/stop lifecycle has been started an +# excessive number of times. Often used in conjunction with a restart +# policy or strategy. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#29 class Concurrent::MaxRestartFrequencyError < ::Concurrent::Error; end +# A `Maybe` encapsulates an optional value. A `Maybe` either contains a value +# of (represented as `Just`), or it is empty (represented as `Nothing`). Using +# `Maybe` is a good way to deal with errors or exceptional cases without +# resorting to drastic measures such as exceptions. +# +# `Maybe` is a replacement for the use of `nil` with better type checking. +# +# For compatibility with {Concurrent::Concern::Obligation} the predicate and +# accessor methods are aliased as `fulfilled?`, `rejected?`, `value`, and +# `reason`. +# +# ## Motivation +# +# A common pattern in languages with pattern matching, such as Erlang and +# Haskell, is to return *either* a value *or* an error from a function +# Consider this Erlang code: +# +# ```erlang +# case file:consult("data.dat") of +# {ok, Terms} -> do_something_useful(Terms); +# {error, Reason} -> lager:error(Reason) +# end. +# ``` +# +# In this example the standard library function `file:consult` returns a +# [tuple](http://erlang.org/doc/reference_manual/data_types.html#id69044) +# with two elements: an [atom](http://erlang.org/doc/reference_manual/data_types.html#id64134) +# (similar to a ruby symbol) and a variable containing ancillary data. On +# success it returns the atom `ok` and the data from the file. On failure it +# returns `error` and a string with an explanation of the problem. With this +# pattern there is no ambiguity regarding success or failure. If the file is +# empty the return value cannot be misinterpreted as an error. And when an +# error occurs the return value provides useful information. +# +# In Ruby we tend to return `nil` when an error occurs or else we raise an +# exception. Both of these idioms are problematic. Returning `nil` is +# ambiguous because `nil` may also be a valid value. It also lacks +# information pertaining to the nature of the error. Raising an exception +# is both expensive and usurps the normal flow of control. All of these +# problems can be solved with the use of a `Maybe`. +# +# A `Maybe` is unambiguous with regard to whether or not it contains a value. +# When `Just` it contains a value, when `Nothing` it does not. When `Just` +# the value it contains may be `nil`, which is perfectly valid. When +# `Nothing` the reason for the lack of a value is contained as well. The +# previous Erlang example can be duplicated in Ruby in a principled way by +# having functions return `Maybe` objects: +# +# ```ruby +# result = MyFileUtils.consult("data.dat") # returns a Maybe +# if result.just? +# do_something_useful(result.value) # or result.just +# else +# logger.error(result.reason) # or result.nothing +# end +# ``` +# +# @example Returning a Maybe from a Function +# module MyFileUtils +# def self.consult(path) +# file = File.open(path, 'r') +# Concurrent::Maybe.just(file.read) +# rescue => ex +# return Concurrent::Maybe.nothing(ex) +# ensure +# file.close if file +# end +# end +# +# maybe = MyFileUtils.consult('bogus.file') +# maybe.just? #=> false +# maybe.nothing? #=> true +# maybe.reason #=> # +# +# maybe = MyFileUtils.consult('README.md') +# maybe.just? #=> true +# maybe.nothing? #=> false +# maybe.value #=> "# Concurrent Ruby\n[![Gem Version..." +# @example Using Maybe with a Block +# result = Concurrent::Maybe.from do +# Client.find(10) # Client is an ActiveRecord model +# end +# +# # -- if the record was found +# result.just? #=> true +# result.value #=> # +# +# # -- if the record was not found +# result.just? #=> false +# result.reason #=> ActiveRecord::RecordNotFound +# @example Using Maybe with the Null Object Pattern +# # In a Rails controller... +# result = ClientService.new(10).find # returns a Maybe +# render json: result.or(NullClient.new) +# @see https://hackage.haskell.org/package/base-4.2.0.1/docs/Data-Maybe.html Haskell Data.Maybe +# @see https://github.com/purescript/purescript-maybe/blob/master/docs/Data.Maybe.md PureScript Data.Maybe +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#104 class Concurrent::Maybe < ::Concurrent::Synchronization::Object include ::Comparable extend ::Concurrent::Synchronization::SafeInitialization + # Create a new `Maybe` with the given attributes. + # + # @param just [Object] The value when `Just` else `NONE`. + # @param nothing [Exception, Object] The exception when `Nothing` else `NONE`. + # @return [Maybe] The new `Maybe`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#224 def initialize(just, nothing); end + # Comparison operator. + # + # @return [Integer] 0 if self and other are both `Nothing`; + # -1 if self is `Nothing` and other is `Just`; + # 1 if self is `Just` and other is nothing; + # `self.just <=> other.just` if both self and other are `Just`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#199 def <=>(other); end + + # Is this `Maybe` a `Just` (successfully fulfilled with a value)? + # + # @return [Boolean] True if `Just` or false if `Nothing`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#176 def fulfilled?; end + + # The value of a `Maybe` when `Just`. Will be `NONE` when `Nothing`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#114 def just; end + + # Is this `Maybe` a `Just` (successfully fulfilled with a value)? + # + # @return [Boolean] True if `Just` or false if `Nothing`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#176 def just?; end + + # The reason for the `Maybe` when `Nothing`. Will be `NONE` when `Just`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#117 def nothing; end + + # Is this `Maybe` a `nothing` (rejected with an exception upon fulfillment)? + # + # @return [Boolean] True if `Nothing` or false if `Just`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#184 def nothing?; end + + # Return either the value of self or the given default value. + # + # @return [Object] The value of self when `Just`; else the given default. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#210 def or(other); end + + # The reason for the `Maybe` when `Nothing`. Will be `NONE` when `Just`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#117 def reason; end + + # Is this `Maybe` a `nothing` (rejected with an exception upon fulfillment)? + # + # @return [Boolean] True if `Nothing` or false if `Just`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#184 def rejected?; end + + # The value of a `Maybe` when `Just`. Will be `NONE` when `Nothing`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#114 def value; end class << self + # Create a new `Maybe` using the given block. + # + # Runs the given block passing all function arguments to the block as block + # arguments. If the block runs to completion without raising an exception + # a new `Just` is created with the value set to the return value of the + # block. If the block raises an exception a new `Nothing` is created with + # the reason being set to the raised exception. + # + # @param args [Array] Zero or more arguments to pass to the block. + # @raise [ArgumentError] when no block given. + # @return [Maybe] The newly created object. + # @yield The block from which to create a new `Maybe`. + # @yieldparam args [Array] Zero or more block arguments passed as + # arguments to the function. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#137 def from(*args); end + + # Create a new `Just` with the given value. + # + # @param value [Object] The value to set for the new `Maybe` object. + # @return [Maybe] The newly created object. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#152 def just(value); end + + # Create a new `Nothing` with the given (optional) reason. + # + # @param error [Exception] The reason to set for the new `Maybe` object. + # When given a string a new `StandardError` will be created with the + # argument as the message. When no argument is given a new + # `StandardError` with an empty message will be created. + # @return [Maybe] The newly created object. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#164 def nothing(error = T.unsafe(nil)); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/safe_initialization.rb#29 + def new(*args, &block); end end end +# Indicates that the given attribute has not been set. +# When `Just` the {#nothing} getter will return `NONE`. +# When `Nothing` the {#just} getter will return `NONE`. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#111 Concurrent::Maybe::NONE = T.let(T.unsafe(nil), Object) +# Raised when an attempt is made to modify an immutable object +# (such as an `IVar`) after its final state has been set. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#33 class Concurrent::MultipleAssignmentError < ::Concurrent::Error + # @return [MultipleAssignmentError] a new instance of MultipleAssignmentError + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#36 def initialize(message = T.unsafe(nil), inspection_data = T.unsafe(nil)); end + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#41 def inspect; end + + # Returns the value of attribute inspection_data. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#34 def inspection_data; end end +# Aggregates multiple exceptions. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#58 class Concurrent::MultipleErrors < ::Concurrent::Error + # @return [MultipleErrors] a new instance of MultipleErrors + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#61 def initialize(errors, message = T.unsafe(nil)); end + # Returns the value of attribute errors. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#59 def errors; end end +# An thread-safe variation of Ruby's standard `Struct`. Values can be set at +# construction or safely changed at any time during the object's lifecycle. +# +# @see http://ruby-doc.org/core/Struct.html Ruby standard library `Struct` +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#10 module Concurrent::MutableStruct include ::Concurrent::Synchronization::AbstractStruct + # Equality + # + # @return [Boolean] true if other has the same struct subclass and has + # equal member values (according to `Object#==`) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#128 def ==(other); end + + # Attribute Reference + # + # @param member [Symbol, String, Integer] the string or symbol name of the member + # for which to obtain the value or the member's index + # @raise [NameError] if the member does not exist + # @raise [IndexError] if the index is out of range. + # @return [Object] the value of the given struct member or the member at the given index. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#118 def [](member); end + + # Attribute Assignment + # + # Sets the value of the given struct member or the member at the given index. + # + # @param member [Symbol, String, Integer] the string or symbol name of the member + # for which to obtain the value or the member's index + # @raise [NameError] if the name does not exist + # @raise [IndexError] if the index is out of range. + # @return [Object] the value of the given struct member or the member at the given index. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#185 def []=(member, value); end + + # Yields the value of each struct member in order. If no block is given + # an enumerator is returned. + # + # @yield the operation to be performed on each struct member + # @yieldparam value [Object] each struct value (in order) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#139 def each(&block); end + + # Yields the name and value of each struct member in order. If no block is + # given an enumerator is returned. + # + # @yield the operation to be performed on each struct member/value pair + # @yieldparam member [Object] each struct member (in order) + # @yieldparam value [Object] each struct value (in order) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#152 def each_pair(&block); end + + # Describe the contents of this struct in a string. + # + # @return [String] the contents of this struct in a string + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#72 def inspect; end + + # Returns a new struct containing the contents of `other` and the contents + # of `self`. If no block is specified, the value for entries with duplicate + # keys will be that of `other`. Otherwise the value for each duplicate key + # is determined by calling the block with the key, its value in `self` and + # its value in `other`. + # + # @param other [Hash] the hash from which to set the new values + # @raise [ArgumentError] of given a member that is not defined in the struct + # @return [Synchronization::AbstractStruct] a new struct with the new values + # @yield an options block for resolving duplicate keys + # @yieldparam member [String, Symbol] the name of the member which is duplicated + # @yieldparam selfvalue [Object] the value of the member in `self` + # @yieldparam othervalue [Object] the value of the member in `other` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#94 def merge(other, &block); end + + # Yields each member value from the struct to the block and returns an Array + # containing the member values from the struct for which the given block + # returns a true value (equivalent to `Enumerable#select`). + # + # @return [Array] an array containing each value for which the block returns true + # @yield the operation to be performed on each struct member + # @yieldparam value [Object] each struct value (in order) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#167 def select(&block); end + + # Returns the values for this struct as an Array. + # + # @return [Array] the values for this struct + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#51 def to_a; end + + # Returns a hash containing the names and values for the struct’s members. + # + # @return [Hash] the names and values for the struct’s members + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#103 def to_h; end + + # Describe the contents of this struct in a string. + # + # @return [String] the contents of this struct in a string + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#72 def to_s; end + + # Returns the values for this struct as an Array. + # + # @return [Array] the values for this struct + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#51 def values; end + + # Returns the struct member values for each selector as an Array. + # + # A selector may be either an Integer offset or a Range of offsets (as in `Array#values_at`). + # + # @param indexes [Fixnum, Range] the index(es) from which to obatin the values (in order) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#63 def values_at(*indexes); end private + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#202 def initialize_copy(original); end class << self + # Factory for creating new struct classes. + # + # ``` + # new([class_name] [, member_name]+>) -> StructClass click to toggle source + # new([class_name] [, member_name]+>) {|StructClass| block } -> StructClass + # new(value, ...) -> obj + # StructClass[value, ...] -> obj + # ``` + # + # The first two forms are used to create a new struct subclass `class_name` + # that can contain a value for each member_name . This subclass can be + # used to create instances of the structure like any other Class . + # + # If the `class_name` is omitted an anonymous struct class will be created. + # Otherwise, the name of this struct will appear as a constant in the struct class, + # so it must be unique for all structs under this base class and must start with a + # capital letter. Assigning a struct class to a constant also gives the class + # the name of the constant. + # + # If a block is given it will be evaluated in the context of `StructClass`, passing + # the created class as a parameter. This is the recommended way to customize a struct. + # Subclassing an anonymous struct creates an extra anonymous class that will never be used. + # + # The last two forms create a new instance of a struct subclass. The number of value + # parameters must be less than or equal to the number of attributes defined for the + # struct. Unset parameters default to nil. Passing more parameters than number of attributes + # will raise an `ArgumentError`. + # + # @see http://ruby-doc.org/core/Struct.html#method-c-new Ruby standard library `Struct#new` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#210 def new(*args, &block); end end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#220 Concurrent::MutableStruct::FACTORY = T.let(T.unsafe(nil), T.untyped) +# A boolean value that can be updated atomically. Reads and writes to an atomic +# boolean and thread-safe and guaranteed to succeed. Reads and writes may block +# briefly but no explicit locking is required. +# +# +# ## Thread-safe Variable Classes +# +# Each of the thread-safe variable classes is designed to solve a different +# problem. In general: +# +# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, +# uncoordinated, *asynchronous* change of individual values. Best used when +# the value will undergo frequent, complex updates. Suitable when the result +# of an update does not need to be known immediately. +# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, +# uncoordinated, *synchronous* change of individual values. Best used when +# the value will undergo frequent reads but only occasional, though complex, +# updates. Suitable when the result of an update must be known immediately. +# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated +# atomically. Updates are synchronous but fast. Best used when updates a +# simple set operations. Not suitable when updates are complex. +# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar +# but optimized for the given data type. +# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used +# when two or more threads need to exchange data. The threads will pair then +# block on each other until the exchange is complete. +# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread +# must give a value to another, which must take the value. The threads will +# block on each other until the exchange is complete. +# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which +# holds a different value for each thread which has access. Often used as +# an instance variable in objects which must maintain different state +# for different threads. +# * *{Concurrent::TVar}:* Shared, mutable variables which provide +# *coordinated*, *synchronous*, change of *many* stated. Used when multiple +# value must change together, in an all-or-nothing transaction. +# Performance: +# +# ``` +# Testing with ruby 2.1.2 +# Testing with Concurrent::MutexAtomicBoolean... +# 2.790000 0.000000 2.790000 ( 2.791454) +# Testing with Concurrent::CAtomicBoolean... +# 0.740000 0.000000 0.740000 ( 0.740206) +# +# Testing with jruby 1.9.3 +# Testing with Concurrent::MutexAtomicBoolean... +# 5.240000 2.520000 7.760000 ( 3.683000) +# Testing with Concurrent::JavaAtomicBoolean... +# 3.340000 0.010000 3.350000 ( 0.855000) +# ``` +# +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/atomic/AtomicBoolean.html java.util.concurrent.atomic.AtomicBoolean +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#8 class Concurrent::MutexAtomicBoolean extend ::Concurrent::Synchronization::SafeInitialization + # Creates a new `AtomicBoolean` with the given initial value. + # + # @param initial [Boolean] the initial value + # @return [MutexAtomicBoolean] a new instance of MutexAtomicBoolean + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#12 def initialize(initial = T.unsafe(nil)); end + # Is the current value `false` + # + # @return [Boolean] true if the current value is `false`, else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#34 def false?; end + + # Explicitly sets the value to false. + # + # @return [Boolean] true if value has changed, otherwise false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#44 def make_false; end + + # Explicitly sets the value to true. + # + # @return [Boolean] true if value has changed, otherwise false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#39 def make_true; end + + # Is the current value `true` + # + # @return [Boolean] true if the current value is `true`, else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#29 def true?; end + + # Retrieves the current `Boolean` value. + # + # @return [Boolean] the current value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#19 def value; end + + # Explicitly sets the value. + # + # @param value [Boolean] the new value to be set + # @return [Boolean] the current value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#24 def value=(value); end protected + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#51 def synchronize; end private + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#62 def ns_make_value(value); end end +# A numeric value that can be updated atomically. Reads and writes to an atomic +# fixnum and thread-safe and guaranteed to succeed. Reads and writes may block +# briefly but no explicit locking is required. +# +# +# ## Thread-safe Variable Classes +# +# Each of the thread-safe variable classes is designed to solve a different +# problem. In general: +# +# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, +# uncoordinated, *asynchronous* change of individual values. Best used when +# the value will undergo frequent, complex updates. Suitable when the result +# of an update does not need to be known immediately. +# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, +# uncoordinated, *synchronous* change of individual values. Best used when +# the value will undergo frequent reads but only occasional, though complex, +# updates. Suitable when the result of an update must be known immediately. +# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated +# atomically. Updates are synchronous but fast. Best used when updates a +# simple set operations. Not suitable when updates are complex. +# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar +# but optimized for the given data type. +# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used +# when two or more threads need to exchange data. The threads will pair then +# block on each other until the exchange is complete. +# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread +# must give a value to another, which must take the value. The threads will +# block on each other until the exchange is complete. +# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which +# holds a different value for each thread which has access. Often used as +# an instance variable in objects which must maintain different state +# for different threads. +# * *{Concurrent::TVar}:* Shared, mutable variables which provide +# *coordinated*, *synchronous*, change of *many* stated. Used when multiple +# value must change together, in an all-or-nothing transaction. +# Performance: +# +# ``` +# Testing with ruby 2.1.2 +# Testing with Concurrent::MutexAtomicFixnum... +# 3.130000 0.000000 3.130000 ( 3.136505) +# Testing with Concurrent::CAtomicFixnum... +# 0.790000 0.000000 0.790000 ( 0.785550) +# +# Testing with jruby 1.9.3 +# Testing with Concurrent::MutexAtomicFixnum... +# 5.460000 2.460000 7.920000 ( 3.715000) +# Testing with Concurrent::JavaAtomicFixnum... +# 4.520000 0.030000 4.550000 ( 1.187000) +# ``` +# +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/atomic/AtomicLong.html java.util.concurrent.atomic.AtomicLong +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#9 class Concurrent::MutexAtomicFixnum extend ::Concurrent::Synchronization::SafeInitialization + # Creates a new `AtomicFixnum` with the given initial value. + # + # @param initial [Fixnum] the initial value + # @raise [ArgumentError] if the initial value is not a `Fixnum` + # @return [MutexAtomicFixnum] a new instance of MutexAtomicFixnum + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#13 def initialize(initial = T.unsafe(nil)); end + # Atomically sets the value to the given updated value if the current + # value == the expected value. + # + # @param expect [Fixnum] the expected value + # @param update [Fixnum] the new value + # @return [Boolean] true if the value was updated else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#44 def compare_and_set(expect, update); end + + # Decreases the current value by the given amount (defaults to 1). + # + # @param delta [Fixnum] the amount by which to decrease the current value + # @return [Fixnum] the current value after decrementation + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#37 def decrement(delta = T.unsafe(nil)); end + + # Decreases the current value by the given amount (defaults to 1). + # + # @param delta [Fixnum] the amount by which to decrease the current value + # @return [Fixnum] the current value after decrementation + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#37 def down(delta = T.unsafe(nil)); end + + # Increases the current value by the given amount (defaults to 1). + # + # @param delta [Fixnum] the amount by which to increase the current value + # @return [Fixnum] the current value after incrementation + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#30 def increment(delta = T.unsafe(nil)); end + + # Increases the current value by the given amount (defaults to 1). + # + # @param delta [Fixnum] the amount by which to increase the current value + # @return [Fixnum] the current value after incrementation + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#30 def up(delta = T.unsafe(nil)); end + + # Pass the current value to the given block, replacing it + # with the block's result. May retry if the value changes + # during the block's execution. + # + # @return [Object] the new value + # @yield [Object] Calculate a new value for the atomic reference using + # given (old) value + # @yieldparam old_value [Object] the starting value of the atomic reference + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#56 def update; end + + # Retrieves the current `Fixnum` value. + # + # @return [Fixnum] the current value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#20 def value; end + + # Explicitly sets the value. + # + # @param value [Fixnum] the new value to be set + # @raise [ArgumentError] if the new value is not a `Fixnum` + # @return [Fixnum] the current value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#25 def value=(value); end protected + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#65 def synchronize; end private + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#76 def ns_set(value); end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#9 class Concurrent::MutexAtomicReference include ::Concurrent::AtomicDirectUpdate include ::Concurrent::AtomicNumericCompareAndSetWrapper extend ::Concurrent::Synchronization::SafeInitialization + # @param value [Object] The initial value. + # @return [MutexAtomicReference] a new instance of MutexAtomicReference + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#16 def initialize(value = T.unsafe(nil)); end + # Atomically sets the value to the given updated value if + # the current value == the expected value. + # + # that the actual value was not equal to the expected value. + # + # @param old_value [Object] the expected value + # @param new_value [Object] the new value + # @return [Boolean] `true` if successful. A `false` return indicates + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#45 def _compare_and_set(old_value, new_value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/numeric_cas_wrapper.rb#10 def compare_and_swap(old_value, new_value); end + + # Gets the current value. + # + # @return [Object] the current value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#23 def get; end + + # Atomically sets to the given value and returns the old value. + # + # @param new_value [Object] the new value + # @return [Object] the old value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#35 def get_and_set(new_value); end + + # Sets to the given value. + # + # @param new_value [Object] the new value + # @return [Object] the new value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#29 def set(new_value); end + + # Atomically sets to the given value and returns the old value. + # + # @param new_value [Object] the new value + # @return [Object] the old value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#35 def swap(new_value); end + + # Gets the current value. + # + # @return [Object] the current value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#23 def value; end + + # Sets to the given value. + # + # @param new_value [Object] the new value + # @return [Object] the new value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#29 def value=(new_value); end protected + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#59 def synchronize; end end +# A synchronization object that allows one thread to wait on multiple other threads. +# The thread that will wait creates a `CountDownLatch` and sets the initial value +# (normally equal to the number of other threads). The initiating thread passes the +# latch to the other threads then waits for the other threads by calling the `#wait` +# method. Each of the other threads calls `#count_down` when done with its work. +# When the latch counter reaches zero the waiting thread is unblocked and continues +# with its work. A `CountDownLatch` can be used only once. Its value cannot be reset. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_count_down_latch.rb#9 class Concurrent::MutexCountDownLatch < ::Concurrent::Synchronization::LockableObject + # Create a new `CountDownLatch` with the initial `count`. + # + # @param count [new] the initial count + # @raise [ArgumentError] if `count` is not an integer or is less than zero + # @return [MutexCountDownLatch] a new instance of MutexCountDownLatch + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_count_down_latch.rb#12 def initialize(count = T.unsafe(nil)); end + # The current value of the counter. + # + # @return [Fixnum] the current value of the counter + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_count_down_latch.rb#34 def count; end + + # Signal the latch to decrement the counter. Will signal all blocked threads when + # the `count` reaches zero. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_count_down_latch.rb#26 def count_down; end + + # Block on the latch until the counter reaches zero or until `timeout` is reached. + # + # @param timeout [Fixnum] the number of seconds to wait for the counter or `nil` + # to block indefinitely + # @return [Boolean] `true` if the `count` reaches zero else false on `timeout` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_count_down_latch.rb#21 def wait(timeout = T.unsafe(nil)); end protected + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_count_down_latch.rb#40 def ns_initialize(count); end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#9 class Concurrent::MutexSemaphore < ::Concurrent::Synchronization::LockableObject + # @return [MutexSemaphore] a new instance of MutexSemaphore + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#12 def initialize(count); end + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#20 def acquire(permits = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#38 def available_permits; end + + # Acquires and returns all permits that are immediately available. + # + # @return [Integer] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#47 def drain_permits; end + + # Shrinks the number of available permits by the indicated reduction. + # + # @param reduction [Fixnum] Number of permits to remove. + # @raise [ArgumentError] if `reduction` is not an integer or is negative + # @raise [ArgumentError] if `@free` - `@reduction` is less than zero + # @return [nil] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#99 def reduce_permits(reduction); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#77 def release(permits = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#54 def try_acquire(permits = T.unsafe(nil), timeout = T.unsafe(nil)); end protected + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#110 def ns_initialize(count); end private + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#117 def try_acquire_now(permits); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#127 def try_acquire_timed(permits, timeout); end end +# Various classes within allows for +nil+ values to be stored, +# so a special +NULL+ token is required to indicate the "nil-ness". +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/constants.rb#6 Concurrent::NULL = T.let(T.unsafe(nil), Object) + +# Suppresses all output when used for logging. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#103 Concurrent::NULL_LOGGER = T.let(T.unsafe(nil), Proc) +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/options.rb#6 module Concurrent::Options class << self + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/options.rb#27 def executor(executor_identifier); end + + # Get the requested `Executor` based on the values set in the options hash. + # + # @option opts + # @param opts [Hash] the options defining the requested executor + # @return [Executor, nil] the requested thread pool, or nil when no option specified + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/options.rb#19 def executor_from_options(opts = T.unsafe(nil)); end end end +# Promises are inspired by the JavaScript [Promises/A](http://wiki.commonjs.org/wiki/Promises/A) +# and [Promises/A+](http://promises-aplus.github.io/promises-spec/) specifications. +# +# > A promise represents the eventual value returned from the single +# > completion of an operation. +# +# Promises are similar to futures and share many of the same behaviours. +# Promises are far more robust, however. Promises can be chained in a tree +# structure where each promise may have zero or more children. Promises are +# chained using the `then` method. The result of a call to `then` is always +# another promise. Promises are resolved asynchronously (with respect to the +# main thread) but in a strict order: parents are guaranteed to be resolved +# before their children, children before their younger siblings. The `then` +# method takes two parameters: an optional block to be executed upon parent +# resolution and an optional callable to be executed upon parent failure. The +# result of each promise is passed to each of its children upon resolution. +# When a promise is rejected all its children will be summarily rejected and +# will receive the reason. +# +# Promises have several possible states: *:unscheduled*, *:pending*, +# *:processing*, *:rejected*, or *:fulfilled*. These are also aggregated as +# `#incomplete?` and `#complete?`. When a Promise is created it is set to +# *:unscheduled*. Once the `#execute` method is called the state becomes +# *:pending*. Once a job is pulled from the thread pool's queue and is given +# to a thread for processing (often immediately upon `#post`) the state +# becomes *:processing*. The future will remain in this state until processing +# is complete. A future that is in the *:unscheduled*, *:pending*, or +# *:processing* is considered `#incomplete?`. A `#complete?` Promise is either +# *:rejected*, indicating that an exception was thrown during processing, or +# *:fulfilled*, indicating success. If a Promise is *:fulfilled* its `#value` +# will be updated to reflect the result of the operation. If *:rejected* the +# `reason` will be updated with a reference to the thrown exception. The +# predicate methods `#unscheduled?`, `#pending?`, `#rejected?`, and +# `#fulfilled?` can be called at any time to obtain the state of the Promise, +# as can the `#state` method, which returns a symbol. +# +# Retrieving the value of a promise is done through the `value` (alias: +# `deref`) method. Obtaining the value of a promise is a potentially blocking +# operation. When a promise is *rejected* a call to `value` will return `nil` +# immediately. When a promise is *fulfilled* a call to `value` will +# immediately return the current value. When a promise is *pending* a call to +# `value` will block until the promise is either *rejected* or *fulfilled*. A +# *timeout* value can be passed to `value` to limit how long the call will +# block. If `nil` the call will block indefinitely. If `0` the call will not +# block. Any other integer or float value will indicate the maximum number of +# seconds to block. +# +# Promises run on the global thread pool. +# +# ### Examples +# +# Start by requiring promises +# +# ```ruby +# require 'concurrent/promise' +# ``` +# +# Then create one +# +# ```ruby +# p = Concurrent::Promise.execute do +# # do something +# 42 +# end +# ``` +# +# Promises can be chained using the `then` method. The `then` method accepts a +# block and an executor, to be executed on fulfillment, and a callable argument to be executed +# on rejection. The result of the each promise is passed as the block argument +# to chained promises. +# +# ```ruby +# p = Concurrent::Promise.new{10}.then{|x| x * 2}.then{|result| result - 10 }.execute +# ``` +# +# And so on, and so on, and so on... +# +# ```ruby +# p = Concurrent::Promise.fulfill(20). +# then{|result| result - 10 }. +# then{|result| result * 3 }. +# then(executor: different_executor){|result| result % 5 }.execute +# ``` +# +# The initial state of a newly created Promise depends on the state of its parent: +# - if parent is *unscheduled* the child will be *unscheduled* +# - if parent is *pending* the child will be *pending* +# - if parent is *fulfilled* the child will be *pending* +# - if parent is *rejected* the child will be *pending* (but will ultimately be *rejected*) +# +# Promises are executed asynchronously from the main thread. By the time a +# child Promise finishes intialization it may be in a different state than its +# parent (by the time a child is created its parent may have completed +# execution and changed state). Despite being asynchronous, however, the order +# of execution of Promise objects in a chain (or tree) is strictly defined. +# +# There are multiple ways to create and execute a new `Promise`. Both ways +# provide identical behavior: +# +# ```ruby +# # create, operate, then execute +# p1 = Concurrent::Promise.new{ "Hello World!" } +# p1.state #=> :unscheduled +# p1.execute +# +# # create and immediately execute +# p2 = Concurrent::Promise.new{ "Hello World!" }.execute +# +# # execute during creation +# p3 = Concurrent::Promise.execute{ "Hello World!" } +# ``` +# +# Once the `execute` method is called a `Promise` becomes `pending`: +# +# ```ruby +# p = Concurrent::Promise.execute{ "Hello, world!" } +# p.state #=> :pending +# p.pending? #=> true +# ``` +# +# Wait a little bit, and the promise will resolve and provide a value: +# +# ```ruby +# p = Concurrent::Promise.execute{ "Hello, world!" } +# sleep(0.1) +# +# p.state #=> :fulfilled +# p.fulfilled? #=> true +# p.value #=> "Hello, world!" +# ``` +# +# If an exception occurs, the promise will be rejected and will provide +# a reason for the rejection: +# +# ```ruby +# p = Concurrent::Promise.execute{ raise StandardError.new("Here comes the Boom!") } +# sleep(0.1) +# +# p.state #=> :rejected +# p.rejected? #=> true +# p.reason #=> "#" +# ``` +# +# #### Rejection +# +# When a promise is rejected all its children will be rejected and will +# receive the rejection `reason` as the rejection callable parameter: +# +# ```ruby +# p = Concurrent::Promise.execute { Thread.pass; raise StandardError } +# +# c1 = p.then(-> reason { 42 }) +# c2 = p.then(-> reason { raise 'Boom!' }) +# +# c1.wait.state #=> :fulfilled +# c1.value #=> 45 +# c2.wait.state #=> :rejected +# c2.reason #=> # +# ``` +# +# Once a promise is rejected it will continue to accept children that will +# receive immediately rejection (they will be executed asynchronously). +# +# #### Aliases +# +# The `then` method is the most generic alias: it accepts a block to be +# executed upon parent fulfillment and a callable to be executed upon parent +# rejection. At least one of them should be passed. The default block is `{ +# |result| result }` that fulfills the child with the parent value. The +# default callable is `{ |reason| raise reason }` that rejects the child with +# the parent reason. +# +# - `on_success { |result| ... }` is the same as `then {|result| ... }` +# - `rescue { |reason| ... }` is the same as `then(Proc.new { |reason| ... } )` +# - `rescue` is aliased by `catch` and `on_error` +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#190 class Concurrent::Promise < ::Concurrent::IVar + # Initialize a new Promise with the provided options. + # + # @option opts + # @option opts + # @option opts + # @option opts + # @param opts [Hash] a customizable set of options + # @raise [ArgumentError] if no block is given + # @return [Promise] a new instance of Promise + # @see http://wiki.commonjs.org/wiki/Promises/A + # @see http://promises-aplus.github.io/promises-spec/ + # @yield The block operation to be performed asynchronously. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#210 def initialize(opts = T.unsafe(nil), &block); end + # Chain onto this promise an action to be undertaken on failure + # (rejection). + # + # @return [Promise] self + # @yield The block to execute + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#360 def catch(&block); end + + # Execute an `:unscheduled` `Promise`. Immediately sets the state to `:pending` and + # passes the block to a new thread/thread pool for eventual execution. + # Does nothing if the `Promise` is in any state other than `:unscheduled`. + # + # @return [Promise] a reference to `self` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#246 def execute; end + + # Set the `IVar` to failed due to some error and wake or notify all threads waiting on it. + # + # @param reason [Object] for the failure + # @raise [Concurrent::MultipleAssignmentError] if the `IVar` has already + # been set or otherwise completed + # @raise [Concurrent::PromiseExecutionError] if not the root promise + # @return [IVar] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#278 def fail(reason = T.unsafe(nil)); end + + # Yield the successful result to the block that returns a promise. If that + # promise is also successful the result is the result of the yielded promise. + # If either part fails the whole also fails. + # + # @example + # Promise.execute { 1 }.flat_map { |v| Promise.execute { v + 2 } }.value! #=> 3 + # @return [Promise] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#375 def flat_map(&block); end + + # Chain onto this promise an action to be undertaken on failure + # (rejection). + # + # @return [Promise] self + # @yield The block to execute + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#360 def on_error(&block); end + + # Chain onto this promise an action to be undertaken on success + # (fulfillment). + # + # @raise [ArgumentError] + # @return [Promise] self + # @yield The block to execute + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#349 def on_success(&block); end + + # Chain onto this promise an action to be undertaken on failure + # (rejection). + # + # @return [Promise] self + # @yield The block to execute + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#360 def rescue(&block); end + + # Set the `IVar` to a value and wake or notify all threads waiting on it. + # + # @param value [Object] the value to store in the `IVar` + # @raise [ArgumentError] if both a value and a block are given + # @raise [Concurrent::MultipleAssignmentError] if the `IVar` has already + # been set or otherwise completed + # @raise [Concurrent::PromiseExecutionError] if not the root promise + # @return [IVar] self + # @yield A block operation to use for setting the value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#262 def set(value = T.unsafe(nil), &block); end + + # Chain a new promise off the current promise. + # + # @overload then + # @overload then + # @raise [ArgumentError] + # @return [Promise] the new promise + # @yield The block operation to be performed asynchronously. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#314 def then(*args, &block); end + + # Builds a promise that produces the result of self and others in an Array + # and fails if any of them fails. + # + # @overload zip + # @overload zip + # @return [Promise] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#440 def zip(*others); end protected + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#551 def complete(success, value, reason); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#545 def notify_child(child); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#481 def ns_initialize(value, opts); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#533 def on_fulfill(result); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#539 def on_reject(reason); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#562 def realize(task); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#528 def root?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#520 def set_pending; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#570 def set_state!(success, value, reason); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#576 def synchronized_set_state!(success, value, reason); end class << self + # Aggregate a collection of zero or more promises under a composite promise, + # execute the aggregated promises and collect them into a standard Ruby array, + # call the given Ruby `Ennnumerable` predicate (such as `any?`, `all?`, `none?`, + # or `one?`) on the collection checking for the success or failure of each, + # then executing the composite's `#then` handlers if the predicate returns + # `true` or executing the composite's `#rescue` handlers if the predicate + # returns false. + # + # + # The returned promise will not yet have been executed. Additional `#then` + # and `#rescue` handlers may still be provided. Once the returned promise + # is execute the aggregate promises will be also be executed (if they have + # not been executed already). The results of the aggregate promises will + # be checked upon completion. The necessary `#then` and `#rescue` blocks + # on the aggregating promise will then be executed as appropriate. If the + # `#rescue` handlers are executed the raises exception will be + # `Concurrent::PromiseExecutionError`. + # + # @param promises [Array] Zero or more promises to aggregate + # @return [Promise] an unscheduled (not executed) promise that aggregates + # the promises given as arguments + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#505 def aggregate(method, *promises); end + + # Aggregates a collection of promises and executes the `then` condition + # if all aggregated promises succeed. Executes the `rescue` handler with + # a `Concurrent::PromiseExecutionError` if any of the aggregated promises + # fail. Upon execution will execute any of the aggregate promises that + # were not already executed. + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#464 def all?(*promises); end + + # Aggregates a collection of promises and executes the `then` condition + # if any aggregated promises succeed. Executes the `rescue` handler with + # a `Concurrent::PromiseExecutionError` if any of the aggregated promises + # fail. Upon execution will execute any of the aggregate promises that + # were not already executed. + # + # + # The returned promise will not yet have been executed. Additional `#then` + # and `#rescue` handlers may still be provided. Once the returned promise + # is execute the aggregate promises will be also be executed (if they have + # not been executed already). The results of the aggregate promises will + # be checked upon completion. The necessary `#then` and `#rescue` blocks + # on the aggregating promise will then be executed as appropriate. If the + # `#rescue` handlers are executed the raises exception will be + # `Concurrent::PromiseExecutionError`. + # + # @param promises [Array] Zero or more promises to aggregate + # @return [Promise] an unscheduled (not executed) promise that aggregates + # the promises given as arguments + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#475 def any?(*promises); end + + # Create a new `Promise` object with the given block, execute it, and return the + # `:pending` object. + # + # @example + # promise = Concurrent::Promise.execute{ sleep(1); 42 } + # promise.state #=> :pending + # @option opts + # @option opts + # @option opts + # @option opts + # @param opts [Hash] a customizable set of options + # @raise [ArgumentError] if no block is given + # @return [Promise] the newly created `Promise` in the `:pending` state + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#296 def execute(opts = T.unsafe(nil), &block); end + + # Create a new `Promise` and fulfill it immediately. + # + # @option opts + # @option opts + # @option opts + # @option opts + # @param opts [Hash] a customizable set of options + # @raise [ArgumentError] if no block is given + # @return [Promise] the newly created `Promise` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#224 def fulfill(value, opts = T.unsafe(nil)); end + + # Create a new `Promise` and reject it immediately. + # + # @option opts + # @option opts + # @option opts + # @option opts + # @param opts [Hash] a customizable set of options + # @raise [ArgumentError] if no block is given + # @return [Promise] the newly created `Promise` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#237 def reject(reason, opts = T.unsafe(nil)); end + + # Builds a promise that produces the result of promises in an Array + # and fails if any of them fails. + # + # @overload zip + # @overload zip + # @return [Promise] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#409 def zip(*promises); end end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#11 class Concurrent::PromiseExecutionError < ::StandardError; end +# {include:file:docs-source/promises-main.md} +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#12 module Concurrent::Promises extend ::Concurrent::Promises::FactoryMethods::Configuration extend ::Concurrent::Promises::FactoryMethods end +# @abstract +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2037 class Concurrent::Promises::AbstractAnyPromise < ::Concurrent::Promises::BlockedPromise; end +# Common ancestor of {Event} and {Future} classes, many shared methods are defined here. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#512 class Concurrent::Promises::AbstractEventFuture < ::Concurrent::Synchronization::Object include ::Concurrent::Promises::InternalStates extend ::Concurrent::Synchronization::SafeInitialization + # @return [AbstractEventFuture] a new instance of AbstractEventFuture + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#521 def initialize(promise, default_executor); end + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#137 def __initialize_atomic_fields__; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#737 def add_callback_clear_delayed_node(node); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#732 def add_callback_notify_blocked(promise, index); end + + # For inspection. + # + # @return [Array] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#701 def blocks; end + + # For inspection. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#709 def callbacks; end + + # Shortcut of {#chain_on} with default `:io` executor supplied. + # + # @return [Future] + # @see #chain_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#595 def chain(*args, &task); end + + # Chains the task to be executed asynchronously on executor after it is resolved. + # + # @overload an_event.chain_on + # @overload a_future.chain_on + # @param executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. The task is executed on it, default executor remains unchanged. + # @param args [Object] arguments which are passed to the task when it's executed. + # (It might be prepended with other arguments, see the @yeild section). + # @return [Future] + # @yieldreturn will become result of the returned Future. + # Its returned value becomes {Future#value} fulfilling it, + # raised exception becomes {Future#reason} rejecting it. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#613 def chain_on(executor, *args, &task); end + + # Resolves the resolvable when receiver is resolved. + # + # @param resolvable [Resolvable] + # @return [self] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#628 def chain_resolvable(resolvable); end + + # Returns default executor. + # + # @return [Executor] default executor + # @see #with_default_executor + # @see FactoryMethods#future_on + # @see FactoryMethods#resolvable_future + # @see FactoryMethods#any_fulfilled_future_on + # @see similar + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#589 def default_executor; end + + # @return [String] Short string representation. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#618 def inspect; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#93 def internal_state; end + + # Shortcut of {#on_resolution_using} with default `:io` executor supplied. + # + # @return [self] + # @see #on_resolution_using + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#636 def on_resolution(*args, &callback); end + + # Stores the callback to be executed synchronously on resolving thread after it is + # resolved. + # + # @overload an_event.on_resolution! + # @overload a_future.on_resolution! + # @param args [Object] arguments which are passed to the task when it's executed. + # (It might be prepended with other arguments, see the @yeild section). + # @return [self] + # @yieldreturn is forgotten. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#654 def on_resolution!(*args, &callback); end + + # Stores the callback to be executed asynchronously on executor after it is resolved. + # + # @overload an_event.on_resolution_using + # @overload a_future.on_resolution_using + # @param executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. The task is executed on it, default executor remains unchanged. + # @param args [Object] arguments which are passed to the task when it's executed. + # (It might be prepended with other arguments, see the @yeild section). + # @return [self] + # @yieldreturn is forgotten. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#672 def on_resolution_using(executor, *args, &callback); end + + # Is it in pending state? + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#548 def pending?; end + + # For inspection. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#715 def promise; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#687 def resolve_with(state, raise_on_reassign = T.unsafe(nil), reserved = T.unsafe(nil)); end + + # Is it in resolved state? + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#554 def resolved?; end + + # Returns its state. + # + # @overload an_event.state + # @overload a_future.state + # @return [Symbol] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#542 def state; end + + # Resolves the resolvable when receiver is resolved. + # + # @param resolvable [Resolvable] + # @return [self] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#628 def tangle(resolvable); end + + # @return [String] Short string representation. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#618 def to_s; end + + # Propagates touch. Requests all the delayed futures, which it depends on, to be + # executed. This method is called by any other method requiring resolved state, like {#wait}. + # + # @return [self] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#561 def touch; end + + # For inspection. + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#721 def touched?; end + + # Wait (block the Thread) until receiver is {#resolved?}. + # Calls {Concurrent::AbstractEventFuture#touch}. + # + # @note This function potentially blocks current thread until the Future is resolved. + # Be careful it can deadlock. Try to chain instead. + # @param timeout [Numeric] the maximum time in second to wait. + # @return [self, true, false] self implies timeout was not used, true implies timeout was used + # and it was resolved, false implies it was not resolved within timeout. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#577 def wait(timeout = T.unsafe(nil)); end + + # For inspection. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#727 def waiting_threads; end + + # Crates new object with same class with the executor set as its new default executor. + # Any futures depending on it will use the new default executor. + # + # @abstract + # @raise [NotImplementedError] + # @return [AbstractEventFuture] + # @see Event#with_default_executor + # @see Future#with_default_executor + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#682 def with_default_executor(executor); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#742 def with_hidden_resolvable; end private + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#749 def add_callback(method, *args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#802 def async_callback_on_resolution(state, executor, args, callback); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#786 def call_callback(method, state, args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#790 def call_callbacks(state); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#762 def callback_clear_delayed_node(state, node); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#808 def callback_notify_blocked(state, promise, index); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#105 def compare_and_set_internal_state(expected, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#97 def internal_state=(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#101 def swap_internal_state(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#109 def update_internal_state(&block); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#767 def wait_until_resolved(timeout); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#798 def with_async(executor, *args, &block); end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1786 class Concurrent::Promises::AbstractFlatPromise < ::Concurrent::Promises::BlockedPromise + # @return [AbstractFlatPromise] a new instance of AbstractFlatPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1788 def initialize(delayed_because, blockers_count, event_or_future); end + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1798 def touch; end private + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1818 def add_delayed_of(future); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1810 def on_resolvable(resolved_future, index); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1814 def resolvable?(countdown, future, index); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1806 def touched?; end end +# @abstract +# @private +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1539 class Concurrent::Promises::AbstractPromise < ::Concurrent::Synchronization::Object include ::Concurrent::Promises::InternalStates extend ::Concurrent::Synchronization::SafeInitialization + # @return [AbstractPromise] a new instance of AbstractPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1543 def initialize(future); end + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1554 def default_executor; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1571 def delayed_because; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1548 def event; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1548 def future; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1565 def inspect; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1558 def state; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1565 def to_s; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1562 def touch; end private + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1582 def evaluate_to(*args, block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1577 def resolve_with(new_state, raise_on_reassign = T.unsafe(nil)); end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2074 class Concurrent::Promises::AnyFulfilledFuturePromise < ::Concurrent::Promises::AnyResolvedFuturePromise private + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2078 def resolvable?(countdown, event_or_future, index); end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2040 class Concurrent::Promises::AnyResolvedEventPromise < ::Concurrent::Promises::AbstractAnyPromise + # @return [AnyResolvedEventPromise] a new instance of AnyResolvedEventPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2044 def initialize(delayed, blockers_count, default_executor); end private + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2052 def on_resolvable(resolved_future, index); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2048 def resolvable?(countdown, future, index); end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2057 class Concurrent::Promises::AnyResolvedFuturePromise < ::Concurrent::Promises::AbstractAnyPromise + # @return [AnyResolvedFuturePromise] a new instance of AnyResolvedFuturePromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2061 def initialize(delayed, blockers_count, default_executor); end private + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2069 def on_resolvable(resolved_future, index); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2065 def resolvable?(countdown, future, index); end end +# @abstract +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1609 class Concurrent::Promises::BlockedPromise < ::Concurrent::Promises::InnerPromise + # @return [BlockedPromise] a new instance of BlockedPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1651 def initialize(delayed, blockers_count, future); end + # for inspection only + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1673 def blocked_by; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1664 def delayed_because; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1657 def on_blocker_resolution(future, index); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1668 def touch; end private + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1681 def clear_and_propagate_touch(stack_or_element = T.unsafe(nil)); end + + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1700 def on_resolvable(resolved_future, index); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1696 def process_on_blocker_resolution(future, index); end + + # @return [true, false] if resolvable + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1692 def resolvable?(countdown, future, index); end class << self + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1642 def add_delayed(delayed1, delayed2); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1635 def new_blocked_by(blockers, *args, &block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1613 def new_blocked_by1(blocker, *args, &block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1620 def new_blocked_by2(blocker1, blocker2, *args, &block); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/safe_initialization.rb#29 + def new(*args, &block); end end end +# @abstract +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1706 class Concurrent::Promises::BlockedTaskPromise < ::Concurrent::Promises::BlockedPromise + # @raise [ArgumentError] + # @return [BlockedTaskPromise] a new instance of BlockedTaskPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1707 def initialize(delayed, blockers_count, default_executor, executor, args, &task); end + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1715 def executor; end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1756 class Concurrent::Promises::ChainPromise < ::Concurrent::Promises::BlockedTaskPromise private + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1759 def on_resolvable(resolved_future, index); end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2085 class Concurrent::Promises::DelayPromise < ::Concurrent::Promises::InnerPromise + # @return [DelayPromise] a new instance of DelayPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2087 def initialize(default_executor); end + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2098 def delayed_because; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2094 def touch; end end +# Represents an event which will happen in future (will be resolved). The event is either +# pending or resolved. It should be always resolved. Use {Future} to communicate rejections and +# cancellation. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#816 class Concurrent::Promises::Event < ::Concurrent::Promises::AbstractEventFuture + # Creates a new event or a future which will be resolved when receiver and other are. + # Returns an event if receiver and other are events, otherwise returns a future. + # If just one of the parties is Future then the result + # of the returned future is equal to the result of the supplied future. If both are futures + # then the result is as described in {FactoryMethods#zip_futures_on}. + # + # @return [Future, Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#829 def &(other); end + + # Creates a new event which will be resolved when the first of receiver, `event_or_future` + # resolves. + # + # @return [Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#843 def any(event_or_future); end + + # Creates new event dependent on receiver which will not evaluate until touched, see {#touch}. + # In other words, it inserts delay into the chain of Futures making rest of it lazy evaluated. + # + # @return [Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#853 def delay; end + + # Creates new event dependent on receiver scheduled to execute on/in intended_time. + # In time is interpreted from the moment the receiver is resolved, therefore it inserts + # delay into the chain. + # + # @param intended_time [Numeric, Time] `Numeric` means to run in `intended_time` seconds. + # `Time` means to run on `intended_time`. + # @return [Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#865 def schedule(intended_time); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#595 def then(*args, &task); end + + # Returns self, since this is event + # + # @return [Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#883 def to_event; end + + # Converts event to a future. The future is fulfilled when the event is resolved, the future may never fail. + # + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#875 def to_future; end + + # Crates new object with same class with the executor set as its new default executor. + # Any futures depending on it will use the new default executor. + # + # @return [Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#889 def with_default_executor(executor); end + + # Creates a new event or a future which will be resolved when receiver and other are. + # Returns an event if receiver and other are events, otherwise returns a future. + # If just one of the parties is Future then the result + # of the returned future is equal to the result of the supplied future. If both are futures + # then the result is as described in {FactoryMethods#zip_futures_on}. + # + # @return [Future, Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#829 def zip(other); end + + # Creates a new event which will be resolved when the first of receiver, `event_or_future` + # resolves. + # + # @return [Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#843 def |(event_or_future); end private + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#900 def callback_on_resolution(state, args, callback); end + + # @raise [Concurrent::MultipleAssignmentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#895 def rejected_resolution(raise_on_reassign, state); end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1962 class Concurrent::Promises::EventWrapperPromise < ::Concurrent::Promises::BlockedPromise + # @return [EventWrapperPromise] a new instance of EventWrapperPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1963 def initialize(delayed, blockers_count, default_executor); end private + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1969 def on_resolvable(resolved_future, index); end end +# Container of all {Future}, {Event} factory methods. They are never constructed directly with +# new. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#45 module Concurrent::Promises::FactoryMethods include ::Concurrent::Promises::FactoryMethods::Configuration extend ::Concurrent::ReInclude - extend ::Concurrent::Promises::FactoryMethods extend ::Concurrent::Promises::FactoryMethods::Configuration + extend ::Concurrent::Promises::FactoryMethods + # Shortcut of {#any_resolved_future_on} with default `:io` executor supplied. + # + # @return [Future] + # @see #any_resolved_future_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#277 def any(*futures_and_or_events); end + + # Shortcut of {#any_event_on} with default `:io` executor supplied. + # + # @return [Event] + # @see #any_event_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#318 def any_event(*futures_and_or_events); end + + # Creates new event which becomes resolved after first of the futures_and_or_events resolves. + # If resolved it does not propagate {Concurrent::AbstractEventFuture#touch}, leaving delayed + # futures un-executed if they are not required any more. + # + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @param futures_and_or_events [AbstractEventFuture] + # @return [Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#328 def any_event_on(default_executor, *futures_and_or_events); end + + # Shortcut of {#any_fulfilled_future_on} with default `:io` executor supplied. + # + # @return [Future] + # @see #any_fulfilled_future_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#299 def any_fulfilled_future(*futures_and_or_events); end + + # Creates new future which is resolved after first of futures_and_or_events is fulfilled. + # Its result equals result of the first resolved future or if all futures_and_or_events reject, + # it has reason of the last resolved future. + # If resolved it does not propagate {Concurrent::AbstractEventFuture#touch}, leaving delayed + # futures un-executed if they are not required any more. + # If event is supplied, which does not have value and can be only resolved, it's + # represented as `:fulfilled` with value `nil`. + # + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @param futures_and_or_events [AbstractEventFuture] + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#312 def any_fulfilled_future_on(default_executor, *futures_and_or_events); end + + # Shortcut of {#any_resolved_future_on} with default `:io` executor supplied. + # + # @return [Future] + # @see #any_resolved_future_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#277 def any_resolved_future(*futures_and_or_events); end + + # Creates new future which is resolved after first futures_and_or_events is resolved. + # Its result equals result of the first resolved future. + # If resolved it does not propagate {Concurrent::AbstractEventFuture#touch}, leaving delayed + # futures un-executed if they are not required any more. + # If event is supplied, which does not have value and can be only resolved, it's + # represented as `:fulfilled` with value `nil`. + # + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @param futures_and_or_events [AbstractEventFuture] + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#293 def any_resolved_future_on(default_executor, *futures_and_or_events); end + + # Shortcut of {#delay_on} with default `:io` executor supplied. + # + # @return [Future, Event] + # @see #delay_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#189 def delay(*args, &task); end + + # Creates new event or future which is resolved only after it is touched, + # see {Concurrent::AbstractEventFuture#touch}. + # + # @overload delay_on + # @overload delay_on + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#206 def delay_on(default_executor, *args, &task); end + + # Creates resolved future with will be fulfilled with the given value. + # + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @param value [Object] + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#126 def fulfilled_future(value, default_executor = T.unsafe(nil)); end + + # Shortcut of {#future_on} with default `:io` executor supplied. + # + # @return [Future] + # @see #future_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#93 def future(*args, &task); end + + # Constructs new Future which will be resolved after block is evaluated on default executor. + # Evaluation begins immediately. + # + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @param args [Object] arguments which are passed to the task when it's executed. + # (It might be prepended with other arguments, see the @yeild section). + # @return [Future] + # @yield [*args] to the task. + # @yieldreturn will become result of the returned Future. + # Its returned value becomes {Future#value} fulfilling it, + # raised exception becomes {Future#reason} rejecting it. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#105 def future_on(default_executor, *args, &task); end + + # General constructor. Behaves differently based on the argument's type. It's provided for convenience + # but it's better to be explicit. + # + # @overload make_future + # @overload make_future + # @overload make_future + # @overload make_future + # @overload make_future + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @return [Event, Future] + # @see rejected_future, resolved_event, fulfilled_future + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#173 def make_future(argument = T.unsafe(nil), default_executor = T.unsafe(nil)); end + + # Creates resolved future with will be rejected with the given reason. + # + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @param reason [Object] + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#135 def rejected_future(reason, default_executor = T.unsafe(nil)); end + + # Shortcut of {#resolvable_event_on} with default `:io` executor supplied. + # + # @return [ResolvableEvent] + # @see #resolvable_event_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#62 def resolvable_event; end + + # Created resolvable event, user is responsible for resolving the event once by + # {Promises::ResolvableEvent#resolve}. + # + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @return [ResolvableEvent] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#71 def resolvable_event_on(default_executor = T.unsafe(nil)); end + + # Shortcut of {#resolvable_future_on} with default `:io` executor supplied. + # + # @return [ResolvableFuture] + # @see #resolvable_future_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#77 def resolvable_future; end + + # Creates resolvable future, user is responsible for resolving the future once by + # {Promises::ResolvableFuture#resolve}, {Promises::ResolvableFuture#fulfill}, + # or {Promises::ResolvableFuture#reject} + # + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @return [ResolvableFuture] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#87 def resolvable_future_on(default_executor = T.unsafe(nil)); end + + # Creates resolved event. + # + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @return [Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#143 def resolved_event(default_executor = T.unsafe(nil)); end + + # Creates resolved future with will be either fulfilled with the given value or rejection with + # the given reason. + # + # @param fulfilled [true, false] + # @param value [Object] + # @param reason [Object] + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#117 def resolved_future(fulfilled, value, reason, default_executor = T.unsafe(nil)); end + + # Shortcut of {#schedule_on} with default `:io` executor supplied. + # + # @return [Future, Event] + # @see #schedule_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#213 def schedule(intended_time, *args, &task); end + + # Creates new event or future which is resolved in intended_time. + # + # @overload schedule_on + # @overload schedule_on + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @param intended_time [Numeric, Time] `Numeric` means to run in `intended_time` seconds. + # `Time` means to run on `intended_time`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#232 def schedule_on(default_executor, intended_time, *args, &task); end + + # Shortcut of {#zip_futures_on} with default `:io` executor supplied. + # + # @return [Future] + # @see #zip_futures_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#239 def zip(*futures_and_or_events); end + + # Shortcut of {#zip_events_on} with default `:io` executor supplied. + # + # @return [Event] + # @see #zip_events_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#261 def zip_events(*futures_and_or_events); end + + # Creates new event which is resolved after all futures_and_or_events are resolved. + # (Future is resolved when fulfilled or rejected.) + # + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @param futures_and_or_events [AbstractEventFuture] + # @return [Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#271 def zip_events_on(default_executor, *futures_and_or_events); end + + # Shortcut of {#zip_futures_on} with default `:io` executor supplied. + # + # @return [Future] + # @see #zip_futures_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#239 def zip_futures(*futures_and_or_events); end + + # Creates new future which is resolved after all futures_and_or_events are resolved. + # Its value is array of zipped future values. Its reason is array of reasons for rejection. + # If there is an error it rejects. + # If event is supplied, which does not have value and can be only resolved, it's + # represented as `:fulfilled` with value `nil`. + # + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @param futures_and_or_events [AbstractEventFuture] + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#253 def zip_futures_on(default_executor, *futures_and_or_events); end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#49 module Concurrent::Promises::FactoryMethods::Configuration + # @return [Executor, :io, :fast] the executor which is used when none is supplied + # to a factory method. The method can be overridden in the receivers of + # `include FactoryMethod` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#53 def default_executor; end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1830 class Concurrent::Promises::FlatEventPromise < ::Concurrent::Promises::AbstractFlatPromise + # @return [FlatEventPromise] a new instance of FlatEventPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1834 def initialize(delayed, blockers_count, default_executor); end private + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1838 def process_on_blocker_resolution(future, index); end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1863 class Concurrent::Promises::FlatFuturePromise < ::Concurrent::Promises::AbstractFlatPromise + # @raise [ArgumentError] + # @return [FlatFuturePromise] a new instance of FlatFuturePromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1867 def initialize(delayed, blockers_count, levels, default_executor); end private + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1874 def process_on_blocker_resolution(future, index); end end +# Represents a value which will become available in future. May reject with a reason instead, +# e.g. when the tasks raises an exception. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#907 class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture + # Creates a new event or a future which will be resolved when receiver and other are. + # Returns an event if receiver and other are events, otherwise returns a future. + # If just one of the parties is Future then the result + # of the returned future is equal to the result of the supplied future. If both are futures + # then the result is as described in {FactoryMethods#zip_futures_on}. + # + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1060 def &(other); end + + # Creates a new event which will be resolved when the first of receiver, `event_or_future` + # resolves. Returning future will have value nil if event_or_future is event and resolves + # first. + # + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1075 def any(event_or_future); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1205 def apply(args, block); end + + # Creates new future dependent on receiver which will not evaluate until touched, see {#touch}. + # In other words, it inserts delay into the chain of Futures making rest of it lazy evaluated. + # + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1085 def delay; end + + # Allows rejected Future to be risen with `raise` method. + # If the reason is not an exception `Runtime.new(reason)` is returned. + # + # @example + # raise Promises.rejected_future(StandardError.new("boom")) + # raise Promises.rejected_future("or just boom") + # @raise [Concurrent::Error] when raising not rejected future + # @return [Exception] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1003 def exception(*args); end + + # Creates new future which will have result of the future returned by receiver. If receiver + # rejects it will have its rejection. + # + # @param level [Integer] how many levels of futures should flatten + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1110 def flat(level = T.unsafe(nil)); end + + # Creates new event which will be resolved when the returned event by receiver is. + # Be careful if the receiver rejects it will just resolve since Event does not hold reason. + # + # @return [Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1120 def flat_event; end + + # Creates new future which will have result of the future returned by receiver. If receiver + # rejects it will have its rejection. + # + # @param level [Integer] how many levels of futures should flatten + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1110 def flat_future(level = T.unsafe(nil)); end + + # Is it in fulfilled state? + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#911 def fulfilled?; end + + # @return [String] Short string representation. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1225 def inspect; end + + # Shortcut of {#on_fulfillment_using} with default `:io` executor supplied. + # + # @return [self] + # @see #on_fulfillment_using + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1126 def on_fulfillment(*args, &callback); end + + # Stores the callback to be executed synchronously on resolving thread after it is + # fulfilled. Does nothing on rejection. + # + # @param args [Object] arguments which are passed to the task when it's executed. + # (It might be prepended with other arguments, see the @yeild section). + # @return [self] + # @yield [value, *args] to the callback. + # @yieldreturn is forgotten. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1137 def on_fulfillment!(*args, &callback); end + + # Stores the callback to be executed asynchronously on executor after it is + # fulfilled. Does nothing on rejection. + # + # @param executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. The task is executed on it, default executor remains unchanged. + # @param args [Object] arguments which are passed to the task when it's executed. + # (It might be prepended with other arguments, see the @yeild section). + # @return [self] + # @yield [value, *args] to the callback. + # @yieldreturn is forgotten. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1149 def on_fulfillment_using(executor, *args, &callback); end + + # Shortcut of {#on_rejection_using} with default `:io` executor supplied. + # + # @return [self] + # @see #on_rejection_using + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1155 def on_rejection(*args, &callback); end + + # Stores the callback to be executed synchronously on resolving thread after it is + # rejected. Does nothing on fulfillment. + # + # @param args [Object] arguments which are passed to the task when it's executed. + # (It might be prepended with other arguments, see the @yeild section). + # @return [self] + # @yield [reason, *args] to the callback. + # @yieldreturn is forgotten. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1166 def on_rejection!(*args, &callback); end + + # Stores the callback to be executed asynchronously on executor after it is + # rejected. Does nothing on fulfillment. + # + # @param executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. The task is executed on it, default executor remains unchanged. + # @param args [Object] arguments which are passed to the task when it's executed. + # (It might be prepended with other arguments, see the @yeild section). + # @return [self] + # @yield [reason, *args] to the callback. + # @yieldreturn is forgotten. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1178 def on_rejection_using(executor, *args, &callback); end + + # Returns reason of future's rejection. + # Calls {Concurrent::AbstractEventFuture#touch}. + # + # @note This function potentially blocks current thread until the Future is resolved. + # Be careful it can deadlock. Try to chain instead. + # @note Make sure returned `nil` is not confused with timeout, no value when rejected, + # no reason when fulfilled, etc. + # Use more exact methods if needed, like {#wait}, {#value!}, {#result}, etc. + # @param timeout [Numeric] the maximum time in second to wait. + # @param timeout_value [Object] a value returned by the method when it times out + # @return [Object, timeout_value] the reason, or timeout_value on timeout, or nil on fulfillment. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#956 def reason(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil)); end + + # Is it in rejected state? + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#918 def rejected?; end + + # Shortcut of {#rescue_on} with default `:io` executor supplied. + # + # @return [Future] + # @see #rescue_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1042 def rescue(*args, &task); end + + # Chains the task to be executed asynchronously on executor after it rejects. Does not run + # the task if it fulfills. It will resolve though, triggering any dependent futures. + # + # @param executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. The task is executed on it, default executor remains unchanged. + # @param args [Object] arguments which are passed to the task when it's executed. + # (It might be prepended with other arguments, see the @yeild section). + # @return [Future] + # @yield [reason, *args] to the task. + # @yieldreturn will become result of the returned Future. + # Its returned value becomes {Future#value} fulfilling it, + # raised exception becomes {Future#reason} rejecting it. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1054 def rescue_on(executor, *args, &task); end + + # Returns triplet fulfilled?, value, reason. + # Calls {Concurrent::AbstractEventFuture#touch}. + # + # @note This function potentially blocks current thread until the Future is resolved. + # Be careful it can deadlock. Try to chain instead. + # @param timeout [Numeric] the maximum time in second to wait. + # @return [Array(Boolean, Object, Object), nil] triplet of fulfilled?, value, reason, or nil + # on timeout. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#971 def result(timeout = T.unsafe(nil)); end + + # Allows to use futures as green threads. The receiver has to evaluate to a future which + # represents what should be done next. It basically flattens indefinitely until non Future + # values is returned which becomes result of the returned future. Any encountered exception + # will become reason of the returned future. + # + # @example + # body = lambda do |v| + # v += 1 + # v < 5 ? Promises.future(v, &body) : v + # end + # Promises.future(0, &body).run.value! # => 5 + # @param run_test [#call(value)] an object which when called returns either Future to keep running with + # or nil, then the run completes with the value. + # The run_test can be used to extract the Future from deeper structure, + # or to distinguish Future which is a resulting value from a future + # which is suppose to continue running. + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1200 def run(run_test = T.unsafe(nil)); end + + # Creates new event dependent on receiver scheduled to execute on/in intended_time. + # In time is interpreted from the moment the receiver is resolved, therefore it inserts + # delay into the chain. + # + # @param intended_time [Numeric, Time] `Numeric` means to run in `intended_time` seconds. + # `Time` means to run on `intended_time`. + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1092 def schedule(intended_time); end + + # Shortcut of {#then_on} with default `:io` executor supplied. + # + # @return [Future] + # @see #then_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1024 def then(*args, &task); end + + # Chains the task to be executed asynchronously on executor after it fulfills. Does not run + # the task if it rejects. It will resolve though, triggering any dependent futures. + # + # @param executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. The task is executed on it, default executor remains unchanged. + # @param args [Object] arguments which are passed to the task when it's executed. + # (It might be prepended with other arguments, see the @yeild section). + # @return [Future] + # @yield [value, *args] to the task. + # @yieldreturn will become result of the returned Future. + # Its returned value becomes {Future#value} fulfilling it, + # raised exception becomes {Future#reason} rejecting it. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1036 def then_on(executor, *args, &task); end + + # Converts future to event which is resolved when future is resolved by fulfillment or rejection. + # + # @return [Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1212 def to_event; end + + # Returns self, since this is a future + # + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1220 def to_future; end + + # @return [String] Short string representation. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1225 def to_s; end + + # Return value of the future. + # Calls {Concurrent::AbstractEventFuture#touch}. + # + # @note This function potentially blocks current thread until the Future is resolved. + # Be careful it can deadlock. Try to chain instead. + # @note Make sure returned `nil` is not confused with timeout, no value when rejected, + # no reason when fulfilled, etc. + # Use more exact methods if needed, like {#wait}, {#value!}, {#result}, etc. + # @param timeout [Numeric] the maximum time in second to wait. + # @param timeout_value [Object] a value returned by the method when it times out + # @return [Object, nil, timeout_value] the value of the Future when fulfilled, + # timeout_value on timeout, + # nil on rejection. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#940 def value(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil)); end + + # Return value of the future. + # Calls {Concurrent::AbstractEventFuture#touch}. + # + # @note This function potentially blocks current thread until the Future is resolved. + # Be careful it can deadlock. Try to chain instead. + # @note Make sure returned `nil` is not confused with timeout, no value when rejected, + # no reason when fulfilled, etc. + # Use more exact methods if needed, like {#wait}, {#value!}, {#result}, etc. + # @param timeout [Numeric] the maximum time in second to wait. + # @param timeout_value [Object] a value returned by the method when it times out + # @raise [Exception] {#reason} on rejection + # @return [Object, nil, timeout_value] the value of the Future when fulfilled, + # or nil on rejection, + # or timeout_value on timeout. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#987 def value!(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil)); end + + # Wait (block the Thread) until receiver is {#resolved?}. + # Calls {Concurrent::AbstractEventFuture#touch}. + # + # @note This function potentially blocks current thread until the Future is resolved. + # Be careful it can deadlock. Try to chain instead. + # @param timeout [Numeric] the maximum time in second to wait. + # @raise [Exception] {#reason} on rejection + # @return [self, true, false] self implies timeout was not used, true implies timeout was used + # and it was resolved, false implies it was not resolved within timeout. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#977 def wait!(timeout = T.unsafe(nil)); end + + # Crates new object with same class with the executor set as its new default executor. + # Any futures depending on it will use the new default executor. + # + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1101 def with_default_executor(executor); end + + # Creates a new event or a future which will be resolved when receiver and other are. + # Returns an event if receiver and other are events, otherwise returns a future. + # If just one of the parties is Future then the result + # of the returned future is equal to the result of the supplied future. If both are futures + # then the result is as described in {FactoryMethods#zip_futures_on}. + # + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1060 def zip(other); end + + # Creates a new event which will be resolved when the first of receiver, `event_or_future` + # resolves. Returning future will have value nil if event_or_future is event and resolves + # first. + # + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1075 def |(event_or_future); end private + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1262 def async_callback_on_fulfillment(state, executor, args, callback); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1268 def async_callback_on_rejection(state, executor, args, callback); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1274 def callback_on_fulfillment(state, args, callback); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1278 def callback_on_rejection(state, args, callback); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1282 def callback_on_resolution(state, args, callback); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1241 def rejected_resolution(raise_on_reassign, state); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1237 def run_test(v); end + + # @raise [self] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1256 def wait_until_resolved!(timeout = T.unsafe(nil)); end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1974 class Concurrent::Promises::FutureWrapperPromise < ::Concurrent::Promises::BlockedPromise + # @return [FutureWrapperPromise] a new instance of FutureWrapperPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1975 def initialize(delayed, blockers_count, default_executor); end private + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1981 def on_resolvable(resolved_future, index); end end +# will be immediately resolved +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1773 class Concurrent::Promises::ImmediateEventPromise < ::Concurrent::Promises::InnerPromise + # @return [ImmediateEventPromise] a new instance of ImmediateEventPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1774 def initialize(default_executor); end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1779 class Concurrent::Promises::ImmediateFuturePromise < ::Concurrent::Promises::InnerPromise + # @return [ImmediateFuturePromise] a new instance of ImmediateFuturePromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1780 def initialize(default_executor, fulfilled, value, reason); end end +# @abstract +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1605 class Concurrent::Promises::InnerPromise < ::Concurrent::Promises::AbstractPromise; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#337 module Concurrent::Promises::InternalStates; end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#396 class Concurrent::Promises::InternalStates::Fulfilled < ::Concurrent::Promises::InternalStates::ResolvedWithResult + # @return [Fulfilled] a new instance of Fulfilled + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#398 def initialize(value); end + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#406 def apply(args, block); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#402 def fulfilled?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#414 def reason; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#418 def to_sym; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#410 def value; end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#424 class Concurrent::Promises::InternalStates::FulfilledArray < ::Concurrent::Promises::InternalStates::Fulfilled + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#425 def apply(args, block); end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#487 Concurrent::Promises::InternalStates::PENDING = T.let(T.unsafe(nil), Concurrent::Promises::InternalStates::Pending) +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#458 class Concurrent::Promises::InternalStates::PartiallyRejected < ::Concurrent::Promises::InternalStates::ResolvedWithResult + # @return [PartiallyRejected] a new instance of PartiallyRejected + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#459 def initialize(value, reason); end + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#481 def apply(args, block); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#465 def fulfilled?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#477 def reason; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#469 def to_sym; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#473 def value; end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#350 class Concurrent::Promises::InternalStates::Pending < ::Concurrent::Promises::InternalStates::State + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#351 def resolved?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#355 def to_sym; end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#489 Concurrent::Promises::InternalStates::RESERVED = T.let(T.unsafe(nil), Concurrent::Promises::InternalStates::Reserved) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#491 Concurrent::Promises::InternalStates::RESOLVED = T.let(T.unsafe(nil), Concurrent::Promises::InternalStates::Fulfilled) +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#431 class Concurrent::Promises::InternalStates::Rejected < ::Concurrent::Promises::InternalStates::ResolvedWithResult + # @return [Rejected] a new instance of Rejected + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#432 def initialize(reason); end + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#452 def apply(args, block); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#436 def fulfilled?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#444 def reason; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#448 def to_sym; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#440 def value; end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#361 class Concurrent::Promises::InternalStates::Reserved < ::Concurrent::Promises::InternalStates::Pending; end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#365 class Concurrent::Promises::InternalStates::ResolvedWithResult < ::Concurrent::Promises::InternalStates::State + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#390 def apply; end + + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#378 def fulfilled?; end + + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#386 def reason; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#366 def resolved?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#374 def result; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#370 def to_sym; end + + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#382 def value; end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#339 class Concurrent::Promises::InternalStates::State + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#340 def resolved?; end + + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#344 def to_sym; end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1738 class Concurrent::Promises::RescuePromise < ::Concurrent::Promises::BlockedTaskPromise + # @return [RescuePromise] a new instance of RescuePromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1741 def initialize(delayed, blockers_count, default_executor, executor, args, &task); end private + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1745 def on_resolvable(resolved_future, index); end end +# Marker module of Future, Event resolved manually. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1289 module Concurrent::Promises::Resolvable include ::Concurrent::Promises::InternalStates end +# A Event which can be resolved by user. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1294 class Concurrent::Promises::ResolvableEvent < ::Concurrent::Promises::Event include ::Concurrent::Promises::Resolvable + # Makes the event resolved, which triggers all dependent futures. + # + # @param raise_on_reassign [Boolean] should method raise exception if already resolved + # @param reserved [true, false] Set to true if the resolvable is {#reserve}d by you, + # marks resolution of reserved resolvable events and futures explicitly. + # Advanced feature, ignore unless you use {Resolvable#reserve} from edge. + # @return [self, false] false is returned when raise_on_reassign is false and the receiver + # is already resolved. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1314 def resolve(raise_on_reassign = T.unsafe(nil), reserved = T.unsafe(nil)); end + + # Behaves as {AbstractEventFuture#wait} but has one additional optional argument + # resolve_on_timeout. + # + # @param resolve_on_timeout [true, false] If it times out and the argument is true it will also resolve the event. + # @return [self, true, false] + # @see AbstractEventFuture#wait + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1332 def wait(timeout = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end + + # Creates new event wrapping receiver, effectively hiding the resolve method. + # + # @return [Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1321 def with_hidden_resolvable; end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1590 class Concurrent::Promises::ResolvableEventPromise < ::Concurrent::Promises::AbstractPromise + # @return [ResolvableEventPromise] a new instance of ResolvableEventPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1591 def initialize(default_executor); end end +# A Future which can be resolved by user. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1344 class Concurrent::Promises::ResolvableFuture < ::Concurrent::Promises::Future include ::Concurrent::Promises::Resolvable + # Evaluates the block and sets its result as future's value fulfilling, if the block raises + # an exception the future rejects with it. + # + # @return [self] + # @yield [*args] to the block. + # @yieldreturn [Object] value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1385 def evaluate_to(*args, &block); end + + # Evaluates the block and sets its result as future's value fulfilling, if the block raises + # an exception the future rejects with it. + # + # @raise [Exception] also raise reason on rejection. + # @return [self] + # @yield [*args] to the block. + # @yieldreturn [Object] value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1396 def evaluate_to!(*args, &block); end + + # Makes the future fulfilled with `value`, + # which triggers all dependent futures. + # + # @param value [Object] + # @param raise_on_reassign [Boolean] should method raise exception if already resolved + # @param reserved [true, false] Set to true if the resolvable is {#reserve}d by you, + # marks resolution of reserved resolvable events and futures explicitly. + # Advanced feature, ignore unless you use {Resolvable#reserve} from edge. + # @return [self, false] false is returned when raise_on_reassign is false and the receiver + # is already resolved. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1365 def fulfill(value, raise_on_reassign = T.unsafe(nil), reserved = T.unsafe(nil)); end + + # Behaves as {Future#reason} but has one additional optional argument + # resolve_on_timeout. + # + # @param resolve_on_timeout [::Array(true, Object, nil), ::Array(false, nil, Exception), nil] If it times out and the argument is not nil it will also resolve the future + # to the provided resolution. + # @return [Exception, timeout_value, nil] + # @see Future#reason + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1493 def reason(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end + + # Makes the future rejected with `reason`, + # which triggers all dependent futures. + # + # @param reason [Object] + # @param raise_on_reassign [Boolean] should method raise exception if already resolved + # @param reserved [true, false] Set to true if the resolvable is {#reserve}d by you, + # marks resolution of reserved resolvable events and futures explicitly. + # Advanced feature, ignore unless you use {Resolvable#reserve} from edge. + # @return [self, false] false is returned when raise_on_reassign is false and the receiver + # is already resolved. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1375 def reject(reason, raise_on_reassign = T.unsafe(nil), reserved = T.unsafe(nil)); end + + # Makes the future resolved with result of triplet `fulfilled?`, `value`, `reason`, + # which triggers all dependent futures. + # + # @param fulfilled [true, false] + # @param value [Object] + # @param reason [Object] + # @param raise_on_reassign [Boolean] should method raise exception if already resolved + # @param reserved [true, false] Set to true if the resolvable is {#reserve}d by you, + # marks resolution of reserved resolvable events and futures explicitly. + # Advanced feature, ignore unless you use {Resolvable#reserve} from edge. + # @return [self, false] false is returned when raise_on_reassign is false and the receiver + # is already resolved. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1355 def resolve(fulfilled = T.unsafe(nil), value = T.unsafe(nil), reason = T.unsafe(nil), raise_on_reassign = T.unsafe(nil), reserved = T.unsafe(nil)); end + + # Behaves as {Future#result} but has one additional optional argument + # resolve_on_timeout. + # + # @param resolve_on_timeout [::Array(true, Object, nil), ::Array(false, nil, Exception), nil] If it times out and the argument is not nil it will also resolve the future + # to the provided resolution. + # @return [::Array(Boolean, Object, Exception), nil] + # @see Future#result + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1514 def result(timeout = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end + + # Behaves as {Future#value} but has one additional optional argument + # resolve_on_timeout. + # + # @param resolve_on_timeout [::Array(true, Object, nil), ::Array(false, nil, Exception), nil] If it times out and the argument is not nil it will also resolve the future + # to the provided resolution. + # @return [Object, timeout_value, nil] + # @see Future#value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1449 def value(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end + + # Behaves as {Future#value!} but has one additional optional argument + # resolve_on_timeout. + # + # @param resolve_on_timeout [::Array(true, Object, nil), ::Array(false, nil, Exception), nil] If it times out and the argument is not nil it will also resolve the future + # to the provided resolution. + # @raise [Exception] {#reason} on rejection + # @return [Object, timeout_value, nil] + # @see Future#value! + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1471 def value!(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end + + # Behaves as {AbstractEventFuture#wait} but has one additional optional argument + # resolve_on_timeout. + # + # @param resolve_on_timeout [::Array(true, Object, nil), ::Array(false, nil, Exception), nil] If it times out and the argument is not nil it will also resolve the future + # to the provided resolution. + # @return [self, true, false] + # @see AbstractEventFuture#wait + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1411 def wait(timeout = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end + + # Behaves as {Future#wait!} but has one additional optional argument + # resolve_on_timeout. + # + # @param resolve_on_timeout [::Array(true, Object, nil), ::Array(false, nil, Exception), nil] If it times out and the argument is not nil it will also resolve the future + # to the provided resolution. + # @raise [Exception] {#reason} on rejection + # @return [self, true, false] + # @see Future#wait! + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1428 def wait!(timeout = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end + + # Creates new future wrapping receiver, effectively hiding the resolve method and similar. + # + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1532 def with_hidden_resolvable; end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1596 class Concurrent::Promises::ResolvableFuturePromise < ::Concurrent::Promises::AbstractPromise + # @return [ResolvableFuturePromise] a new instance of ResolvableFuturePromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1597 def initialize(default_executor); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1582 + def evaluate_to(*args, block); end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1899 class Concurrent::Promises::RunFuturePromise < ::Concurrent::Promises::AbstractFlatPromise + # @return [RunFuturePromise] a new instance of RunFuturePromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1903 def initialize(delayed, blockers_count, default_executor, run_test); end private + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1908 def process_on_blocker_resolution(future, index); end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2104 class Concurrent::Promises::ScheduledPromise < ::Concurrent::Promises::InnerPromise + # @return [ScheduledPromise] a new instance of ScheduledPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2115 def initialize(default_executor, intended_time); end + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2109 def inspect; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2105 def intended_time; end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1720 class Concurrent::Promises::ThenPromise < ::Concurrent::Promises::BlockedTaskPromise + # @return [ThenPromise] a new instance of ThenPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1723 def initialize(delayed, blockers_count, default_executor, executor, args, &task); end private + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1727 def on_resolvable(resolved_future, index); end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1930 class Concurrent::Promises::ZipEventEventPromise < ::Concurrent::Promises::BlockedPromise + # @return [ZipEventEventPromise] a new instance of ZipEventEventPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1931 def initialize(delayed, blockers_count, default_executor); end private + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1937 def on_resolvable(resolved_future, index); end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2021 class Concurrent::Promises::ZipEventsPromise < ::Concurrent::Promises::BlockedPromise + # @return [ZipEventsPromise] a new instance of ZipEventsPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2025 def initialize(delayed, blockers_count, default_executor); end private + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2031 def on_resolvable(resolved_future, index); end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1942 class Concurrent::Promises::ZipFutureEventPromise < ::Concurrent::Promises::BlockedPromise + # @return [ZipFutureEventPromise] a new instance of ZipFutureEventPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1943 def initialize(delayed, blockers_count, default_executor); end private + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1957 def on_resolvable(resolved_future, index); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1950 def process_on_blocker_resolution(future, index); end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1986 class Concurrent::Promises::ZipFuturesPromise < ::Concurrent::Promises::BlockedPromise + # @return [ZipFuturesPromise] a new instance of ZipFuturesPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1990 def initialize(delayed, blockers_count, default_executor); end private + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2003 def on_resolvable(resolved_future, index); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1997 def process_on_blocker_resolution(future, index); end end +# Methods form module A included to a module B, which is already included into class C, +# will not be visible in the C class. If this module is extended to B then A's methods +# are correctly made visible to C. +# +# @example +# module A +# def a +# :a +# end +# end +# +# module B1 +# end +# +# class C1 +# include B1 +# end +# +# module B2 +# extend Concurrent::ReInclude +# end +# +# class C2 +# include B2 +# end +# +# B1.send :include, A +# B2.send :include, A +# +# C1.new.respond_to? :a # => false +# C2.new.respond_to? :a # => true +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/re_include.rb#36 module Concurrent::ReInclude + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/re_include.rb#44 def extended(base); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/re_include.rb#50 def include(*modules); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/re_include.rb#38 def included(base); end end +# Ruby read-write lock implementation +# +# Allows any number of concurrent readers, but only one concurrent writer +# (And if the "write" lock is taken, any readers who come along will have to wait) +# +# If readers are already active when a writer comes along, the writer will wait for +# all the readers to finish before going ahead. +# Any additional readers that come when the writer is already waiting, will also +# wait (so writers are not starved). +# +# This implementation is based on `java.util.concurrent.ReentrantReadWriteLock`. +# +# @example +# lock = Concurrent::ReadWriteLock.new +# lock.with_read_lock { data.retrieve } +# lock.with_write_lock { data.modify! } +# @note Do **not** try to acquire the write lock while already holding a read lock +# **or** try to acquire the write lock while you already have it. +# This will lead to deadlock +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/ReentrantReadWriteLock.html java.util.concurrent.ReentrantReadWriteLock +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#31 class Concurrent::ReadWriteLock < ::Concurrent::Synchronization::Object extend ::Concurrent::Synchronization::SafeInitialization + # Create a new `ReadWriteLock` in the unlocked state. + # + # @return [ReadWriteLock] a new instance of ReadWriteLock + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#59 def initialize; end + # Acquire a read lock. If a write lock has been acquired will block until + # it is released. Will not block if other read locks have been acquired. + # + # @raise [Concurrent::ResourceLimitError] if the maximum number of readers + # is exceeded. + # @return [Boolean] true if the lock is successfully acquired + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#111 def acquire_read_lock; end + + # Acquire a write lock. Will block and wait for all active readers and writers. + # + # @raise [Concurrent::ResourceLimitError] if the maximum number of writers + # is exceeded. + # @return [Boolean] true if the lock is successfully acquired + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#160 def acquire_write_lock; end + + # Queries whether any threads are waiting to acquire the read or write lock. + # + # @return [Boolean] true if any threads are waiting for a lock else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#214 def has_waiters?; end + + # Release a previously acquired read lock. + # + # @return [Boolean] true if the lock is successfully released + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#140 def release_read_lock; end + + # Release a previously acquired write lock. + # + # @return [Boolean] true if the lock is successfully released + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#196 def release_write_lock; end + + # Execute a block operation within a read lock. + # + # @raise [ArgumentError] when no block is given. + # @raise [Concurrent::ResourceLimitError] if the maximum number of readers + # is exceeded. + # @return [Object] the result of the block operation. + # @yield the task to be performed within the lock. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#75 def with_read_lock; end + + # Execute a block operation within a write lock. + # + # @raise [ArgumentError] when no block is given. + # @raise [Concurrent::ResourceLimitError] if the maximum number of readers + # is exceeded. + # @return [Object] the result of the block operation. + # @yield the task to be performed within the lock. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#94 def with_write_lock; end + + # Queries if the write lock is held by any thread. + # + # @return [Boolean] true if the write lock is held else false` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#207 def write_locked?; end private + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#246 def max_readers?(c = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#251 def max_writers?(c = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#221 def running_readers(c = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#226 def running_readers?(c = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#231 def running_writer?(c = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#241 def waiting_writer?(c = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#236 def waiting_writers(c = T.unsafe(nil)); end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#40 Concurrent::ReadWriteLock::MAX_READERS = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#43 Concurrent::ReadWriteLock::MAX_WRITERS = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#37 Concurrent::ReadWriteLock::RUNNING_WRITER = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#34 Concurrent::ReadWriteLock::WAITING_WRITER = T.let(T.unsafe(nil), Integer) +# Re-entrant read-write lock implementation +# +# Allows any number of concurrent readers, but only one concurrent writer +# (And while the "write" lock is taken, no read locks can be obtained either. +# Hence, the write lock can also be called an "exclusive" lock.) +# +# If another thread has taken a read lock, any thread which wants a write lock +# will block until all the readers release their locks. However, once a thread +# starts waiting to obtain a write lock, any additional readers that come along +# will also wait (so writers are not starved). +# +# A thread can acquire both a read and write lock at the same time. A thread can +# also acquire a read lock OR a write lock more than once. Only when the read (or +# write) lock is released as many times as it was acquired, will the thread +# actually let it go, allowing other threads which might have been waiting +# to proceed. Therefore the lock can be upgraded by first acquiring +# read lock and then write lock and that the lock can be downgraded by first +# having both read and write lock a releasing just the write lock. +# +# If both read and write locks are acquired by the same thread, it is not strictly +# necessary to release them in the same order they were acquired. In other words, +# the following code is legal: +# +# This implementation was inspired by `java.util.concurrent.ReentrantReadWriteLock`. +# +# @example +# lock = Concurrent::ReentrantReadWriteLock.new +# lock.acquire_write_lock +# lock.acquire_read_lock +# lock.release_write_lock +# # At this point, the current thread is holding only a read lock, not a write +# # lock. So other threads can take read locks, but not a write lock. +# lock.release_read_lock +# # Now the current thread is not holding either a read or write lock, so +# # another thread could potentially acquire a write lock. +# @example +# lock = Concurrent::ReentrantReadWriteLock.new +# lock.with_read_lock { data.retrieve } +# lock.with_write_lock { data.modify! } +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/ReentrantReadWriteLock.html java.util.concurrent.ReentrantReadWriteLock +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#53 class Concurrent::ReentrantReadWriteLock < ::Concurrent::Synchronization::Object extend ::Concurrent::Synchronization::SafeInitialization + # Create a new `ReentrantReadWriteLock` in the unlocked state. + # + # @return [ReentrantReadWriteLock] a new instance of ReentrantReadWriteLock + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#109 def initialize; end + # Acquire a read lock. If a write lock is held by another thread, will block + # until it is released. + # + # @raise [Concurrent::ResourceLimitError] if the maximum number of readers + # is exceeded. + # @return [Boolean] true if the lock is successfully acquired + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#162 def acquire_read_lock; end + + # Acquire a write lock. Will block and wait for all active readers and writers. + # + # @raise [Concurrent::ResourceLimitError] if the maximum number of writers + # is exceeded. + # @return [Boolean] true if the lock is successfully acquired + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#257 def acquire_write_lock; end + + # Release a previously acquired read lock. + # + # @return [Boolean] true if the lock is successfully released + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#236 def release_read_lock; end + + # Release a previously acquired write lock. + # + # @return [Boolean] true if the lock is successfully released + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#329 def release_write_lock; end + + # Try to acquire a read lock and return true if we succeed. If it cannot be + # acquired immediately, return false. + # + # @return [Boolean] true if the lock is successfully acquired + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#215 def try_read_lock; end + + # Try to acquire a write lock and return true if we succeed. If it cannot be + # acquired immediately, return false. + # + # @return [Boolean] true if the lock is successfully acquired + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#310 def try_write_lock; end + + # Execute a block operation within a read lock. + # + # @raise [ArgumentError] when no block is given. + # @raise [Concurrent::ResourceLimitError] if the maximum number of readers + # is exceeded. + # @return [Object] the result of the block operation. + # @yield the task to be performed within the lock. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#126 def with_read_lock; end + + # Execute a block operation within a write lock. + # + # @raise [ArgumentError] when no block is given. + # @raise [Concurrent::ResourceLimitError] if the maximum number of readers + # is exceeded. + # @return [Object] the result of the block operation. + # @yield the task to be performed within the lock. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#145 def with_write_lock; end private + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#370 def max_readers?(c = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#375 def max_writers?(c = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#345 def running_readers(c = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#350 def running_readers?(c = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#355 def running_writer?(c = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#365 def waiting_or_running_writer?(c = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#360 def waiting_writers(c = T.unsafe(nil)); end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#94 Concurrent::ReentrantReadWriteLock::MAX_READERS = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#96 Concurrent::ReentrantReadWriteLock::MAX_WRITERS = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#84 Concurrent::ReentrantReadWriteLock::READER_BITS = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#102 Concurrent::ReentrantReadWriteLock::READ_LOCK_MASK = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#92 Concurrent::ReentrantReadWriteLock::RUNNING_WRITER = T.let(T.unsafe(nil), Integer) + +# Used with @Counter: +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#90 Concurrent::ReentrantReadWriteLock::WAITING_WRITER = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#86 Concurrent::ReentrantReadWriteLock::WRITER_BITS = T.let(T.unsafe(nil), Integer) + +# Used with @HeldCount: +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#100 Concurrent::ReentrantReadWriteLock::WRITE_LOCK_HELD = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#104 Concurrent::ReentrantReadWriteLock::WRITE_LOCK_MASK = T.let(T.unsafe(nil), Integer) + +# Raised by an `Executor` when it is unable to process a given task, +# possibly because of a reject policy or other internal error. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#48 class Concurrent::RejectedExecutionError < ::Concurrent::Error; end + +# Raised when any finite resource, such as a lock counter, exceeds its +# maximum limit/threshold. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#52 class Concurrent::ResourceLimitError < ::Concurrent::Error; end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#134 class Concurrent::RubyExchanger < ::Concurrent::AbstractExchanger extend ::Concurrent::Synchronization::SafeInitialization + # @return [RubyExchanger] a new instance of RubyExchanger + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#159 def initialize; end + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#137 def __initialize_atomic_fields__; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#105 def compare_and_set_slot(expected, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#93 def slot; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#97 def slot=(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#101 def swap_slot(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#109 def update_slot(&block); end private + # Waits for another thread to arrive at this exchange point (unless the + # current thread is interrupted), and then transfers the given object to + # it, receiving its object in return. The timeout value indicates the + # approximate number of seconds the method should block while waiting + # for the exchange. When the timeout value is `nil` the method will + # block indefinitely. + # + # @param value [Object] the value to exchange with another thread + # @param timeout [Numeric, nil] in seconds, `nil` blocks indefinitely + # @return [Object, CANCEL] the value exchanged by the other thread; {CANCEL} on timeout + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#170 def do_exchange(value, timeout); end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#138 class Concurrent::RubyExchanger::Node < ::Concurrent::Synchronization::Object extend ::Concurrent::Synchronization::SafeInitialization + # @return [Node] a new instance of Node + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#142 def initialize(item); end + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#137 def __initialize_atomic_fields__; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#105 def compare_and_set_value(expected, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#153 def item; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#149 def latch; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#101 def swap_value(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#109 def update_value(&block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#93 def value; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#97 def value=(value); end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#8 class Concurrent::RubyExecutorService < ::Concurrent::AbstractExecutorService + # @return [RubyExecutorService] a new instance of RubyExecutorService + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#11 def initialize(*args, &block); end + # Begin an immediate shutdown. In-progress tasks will be allowed to + # complete but enqueued tasks will be dismissed and no new tasks + # will be accepted. Has no additional effect if the thread pool is + # not running. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#42 def kill; end + + # Submit a task to the executor for asynchronous processing. + # + # @param args [Array] zero or more arguments to be passed to the task + # @raise [ArgumentError] if no task is given + # @return [Boolean] `true` if the task is queued, `false` if the executor + # is not running + # @yield the asynchronous task to perform + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#17 def post(*args, &task); end + + # Begin an orderly shutdown. Tasks already in the queue will be executed, + # but no new tasks will be accepted. Has no additional effect if the + # thread pool is not running. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#33 def shutdown; end + + # Block until executor shutdown is complete or until `timeout` seconds have + # passed. + # + # @note Does not initiate shutdown or termination. Either `shutdown` or `kill` + # must be called before this method (or on another thread). + # @param timeout [Integer] the maximum number of seconds to wait for shutdown to complete + # @return [Boolean] `true` if shutdown complete or false on `timeout` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#52 def wait_for_termination(timeout = T.unsafe(nil)); end private + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#70 def ns_running?; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#78 def ns_shutdown?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#66 def ns_shutdown_execution; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#74 def ns_shuttingdown?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#58 def stop_event; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#62 def stopped_event; end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_single_thread_executor.rb#8 class Concurrent::RubySingleThreadExecutor < ::Concurrent::RubyThreadPoolExecutor + # @return [RubySingleThreadExecutor] a new instance of RubySingleThreadExecutor + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_single_thread_executor.rb#11 def initialize(opts = T.unsafe(nil)); end end +# **Thread Pool Options** +# +# Thread pools support several configuration options: +# +# * `idletime`: The number of seconds that a thread may be idle before being reclaimed. +# * `name`: The name of the executor (optional). Printed in the executor's `#to_s` output and +# a `-worker-` name is given to its threads if supported by used Ruby +# implementation. `` is uniq for each thread. +# * `max_queue`: The maximum number of tasks that may be waiting in the work queue at +# any one time. When the queue size reaches `max_queue` and no new threads can be created, +# subsequent tasks will be rejected in accordance with the configured `fallback_policy`. +# * `auto_terminate`: When true (default), the threads started will be marked as daemon. +# * `fallback_policy`: The policy defining how rejected tasks are handled. +# +# Three fallback policies are supported: +# +# * `:abort`: Raise a `RejectedExecutionError` exception and discard the task. +# * `:discard`: Discard the task and return false. +# * `:caller_runs`: Execute the task on the calling thread. +# +# **Shutting Down Thread Pools** +# +# Killing a thread pool while tasks are still being processed, either by calling +# the `#kill` method or at application exit, will have unpredictable results. There +# is no way for the thread pool to know what resources are being used by the +# in-progress tasks. When those tasks are killed the impact on those resources +# cannot be predicted. The *best* practice is to explicitly shutdown all thread +# pools using the provided methods: +# +# * Call `#shutdown` to initiate an orderly termination of all in-progress tasks +# * Call `#wait_for_termination` with an appropriate timeout interval an allow +# the orderly shutdown to complete +# * Call `#kill` *only when* the thread pool fails to shutdown in the allotted time +# +# On some runtime platforms (most notably the JVM) the application will not +# exit until all thread pools have been shutdown. To prevent applications from +# "hanging" on exit, all threads can be marked as daemon according to the +# `:auto_terminate` option. +# +# ```ruby +# pool1 = Concurrent::FixedThreadPool.new(5) # threads will be marked as daemon +# pool2 = Concurrent::FixedThreadPool.new(5, auto_terminate: false) # mark threads as non-daemon +# ``` +# +# @note Failure to properly shutdown a thread pool can lead to unpredictable results. +# Please read *Shutting Down Thread Pools* for more information. +# @see http://docs.oracle.com/javase/tutorial/essential/concurrency/pools.html Java Tutorials: Thread Pools +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executors.html Java Executors class +# @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ExecutorService.html Java ExecutorService interface +# @see https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html#setDaemon-boolean- +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#12 class Concurrent::RubyThreadPoolExecutor < ::Concurrent::RubyExecutorService + # @return [RubyThreadPoolExecutor] a new instance of RubyThreadPoolExecutor + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#45 def initialize(opts = T.unsafe(nil)); end + # Does the task queue have a maximum size? + # + # @return [Boolean] True if the task queue has a maximum size else false. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#65 def can_overflow?; end + + # The number of tasks that have been completed by the pool since construction. + # + # @return [Integer] The number of tasks that have been completed by the pool since construction. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#60 def completed_task_count; end + + # The number of seconds that a thread may be idle before being reclaimed. + # + # @return [Integer] The number of seconds that a thread may be idle before being reclaimed. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#36 def idletime; end + + # The largest number of threads that have been created in the pool since construction. + # + # @return [Integer] The largest number of threads that have been created in the pool since construction. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#50 def largest_length; end + + # The number of threads currently in the pool. + # + # @return [Integer] The number of threads currently in the pool. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#70 def length; end + + # The maximum number of threads that may be created in the pool. + # + # @return [Integer] The maximum number of threads that may be created in the pool. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#30 def max_length; end + + # The maximum number of tasks that may be waiting in the work queue at any one time. + # When the queue size reaches `max_queue` subsequent tasks will be rejected in + # accordance with the configured `fallback_policy`. + # + # @return [Integer] The maximum number of tasks that may be waiting in the work queue at any one time. + # When the queue size reaches `max_queue` subsequent tasks will be rejected in + # accordance with the configured `fallback_policy`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#39 def max_queue; end + + # The minimum number of threads that may be retained in the pool. + # + # @return [Integer] The minimum number of threads that may be retained in the pool. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#33 def min_length; end + + # Prune the thread pool of unneeded threads + # + # What is being pruned is controlled by the min_threads and idletime + # parameters passed at pool creation time + # + # This is a no-op on some pool implementation (e.g. the Java one). The Ruby + # pool will auto-prune each time a new job is posted. You will need to call + # this method explicitely in case your application post jobs in bursts (a + # lot of jobs and then nothing for long periods) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#111 def prune_pool; end + + # The number of tasks in the queue awaiting execution. + # + # @return [Integer] The number of tasks in the queue awaiting execution. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#75 def queue_length; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#96 def ready_worker(worker, last_message); end + + # Number of tasks that may be enqueued before reaching `max_queue` and rejecting + # new tasks. A value of -1 indicates that the queue may grow without bound. + # + # @return [Integer] Number of tasks that may be enqueued before reaching `max_queue` and rejecting + # new tasks. A value of -1 indicates that the queue may grow without bound. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#80 def remaining_capacity; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#91 def remove_busy_worker(worker); end + + # The number of tasks that have been scheduled for execution on the pool since construction. + # + # @return [Integer] The number of tasks that have been scheduled for execution on the pool since construction. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#55 def scheduled_task_count; end + + # Whether or not a value of 0 for :max_queue option means the queue must perform direct hand-off or rather unbounded queue. + # + # @return [true, false] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#42 def synchronous; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#101 def worker_died(worker); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#106 def worker_task_completed; end private + # creates new worker which has to receive work to do after it's added + # + # @return [nil, Worker] nil of max capacity is reached + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#234 def ns_add_busy_worker; end + + # tries to assign task to a worker, tries to get one from @ready or to create new one + # + # @return [true, false] if task is assigned to a worker + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#194 def ns_assign_worker(*args, &task); end + + # tries to enqueue task + # + # @return [true, false] if enqueued + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#212 def ns_enqueue(*args, &task); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#153 def ns_execute(*args, &task); end + + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#118 def ns_initialize(opts); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#182 def ns_kill_execution; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#148 def ns_limited_queue?; end + + # try oldest worker if it is idle for enough time, it's returned back at the start + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#273 def ns_prune_pool; end + + # handle ready worker, giving it new job or assigning back to @ready + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#246 def ns_ready_worker(worker, last_message, success = T.unsafe(nil)); end + + # removes a worker which is not in not tracked in @ready + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#264 def ns_remove_busy_worker(worker); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#289 def ns_reset_if_forked; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#167 def ns_shutdown_execution; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#224 def ns_worker_died(worker); end end +# Default maximum number of threads that will be created in the pool. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#15 Concurrent::RubyThreadPoolExecutor::DEFAULT_MAX_POOL_SIZE = T.let(T.unsafe(nil), Integer) + +# Default maximum number of tasks that may be added to the task queue. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#21 Concurrent::RubyThreadPoolExecutor::DEFAULT_MAX_QUEUE_SIZE = T.let(T.unsafe(nil), Integer) + +# Default minimum number of threads that will be retained in the pool. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#18 Concurrent::RubyThreadPoolExecutor::DEFAULT_MIN_POOL_SIZE = T.let(T.unsafe(nil), Integer) + +# Default value of the :synchronous option. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#27 +Concurrent::RubyThreadPoolExecutor::DEFAULT_SYNCHRONOUS = T.let(T.unsafe(nil), FalseClass) + +# Default maximum number of seconds a thread in the pool may remain idle +# before being reclaimed. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#24 Concurrent::RubyThreadPoolExecutor::DEFAULT_THREAD_IDLETIMEOUT = T.let(T.unsafe(nil), Integer) +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#303 class Concurrent::RubyThreadPoolExecutor::Worker include ::Logger::Severity include ::Concurrent::Concern::Logging + # @return [Worker] a new instance of Worker + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#306 def initialize(pool, id); end + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#317 def <<(message); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#325 def kill; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#321 def stop; end private + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#331 def create_worker(queue, pool, idletime); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#351 def run_task(pool, task, args); end end +# A simple utility class that executes a callable and returns and array of three elements: +# success - indicating if the callable has been executed without errors +# value - filled by the callable result if it has been executed without errors, nil otherwise +# reason - the error risen by the callable if it has been executed with errors, nil otherwise +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/safe_task_executor.rb#9 class Concurrent::SafeTaskExecutor < ::Concurrent::Synchronization::LockableObject + # @return [SafeTaskExecutor] a new instance of SafeTaskExecutor + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/safe_task_executor.rb#11 def initialize(task, opts = T.unsafe(nil)); end + # @return [Array] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/safe_task_executor.rb#18 def execute(*args); end end +# `ScheduledTask` is a close relative of `Concurrent::Future` but with one +# important difference: A `Future` is set to execute as soon as possible +# whereas a `ScheduledTask` is set to execute after a specified delay. This +# implementation is loosely based on Java's +# [ScheduledExecutorService](http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ScheduledExecutorService.html). +# It is a more feature-rich variant of {Concurrent.timer}. +# +# The *intended* schedule time of task execution is set on object construction +# with the `delay` argument. The delay is a numeric (floating point or integer) +# representing a number of seconds in the future. Any other value or a numeric +# equal to or less than zero will result in an exception. The *actual* schedule +# time of task execution is set when the `execute` method is called. +# +# The constructor can also be given zero or more processing options. Currently +# the only supported options are those recognized by the +# [Dereferenceable](Dereferenceable) module. +# +# The final constructor argument is a block representing the task to be performed. +# If no block is given an `ArgumentError` will be raised. +# +# **States** +# +# `ScheduledTask` mixes in the [Obligation](Obligation) module thus giving it +# "future" behavior. This includes the expected lifecycle states. `ScheduledTask` +# has one additional state, however. While the task (block) is being executed the +# state of the object will be `:processing`. This additional state is necessary +# because it has implications for task cancellation. +# +# **Cancellation** +# +# A `:pending` task can be cancelled using the `#cancel` method. A task in any +# other state, including `:processing`, cannot be cancelled. The `#cancel` +# method returns a boolean indicating the success of the cancellation attempt. +# A cancelled `ScheduledTask` cannot be restarted. It is immutable. +# +# **Obligation and Observation** +# +# The result of a `ScheduledTask` can be obtained either synchronously or +# asynchronously. `ScheduledTask` mixes in both the [Obligation](Obligation) +# module and the +# [Observable](http://ruby-doc.org/stdlib-2.0/libdoc/observer/rdoc/Observable.html) +# module from the Ruby standard library. With one exception `ScheduledTask` +# behaves identically to [Future](Observable) with regard to these modules. +# +# @example Basic usage +# +# require 'concurrent/scheduled_task' +# require 'csv' +# require 'open-uri' +# +# class Ticker +# def get_year_end_closing(symbol, year, api_key) +# uri = "https://www.alphavantage.co/query?function=TIME_SERIES_MONTHLY&symbol=#{symbol}&apikey=#{api_key}&datatype=csv" +# data = [] +# csv = URI.parse(uri).read +# if csv.include?('call frequency') +# return :rate_limit_exceeded +# end +# CSV.parse(csv, headers: true) do |row| +# data << row['close'].to_f if row['timestamp'].include?(year.to_s) +# end +# year_end = data.first +# year_end +# rescue => e +# p e +# end +# end +# +# api_key = ENV['ALPHAVANTAGE_KEY'] +# abort(error_message) unless api_key +# +# # Future +# price = Concurrent::Future.execute{ Ticker.new.get_year_end_closing('TWTR', 2013, api_key) } +# price.state #=> :pending +# price.pending? #=> true +# price.value(0) #=> nil (does not block) +# +# sleep(1) # do other stuff +# +# price.value #=> 63.65 (after blocking if necessary) +# price.state #=> :fulfilled +# price.fulfilled? #=> true +# price.value #=> 63.65 +# @example Successful task execution +# +# task = Concurrent::ScheduledTask.new(2){ 'What does the fox say?' } +# task.state #=> :unscheduled +# task.execute +# task.state #=> pending +# +# # wait for it... +# sleep(3) +# +# task.unscheduled? #=> false +# task.pending? #=> false +# task.fulfilled? #=> true +# task.rejected? #=> false +# task.value #=> 'What does the fox say?' +# @example One line creation and execution +# +# task = Concurrent::ScheduledTask.new(2){ 'What does the fox say?' }.execute +# task.state #=> pending +# +# task = Concurrent::ScheduledTask.execute(2){ 'What do you get when you multiply 6 by 9?' } +# task.state #=> pending +# @example Failed task execution +# +# task = Concurrent::ScheduledTask.execute(2){ raise StandardError.new('Call me maybe?') } +# task.pending? #=> true +# +# # wait for it... +# sleep(3) +# +# task.unscheduled? #=> false +# task.pending? #=> false +# task.fulfilled? #=> false +# task.rejected? #=> true +# task.value #=> nil +# task.reason #=> # +# @example Task execution with observation +# +# observer = Class.new{ +# def update(time, value, reason) +# puts "The task completed at #{time} with value '#{value}'" +# end +# }.new +# +# task = Concurrent::ScheduledTask.new(2){ 'What does the fox say?' } +# task.add_observer(observer) +# task.execute +# task.pending? #=> true +# +# # wait for it... +# sleep(3) +# +# #>> The task completed at 2013-11-07 12:26:09 -0500 with value 'What does the fox say?' +# @see Concurrent.timer +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#158 class Concurrent::ScheduledTask < ::Concurrent::IVar include ::Comparable + # Schedule a task for execution at a specified future time. + # + # @option opts + # @param delay [Float] the number of seconds to wait for before executing the task + # @param opts [Hash] a customizable set of options + # @raise [ArgumentError] When no block is given + # @raise [ArgumentError] When given a time that is in the past + # @return [ScheduledTask] a new instance of ScheduledTask + # @yield the task to be performed + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#178 def initialize(delay, opts = T.unsafe(nil), &task); end + # Comparator which orders by schedule time. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#213 def <=>(other); end + + # Cancel this task and prevent it from executing. A task can only be + # cancelled if it is pending or unscheduled. + # + # @return [Boolean] true if successfully cancelled else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#235 def cancel; end + + # Has the task been cancelled? + # + # @return [Boolean] true if the task is in the given state else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#220 def cancelled?; end + + # Execute an `:unscheduled` `ScheduledTask`. Immediately sets the state to `:pending` + # and starts counting down toward execution. Does nothing if the `ScheduledTask` is + # in any state other than `:unscheduled`. + # + # @return [ScheduledTask] a reference to `self` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#273 def execute; end + + # The executor on which to execute the task. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#163 def executor; end + + # The `delay` value given at instanciation. + # + # @return [Float] the initial delay. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#199 def initial_delay; end + + # Execute the task. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#297 def process_task; end + + # In the task execution in progress? + # + # @return [Boolean] true if the task is in the given state else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#227 def processing?; end + + # Reschedule the task using the given delay and the current time. + # A task can only be reset while it is `:pending`. + # + # @param delay [Float] the number of seconds to wait for before executing the task + # @raise [ArgumentError] When given a time that is in the past + # @return [Boolean] true if successfully rescheduled else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#262 def reschedule(delay); end + + # Reschedule the task using the original delay and the current time. + # A task can only be reset while it is `:pending`. + # + # @return [Boolean] true if successfully rescheduled else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#250 def reset; end + + # The monotonic time at which the the task is scheduled to be executed. + # + # @return [Float] the schedule time or nil if `unscheduled` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#206 def schedule_time; end protected + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#135 + def fail(reason = T.unsafe(nil)); end + + # Reschedule the task using the given delay and the current time. + # A task can only be reset while it is `:pending`. + # + # @param delay [Float] the number of seconds to wait for before executing the task + # @return [Boolean] true if successfully rescheduled else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#326 def ns_reschedule(delay); end + + # Schedule the task using the given delay and the current time. + # + # @param delay [Float] the number of seconds to wait for before executing the task + # @return [Boolean] true if successfully rescheduled else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#312 def ns_schedule(delay); end + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#113 + def set(value = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#145 + def try_set(value = T.unsafe(nil), &block); end + class << self + # Create a new `ScheduledTask` object with the given block, execute it, and return the + # `:pending` object. + # + # @param delay [Float] the number of seconds to wait for before executing the task + # @raise [ArgumentError] if no block is given + # @return [ScheduledTask] the newly created `ScheduledTask` in the `:pending` state + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#290 def execute(delay, opts = T.unsafe(nil), &task); end end end +# A counting semaphore. Conceptually, a semaphore maintains a set of +# permits. Each {#acquire} blocks if necessary until a permit is +# available, and then takes it. Each {#release} adds a permit, potentially +# releasing a blocking acquirer. +# However, no actual permit objects are used; the Semaphore just keeps a +# count of the number available and acts accordingly. +# Alternatively, permits may be acquired within a block, and automatically +# released after the block finishes executing. +# +# @example +# semaphore = Concurrent::Semaphore.new(2) +# +# t1 = Thread.new do +# semaphore.acquire +# puts "Thread 1 acquired semaphore" +# end +# +# t2 = Thread.new do +# semaphore.acquire +# puts "Thread 2 acquired semaphore" +# end +# +# t3 = Thread.new do +# semaphore.acquire +# puts "Thread 3 acquired semaphore" +# end +# +# t4 = Thread.new do +# sleep(2) +# puts "Thread 4 releasing semaphore" +# semaphore.release +# end +# +# [t1, t2, t3, t4].each(&:join) +# +# # prints: +# # Thread 3 acquired semaphore +# # Thread 2 acquired semaphore +# # Thread 4 releasing semaphore +# # Thread 1 acquired semaphore +# @example +# semaphore = Concurrent::Semaphore.new(1) +# +# puts semaphore.available_permits +# semaphore.acquire do +# puts semaphore.available_permits +# end +# puts semaphore.available_permits +# +# # prints: +# # 1 +# # 0 +# # 1 +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/semaphore.rb#161 class Concurrent::Semaphore < ::Concurrent::MutexSemaphore; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/semaphore.rb#96 Concurrent::SemaphoreImplementation = Concurrent::MutexSemaphore +# Indicates that the including `ExecutorService` guarantees +# that all operations will occur in the order they are post and that no +# two operations may occur simultaneously. This module provides no +# functionality and provides no guarantees. That is the responsibility +# of the including class. This module exists solely to allow the including +# object to be interrogated for its serialization status. +# +# @example +# class Foo +# include Concurrent::SerialExecutor +# end +# +# foo = Foo.new +# +# foo.is_a? Concurrent::ExecutorService #=> true +# foo.is_a? Concurrent::SerialExecutor #=> true +# foo.serialized? #=> true +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serial_executor_service.rb#24 module Concurrent::SerialExecutorService include ::Logger::Severity include ::Concurrent::Concern::Logging include ::Concurrent::ExecutorService + # Does this executor guarantee serialization of its operations? + # + # @note Always returns `true` + # @return [Boolean] True if the executor guarantees that all operations + # will be post in the order they are received and no two operations may + # occur simultaneously. Else false. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serial_executor_service.rb#30 def serialized?; end end +# Ensures passed jobs in a serialized order never running at the same time. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#8 class Concurrent::SerializedExecution < ::Concurrent::Synchronization::LockableObject include ::Logger::Severity include ::Concurrent::Concern::Logging + # @return [SerializedExecution] a new instance of SerializedExecution + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#11 def initialize; end + # Submit a task to the executor for asynchronous processing. + # + # @param executor [Executor] to be used for this job + # @param args [Array] zero or more arguments to be passed to the task + # @raise [ArgumentError] if no task is given + # @return [Boolean] `true` if the task is queued, `false` if the executor + # is not running + # @yield the asynchronous task to perform + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#34 def post(executor, *args, &task); end + + # As {#post} but allows to submit multiple tasks at once, it's guaranteed that they will not + # be interleaved by other tasks. + # + # @param posts [Array, Proc)>] array of triplets where + # first is a {ExecutorService}, second is array of args for task, third is a task (Proc) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#44 def posts(posts); end private + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#75 def call_job(job); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#70 def ns_initialize; end + + # ensures next job is executed if any is stashed + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#95 def work(job); end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#16 class Concurrent::SerializedExecution::Job < ::Struct + # Returns the value of attribute args + # + # @return [Object] the current value of args def args; end + + # Sets the attribute args + # + # @param value [Object] the value to set the attribute args to. + # @return [Object] the newly set value def args=(_); end + + # Returns the value of attribute block + # + # @return [Object] the current value of block def block; end + + # Sets the attribute block + # + # @param value [Object] the value to set the attribute block to. + # @return [Object] the newly set value def block=(_); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#17 def call; end + + # Returns the value of attribute executor + # + # @return [Object] the current value of executor def executor; end + + # Sets the attribute executor + # + # @param value [Object] the value to set the attribute executor to. + # @return [Object] the newly set value def executor=(_); end class << self def [](*_arg0); end def inspect; end + def keyword_init?; end def members; end def new(*_arg0); end end end +# A wrapper/delegator for any `ExecutorService` that +# guarantees serialized execution of tasks. +# +# @see [SimpleDelegator](http://www.ruby-doc.org/stdlib-2.1.2/libdoc/delegate/rdoc/SimpleDelegator.html) +# @see Concurrent::SerializedExecution +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution_delegator.rb#12 class Concurrent::SerializedExecutionDelegator < ::SimpleDelegator include ::Logger::Severity include ::Concurrent::Concern::Logging include ::Concurrent::ExecutorService include ::Concurrent::SerialExecutorService + # @return [SerializedExecutionDelegator] a new instance of SerializedExecutionDelegator + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution_delegator.rb#15 def initialize(executor); end + # Submit a task to the executor for asynchronous processing. + # + # @param args [Array] zero or more arguments to be passed to the task + # @raise [ArgumentError] if no task is given + # @return [Boolean] `true` if the task is queued, `false` if the executor + # is not running + # @yield the asynchronous task to perform + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution_delegator.rb#22 def post(*args, &task); end end +# A thread-safe subclass of Set. This version locks against the object +# itself for every method call, ensuring only one thread can be reading +# or writing at a time. This includes iteration methods like `#each`. +# +# @note `a += b` is **not** a **thread-safe** operation on +# `Concurrent::Set`. It reads Set `a`, then it creates new `Concurrent::Set` +# which is union of `a` and `b`, then it writes the union to `a`. +# The read and write are independent operations they do not form a single atomic +# operation therefore when two `+=` operations are executed concurrently updates +# may be lost. Use `#merge` instead. +# @see http://ruby-doc.org/stdlib-2.4.0/libdoc/set/rdoc/Set.html Ruby standard library `Set` +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#61 class Concurrent::Set < ::Concurrent::CRubySet; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#23 Concurrent::SetImplementation = Concurrent::CRubySet +# An thread-safe, write-once variation of Ruby's standard `Struct`. +# Each member can have its value set at most once, either at construction +# or any time thereafter. Attempting to assign a value to a member +# that has already been set will result in a `Concurrent::ImmutabilityError`. +# +# @see http://ruby-doc.org/core/Struct.html Ruby standard library `Struct` +# @see http://en.wikipedia.org/wiki/Final_(Java) Java `final` keyword +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#14 module Concurrent::SettableStruct include ::Concurrent::Synchronization::AbstractStruct + # Equality + # + # @return [Boolean] true if other has the same struct subclass and has + # equal member values (according to `Object#==`) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#50 def ==(other); end + + # Attribute Reference + # + # @param member [Symbol, String, Integer] the string or symbol name of the member + # for which to obtain the value or the member's index + # @raise [NameError] if the member does not exist + # @raise [IndexError] if the index is out of range. + # @return [Object] the value of the given struct member or the member at the given index. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#45 def [](member); end + + # Attribute Assignment + # + # Sets the value of the given struct member or the member at the given index. + # + # @param member [Symbol, String, Integer] the string or symbol name of the member + # for which to obtain the value or the member's index + # @raise [NameError] if the name does not exist + # @raise [IndexError] if the index is out of range. + # @raise [Concurrent::ImmutabilityError] if the given member has already been set + # @return [Object] the value of the given struct member or the member at the given index. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#75 def []=(member, value); end + + # Yields the value of each struct member in order. If no block is given + # an enumerator is returned. + # + # @yield the operation to be performed on each struct member + # @yieldparam value [Object] each struct value (in order) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#55 def each(&block); end + + # Yields the name and value of each struct member in order. If no block is + # given an enumerator is returned. + # + # @yield the operation to be performed on each struct member/value pair + # @yieldparam member [Object] each struct member (in order) + # @yieldparam value [Object] each struct value (in order) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#61 def each_pair(&block); end + + # Describe the contents of this struct in a string. + # + # @return [String] the contents of this struct in a string + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#29 def inspect; end + + # Returns a new struct containing the contents of `other` and the contents + # of `self`. If no block is specified, the value for entries with duplicate + # keys will be that of `other`. Otherwise the value for each duplicate key + # is determined by calling the block with the key, its value in `self` and + # its value in `other`. + # + # @param other [Hash] the hash from which to set the new values + # @raise [ArgumentError] of given a member that is not defined in the struct + # @return [Synchronization::AbstractStruct] a new struct with the new values + # @yield an options block for resolving duplicate keys + # @yieldparam member [String, Symbol] the name of the member which is duplicated + # @yieldparam selfvalue [Object] the value of the member in `self` + # @yieldparam othervalue [Object] the value of the member in `other` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#35 def merge(other, &block); end + + # Yields each member value from the struct to the block and returns an Array + # containing the member values from the struct for which the given block + # returns a true value (equivalent to `Enumerable#select`). + # + # @return [Array] an array containing each value for which the block returns true + # @yield the operation to be performed on each struct member + # @yieldparam value [Object] each struct value (in order) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#67 def select(&block); end + + # Returns the values for this struct as an Array. + # + # @return [Array] the values for this struct + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#18 def to_a; end + + # Returns a hash containing the names and values for the struct’s members. + # + # @return [Hash] the names and values for the struct’s members + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#40 def to_h; end + + # Describe the contents of this struct in a string. + # + # @return [String] the contents of this struct in a string + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#29 def to_s; end + + # Returns the values for this struct as an Array. + # + # @return [Array] the values for this struct + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#18 def values; end + + # Returns the struct member values for each selector as an Array. + # + # A selector may be either an Integer offset or a Range of offsets (as in `Array#values_at`). + # + # @param indexes [Fixnum, Range] the index(es) from which to obatin the values (in order) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#24 def values_at(*indexes); end private + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#97 def initialize_copy(original); end class << self + # Factory for creating new struct classes. + # + # ``` + # new([class_name] [, member_name]+>) -> StructClass click to toggle source + # new([class_name] [, member_name]+>) {|StructClass| block } -> StructClass + # new(value, ...) -> obj + # StructClass[value, ...] -> obj + # ``` + # + # The first two forms are used to create a new struct subclass `class_name` + # that can contain a value for each member_name . This subclass can be + # used to create instances of the structure like any other Class . + # + # If the `class_name` is omitted an anonymous struct class will be created. + # Otherwise, the name of this struct will appear as a constant in the struct class, + # so it must be unique for all structs under this base class and must start with a + # capital letter. Assigning a struct class to a constant also gives the class + # the name of the constant. + # + # If a block is given it will be evaluated in the context of `StructClass`, passing + # the created class as a parameter. This is the recommended way to customize a struct. + # Subclassing an anonymous struct creates an extra anonymous class that will never be used. + # + # The last two forms create a new instance of a struct subclass. The number of value + # parameters must be less than or equal to the number of attributes defined for the + # struct. Unset parameters default to nil. Passing more parameters than number of attributes + # will raise an `ArgumentError`. + # + # @see http://ruby-doc.org/core/Struct.html#method-c-new Ruby standard library `Struct#new` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#105 def new(*args, &block); end end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#115 Concurrent::SettableStruct::FACTORY = T.let(T.unsafe(nil), T.untyped) +# An executor service in which every operation spawns a new, +# independently operating thread. +# +# This is perhaps the most inefficient executor service in this +# library. It exists mainly for testing an debugging. Thread creation +# and management is expensive in Ruby and this executor performs no +# resource pooling. This can be very beneficial during testing and +# debugging because it decouples the using code from the underlying +# executor implementation. In production this executor will likely +# lead to suboptimal performance. +# +# @note Intended for use primarily in testing and debugging. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#21 class Concurrent::SimpleExecutorService < ::Concurrent::RubyExecutorService + # Submit a task to the executor for asynchronous processing. + # + # @param task [Proc] the asynchronous task to perform + # @return [self] returns itself + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#56 def <<(task); end + + # Begin an immediate shutdown. In-progress tasks will be allowed to + # complete but enqueued tasks will be dismissed and no new tasks + # will be accepted. Has no additional effect if the thread pool is + # not running. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#84 def kill; end + + # Submit a task to the executor for asynchronous processing. + # + # @param args [Array] zero or more arguments to be passed to the task + # @raise [ArgumentError] if no task is given + # @return [Boolean] `true` if the task is queued, `false` if the executor + # is not running + # @yield the asynchronous task to perform + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#40 def post(*args, &task); end + + # Is the executor running? + # + # @return [Boolean] `true` when running, `false` when shutting down or shutdown + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#62 def running?; end + + # Begin an orderly shutdown. Tasks already in the queue will be executed, + # but no new tasks will be accepted. Has no additional effect if the + # thread pool is not running. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#77 def shutdown; end + + # Is the executor shutdown? + # + # @return [Boolean] `true` when shutdown, `false` when shutting down or running + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#72 def shutdown?; end + + # Is the executor shuttingdown? + # + # @return [Boolean] `true` when not running and not shutdown, else `false` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#67 def shuttingdown?; end + + # Block until executor shutdown is complete or until `timeout` seconds have + # passed. + # + # @note Does not initiate shutdown or termination. Either `shutdown` or `kill` + # must be called before this method (or on another thread). + # @param timeout [Integer] the maximum number of seconds to wait for shutdown to complete + # @return [Boolean] `true` if shutdown complete or false on `timeout` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#91 def wait_for_termination(timeout = T.unsafe(nil)); end private + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#97 def ns_initialize(*args); end class << self + # Submit a task to the executor for asynchronous processing. + # + # @param task [Proc] the asynchronous task to perform + # @return [self] returns itself + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#34 def <<(task); end + + # Submit a task to the executor for asynchronous processing. + # + # @param args [Array] zero or more arguments to be passed to the task + # @raise [ArgumentError] if no task is given + # @return [Boolean] `true` if the task is queued, `false` if the executor + # is not running + # @yield the asynchronous task to perform + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#24 def post(*args); end end end +# A thread pool with a single thread an unlimited queue. Should the thread +# die for any reason it will be removed and replaced, thus ensuring that +# the executor will always remain viable and available to process jobs. +# +# A common pattern for background processing is to create a single thread +# on which an infinite loop is run. The thread's loop blocks on an input +# source (perhaps blocking I/O or a queue) and processes each input as it +# is received. This pattern has several issues. The thread itself is highly +# susceptible to errors during processing. Also, the thread itself must be +# constantly monitored and restarted should it die. `SingleThreadExecutor` +# encapsulates all these bahaviors. The task processor is highly resilient +# to errors from within tasks. Also, should the thread die it will +# automatically be restarted. +# +# The API and behavior of this class are based on Java's `SingleThreadExecutor`. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/single_thread_executor.rb#37 class Concurrent::SingleThreadExecutor < ::Concurrent::RubySingleThreadExecutor; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/single_thread_executor.rb#10 Concurrent::SingleThreadExecutorImplementation = Concurrent::RubySingleThreadExecutor +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_object.rb#2 module Concurrent::Synchronization class << self + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/full_memory_barrier.rb#7 def full_memory_barrier; end end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb#9 class Concurrent::Synchronization::AbstractLockableObject < ::Concurrent::Synchronization::Object protected + # Broadcast to all waiting threads. + # + # @note only to be used inside synchronized block + # @note to provide direct access to this method in a descendant add method + # ``` + # def broadcast + # synchronize { ns_broadcast } + # end + # ``` + # @raise [NotImplementedError] + # @return [self] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb#96 def ns_broadcast; end + + # Signal one waiting thread. + # + # @note only to be used inside synchronized block + # @note to provide direct access to this method in a descendant add method + # ``` + # def signal + # synchronize { ns_signal } + # end + # ``` + # @raise [NotImplementedError] + # @return [self] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb#81 def ns_signal; end + + # Wait until another thread calls #signal or #broadcast, + # spurious wake-ups can happen. + # + # @note only to be used inside synchronized block + # @note to provide direct access to this method in a descendant add method + # ``` + # def wait(timeout = nil) + # synchronize { ns_wait(timeout) } + # end + # ``` + # @param timeout [Numeric, nil] in seconds, `nil` means no timeout + # @raise [NotImplementedError] + # @return [self] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb#66 def ns_wait(timeout = T.unsafe(nil)); end + + # Wait until condition is met or timeout passes, + # protects against spurious wake-ups. + # + # @note only to be used inside synchronized block + # @note to provide direct access to this method in a descendant add method + # ``` + # def wait_until(timeout = nil, &condition) + # synchronize { ns_wait_until(timeout, &condition) } + # end + # ``` + # @param timeout [Numeric, nil] in seconds, `nil` means no timeout + # @return [true, false] if condition met + # @yield condition to be met + # @yieldreturn [true, false] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb#37 def ns_wait_until(timeout = T.unsafe(nil), &condition); end + + # @note can by made public in descendants if required by `public :synchronize` + # @raise [NotImplementedError] + # @yield runs the block synchronized against this object, + # equivalent of java's `synchronize(this) {}` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb#18 def synchronize; end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_object.rb#6 class Concurrent::Synchronization::AbstractObject + # @return [AbstractObject] a new instance of AbstractObject + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_object.rb#7 def initialize; end + # @abstract + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_object.rb#13 def full_memory_barrier; end class << self + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_object.rb#17 def attr_volatile(*names); end end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#6 module Concurrent::Synchronization::AbstractStruct + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#9 def initialize(*values); end + # Returns the number of struct members. + # + # @return [Fixnum] the number of struct members + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#19 def length; end + + # Returns the struct members as an array of symbols. + # + # @return [Array] the struct members as an array of symbols + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#29 def members; end + + # Returns the number of struct members. + # + # @return [Fixnum] the number of struct members + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#19 def size; end protected + # Yields the value of each struct member in order. If no block is given + # an enumerator is returned. + # + # @yield the operation to be performed on each struct member + # @yieldparam value [Object] each struct value (in order) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#82 def ns_each; end + + # Yields the name and value of each struct member in order. If no block is + # given an enumerator is returned. + # + # @yield the operation to be performed on each struct member/value pair + # @yieldparam member [Object] each struct member (in order) + # @yieldparam value [Object] each struct value (in order) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#89 def ns_each_pair; end + + # Equality + # + # @return [Boolean] true if other has the same struct subclass and has + # equal member values (according to `Object#==`) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#75 def ns_equality(other); end + + # Attribute Reference + # + # @param member [Symbol, String, Integer] the string or symbol name of the member + # for which to obtain the value or the member's index + # @raise [NameError] if the member does not exist + # @raise [IndexError] if the index is out of range. + # @return [Object] the value of the given struct member or the member at the given index. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#59 def ns_get(member); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#119 def ns_initialize_copy; end + + # Describe the contents of this struct in a string. + # + # @return [String] the contents of this struct in a string + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#105 def ns_inspect; end + + # Returns a new struct containing the contents of `other` and the contents + # of `self`. If no block is specified, the value for entries with duplicate + # keys will be that of `other`. Otherwise the value for each duplicate key + # is determined by calling the block with the key, its value in `self` and + # its value in `other`. + # + # @param other [Hash] the hash from which to set the new values + # @raise [ArgumentError] of given a member that is not defined in the struct + # @return [Synchronization::AbstractStruct] a new struct with the new values + # @yield an options block for resolving duplicate keys + # @yieldparam member [String, Symbol] the name of the member which is duplicated + # @yieldparam selfvalue [Object] the value of the member in `self` + # @yieldparam othervalue [Object] the value of the member in `other` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#114 def ns_merge(other, &block); end + + # Yields each member value from the struct to the block and returns an Array + # containing the member values from the struct for which the given block + # returns a true value (equivalent to `Enumerable#select`). + # + # @return [Array] an array containing each value for which the block returns true + # @yield the operation to be performed on each struct member + # @yieldparam value [Object] each struct value (in order) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#98 def ns_select; end + + # Returns a hash containing the names and values for the struct’s members. + # + # @return [Hash] the names and values for the struct’s members + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#52 def ns_to_h; end + + # Returns the values for this struct as an Array. + # + # @return [Array] the values for this struct + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#38 def ns_values; end + + # Returns the struct member values for each selector as an Array. + # + # A selector may be either an Integer offset or a Range of offsets (as in `Array#values_at`). + # + # @param indexes [Fixnum, Range] the index(es) from which to obatin the values (in order) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#45 def ns_values_at(indexes); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#130 def pr_underscore(clazz); end class << self + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#141 def define_struct_class(parent, base, name, members, &block); end end end +# TODO (pitr-ch 04-Dec-2016): should be in edge +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#8 class Concurrent::Synchronization::Condition < ::Concurrent::Synchronization::LockableObject + # @return [Condition] a new instance of Condition + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#18 def initialize(lock); end + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#47 def broadcast; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#51 def ns_broadcast; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#43 def ns_signal; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#27 def ns_wait(timeout = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#35 def ns_wait_until(timeout = T.unsafe(nil), &condition); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#39 def signal; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#23 def wait(timeout = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#31 def wait_until(timeout = T.unsafe(nil), &condition); end class << self + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/safe_initialization.rb#29 def private_new(*args, &block); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/safe_initialization.rb#29 + def new(*args, &block); end end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#8 module Concurrent::Synchronization::ConditionSignalling protected + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#16 def ns_broadcast; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#11 def ns_signal; end end +# TODO (pitr-ch 04-Dec-2016): should be in edge +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/lock.rb#9 class Concurrent::Synchronization::Lock < ::Concurrent::Synchronization::LockableObject + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/lock.rb#31 def broadcast; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#16 + def ns_broadcast; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#11 + def ns_signal; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#52 + def ns_wait(timeout = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb#37 + def ns_wait_until(timeout = T.unsafe(nil), &condition); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/lock.rb#25 def signal; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#44 + def synchronize; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/lock.rb#13 def wait(timeout = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/lock.rb#19 def wait_until(timeout = T.unsafe(nil), &condition); end end +# Safe synchronization under any Ruby implementation. +# It provides methods like {#synchronize}, {#wait}, {#signal} and {#broadcast}. +# Provides a single layer which can improve its implementation over time without changes needed to +# the classes using it. Use {Synchronization::Object} not this abstract class. +# +# @note this object does not support usage together with +# [`Thread#wakeup`](http://ruby-doc.org/core/Thread.html#method-i-wakeup) +# and [`Thread#raise`](http://ruby-doc.org/core/Thread.html#method-i-raise). +# `Thread#sleep` and `Thread#wakeup` will work as expected but mixing `Synchronization::Object#wait` and +# `Thread#wakeup` will not work on all platforms. +# +# @see Event implementation as an example of this class use +# +# @example simple +# class AnClass < Synchronization::Object +# def initialize +# super +# synchronize { @value = 'asd' } +# end +# +# def value +# synchronize { @value } +# end +# end +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/lockable_object.rb#50 class Concurrent::Synchronization::LockableObject < ::Concurrent::Synchronization::MutexLockableObject + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#57 def new_condition; end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/lockable_object.rb#11 Concurrent::Synchronization::LockableObjectImplementation = Concurrent::Synchronization::MutexLockableObject +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#60 class Concurrent::Synchronization::MonitorLockableObject < ::Concurrent::Synchronization::AbstractLockableObject include ::Concurrent::Synchronization::ConditionSignalling extend ::Concurrent::Synchronization::SafeInitialization + # @return [MonitorLockableObject] a new instance of MonitorLockableObject + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#65 def initialize; end protected + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#83 def ns_wait(timeout = T.unsafe(nil)); end + + # TODO may be a problem with lock.synchronize { lock.wait } + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#79 def synchronize; end private + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#71 def initialize_copy(other); end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#25 class Concurrent::Synchronization::MutexLockableObject < ::Concurrent::Synchronization::AbstractLockableObject include ::Concurrent::Synchronization::ConditionSignalling extend ::Concurrent::Synchronization::SafeInitialization + # @return [MutexLockableObject] a new instance of MutexLockableObject + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#30 def initialize; end protected + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#52 def ns_wait(timeout = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#44 def synchronize; end private + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#36 def initialize_copy(other); end end +# Abstract object providing final, volatile, ans CAS extensions to build other concurrent abstractions. +# - final instance variables see {Object.safe_initialization!} +# - volatile instance variables see {Object.attr_volatile} +# - volatile instance variables see {Object.attr_atomic} +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#15 class Concurrent::Synchronization::Object < ::Concurrent::Synchronization::AbstractObject include ::Concurrent::Synchronization::Volatile extend ::Concurrent::Synchronization::Volatile::ClassMethods + # Has to be called by children. + # + # @return [Object] a new instance of Object + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#28 def initialize; end private + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#146 def __initialize_atomic_fields__; end class << self + # @return [true, false] is the attribute with name atomic? + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#125 def atomic_attribute?(name); end + + # @param inherited [true, false] should inherited volatile with CAS fields be returned? + # @return [::Array] Returns defined volatile with CAS fields on this class. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#119 def atomic_attributes(inherited = T.unsafe(nil)); end + + # Creates methods for reading and writing to a instance variable with + # volatile (Java) semantic as {.attr_volatile} does. + # The instance variable should be accessed oly through generated methods. + # This method generates following methods: `value`, `value=(new_value) #=> new_value`, + # `swap_value(new_value) #=> old_value`, + # `compare_and_set_value(expected, value) #=> true || false`, `update_value(&block)`. + # + # @param names [::Array] of the instance variables to be volatile with CAS. + # @return [::Array] names of defined method names. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#84 def attr_atomic(*names); end + + # For testing purposes, quite slow. Injects assert code to new method which will raise if class instance contains + # any instance variables with CamelCase names and isn't {.safe_initialization?}. + # + # @raise when offend found + # @return [true] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#45 def ensure_safe_initialization_when_final_fields_are_present; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#33 def safe_initialization!; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#37 def safe_initialization?; end private + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#131 def define_initialize_atomic_fields; end end end +# By extending this module, a class and all its children are marked to be constructed safely. Meaning that +# all writes (ivar initializations) are made visible to all readers of newly constructed object. It ensures +# same behaviour as Java's final fields. +# +# Due to using Kernel#extend, the module is not included again if already present in the ancestors, +# which avoids extra overhead. +# +# @example +# class AClass < Concurrent::Synchronization::Object +# extend Concurrent::Synchronization::SafeInitialization +# +# def initialize +# @AFinalValue = 'value' # published safely, #foo will never return nil +# end +# +# def foo +# @AFinalValue +# end +# end +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/safe_initialization.rb#28 module Concurrent::Synchronization::SafeInitialization + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/safe_initialization.rb#29 def new(*args, &block); end end +# Volatile adds the attr_volatile class method when included. +# +# foo = Foo.new +# foo.bar +# => 1 +# foo.bar = 2 +# => 2 +# +# @example +# class Foo +# include Concurrent::Synchronization::Volatile +# +# attr_volatile :bar +# +# def initialize +# self.bar = 1 +# end +# end +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/volatile.rb#28 module Concurrent::Synchronization::Volatile mixes_in_class_methods ::Concurrent::Synchronization::Volatile::ClassMethods + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/volatile.rb#33 def full_memory_barrier; end class << self + # @private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/volatile.rb#29 def included(base); end end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/volatile.rb#37 module Concurrent::Synchronization::Volatile::ClassMethods + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/volatile.rb#39 def attr_volatile(*names); end end +# This class provides a trivial way to synchronize all calls to a given object +# by wrapping it with a `Delegator` that performs `Monitor#enter/exit` calls +# around the delegated `#send`. Example: +# +# array = [] # not thread-safe on many impls +# array = SynchronizedDelegator.new([]) # thread-safe +# +# A simple `Monitor` provides a very coarse-grained way to synchronize a given +# object, in that it will cause synchronization for methods that have no need +# for it, but this is a trivial way to get thread-safety where none may exist +# currently on some implementations. +# +# This class is currently being considered for inclusion into stdlib, via +# https://bugs.ruby-lang.org/issues/8556 +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/synchronized_delegator.rb#21 class Concurrent::SynchronizedDelegator < ::SimpleDelegator + # @return [SynchronizedDelegator] a new instance of SynchronizedDelegator + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/synchronized_delegator.rb#31 def initialize(obj); end + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/synchronized_delegator.rb#36 def method_missing(method, *args, &block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/synchronized_delegator.rb#22 def setup; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/synchronized_delegator.rb#27 def teardown; end end +# A `TVar` is a transactional variable - a single-element container that +# is used as part of a transaction - see `Concurrent::atomically`. +# +# +# ## Thread-safe Variable Classes +# +# Each of the thread-safe variable classes is designed to solve a different +# problem. In general: +# +# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, +# uncoordinated, *asynchronous* change of individual values. Best used when +# the value will undergo frequent, complex updates. Suitable when the result +# of an update does not need to be known immediately. +# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, +# uncoordinated, *synchronous* change of individual values. Best used when +# the value will undergo frequent reads but only occasional, though complex, +# updates. Suitable when the result of an update must be known immediately. +# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated +# atomically. Updates are synchronous but fast. Best used when updates a +# simple set operations. Not suitable when updates are complex. +# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar +# but optimized for the given data type. +# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used +# when two or more threads need to exchange data. The threads will pair then +# block on each other until the exchange is complete. +# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread +# must give a value to another, which must take the value. The threads will +# block on each other until the exchange is complete. +# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which +# holds a different value for each thread which has access. Often used as +# an instance variable in objects which must maintain different state +# for different threads. +# * *{Concurrent::TVar}:* Shared, mutable variables which provide +# *coordinated*, *synchronous*, change of *many* stated. Used when multiple +# value must change together, in an all-or-nothing transaction. +# {include:file:docs-source/tvar.md} +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#12 class Concurrent::TVar < ::Concurrent::Synchronization::Object extend ::Concurrent::Synchronization::SafeInitialization + # Create a new `TVar` with an initial value. + # + # @return [TVar] a new instance of TVar + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#16 def initialize(value); end + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#46 def unsafe_lock; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#36 def unsafe_value; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#41 def unsafe_value=(value); end + + # Get the value of a `TVar`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#22 def value; end + + # Set the value of a `TVar`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#29 def value=(value); end end +# A `ThreadLocalVar` is a variable where the value is different for each thread. +# Each variable may have a default value, but when you modify the variable only +# the current thread will ever see that change. +# +# This is similar to Ruby's built-in thread-local variables (`Thread#thread_variable_get`), +# but with these major advantages: +# * `ThreadLocalVar` has its own identity, it doesn't need a Symbol. +# * Each Ruby's built-in thread-local variable leaks some memory forever (it's a Symbol held forever on the thread), +# so it's only OK to create a small amount of them. +# `ThreadLocalVar` has no such issue and it is fine to create many of them. +# * Ruby's built-in thread-local variables leak forever the value set on each thread (unless set to nil explicitly). +# `ThreadLocalVar` automatically removes the mapping for each thread once the `ThreadLocalVar` instance is GC'd. +# +# +# ## Thread-safe Variable Classes +# +# Each of the thread-safe variable classes is designed to solve a different +# problem. In general: +# +# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, +# uncoordinated, *asynchronous* change of individual values. Best used when +# the value will undergo frequent, complex updates. Suitable when the result +# of an update does not need to be known immediately. +# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, +# uncoordinated, *synchronous* change of individual values. Best used when +# the value will undergo frequent reads but only occasional, though complex, +# updates. Suitable when the result of an update must be known immediately. +# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated +# atomically. Updates are synchronous but fast. Best used when updates a +# simple set operations. Not suitable when updates are complex. +# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar +# but optimized for the given data type. +# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used +# when two or more threads need to exchange data. The threads will pair then +# block on each other until the exchange is complete. +# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread +# must give a value to another, which must take the value. The threads will +# block on each other until the exchange is complete. +# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which +# holds a different value for each thread which has access. Often used as +# an instance variable in objects which must maintain different state +# for different threads. +# * *{Concurrent::TVar}:* Shared, mutable variables which provide +# *coordinated*, *synchronous*, change of *many* stated. Used when multiple +# value must change together, in an all-or-nothing transaction. +# +# @example +# v = ThreadLocalVar.new(14) +# v.value #=> 14 +# v.value = 2 +# v.value #=> 2 +# @example +# v = ThreadLocalVar.new(14) +# +# t1 = Thread.new do +# v.value #=> 14 +# v.value = 1 +# v.value #=> 1 +# end +# +# t2 = Thread.new do +# v.value #=> 14 +# v.value = 2 +# v.value #=> 2 +# end +# +# v.value #=> 14 +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb#43 class Concurrent::ThreadLocalVar + # Creates a thread local variable. + # + # @param default [Object] the default value when otherwise unset + # @param default_block [Proc] Optional block that gets called to obtain the + # default value for each thread + # @return [ThreadLocalVar] a new instance of ThreadLocalVar + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb#51 def initialize(default = T.unsafe(nil), &default_block); end + # Bind the given value to thread local storage during + # execution of the given block. + # + # @param value [Object] the value to bind + # @return [Object] the value + # @yield the operation to be performed with the bound variable + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb#88 def bind(value); end + + # Returns the value in the current thread's copy of this thread-local variable. + # + # @return [Object] the current value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb#70 def value; end + + # Sets the current thread's copy of this thread-local variable to the specified value. + # + # @param value [Object] the value to set + # @return [Object] the new value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb#78 def value=(value); end protected + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb#103 def default; end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb#44 Concurrent::ThreadLocalVar::LOCALS = T.let(T.unsafe(nil), Concurrent::ThreadLocals) +# An array-backed storage of indexed variables per thread. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#141 class Concurrent::ThreadLocals < ::Concurrent::AbstractLocals + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#142 def locals; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#146 def locals!; end end +# An abstraction composed of one or more threads and a task queue. Tasks +# (blocks or `proc` objects) are submitted to the pool and added to the queue. +# The threads in the pool remove the tasks and execute them in the order +# they were received. +# +# A `ThreadPoolExecutor` will automatically adjust the pool size according +# to the bounds set by `min-threads` and `max-threads`. When a new task is +# submitted and fewer than `min-threads` threads are running, a new thread +# is created to handle the request, even if other worker threads are idle. +# If there are more than `min-threads` but less than `max-threads` threads +# running, a new thread will be created only if the queue is full. +# +# Threads that are idle for too long will be garbage collected, down to the +# configured minimum options. Should a thread crash it, too, will be garbage collected. +# +# `ThreadPoolExecutor` is based on the Java class of the same name. From +# the official Java documentation; +# +# > Thread pools address two different problems: they usually provide +# > improved performance when executing large numbers of asynchronous tasks, +# > due to reduced per-task invocation overhead, and they provide a means +# > of bounding and managing the resources, including threads, consumed +# > when executing a collection of tasks. Each ThreadPoolExecutor also +# > maintains some basic statistics, such as the number of completed tasks. +# > +# > To be useful across a wide range of contexts, this class provides many +# > adjustable parameters and extensibility hooks. However, programmers are +# > urged to use the more convenient Executors factory methods +# > [CachedThreadPool] (unbounded thread pool, with automatic thread reclamation), +# > [FixedThreadPool] (fixed size thread pool) and [SingleThreadExecutor] (single +# > background thread), that preconfigure settings for the most common usage +# > scenarios. +# +# **Thread Pool Options** +# +# Thread pools support several configuration options: +# +# * `idletime`: The number of seconds that a thread may be idle before being reclaimed. +# * `name`: The name of the executor (optional). Printed in the executor's `#to_s` output and +# a `-worker-` name is given to its threads if supported by used Ruby +# implementation. `` is uniq for each thread. +# * `max_queue`: The maximum number of tasks that may be waiting in the work queue at +# any one time. When the queue size reaches `max_queue` and no new threads can be created, +# subsequent tasks will be rejected in accordance with the configured `fallback_policy`. +# * `auto_terminate`: When true (default), the threads started will be marked as daemon. +# * `fallback_policy`: The policy defining how rejected tasks are handled. +# +# Three fallback policies are supported: +# +# * `:abort`: Raise a `RejectedExecutionError` exception and discard the task. +# * `:discard`: Discard the task and return false. +# * `:caller_runs`: Execute the task on the calling thread. +# +# **Shutting Down Thread Pools** +# +# Killing a thread pool while tasks are still being processed, either by calling +# the `#kill` method or at application exit, will have unpredictable results. There +# is no way for the thread pool to know what resources are being used by the +# in-progress tasks. When those tasks are killed the impact on those resources +# cannot be predicted. The *best* practice is to explicitly shutdown all thread +# pools using the provided methods: +# +# * Call `#shutdown` to initiate an orderly termination of all in-progress tasks +# * Call `#wait_for_termination` with an appropriate timeout interval an allow +# the orderly shutdown to complete +# * Call `#kill` *only when* the thread pool fails to shutdown in the allotted time +# +# On some runtime platforms (most notably the JVM) the application will not +# exit until all thread pools have been shutdown. To prevent applications from +# "hanging" on exit, all threads can be marked as daemon according to the +# `:auto_terminate` option. +# +# ```ruby +# pool1 = Concurrent::FixedThreadPool.new(5) # threads will be marked as daemon +# pool2 = Concurrent::FixedThreadPool.new(5, auto_terminate: false) # mark threads as non-daemon +# ``` +# +# @note Failure to properly shutdown a thread pool can lead to unpredictable results. +# Please read *Shutting Down Thread Pools* for more information. +# @see http://docs.oracle.com/javase/tutorial/essential/concurrency/pools.html Java Tutorials: Thread Pools +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executors.html Java Executors class +# @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ExecutorService.html Java ExecutorService interface +# @see https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html#setDaemon-boolean- +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/thread_pool_executor.rb#56 class Concurrent::ThreadPoolExecutor < ::Concurrent::RubyThreadPoolExecutor; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/thread_pool_executor.rb#10 Concurrent::ThreadPoolExecutorImplementation = Concurrent::RubyThreadPoolExecutor + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util.rb#4 module Concurrent::ThreadSafe; end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util.rb#7 module Concurrent::ThreadSafe::Util class << self + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#16 def make_synchronized_on_cruby(klass); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#41 def make_synchronized_on_truffleruby(klass); end end end +# TODO (pitr-ch 15-Oct-2016): migrate to Utility::ProcessorCounter +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util.rb#13 Concurrent::ThreadSafe::Util::CPU_COUNT = T.let(T.unsafe(nil), Integer) + +# TODO (pitr-ch 15-Oct-2016): migrate to Utility::NativeInteger +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util.rb#10 Concurrent::ThreadSafe::Util::FIXNUM_BIT_SIZE = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util.rb#11 Concurrent::ThreadSafe::Util::MAX_INT = T.let(T.unsafe(nil), Integer) + +# Raised when an operation times out. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#55 class Concurrent::TimeoutError < ::Concurrent::Error; end +# Executes a collection of tasks, each after a given delay. A master task +# monitors the set and schedules each task for execution at the appropriate +# time. Tasks are run on the global thread pool or on the supplied executor. +# Each task is represented as a `ScheduledTask`. +# +# @see Concurrent::ScheduledTask +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#19 class Concurrent::TimerSet < ::Concurrent::RubyExecutorService + # Create a new set of timed tasks. + # + # @option opts + # @param opts [Hash] the options used to specify the executor on which to perform actions + # @return [TimerSet] a new instance of TimerSet + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#30 def initialize(opts = T.unsafe(nil)); end + # Begin an immediate shutdown. In-progress tasks will be allowed to + # complete but enqueued tasks will be dismissed and no new tasks + # will be accepted. Has no additional effect if the thread pool is + # not running. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#62 def kill; end + + # Post a task to be execute run after a given delay (in seconds). If the + # delay is less than 1/100th of a second the task will be immediately post + # to the executor. + # + # @param delay [Float] the number of seconds to wait for before executing the task. + # @param args [Array] the arguments passed to the task on execution. + # @raise [ArgumentError] if the intended execution time is not in the future. + # @raise [ArgumentError] if no block is given. + # @return [Concurrent::ScheduledTask, false] IVar representing the task if the post + # is successful; false after shutdown. + # @yield the task to be performed. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#48 def post(delay, *args, &task); end private + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/executor_service.rb#166 + def <<(task); end + + # Initialize the object. + # + # @param opts [Hash] the options to create the object with. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#74 def ns_initialize(opts); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#94 def ns_post_task(task); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#129 def ns_reset_if_forked; end + + # `ExecutorService` callback called during shutdown. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#122 def ns_shutdown_execution; end + + # Post the task to the internal queue. + # + # @note This is intended as a callback method from ScheduledTask + # only. It is not intended to be used directly. Post a task + # by using the `SchedulesTask#execute` method. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#89 def post_task(task); end + + # Run a loop and execute tasks in the scheduled order and at the approximate + # scheduled time. If no tasks remain the thread will exit gracefully so that + # garbage collection can occur. If there are no ready tasks it will sleep + # for up to 60 seconds waiting for the next scheduled task. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#143 def process_tasks; end + + # Remove the given task from the queue. + # + # @note This is intended as a callback method from `ScheduledTask` + # only. It is not intended to be used directly. Cancel a task + # by using the `ScheduledTask#cancel` method. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#115 def remove_task(task); end end +# A very common concurrency pattern is to run a thread that performs a task at +# regular intervals. The thread that performs the task sleeps for the given +# interval then wakes up and performs the task. Lather, rinse, repeat... This +# pattern causes two problems. First, it is difficult to test the business +# logic of the task because the task itself is tightly coupled with the +# concurrency logic. Second, an exception raised while performing the task can +# cause the entire thread to abend. In a long-running application where the +# task thread is intended to run for days/weeks/years a crashed task thread +# can pose a significant problem. `TimerTask` alleviates both problems. +# +# When a `TimerTask` is launched it starts a thread for monitoring the +# execution interval. The `TimerTask` thread does not perform the task, +# however. Instead, the TimerTask launches the task on a separate thread. +# Should the task experience an unrecoverable crash only the task thread will +# crash. This makes the `TimerTask` very fault tolerant. Additionally, the +# `TimerTask` thread can respond to the success or failure of the task, +# performing logging or ancillary operations. +# +# One other advantage of `TimerTask` is that it forces the business logic to +# be completely decoupled from the concurrency logic. The business logic can +# be tested separately then passed to the `TimerTask` for scheduling and +# running. +# +# In some cases it may be necessary for a `TimerTask` to affect its own +# execution cycle. To facilitate this, a reference to the TimerTask instance +# is passed as an argument to the provided block every time the task is +# executed. +# +# The `TimerTask` class includes the `Dereferenceable` mixin module so the +# result of the last execution is always available via the `#value` method. +# Dereferencing options can be passed to the `TimerTask` during construction or +# at any later time using the `#set_deref_options` method. +# +# `TimerTask` supports notification through the Ruby standard library +# {http://ruby-doc.org/stdlib-2.0/libdoc/observer/rdoc/Observable.html +# Observable} module. On execution the `TimerTask` will notify the observers +# with three arguments: time of execution, the result of the block (or nil on +# failure), and any raised exceptions (or nil on success). +# +# @example Basic usage +# task = Concurrent::TimerTask.new{ puts 'Boom!' } +# task.execute +# +# task.execution_interval #=> 60 (default) +# +# # wait 60 seconds... +# #=> 'Boom!' +# +# task.shutdown #=> true +# @example Configuring `:execution_interval` +# task = Concurrent::TimerTask.new(execution_interval: 5) do +# puts 'Boom!' +# end +# +# task.execution_interval #=> 5 +# @example Immediate execution with `:run_now` +# task = Concurrent::TimerTask.new(run_now: true){ puts 'Boom!' } +# task.execute +# +# #=> 'Boom!' +# @example Last `#value` and `Dereferenceable` mixin +# task = Concurrent::TimerTask.new( +# dup_on_deref: true, +# execution_interval: 5 +# ){ Time.now } +# +# task.execute +# Time.now #=> 2013-11-07 18:06:50 -0500 +# sleep(10) +# task.value #=> 2013-11-07 18:06:55 -0500 +# @example Controlling execution from within the block +# timer_task = Concurrent::TimerTask.new(execution_interval: 1) do |task| +# task.execution_interval.times{ print 'Boom! ' } +# print "\n" +# task.execution_interval += 1 +# if task.execution_interval > 5 +# puts 'Stopping...' +# task.shutdown +# end +# end +# +# timer_task.execute # blocking call - this task will stop itself +# #=> Boom! +# #=> Boom! Boom! +# #=> Boom! Boom! Boom! +# #=> Boom! Boom! Boom! Boom! +# #=> Boom! Boom! Boom! Boom! Boom! +# #=> Stopping... +# @example Observation +# class TaskObserver +# def update(time, result, ex) +# if result +# print "(#{time}) Execution successfully returned #{result}\n" +# else +# print "(#{time}) Execution failed with error #{ex}\n" +# end +# end +# end +# +# task = Concurrent::TimerTask.new(execution_interval: 1){ 42 } +# task.add_observer(TaskObserver.new) +# task.execute +# sleep 4 +# +# #=> (2013-10-13 19:08:58 -0400) Execution successfully returned 42 +# #=> (2013-10-13 19:08:59 -0400) Execution successfully returned 42 +# #=> (2013-10-13 19:09:00 -0400) Execution successfully returned 42 +# task.shutdown +# +# task = Concurrent::TimerTask.new(execution_interval: 1){ sleep } +# task.add_observer(TaskObserver.new) +# task.execute +# +# #=> (2013-10-13 19:07:25 -0400) Execution timed out +# #=> (2013-10-13 19:07:27 -0400) Execution timed out +# #=> (2013-10-13 19:07:29 -0400) Execution timed out +# task.shutdown +# +# task = Concurrent::TimerTask.new(execution_interval: 1){ raise StandardError } +# task.add_observer(TaskObserver.new) +# task.execute +# +# #=> (2013-10-13 19:09:37 -0400) Execution failed with error StandardError +# #=> (2013-10-13 19:09:38 -0400) Execution failed with error StandardError +# #=> (2013-10-13 19:09:39 -0400) Execution failed with error StandardError +# task.shutdown +# @see http://ruby-doc.org/stdlib-2.0/libdoc/observer/rdoc/Observable.html +# @see http://docs.oracle.com/javase/7/docs/api/java/util/TimerTask.html +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#148 class Concurrent::TimerTask < ::Concurrent::RubyExecutorService include ::Concurrent::Concern::Dereferenceable include ::Concurrent::Concern::Observable + # Create a new TimerTask with the given task and configuration. + # + # @option opts + # @option opts + # @param opts [Hash] the options defining task execution. + # @raise ArgumentError when no block is given. + # @return [TimerTask] the new `TimerTask` + # @yield to the block after :execution_interval seconds have passed since + # the last yield + # @yieldparam task a reference to the `TimerTask` instance so that the + # block can control its own lifecycle. Necessary since `self` will + # refer to the execution context of the block rather than the running + # `TimerTask`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#180 def initialize(opts = T.unsafe(nil), &task); end + # Execute a previously created `TimerTask`. + # + # @example Instance and execute in separate steps + # task = Concurrent::TimerTask.new(execution_interval: 10){ print "Hello World\n" } + # task.running? #=> false + # task.execute + # task.running? #=> true + # @example Instance and execute in one line + # task = Concurrent::TimerTask.new(execution_interval: 10){ print "Hello World\n" }.execute + # task.running? #=> true + # @return [TimerTask] a reference to `self` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#206 def execute; end + + # @return [Fixnum] Number of seconds after the task completes before the + # task is performed again. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#230 def execution_interval; end + + # @return [Fixnum] Number of seconds after the task completes before the + # task is performed again. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#237 def execution_interval=(value); end + + # Is the executor running? + # + # @return [Boolean] `true` when running, `false` when shutting down or shutdown + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#189 def running?; end + + # @return [Fixnum] Number of seconds the task can run before it is + # considered to have failed. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#248 def timeout_interval; end + + # @return [Fixnum] Number of seconds the task can run before it is + # considered to have failed. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#255 def timeout_interval=(value); end private + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/executor_service.rb#166 + def <<(task); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#297 def execute_task(completion); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#263 def ns_initialize(opts, &task); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#285 def ns_kill_execution; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#279 def ns_shutdown_execution; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#17 + def post(*args, &task); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#291 def schedule_next_task(interval = T.unsafe(nil)); end class << self + # Create and execute a new `TimerTask`. + # + # @example + # task = Concurrent::TimerTask.execute(execution_interval: 10){ print "Hello World\n" } + # task.running? #=> true + # @option opts + # @option opts + # @param opts [Hash] the options defining task execution. + # @raise ArgumentError when no block is given. + # @return [TimerTask] the new `TimerTask` + # @yield to the block after :execution_interval seconds have passed since + # the last yield + # @yieldparam task a reference to the `TimerTask` instance so that the + # block can control its own lifecycle. Necessary since `self` will + # refer to the execution context of the block rather than the running + # `TimerTask`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#223 def execute(opts = T.unsafe(nil), &task); end end end +# Default `:execution_interval` in seconds. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#153 Concurrent::TimerTask::EXECUTION_INTERVAL = T.let(T.unsafe(nil), Integer) + +# Default `:timeout_interval` in seconds. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#156 Concurrent::TimerTask::TIMEOUT_INTERVAL = T.let(T.unsafe(nil), Integer) +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#153 class Concurrent::Transaction + # @return [Transaction] a new instance of Transaction + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#162 def initialize; end + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#192 def abort; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#196 def commit; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#177 def open(tvar); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#166 def read(tvar); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#206 def unlock; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#171 def write(tvar, value); end class << self + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#212 def current; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#216 def current=(transaction); end end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#155 Concurrent::Transaction::ABORTED = T.let(T.unsafe(nil), Object) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#159 class Concurrent::Transaction::AbortError < ::StandardError; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#160 class Concurrent::Transaction::LeaveError < ::StandardError; end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#157 class Concurrent::Transaction::OpenEntry < ::Struct + # Returns the value of attribute modified + # + # @return [Object] the current value of modified def modified; end + + # Sets the attribute modified + # + # @param value [Object] the value to set the attribute modified to. + # @return [Object] the newly set value def modified=(_); end + + # Returns the value of attribute value + # + # @return [Object] the current value of value def value; end + + # Sets the attribute value + # + # @param value [Object] the value to set the attribute value to. + # @return [Object] the newly set value def value=(_); end class << self def [](*_arg0); end def inspect; end + def keyword_init?; end def members; end def new(*_arg0); end end end +# A fixed size array with volatile (synchronized, thread safe) getters/setters. +# Mixes in Ruby's `Enumerable` module for enhanced search, sort, and traversal. +# +# @example +# tuple = Concurrent::Tuple.new(16) +# +# tuple.set(0, :foo) #=> :foo | volatile write +# tuple.get(0) #=> :foo | volatile read +# tuple.compare_and_set(0, :foo, :bar) #=> true | strong CAS +# tuple.cas(0, :foo, :baz) #=> false | strong CAS +# tuple.get(0) #=> :bar | volatile read +# @see https://en.wikipedia.org/wiki/Tuple Tuple entry at Wikipedia +# @see http://www.erlang.org/doc/reference_manual/data_types.html#id70396 Erlang Tuple +# @see http://ruby-doc.org/core-2.2.2/Enumerable.html Enumerable +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#20 class Concurrent::Tuple include ::Enumerable + # Create a new tuple of the given size. + # + # @param size [Integer] the number of elements in the tuple + # @return [Tuple] a new instance of Tuple + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#29 def initialize(size); end + # Set the value at the given index to the new value if and only if the current + # value matches the given old value. + # + # @param i [Integer] the index for the element to set + # @param old_value [Object] the value to compare against the current value + # @param new_value [Object] the value to set at the given index + # @return [Boolean] true if the value at the given element was set else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#69 def cas(i, old_value, new_value); end + + # Set the value at the given index to the new value if and only if the current + # value matches the given old value. + # + # @param i [Integer] the index for the element to set + # @param old_value [Object] the value to compare against the current value + # @param new_value [Object] the value to set at the given index + # @return [Boolean] true if the value at the given element was set else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#69 def compare_and_set(i, old_value, new_value); end + + # Calls the given block once for each element in self, passing that element as a parameter. + # + # @yieldparam ref [Object] the `Concurrent::AtomicReference` object at the current index + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#78 def each; end + + # Get the value of the element at the given index. + # + # @param i [Integer] the index from which to retrieve the value + # @return [Object] the value at the given index or nil if the index is out of bounds + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#43 def get(i); end + + # Set the element at the given index to the given value + # + # @param i [Integer] the index for the element to set + # @param value [Object] the value to set at the given index + # @return [Object] the new value of the element at the given index or nil if the index is out of bounds + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#55 def set(i, value); end + + # The (fixed) size of the tuple. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#24 def size; end + + # Get the value of the element at the given index. + # + # @param i [Integer] the index from which to retrieve the value + # @return [Object] the value at the given index or nil if the index is out of bounds + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#43 def volatile_get(i); end + + # Set the element at the given index to the given value + # + # @param i [Integer] the index for the element to set + # @param value [Object] the value to set at the given index + # @return [Object] the new value of the element at the given index or nil if the index is out of bounds + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#55 def volatile_set(i, value); end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/engine.rb#3 module Concurrent::Utility; end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/engine.rb#6 module Concurrent::Utility::EngineDetector + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/engine.rb#7 def on_cruby?; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/engine.rb#11 def on_jruby?; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/engine.rb#27 def on_linux?; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/engine.rb#23 def on_osx?; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/engine.rb#15 def on_truffleruby?; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/engine.rb#19 def on_windows?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/engine.rb#31 def ruby_version(version = T.unsafe(nil), comparison, major, minor, patch); end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb#9 module Concurrent::Utility::NativeExtensionLoader + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb#11 def allow_c_extensions?; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb#15 def c_extensions_loaded?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb#19 def load_native_extensions; end private + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb#50 def java_extensions_loaded?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb#38 def load_error_path(error); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb#46 def set_c_extensions_loaded; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb#54 def set_java_extensions_loaded; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb#58 def try_load_c_extension(path); end end +# @private +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_integer.rb#5 module Concurrent::Utility::NativeInteger extend ::Concurrent::Utility::NativeInteger + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_integer.rb#24 def ensure_integer(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_integer.rb#31 def ensure_integer_and_bounds(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_integer.rb#17 def ensure_lower_bound(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_integer.rb#37 def ensure_positive(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_integer.rb#44 def ensure_positive_and_no_zero(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_integer.rb#10 def ensure_upper_bound(value); end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_integer.rb#8 Concurrent::Utility::NativeInteger::MAX_VALUE = T.let(T.unsafe(nil), Integer) + +# http://stackoverflow.com/questions/535721/ruby-max-integer +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_integer.rb#7 Concurrent::Utility::NativeInteger::MIN_VALUE = T.let(T.unsafe(nil), Integer) +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#10 class Concurrent::Utility::ProcessorCounter + # @return [ProcessorCounter] a new instance of ProcessorCounter + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#11 def initialize; end + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#20 def physical_processor_count; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#16 def processor_count; end private + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#34 def compute_physical_processor_count; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#26 def compute_processor_count; end end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/version.rb#2 Concurrent::VERSION = T.let(T.unsafe(nil), String) diff --git a/Library/Homebrew/sorbet/rbi/gems/diff-lcs@1.5.0.rbi b/Library/Homebrew/sorbet/rbi/gems/diff-lcs@1.5.0.rbi index 5b73ae7fe9a9db..120f096380d417 100644 --- a/Library/Homebrew/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/diff-lcs@1.5.0.rbi @@ -4,182 +4,1080 @@ # This is an autogenerated file for types exported from the `diff-lcs` gem. # Please instead update this file by running `bin/tapioca gem diff-lcs`. +# source://diff-lcs//lib/diff/lcs.rb#3 module Diff; end +# source://diff-lcs//lib/diff/lcs.rb#51 module Diff::LCS + # Returns the difference set between +self+ and +other+. See Diff::LCS#diff. + # + # source://diff-lcs//lib/diff/lcs.rb#75 def diff(other, callbacks = T.unsafe(nil), &block); end + + # Returns an Array containing the longest common subsequence(s) between + # +self+ and +other+. See Diff::LCS#lcs. + # + # lcs = seq1.lcs(seq2) + # + # A note when using objects: Diff::LCS only works properly when each object + # can be used as a key in a Hash, which typically means that the objects must + # implement Object#eql? in a way that two identical values compare + # identically for key purposes. That is: + # + # O.new('a').eql?(O.new('a')) == true + # + # source://diff-lcs//lib/diff/lcs.rb#70 def lcs(other, &block); end + + # Attempts to patch +self+ with the provided +patchset+. A new sequence based + # on +self+ and the +patchset+ will be created. See Diff::LCS#patch. Attempts + # to autodiscover the direction of the patch. + # + # source://diff-lcs//lib/diff/lcs.rb#101 def patch(patchset); end + + # Attempts to patch +self+ with the provided +patchset+. A new sequence based + # on +self+ and the +patchset+ will be created. See Diff::LCS#patch. Does no + # patch direction autodiscovery. + # + # source://diff-lcs//lib/diff/lcs.rb#109 def patch!(patchset); end + + # Attempts to patch +self+ with the provided +patchset+, using #patch!. If + # the sequence this is used on supports #replace, the value of +self+ will be + # replaced. See Diff::LCS#patch. Does no patch direction autodiscovery. + # + # source://diff-lcs//lib/diff/lcs.rb#123 def patch_me(patchset); end + + # Returns the balanced ("side-by-side") difference set between +self+ and + # +other+. See Diff::LCS#sdiff. + # + # source://diff-lcs//lib/diff/lcs.rb#81 def sdiff(other, callbacks = T.unsafe(nil), &block); end + + # Traverses the discovered longest common subsequences between +self+ and + # +other+ using the alternate, balanced algorithm. See + # Diff::LCS#traverse_balanced. + # + # source://diff-lcs//lib/diff/lcs.rb#94 def traverse_balanced(other, callbacks = T.unsafe(nil), &block); end + + # Traverses the discovered longest common subsequences between +self+ and + # +other+. See Diff::LCS#traverse_sequences. + # + # source://diff-lcs//lib/diff/lcs.rb#87 def traverse_sequences(other, callbacks = T.unsafe(nil), &block); end + + # Attempts to patch +self+ with the provided +patchset+. A new sequence based + # on +self+ and the +patchset+ will be created. See Diff::LCS#patch. Attempts + # to autodiscover the direction of the patch. + # + # source://diff-lcs//lib/diff/lcs.rb#101 def unpatch(patchset); end + + # Attempts to unpatch +self+ with the provided +patchset+. A new sequence + # based on +self+ and the +patchset+ will be created. See Diff::LCS#unpatch. + # Does no patch direction autodiscovery. + # + # source://diff-lcs//lib/diff/lcs.rb#116 def unpatch!(patchset); end + + # Attempts to unpatch +self+ with the provided +patchset+, using #unpatch!. + # If the sequence this is used on supports #replace, the value of +self+ will + # be replaced. See Diff::LCS#unpatch. Does no patch direction autodiscovery. + # + # source://diff-lcs//lib/diff/lcs.rb#134 def unpatch_me(patchset); end class << self + # :yields seq1[i] for each matched: + # + # source://diff-lcs//lib/diff/lcs.rb#144 def LCS(seq1, seq2, &block); end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#52 def callbacks_for(callbacks); end + + # #diff computes the smallest set of additions and deletions necessary to + # turn the first sequence into the second, and returns a description of these + # changes. + # + # See Diff::LCS::DiffCallbacks for the default behaviour. An alternate + # behaviour may be implemented with Diff::LCS::ContextDiffCallbacks. If a + # Class argument is provided for +callbacks+, #diff will attempt to + # initialise it. If the +callbacks+ object (possibly initialised) responds to + # #finish, it will be called. + # + # source://diff-lcs//lib/diff/lcs.rb#168 def diff(seq1, seq2, callbacks = T.unsafe(nil), &block); end + + # :yields seq1[i] for each matched: + # + # source://diff-lcs//lib/diff/lcs.rb#144 def lcs(seq1, seq2, &block); end + + # Applies a +patchset+ to the sequence +src+ according to the +direction+ + # (:patch or :unpatch), producing a new sequence. + # + # If the +direction+ is not specified, Diff::LCS::patch will attempt to + # discover the direction of the +patchset+. + # + # A +patchset+ can be considered to apply forward (:patch) if the + # following expression is true: + # + # patch(s1, diff(s1, s2)) -> s2 + # + # A +patchset+ can be considered to apply backward (:unpatch) if the + # following expression is true: + # + # patch(s2, diff(s1, s2)) -> s1 + # + # If the +patchset+ contains no changes, the +src+ value will be returned as + # either src.dup or +src+. A +patchset+ can be deemed as having no + # changes if the following predicate returns true: + # + # patchset.empty? or + # patchset.flatten(1).all? { |change| change.unchanged? } + # + # === Patchsets + # + # A +patchset+ is always an enumerable sequence of changes, hunks of changes, + # or a mix of the two. A hunk of changes is an enumerable sequence of + # changes: + # + # [ # patchset + # # change + # [ # hunk + # # change + # ] + # ] + # + # The +patch+ method accepts patchsets that are enumerable sequences + # containing either Diff::LCS::Change objects (or a subclass) or the array + # representations of those objects. Prior to application, array + # representations of Diff::LCS::Change objects will be reified. + # + # source://diff-lcs//lib/diff/lcs.rb#624 def patch(src, patchset, direction = T.unsafe(nil)); end + + # Given a set of patchset, convert the current version to the next version. + # Does no auto-discovery. + # + # source://diff-lcs//lib/diff/lcs.rb#734 def patch!(src, patchset); end + + # #sdiff computes all necessary components to show two sequences and their + # minimized differences side by side, just like the Unix utility + # sdiff does: + # + # old < - + # same same + # before | after + # - > new + # + # See Diff::LCS::SDiffCallbacks for the default behaviour. An alternate + # behaviour may be implemented with Diff::LCS::ContextDiffCallbacks. If a + # Class argument is provided for +callbacks+, #diff will attempt to + # initialise it. If the +callbacks+ object (possibly initialised) responds to + # #finish, it will be called. + # + # Each element of a returned array is a Diff::LCS::ContextChange object, + # which can be implicitly converted to an array. + # + # Diff::LCS.sdiff(a, b).each do |action, (old_pos, old_element), (new_pos, new_element)| + # case action + # when '!' + # # replace + # when '-' + # # delete + # when '+' + # # insert + # end + # end + # + # source://diff-lcs//lib/diff/lcs.rb#200 def sdiff(seq1, seq2, callbacks = T.unsafe(nil), &block); end + + # #traverse_balanced is an alternative to #traverse_sequences. It uses a + # different algorithm to iterate through the entries in the computed longest + # common subsequence. Instead of viewing the changes as insertions or + # deletions from one of the sequences, #traverse_balanced will report + # changes between the sequences. + # + # The arguments to #traverse_balanced are the two sequences to traverse and a + # callback object, like this: + # + # traverse_balanced(seq1, seq2, Diff::LCS::ContextDiffCallbacks.new) + # + # #sdiff is implemented with #traverse_balanced. + # + # == Callback Methods + # + # Optional callback methods are emphasized. + # + # callbacks#match:: Called when +a+ and +b+ are pointing to + # common elements in +A+ and +B+. + # callbacks#discard_a:: Called when +a+ is pointing to an + # element not in +B+. + # callbacks#discard_b:: Called when +b+ is pointing to an + # element not in +A+. + # callbacks#change:: Called when +a+ and +b+ are pointing to + # the same relative position, but + # A[a] and B[b] are not + # the same; a change has + # occurred. + # + # #traverse_balanced might be a bit slower than #traverse_sequences, + # noticable only while processing huge amounts of data. + # + # == Algorithm + # + # a---+ + # v + # A = a b c e h j l m n p + # B = b c d e f j k l m r s t + # ^ + # b---+ + # + # === Matches + # + # If there are two arrows (+a+ and +b+) pointing to elements of sequences +A+ + # and +B+, the arrows will initially point to the first elements of their + # respective sequences. #traverse_sequences will advance the arrows through + # the sequences one element at a time, calling a method on the user-specified + # callback object before each advance. It will advance the arrows in such a + # way that if there are elements A[i] and B[j] which are + # both equal and part of the longest common subsequence, there will be some + # moment during the execution of #traverse_sequences when arrow +a+ is + # pointing to A[i] and arrow +b+ is pointing to B[j]. When + # this happens, #traverse_sequences will call callbacks#match and + # then it will advance both arrows. + # + # === Discards + # + # Otherwise, one of the arrows is pointing to an element of its sequence that + # is not part of the longest common subsequence. #traverse_sequences will + # advance that arrow and will call callbacks#discard_a or + # callbacks#discard_b, depending on which arrow it advanced. + # + # === Changes + # + # If both +a+ and +b+ point to elements that are not part of the longest + # common subsequence, then #traverse_sequences will try to call + # callbacks#change and advance both arrows. If + # callbacks#change is not implemented, then + # callbacks#discard_a and callbacks#discard_b will be + # called in turn. + # + # The methods for callbacks#match, callbacks#discard_a, + # callbacks#discard_b, and callbacks#change are invoked + # with an event comprising the action ("=", "+", "-", or "!", respectively), + # the indicies +i+ and +j+, and the elements A[i] and B[j]. + # Return values are discarded by #traverse_balanced. + # + # === Context + # + # Note that +i+ and +j+ may not be the same index position, even if +a+ and + # +b+ are considered to be pointing to matching or changed elements. + # + # source://diff-lcs//lib/diff/lcs.rb#475 def traverse_balanced(seq1, seq2, callbacks = T.unsafe(nil)); end + + # #traverse_sequences is the most general facility provided by this module; + # #diff and #lcs are implemented as calls to it. + # + # The arguments to #traverse_sequences are the two sequences to traverse, and + # a callback object, like this: + # + # traverse_sequences(seq1, seq2, Diff::LCS::ContextDiffCallbacks.new) + # + # == Callback Methods + # + # Optional callback methods are emphasized. + # + # callbacks#match:: Called when +a+ and +b+ are pointing to + # common elements in +A+ and +B+. + # callbacks#discard_a:: Called when +a+ is pointing to an + # element not in +B+. + # callbacks#discard_b:: Called when +b+ is pointing to an + # element not in +A+. + # callbacks#finished_a:: Called when +a+ has reached the end of + # sequence +A+. + # callbacks#finished_b:: Called when +b+ has reached the end of + # sequence +B+. + # + # == Algorithm + # + # a---+ + # v + # A = a b c e h j l m n p + # B = b c d e f j k l m r s t + # ^ + # b---+ + # + # If there are two arrows (+a+ and +b+) pointing to elements of sequences +A+ + # and +B+, the arrows will initially point to the first elements of their + # respective sequences. #traverse_sequences will advance the arrows through + # the sequences one element at a time, calling a method on the user-specified + # callback object before each advance. It will advance the arrows in such a + # way that if there are elements A[i] and B[j] which are + # both equal and part of the longest common subsequence, there will be some + # moment during the execution of #traverse_sequences when arrow +a+ is + # pointing to A[i] and arrow +b+ is pointing to B[j]. When + # this happens, #traverse_sequences will call callbacks#match and + # then it will advance both arrows. + # + # Otherwise, one of the arrows is pointing to an element of its sequence that + # is not part of the longest common subsequence. #traverse_sequences will + # advance that arrow and will call callbacks#discard_a or + # callbacks#discard_b, depending on which arrow it advanced. If both + # arrows point to elements that are not part of the longest common + # subsequence, then #traverse_sequences will advance arrow +a+ and call the + # appropriate callback, then it will advance arrow +b+ and call the appropriate + # callback. + # + # The methods for callbacks#match, callbacks#discard_a, and + # callbacks#discard_b are invoked with an event comprising the + # action ("=", "+", or "-", respectively), the indicies +i+ and +j+, and the + # elements A[i] and B[j]. Return values are discarded by + # #traverse_sequences. + # + # === End of Sequences + # + # If arrow +a+ reaches the end of its sequence before arrow +b+ does, + # #traverse_sequence will try to call callbacks#finished_a with the + # last index and element of +A+ (A[-1]) and the current index and + # element of +B+ (B[j]). If callbacks#finished_a does not + # exist, then callbacks#discard_b will be called on each element of + # +B+ until the end of the sequence is reached (the call will be done with + # A[-1] and B[j] for each element). + # + # If +b+ reaches the end of +B+ before +a+ reaches the end of +A+, + # callbacks#finished_b will be called with the current index and + # element of +A+ (A[i]) and the last index and element of +B+ + # (A[-1]). Again, if callbacks#finished_b does not exist on + # the callback object, then callbacks#discard_a will be called on + # each element of +A+ until the end of the sequence is reached (A[i] + # and B[-1]). + # + # There is a chance that one additional callbacks#discard_a or + # callbacks#discard_b will be called after the end of the sequence + # is reached, if +a+ has not yet reached the end of +A+ or +b+ has not yet + # reached the end of +B+. + # + # source://diff-lcs//lib/diff/lcs.rb#285 def traverse_sequences(seq1, seq2, callbacks = T.unsafe(nil)); end + + # Given a set of patchset, convert the current version to the prior version. + # Does no auto-discovery. + # + # source://diff-lcs//lib/diff/lcs.rb#728 def unpatch!(src, patchset); end private + # source://diff-lcs//lib/diff/lcs/internals.rb#4 def diff_traversal(method, seq1, seq2, callbacks, &block); end end end +# An alias for DefaultCallbacks that is used in +# Diff::LCS#traverse_balanced. +# +# Diff::LCS.LCS(seq1, seq2, Diff::LCS::BalancedCallbacks) +# +# source://diff-lcs//lib/diff/lcs/callbacks.rb#50 Diff::LCS::BalancedCallbacks = Diff::LCS::DefaultCallbacks +# A block is an operation removing, adding, or changing a group of items. +# Basically, this is just a list of changes, where each change adds or +# deletes a single item. Used by bin/ldiff. +# +# source://diff-lcs//lib/diff/lcs/block.rb#6 class Diff::LCS::Block + # @return [Block] a new instance of Block + # + # source://diff-lcs//lib/diff/lcs/block.rb#9 def initialize(chunk); end + # Returns the value of attribute changes. + # + # source://diff-lcs//lib/diff/lcs/block.rb#7 def changes; end + + # source://diff-lcs//lib/diff/lcs/block.rb#21 def diff_size; end + + # Returns the value of attribute insert. + # + # source://diff-lcs//lib/diff/lcs/block.rb#7 def insert; end + + # source://diff-lcs//lib/diff/lcs/block.rb#25 def op; end + + # Returns the value of attribute remove. + # + # source://diff-lcs//lib/diff/lcs/block.rb#7 def remove; end end +# Represents a simplistic (non-contextual) change. Represents the removal or +# addition of an element from either the old or the new sequenced +# enumerable. +# +# source://diff-lcs//lib/diff/lcs/change.rb#6 class Diff::LCS::Change include ::Comparable + # @return [Change] a new instance of Change + # + # source://diff-lcs//lib/diff/lcs/change.rb#27 def initialize(*args); end + # source://diff-lcs//lib/diff/lcs/change.rb#65 def <=>(other); end + + # source://diff-lcs//lib/diff/lcs/change.rb#58 def ==(other); end + + # Returns the action this Change represents. + # + # source://diff-lcs//lib/diff/lcs/change.rb#20 def action; end + + # @return [Boolean] + # + # source://diff-lcs//lib/diff/lcs/change.rb#72 def adding?; end + + # @return [Boolean] + # + # source://diff-lcs//lib/diff/lcs/change.rb#84 def changed?; end + + # @return [Boolean] + # + # source://diff-lcs//lib/diff/lcs/change.rb#76 def deleting?; end + + # Returns the sequence element of the Change. + # + # source://diff-lcs//lib/diff/lcs/change.rb#25 def element; end + + # @return [Boolean] + # + # source://diff-lcs//lib/diff/lcs/change.rb#88 def finished_a?; end + + # @return [Boolean] + # + # source://diff-lcs//lib/diff/lcs/change.rb#92 def finished_b?; end + + # source://diff-lcs//lib/diff/lcs/change.rb#34 def inspect(*_args); end + + # Returns the position of the Change. + # + # source://diff-lcs//lib/diff/lcs/change.rb#23 def position; end + + # source://diff-lcs//lib/diff/lcs/change.rb#38 def to_a; end + + # source://diff-lcs//lib/diff/lcs/change.rb#38 def to_ary; end + + # @return [Boolean] + # + # source://diff-lcs//lib/diff/lcs/change.rb#80 def unchanged?; end class << self + # source://diff-lcs//lib/diff/lcs/change.rb#44 def from_a(arr); end + + # @return [Boolean] + # + # source://diff-lcs//lib/diff/lcs/change.rb#15 def valid_action?(action); end end end +# source://diff-lcs//lib/diff/lcs/change.rb#7 Diff::LCS::Change::IntClass = Integer + +# The only actions valid for changes are '+' (add), '-' (delete), '=' +# (no change), '!' (changed), '<' (tail changes from first sequence), or +# '>' (tail changes from second sequence). The last two ('<>') are only +# found with Diff::LCS::diff and Diff::LCS::sdiff. +# +# source://diff-lcs//lib/diff/lcs/change.rb#13 Diff::LCS::Change::VALID_ACTIONS = T.let(T.unsafe(nil), Array) +# Represents a contextual change. Contains the position and values of the +# elements in the old and the new sequenced enumerables as well as the action +# taken. +# +# source://diff-lcs//lib/diff/lcs/change.rb#101 class Diff::LCS::ContextChange < ::Diff::LCS::Change + # @return [ContextChange] a new instance of ContextChange + # + # source://diff-lcs//lib/diff/lcs/change.rb#114 def initialize(*args); end + # source://diff-lcs//lib/diff/lcs/change.rb#166 def <=>(other); end + + # source://diff-lcs//lib/diff/lcs/change.rb#157 def ==(other); end + + # Returns the new element being changed. + # + # source://diff-lcs//lib/diff/lcs/change.rb#112 def new_element; end + + # Returns the new position being changed. + # + # source://diff-lcs//lib/diff/lcs/change.rb#108 def new_position; end + + # Returns the old element being changed. + # + # source://diff-lcs//lib/diff/lcs/change.rb#110 def old_element; end + + # Returns the old position being changed. + # + # source://diff-lcs//lib/diff/lcs/change.rb#106 def old_position; end + + # source://diff-lcs//lib/diff/lcs/change.rb#122 def to_a; end + + # source://diff-lcs//lib/diff/lcs/change.rb#122 def to_ary; end class << self + # source://diff-lcs//lib/diff/lcs/change.rb#132 def from_a(arr); end + + # Simplifies a context change for use in some diff callbacks. '<' actions + # are converted to '-' and '>' actions are converted to '+'. + # + # source://diff-lcs//lib/diff/lcs/change.rb#138 def simplify(event); end end end +# This will produce a compound array of contextual diff change objects. Each +# element in the #diffs array is a "hunk" array, where each element in each +# "hunk" array is a single change. Each change is a Diff::LCS::ContextChange +# that contains both the old index and new index values for the change. The +# "hunk" provides the full context for the changes. Both old and new objects +# will be presented for changed objects. +nil+ will be substituted for a +# discarded object. +# +# seq1 = %w(a b c e h j l m n p) +# seq2 = %w(b c d e f j k l m r s t) +# +# diffs = Diff::LCS.diff(seq1, seq2, Diff::LCS::ContextDiffCallbacks) +# # This example shows a simplified array format. +# # [ [ [ '-', [ 0, 'a' ], [ 0, nil ] ] ], # 1 +# # [ [ '+', [ 3, nil ], [ 2, 'd' ] ] ], # 2 +# # [ [ '-', [ 4, 'h' ], [ 4, nil ] ], # 3 +# # [ '+', [ 5, nil ], [ 4, 'f' ] ] ], +# # [ [ '+', [ 6, nil ], [ 6, 'k' ] ] ], # 4 +# # [ [ '-', [ 8, 'n' ], [ 9, nil ] ], # 5 +# # [ '+', [ 9, nil ], [ 9, 'r' ] ], +# # [ '-', [ 9, 'p' ], [ 10, nil ] ], +# # [ '+', [ 10, nil ], [ 10, 's' ] ], +# # [ '+', [ 10, nil ], [ 11, 't' ] ] ] ] +# +# The five hunks shown are comprised of individual changes; if there is a +# related set of changes, they are still shown individually. +# +# This callback can also be used with Diff::LCS#sdiff, which will produce +# results like: +# +# diffs = Diff::LCS.sdiff(seq1, seq2, Diff::LCS::ContextCallbacks) +# # This example shows a simplified array format. +# # [ [ [ "-", [ 0, "a" ], [ 0, nil ] ] ], # 1 +# # [ [ "+", [ 3, nil ], [ 2, "d" ] ] ], # 2 +# # [ [ "!", [ 4, "h" ], [ 4, "f" ] ] ], # 3 +# # [ [ "+", [ 6, nil ], [ 6, "k" ] ] ], # 4 +# # [ [ "!", [ 8, "n" ], [ 9, "r" ] ], # 5 +# # [ "!", [ 9, "p" ], [ 10, "s" ] ], +# # [ "+", [ 10, nil ], [ 11, "t" ] ] ] ] +# +# The five hunks are still present, but are significantly shorter in total +# presentation, because changed items are shown as changes ("!") instead of +# potentially "mismatched" pairs of additions and deletions. +# +# The result of this operation is similar to that of +# Diff::LCS::SDiffCallbacks. They may be compared as: +# +# s = Diff::LCS.sdiff(seq1, seq2).reject { |e| e.action == "=" } +# c = Diff::LCS.sdiff(seq1, seq2, Diff::LCS::ContextDiffCallbacks).flatten(1) +# +# s == c # -> true +# +# === Use +# +# This callback object must be initialised and can be used by the +# Diff::LCS#diff or Diff::LCS#sdiff methods. +# +# cbo = Diff::LCS::ContextDiffCallbacks.new +# Diff::LCS.LCS(seq1, seq2, cbo) +# cbo.finish +# +# Note that the call to #finish is absolutely necessary, or the last set of +# changes will not be visible. Alternatively, can be used as: +# +# cbo = Diff::LCS::ContextDiffCallbacks.new { |tcbo| Diff::LCS.LCS(seq1, seq2, tcbo) } +# +# The necessary #finish call will be made. +# +# === Simplified Array Format +# +# The simplified array format used in the example above can be obtained +# with: +# +# require 'pp' +# pp diffs.map { |e| e.map { |f| f.to_a } } +# +# source://diff-lcs//lib/diff/lcs/callbacks.rb#223 class Diff::LCS::ContextDiffCallbacks < ::Diff::LCS::DiffCallbacks + # source://diff-lcs//lib/diff/lcs/callbacks.rb#232 def change(event); end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#224 def discard_a(event); end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#228 def discard_b(event); end end +# This callback object implements the default set of callback events, +# which only returns the event itself. Note that #finished_a and +# #finished_b are not implemented -- I haven't yet figured out where they +# would be useful. +# +# Note that this is intended to be called as is, e.g., +# +# Diff::LCS.LCS(seq1, seq2, Diff::LCS::DefaultCallbacks) +# +# source://diff-lcs//lib/diff/lcs/callbacks.rb#14 class Diff::LCS::DefaultCallbacks class << self + # Called when both the old and new values have changed. + # + # source://diff-lcs//lib/diff/lcs/callbacks.rb#32 def change(event); end + + # Called when the old value is discarded in favour of the new value. + # + # source://diff-lcs//lib/diff/lcs/callbacks.rb#22 def discard_a(event); end + + # Called when the new value is discarded in favour of the old value. + # + # source://diff-lcs//lib/diff/lcs/callbacks.rb#27 def discard_b(event); end + + # Called when two items match. + # + # source://diff-lcs//lib/diff/lcs/callbacks.rb#17 def match(event); end + + private + + def new(*_arg0); end end end +# This will produce a compound array of simple diff change objects. Each +# element in the #diffs array is a +hunk+ or +hunk+ array, where each +# element in each +hunk+ array is a single Change object representing the +# addition or removal of a single element from one of the two tested +# sequences. The +hunk+ provides the full context for the changes. +# +# diffs = Diff::LCS.diff(seq1, seq2) +# # This example shows a simplified array format. +# # [ [ [ '-', 0, 'a' ] ], # 1 +# # [ [ '+', 2, 'd' ] ], # 2 +# # [ [ '-', 4, 'h' ], # 3 +# # [ '+', 4, 'f' ] ], +# # [ [ '+', 6, 'k' ] ], # 4 +# # [ [ '-', 8, 'n' ], # 5 +# # [ '-', 9, 'p' ], +# # [ '+', 9, 'r' ], +# # [ '+', 10, 's' ], +# # [ '+', 11, 't' ] ] ] +# +# There are five hunks here. The first hunk says that the +a+ at position 0 +# of the first sequence should be deleted ('-'). The second hunk +# says that the +d+ at position 2 of the second sequence should be inserted +# ('+'). The third hunk says that the +h+ at position 4 of the +# first sequence should be removed and replaced with the +f+ from position 4 +# of the second sequence. The other two hunks are described similarly. +# +# === Use +# +# This callback object must be initialised and is used by the Diff::LCS#diff +# method. +# +# cbo = Diff::LCS::DiffCallbacks.new +# Diff::LCS.LCS(seq1, seq2, cbo) +# cbo.finish +# +# Note that the call to #finish is absolutely necessary, or the last set of +# changes will not be visible. Alternatively, can be used as: +# +# cbo = Diff::LCS::DiffCallbacks.new { |tcbo| Diff::LCS.LCS(seq1, seq2, tcbo) } +# +# The necessary #finish call will be made. +# +# === Simplified Array Format +# +# The simplified array format used in the example above can be obtained +# with: +# +# require 'pp' +# pp diffs.map { |e| e.map { |f| f.to_a } } +# +# source://diff-lcs//lib/diff/lcs/callbacks.rb#106 class Diff::LCS::DiffCallbacks + # :yields self: + # + # @return [DiffCallbacks] a new instance of DiffCallbacks + # + # source://diff-lcs//lib/diff/lcs/callbacks.rb#110 def initialize; end + # Returns the difference set collected during the diff process. + # + # source://diff-lcs//lib/diff/lcs/callbacks.rb#108 def diffs; end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#133 def discard_a(event); end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#137 def discard_b(event); end + + # Finalizes the diff process. If an unprocessed hunk still exists, then it + # is appended to the diff list. + # + # source://diff-lcs//lib/diff/lcs/callbacks.rb#125 def finish; end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#129 def match(_event); end private + # source://diff-lcs//lib/diff/lcs/callbacks.rb#141 def finish_hunk; end end +# A Hunk is a group of Blocks which overlap because of the context surrounding +# each block. (So if we're not using context, every hunk will contain one +# block.) Used in the diff program (bin/ldiff). +# +# source://diff-lcs//lib/diff/lcs/hunk.rb#8 class Diff::LCS::Hunk + # Create a hunk using references to both the old and new data, as well as the + # piece of data. + # + # @return [Hunk] a new instance of Hunk + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#16 def initialize(data_old, data_new, piece, flag_context, file_length_difference); end + # Returns the value of attribute blocks. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#63 def blocks; end + + # Returns a diff string based on a format. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#116 def diff(format, last = T.unsafe(nil)); end + + # Returns the value of attribute end_new. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#65 def end_new; end + + # Returns the value of attribute end_old. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#65 def end_old; end + + # Returns the value of attribute file_length_difference. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#66 def file_length_difference; end + + # Change the "start" and "end" fields to note that context should be added + # to this hunk. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#70 def flag_context; end + + # source://diff-lcs//lib/diff/lcs/hunk.rb#72 def flag_context=(context); end + + # Merges this hunk and the provided hunk together if they overlap. Returns + # a truthy value so that if there is no overlap, you can know the merge + # was skipped. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#98 def merge(hunk); end + + # @return [Boolean] + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#326 def missing_last_newline?(data); end + + # Determines whether there is an overlap between this hunk and the + # provided hunk. This will be true if the difference between the two hunks + # start or end positions is within one position of each other. + # + # @return [Boolean] + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#110 def overlaps?(hunk); end + + # Returns the value of attribute start_new. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#64 def start_new; end + + # Returns the value of attribute start_old. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#64 def start_old; end + + # Merges this hunk and the provided hunk together if they overlap. Returns + # a truthy value so that if there is no overlap, you can know the merge + # was skipped. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#98 def unshift(hunk); end private + # source://diff-lcs//lib/diff/lcs/hunk.rb#213 def context_diff(last = T.unsafe(nil)); end + + # Generate a range of item numbers to print. Only print 1 number if the + # range has only one item in it. Otherwise, it's 'start,end' + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#293 def context_range(mode, op, last = T.unsafe(nil)); end + + # source://diff-lcs//lib/diff/lcs/hunk.rb#271 def ed_diff(format, _last = T.unsafe(nil)); end + + # source://diff-lcs//lib/diff/lcs/hunk.rb#339 def encode(literal, target_encoding = T.unsafe(nil)); end + + # source://diff-lcs//lib/diff/lcs/hunk.rb#343 def encode_as(string, *args); end + + # Note that an old diff can't have any context. Therefore, we know that + # there's only one block in the hunk. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#135 def old_diff(_last = T.unsafe(nil)); end + + # source://diff-lcs//lib/diff/lcs/hunk.rb#160 def unified_diff(last = T.unsafe(nil)); end + + # Generate a range of item numbers to print for unified diff. Print number + # where block starts, followed by number of lines in the block + # (don't print number of lines if it's 1) + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#311 def unified_range(mode, last); end end +# source://diff-lcs//lib/diff/lcs/hunk.rb#10 Diff::LCS::Hunk::ED_DIFF_OP_ACTION = T.let(T.unsafe(nil), Hash) + +# source://diff-lcs//lib/diff/lcs/hunk.rb#9 Diff::LCS::Hunk::OLD_DIFF_OP_ACTION = T.let(T.unsafe(nil), Hash) +# source://diff-lcs//lib/diff/lcs/internals.rb#29 module Diff::LCS::Internals class << self + # This method will analyze the provided patchset to provide a single-pass + # normalization (conversion of the array form of Diff::LCS::Change objects to + # the object form of same) and detection of whether the patchset represents + # changes to be made. + # + # source://diff-lcs//lib/diff/lcs/internals.rb#102 def analyze_patchset(patchset, depth = T.unsafe(nil)); end + + # Examine the patchset and the source to see in which direction the + # patch should be applied. + # + # WARNING: By default, this examines the whole patch, so this could take + # some time. This also works better with Diff::LCS::ContextChange or + # Diff::LCS::Change as its source, as an array will cause the creation + # of one of the above. + # + # source://diff-lcs//lib/diff/lcs/internals.rb#147 def intuit_diff_direction(src, patchset, limit = T.unsafe(nil)); end + + # Compute the longest common subsequence between the sequenced + # Enumerables +a+ and +b+. The result is an array whose contents is such + # that + # + # result = Diff::LCS::Internals.lcs(a, b) + # result.each_with_index do |e, i| + # assert_equal(a[i], b[e]) unless e.nil? + # end + # + # source://diff-lcs//lib/diff/lcs/internals.rb#41 def lcs(a, b); end private + # If +vector+ maps the matching elements of another collection onto this + # Enumerable, compute the inverse of +vector+ that maps this Enumerable + # onto the collection. (Currently unused.) + # + # source://diff-lcs//lib/diff/lcs/internals.rb#286 def inverse_vector(a, vector); end + + # Returns a hash mapping each element of an Enumerable to the set of + # positions it occupies in the Enumerable, optionally restricted to the + # elements specified in the range of indexes specified by +interval+. + # + # source://diff-lcs//lib/diff/lcs/internals.rb#298 def position_hash(enum, interval); end + + # Find the place at which +value+ would normally be inserted into the + # Enumerable. If that place is already occupied by +value+, do nothing + # and return +nil+. If the place does not exist (i.e., it is off the end + # of the Enumerable), add it to the end. Otherwise, replace the element + # at that point with +value+. It is assumed that the Enumerable's values + # are numeric. + # + # This operation preserves the sort order. + # + # source://diff-lcs//lib/diff/lcs/internals.rb#252 def replace_next_larger(enum, value, last_index = T.unsafe(nil)); end end end +# This will produce a simple array of diff change objects. Each element in +# the #diffs array is a single ContextChange. In the set of #diffs provided +# by SDiffCallbacks, both old and new objects will be presented for both +# changed and unchanged objects. +nil+ will be substituted +# for a discarded object. +# +# The diffset produced by this callback, when provided to Diff::LCS#sdiff, +# will compute and display the necessary components to show two sequences +# and their minimized differences side by side, just like the Unix utility +# +sdiff+. +# +# same same +# before | after +# old < - +# - > new +# +# seq1 = %w(a b c e h j l m n p) +# seq2 = %w(b c d e f j k l m r s t) +# +# diffs = Diff::LCS.sdiff(seq1, seq2) +# # This example shows a simplified array format. +# # [ [ "-", [ 0, "a"], [ 0, nil ] ], +# # [ "=", [ 1, "b"], [ 0, "b" ] ], +# # [ "=", [ 2, "c"], [ 1, "c" ] ], +# # [ "+", [ 3, nil], [ 2, "d" ] ], +# # [ "=", [ 3, "e"], [ 3, "e" ] ], +# # [ "!", [ 4, "h"], [ 4, "f" ] ], +# # [ "=", [ 5, "j"], [ 5, "j" ] ], +# # [ "+", [ 6, nil], [ 6, "k" ] ], +# # [ "=", [ 6, "l"], [ 7, "l" ] ], +# # [ "=", [ 7, "m"], [ 8, "m" ] ], +# # [ "!", [ 8, "n"], [ 9, "r" ] ], +# # [ "!", [ 9, "p"], [ 10, "s" ] ], +# # [ "+", [ 10, nil], [ 11, "t" ] ] ] +# +# The result of this operation is similar to that of +# Diff::LCS::ContextDiffCallbacks. They may be compared as: +# +# s = Diff::LCS.sdiff(seq1, seq2).reject { |e| e.action == "=" } +# c = Diff::LCS.sdiff(seq1, seq2, Diff::LCS::ContextDiffCallbacks).flatten(1) +# +# s == c # -> true +# +# === Use +# +# This callback object must be initialised and is used by the Diff::LCS#sdiff +# method. +# +# cbo = Diff::LCS::SDiffCallbacks.new +# Diff::LCS.LCS(seq1, seq2, cbo) +# +# As with the other initialisable callback objects, +# Diff::LCS::SDiffCallbacks can be initialised with a block. As there is no +# "fininishing" to be done, this has no effect on the state of the object. +# +# cbo = Diff::LCS::SDiffCallbacks.new { |tcbo| Diff::LCS.LCS(seq1, seq2, tcbo) } +# +# === Simplified Array Format +# +# The simplified array format used in the example above can be obtained +# with: +# +# require 'pp' +# pp diffs.map { |e| e.to_a } +# +# source://diff-lcs//lib/diff/lcs/callbacks.rb#301 class Diff::LCS::SDiffCallbacks + # :yields self: + # + # @return [SDiffCallbacks] a new instance of SDiffCallbacks + # @yield [_self] + # @yieldparam _self [Diff::LCS::SDiffCallbacks] the object that the method was called on + # + # source://diff-lcs//lib/diff/lcs/callbacks.rb#305 def initialize; end + # source://diff-lcs//lib/diff/lcs/callbacks.rb#322 def change(event); end + + # Returns the difference set collected during the diff process. + # + # source://diff-lcs//lib/diff/lcs/callbacks.rb#303 def diffs; end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#314 def discard_a(event); end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#318 def discard_b(event); end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#310 def match(event); end end +# An alias for DefaultCallbacks that is used in +# Diff::LCS#traverse_sequences. +# +# Diff::LCS.LCS(seq1, seq2, Diff::LCS::SequenceCallbacks) +# +# source://diff-lcs//lib/diff/lcs/callbacks.rb#44 Diff::LCS::SequenceCallbacks = Diff::LCS::DefaultCallbacks + +# source://diff-lcs//lib/diff/lcs.rb#52 Diff::LCS::VERSION = T.let(T.unsafe(nil), String) diff --git a/Library/Homebrew/sorbet/rbi/gems/docile@1.4.0.rbi b/Library/Homebrew/sorbet/rbi/gems/docile@1.4.0.rbi index d8a14c572165c9..d62d1db0cde6e2 100644 --- a/Library/Homebrew/sorbet/rbi/gems/docile@1.4.0.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/docile@1.4.0.rbi @@ -4,51 +4,373 @@ # This is an autogenerated file for types exported from the `docile` gem. # Please instead update this file by running `bin/tapioca gem docile`. +# Docile keeps your Ruby DSLs tame and well-behaved. +# +# source://docile//lib/docile/version.rb#3 module Docile extend ::Docile::Execution private - def dsl_eval(dsl, *args, &block); end - def dsl_eval_immutable(dsl, *args, &block); end - def dsl_eval_with_block_return(dsl, *args, &block); end + # Execute a block in the context of an object whose methods represent the + # commands in a DSL. + # + # Use this method to execute an *imperative* DSL, which means that: + # + # 1. Each command mutates the state of the DSL context object + # 2. The return value of each command is ignored + # 3. The final return value is the original context object + # + # @example Use a String as a DSL + # Docile.dsl_eval("Hello, world!") do + # reverse! + # upcase! + # end + # #=> "!DLROW ,OLLEH" + # @example Use an Array as a DSL + # Docile.dsl_eval([]) do + # push 1 + # push 2 + # pop + # push 3 + # end + # #=> [1, 3] + # @note Use with an *imperative* DSL (commands modify the context object) + # @param dsl [Object] context object whose methods make up the DSL + # @param args [Array] arguments to be passed to the block + # @param block [Proc] the block of DSL commands to be executed against the + # `dsl` context object + # @return [Object] the `dsl` context object after executing the block + # + # source://docile//lib/docile.rb#45 + def dsl_eval(dsl, *args, **_arg2, &block); end + + # Execute a block in the context of an immutable object whose methods, + # and the methods of their return values, represent the commands in a DSL. + # + # Use this method to execute a *functional* DSL, which means that: + # + # 1. The original DSL context object is never mutated + # 2. Each command returns the next DSL context object + # 3. The final return value is the value returned by the last command + # + # @example Use a frozen String as a DSL + # Docile.dsl_eval_immutable("I'm immutable!".freeze) do + # reverse + # upcase + # end + # #=> "!ELBATUMMI M'I" + # @example Use a Float as a DSL + # Docile.dsl_eval_immutable(84.5) do + # fdiv(2) + # floor + # end + # #=> 42 + # @note Use with a *functional* DSL (commands return successor + # context objects) + # @param dsl [Object] immutable context object whose methods make up the + # initial DSL + # @param args [Array] arguments to be passed to the block + # @param block [Proc] the block of DSL commands to be executed against the + # `dsl` context object and successor return values + # @return [Object] the return value of the final command in the block + # + # source://docile//lib/docile.rb#128 + def dsl_eval_immutable(dsl, *args, **_arg2, &block); end + + # Execute a block in the context of an object whose methods represent the + # commands in a DSL, and return *the block's return value*. + # + # Use this method to execute an *imperative* DSL, which means that: + # + # 1. Each command mutates the state of the DSL context object + # 2. The return value of each command is ignored + # 3. The final return value is the original context object + # + # @example Use a String as a DSL + # Docile.dsl_eval_with_block_return("Hello, world!") do + # reverse! + # upcase! + # first + # end + # #=> "!" + # @example Use an Array as a DSL + # Docile.dsl_eval_with_block_return([]) do + # push "a" + # push "b" + # pop + # push "c" + # length + # end + # #=> 2 + # @note Use with an *imperative* DSL (commands modify the context object) + # @param dsl [Object] context object whose methods make up the DSL + # @param args [Array] arguments to be passed to the block + # @param block [Proc] the block of DSL commands to be executed against the + # `dsl` context object + # @return [Object] the return value from executing the block + # + # source://docile//lib/docile.rb#87 + def dsl_eval_with_block_return(dsl, *args, **_arg2, &block); end class << self - def dsl_eval(dsl, *args, &block); end - def dsl_eval_immutable(dsl, *args, &block); end - def dsl_eval_with_block_return(dsl, *args, &block); end + # Execute a block in the context of an object whose methods represent the + # commands in a DSL. + # + # Use this method to execute an *imperative* DSL, which means that: + # + # 1. Each command mutates the state of the DSL context object + # 2. The return value of each command is ignored + # 3. The final return value is the original context object + # + # @example Use a String as a DSL + # Docile.dsl_eval("Hello, world!") do + # reverse! + # upcase! + # end + # #=> "!DLROW ,OLLEH" + # @example Use an Array as a DSL + # Docile.dsl_eval([]) do + # push 1 + # push 2 + # pop + # push 3 + # end + # #=> [1, 3] + # @note Use with an *imperative* DSL (commands modify the context object) + # @param dsl [Object] context object whose methods make up the DSL + # @param args [Array] arguments to be passed to the block + # @param block [Proc] the block of DSL commands to be executed against the + # `dsl` context object + # @return [Object] the `dsl` context object after executing the block + # + # source://docile//lib/docile.rb#45 + def dsl_eval(dsl, *args, **_arg2, &block); end + + # Execute a block in the context of an immutable object whose methods, + # and the methods of their return values, represent the commands in a DSL. + # + # Use this method to execute a *functional* DSL, which means that: + # + # 1. The original DSL context object is never mutated + # 2. Each command returns the next DSL context object + # 3. The final return value is the value returned by the last command + # + # @example Use a frozen String as a DSL + # Docile.dsl_eval_immutable("I'm immutable!".freeze) do + # reverse + # upcase + # end + # #=> "!ELBATUMMI M'I" + # @example Use a Float as a DSL + # Docile.dsl_eval_immutable(84.5) do + # fdiv(2) + # floor + # end + # #=> 42 + # @note Use with a *functional* DSL (commands return successor + # context objects) + # @param dsl [Object] immutable context object whose methods make up the + # initial DSL + # @param args [Array] arguments to be passed to the block + # @param block [Proc] the block of DSL commands to be executed against the + # `dsl` context object and successor return values + # @return [Object] the return value of the final command in the block + # + # source://docile//lib/docile.rb#128 + def dsl_eval_immutable(dsl, *args, **_arg2, &block); end + + # Execute a block in the context of an object whose methods represent the + # commands in a DSL, and return *the block's return value*. + # + # Use this method to execute an *imperative* DSL, which means that: + # + # 1. Each command mutates the state of the DSL context object + # 2. The return value of each command is ignored + # 3. The final return value is the original context object + # + # @example Use a String as a DSL + # Docile.dsl_eval_with_block_return("Hello, world!") do + # reverse! + # upcase! + # first + # end + # #=> "!" + # @example Use an Array as a DSL + # Docile.dsl_eval_with_block_return([]) do + # push "a" + # push "b" + # pop + # push "c" + # length + # end + # #=> 2 + # @note Use with an *imperative* DSL (commands modify the context object) + # @param dsl [Object] context object whose methods make up the DSL + # @param args [Array] arguments to be passed to the block + # @param block [Proc] the block of DSL commands to be executed against the + # `dsl` context object + # @return [Object] the return value from executing the block + # + # source://docile//lib/docile.rb#87 + def dsl_eval_with_block_return(dsl, *args, **_arg2, &block); end end end +# This is used to remove entries pointing to Docile's source files +# from {Exception#backtrace} and {Exception#backtrace_locations}. +# +# If {NoMethodError} is caught then the exception object will be extended +# by this module to add filter functionalities. +# +# @api private +# +# source://docile//lib/docile/backtrace_filter.rb#11 module Docile::BacktraceFilter + # @api private + # + # source://docile//lib/docile/backtrace_filter.rb#14 def backtrace; end + + # @api private + # + # source://docile//lib/docile/backtrace_filter.rb#19 def backtrace_locations; end end +# @api private +# +# source://docile//lib/docile/backtrace_filter.rb#12 Docile::BacktraceFilter::FILTER_PATTERN = T.let(T.unsafe(nil), Regexp) +# Operates in the same manner as {FallbackContextProxy}, but replacing +# the primary `receiver` object with the result of each proxied method. +# +# This is useful for implementing DSL evaluation for immutable context +# objects. +# +# +# @api private +# @see Docile.dsl_eval_immutable +# +# source://docile//lib/docile/chaining_fallback_context_proxy.rb#19 class Docile::ChainingFallbackContextProxy < ::Docile::FallbackContextProxy - def method_missing(method, *args, &block); end + # Proxy methods as in {FallbackContextProxy#method_missing}, replacing + # `receiver` with the returned value. + # + # @api private + # + # source://docile//lib/docile/chaining_fallback_context_proxy.rb#20 + def method_missing(method, *args, **_arg2, &block); end end +# A namespace for functions relating to the execution of a block against a +# proxy object. +# +# @api private +# +# source://docile//lib/docile/execution.rb#8 module Docile::Execution private - def exec_in_proxy_context(dsl, proxy_type, *args, &block); end + # Execute a block in the context of an object whose methods represent the + # commands in a DSL, using a specific proxy class. + # + # @api private + # @param dsl [Object] context object whose methods make up the + # (initial) DSL + # @param proxy_type [FallbackContextProxy, ChainingFallbackContextProxy] which class to instantiate as proxy context + # @param args [Array] arguments to be passed to the block + # @param block [Proc] the block of DSL commands to be executed + # @return [Object] the return value of the block + # + # source://docile//lib/docile/execution.rb#19 + def exec_in_proxy_context(dsl, proxy_type, *args, **_arg3, &block); end class << self - def exec_in_proxy_context(dsl, proxy_type, *args, &block); end + # Execute a block in the context of an object whose methods represent the + # commands in a DSL, using a specific proxy class. + # + # @api private + # @param dsl [Object] context object whose methods make up the + # (initial) DSL + # @param proxy_type [FallbackContextProxy, ChainingFallbackContextProxy] which class to instantiate as proxy context + # @param args [Array] arguments to be passed to the block + # @param block [Proc] the block of DSL commands to be executed + # @return [Object] the return value of the block + # + # source://docile//lib/docile/execution.rb#19 + def exec_in_proxy_context(dsl, proxy_type, *args, **_arg3, &block); end end end +# A proxy object with a primary receiver as well as a secondary +# fallback receiver. +# +# Will attempt to forward all method calls first to the primary receiver, +# and then to the fallback receiver if the primary does not handle that +# method. +# +# This is useful for implementing DSL evaluation in the context of an object. +# +# +# @api private +# @see Docile.dsl_eval +# +# source://docile//lib/docile/fallback_context_proxy.rb#20 class Docile::FallbackContextProxy + # @api private + # @param receiver [Object] the primary proxy target to which all methods + # initially will be forwarded + # @param fallback [Object] the fallback proxy target to which any methods + # not handled by `receiver` will be forwarded + # @return [FallbackContextProxy] a new instance of FallbackContextProxy + # + # source://docile//lib/docile/fallback_context_proxy.rb#46 def initialize(receiver, fallback); end + # @api private + # @return [Array] Instance variable names, excluding + # {NON_PROXIED_INSTANCE_VARIABLES} + # + # source://docile//lib/docile/fallback_context_proxy.rb#85 def instance_variables; end - def method_missing(method, *args, &block); end + + # Proxy all methods, excluding {NON_PROXIED_METHODS}, first to `receiver` + # and then to `fallback` if not found. + # + # @api private + # + # source://docile//lib/docile/fallback_context_proxy.rb#91 + def method_missing(method, *args, **_arg2, &block); end end +# The set of methods which will **not** fallback from the block's context +# to the dsl object. +# +# @api private +# +# source://docile//lib/docile/fallback_context_proxy.rb#30 Docile::FallbackContextProxy::NON_FALLBACK_METHODS = T.let(T.unsafe(nil), Set) + +# The set of instance variables which are local to this object and hidden. +# All other instance variables will be copied in and out of this object +# from the scope in which this proxy was created. +# +# @api private +# +# source://docile//lib/docile/fallback_context_proxy.rb#35 Docile::FallbackContextProxy::NON_PROXIED_INSTANCE_VARIABLES = T.let(T.unsafe(nil), Set) + +# The set of methods which will **not** be proxied, but instead answered +# by this object directly. +# +# @api private +# +# source://docile//lib/docile/fallback_context_proxy.rb#23 Docile::FallbackContextProxy::NON_PROXIED_METHODS = T.let(T.unsafe(nil), Set) + +# The current version of this library +# +# source://docile//lib/docile/version.rb#5 Docile::VERSION = T.let(T.unsafe(nil), String) diff --git a/Library/Homebrew/sorbet/rbi/gems/elftools@1.2.0.rbi b/Library/Homebrew/sorbet/rbi/gems/elftools@1.2.0.rbi index aed4ade65cd23e..26a55dbf501de5 100644 --- a/Library/Homebrew/sorbet/rbi/gems/elftools@1.2.0.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/elftools@1.2.0.rbi @@ -4,8 +4,18 @@ # This is an autogenerated file for types exported from the `elftools` gem. # Please instead update this file by running `bin/tapioca gem elftools`. +# The ELF parsing tools! +# Main entry point is {ELFTools::ELFFile}, see it +# for more information. +# +# source://elftools//lib/elftools/constants.rb#3 module ELFTools; end +# Define constants from elf.h. +# Mostly refer from https://github.com/torvalds/linux/blob/master/include/uapi/linux/elf.h +# and binutils/elfcpp/elfcpp.h. +# +# source://elftools//lib/elftools/constants.rb#7 module ELFTools::Constants include ::ELFTools::Constants::DF include ::ELFTools::Constants::DT @@ -20,911 +30,4259 @@ module ELFTools::Constants include ::ELFTools::Constants::STT end +# Values of `d_un.d_val' in the DT_FLAGS and DT_FLAGS_1 entry. +# +# source://elftools//lib/elftools/constants.rb#12 module ELFTools::Constants::DF; end + +# Configuration alternative created. +# +# source://elftools//lib/elftools/constants.rb#32 ELFTools::Constants::DF::DF_1_CONFALT = T.let(T.unsafe(nil), Integer) + +# Direct binding enabled. +# +# source://elftools//lib/elftools/constants.rb#27 ELFTools::Constants::DF::DF_1_DIRECT = T.let(T.unsafe(nil), Integer) + +# Disp reloc applied at build time. +# +# source://elftools//lib/elftools/constants.rb#34 ELFTools::Constants::DF::DF_1_DISPRELDNE = T.let(T.unsafe(nil), Integer) + +# Disp reloc applied at run-time. +# +# source://elftools//lib/elftools/constants.rb#35 ELFTools::Constants::DF::DF_1_DISPRELPND = T.let(T.unsafe(nil), Integer) + +# Object is modified after built. +# +# source://elftools//lib/elftools/constants.rb#40 ELFTools::Constants::DF::DF_1_EDITED = T.let(T.unsafe(nil), Integer) + +# Filtee terminates filters search. +# +# source://elftools//lib/elftools/constants.rb#33 ELFTools::Constants::DF::DF_1_ENDFILTEE = T.let(T.unsafe(nil), Integer) + +# Set RTLD_GLOBAL for this object. +# +# source://elftools//lib/elftools/constants.rb#20 ELFTools::Constants::DF::DF_1_GLOBAL = T.let(T.unsafe(nil), Integer) + +# Global auditing required. +# +# source://elftools//lib/elftools/constants.rb#43 ELFTools::Constants::DF::DF_1_GLOBAUDIT = T.let(T.unsafe(nil), Integer) + +# Set RTLD_GROUP for this object. +# +# source://elftools//lib/elftools/constants.rb#21 ELFTools::Constants::DF::DF_1_GROUP = T.let(T.unsafe(nil), Integer) + +# source://elftools//lib/elftools/constants.rb#37 ELFTools::Constants::DF::DF_1_IGNMULDEF = T.let(T.unsafe(nil), Integer) + +# Set RTLD_INITFIRST for this object +# +# source://elftools//lib/elftools/constants.rb#24 ELFTools::Constants::DF::DF_1_INITFIRST = T.let(T.unsafe(nil), Integer) + +# Object is used to interpose. +# +# source://elftools//lib/elftools/constants.rb#29 ELFTools::Constants::DF::DF_1_INTERPOSE = T.let(T.unsafe(nil), Integer) + +# source://elftools//lib/elftools/constants.rb#47 ELFTools::Constants::DF::DF_1_KMOD = T.let(T.unsafe(nil), Integer) + +# Trigger filtee loading at runtime. +# +# source://elftools//lib/elftools/constants.rb#23 ELFTools::Constants::DF::DF_1_LOADFLTR = T.let(T.unsafe(nil), Integer) + +# source://elftools//lib/elftools/constants.rb#49 ELFTools::Constants::DF::DF_1_NOCOMMON = T.let(T.unsafe(nil), Integer) + +# Ignore default lib search path. +# +# source://elftools//lib/elftools/constants.rb#30 ELFTools::Constants::DF::DF_1_NODEFLIB = T.let(T.unsafe(nil), Integer) + +# Set RTLD_NODELETE for this object. +# +# source://elftools//lib/elftools/constants.rb#22 ELFTools::Constants::DF::DF_1_NODELETE = T.let(T.unsafe(nil), Integer) + +# Object has no-direct binding. +# +# source://elftools//lib/elftools/constants.rb#36 ELFTools::Constants::DF::DF_1_NODIRECT = T.let(T.unsafe(nil), Integer) + +# Object can't be dldump'ed. +# +# source://elftools//lib/elftools/constants.rb#31 ELFTools::Constants::DF::DF_1_NODUMP = T.let(T.unsafe(nil), Integer) + +# source://elftools//lib/elftools/constants.rb#39 ELFTools::Constants::DF::DF_1_NOHDR = T.let(T.unsafe(nil), Integer) + +# source://elftools//lib/elftools/constants.rb#38 ELFTools::Constants::DF::DF_1_NOKSYMS = T.let(T.unsafe(nil), Integer) + +# Set RTLD_NOOPEN for this object. +# +# source://elftools//lib/elftools/constants.rb#25 ELFTools::Constants::DF::DF_1_NOOPEN = T.let(T.unsafe(nil), Integer) + +# source://elftools//lib/elftools/constants.rb#41 ELFTools::Constants::DF::DF_1_NORELOC = T.let(T.unsafe(nil), Integer) + +# Set RTLD_NOW for this object. +# +# source://elftools//lib/elftools/constants.rb#19 ELFTools::Constants::DF::DF_1_NOW = T.let(T.unsafe(nil), Integer) + +# $ORIGIN must be handled. +# +# source://elftools//lib/elftools/constants.rb#26 ELFTools::Constants::DF::DF_1_ORIGIN = T.let(T.unsafe(nil), Integer) + +# Object is a position-independent executable. +# +# source://elftools//lib/elftools/constants.rb#46 ELFTools::Constants::DF::DF_1_PIE = T.let(T.unsafe(nil), Integer) + +# Singleton symbols are used. +# +# source://elftools//lib/elftools/constants.rb#44 ELFTools::Constants::DF::DF_1_SINGLETON = T.let(T.unsafe(nil), Integer) + +# source://elftools//lib/elftools/constants.rb#45 ELFTools::Constants::DF::DF_1_STUB = T.let(T.unsafe(nil), Integer) + +# Object has individual interposers. +# +# source://elftools//lib/elftools/constants.rb#42 ELFTools::Constants::DF::DF_1_SYMINTPOSE = T.let(T.unsafe(nil), Integer) + +# source://elftools//lib/elftools/constants.rb#28 ELFTools::Constants::DF::DF_1_TRANS = T.let(T.unsafe(nil), Integer) + +# source://elftools//lib/elftools/constants.rb#48 ELFTools::Constants::DF::DF_1_WEAKFILTER = T.let(T.unsafe(nil), Integer) + +# No lazy binding for this object +# +# source://elftools//lib/elftools/constants.rb#16 ELFTools::Constants::DF::DF_BIND_NOW = T.let(T.unsafe(nil), Integer) + +# Object may use DF_ORIGIN +# +# source://elftools//lib/elftools/constants.rb#13 ELFTools::Constants::DF::DF_ORIGIN = T.let(T.unsafe(nil), Integer) + +# Module uses the static TLS model +# +# source://elftools//lib/elftools/constants.rb#17 ELFTools::Constants::DF::DF_STATIC_TLS = T.let(T.unsafe(nil), Integer) + +# Symbol resolutions starts here +# +# source://elftools//lib/elftools/constants.rb#14 ELFTools::Constants::DF::DF_SYMBOLIC = T.let(T.unsafe(nil), Integer) + +# Object contains text relocations +# +# source://elftools//lib/elftools/constants.rb#15 ELFTools::Constants::DF::DF_TEXTREL = T.let(T.unsafe(nil), Integer) + +# Dynamic table types, records in +d_tag+. +# +# source://elftools//lib/elftools/constants.rb#54 module ELFTools::Constants::DT; end + +# see {DT_ADDRRNGLO} +# +# source://elftools//lib/elftools/constants.rb#115 ELFTools::Constants::DT::DT_ADDRRNGHI = T.let(T.unsafe(nil), Integer) + +# Values between {DT_ADDRRNGLO} and {DT_ADDRRNGHI} use the +d_un.d_ptr+ field of the dynamic structure. +# +# source://elftools//lib/elftools/constants.rb#103 ELFTools::Constants::DT::DT_ADDRRNGLO = T.let(T.unsafe(nil), Integer) + +# source://elftools//lib/elftools/constants.rb#111 ELFTools::Constants::DT::DT_AUDIT = T.let(T.unsafe(nil), Integer) + +# source://elftools//lib/elftools/constants.rb#187 ELFTools::Constants::DT::DT_AUXILIARY = T.let(T.unsafe(nil), Integer) + +# if the loader needs to do relocate now, superseded by the DF_BIND_NOW flag +# +# source://elftools//lib/elftools/constants.rb#79 ELFTools::Constants::DT::DT_BIND_NOW = T.let(T.unsafe(nil), Integer) + +# source://elftools//lib/elftools/constants.rb#109 ELFTools::Constants::DT::DT_CONFIG = T.let(T.unsafe(nil), Integer) + +# for debugging +# +# source://elftools//lib/elftools/constants.rb#76 ELFTools::Constants::DT::DT_DEBUG = T.let(T.unsafe(nil), Integer) + +# source://elftools//lib/elftools/constants.rb#110 ELFTools::Constants::DT::DT_DEPAUDIT = T.let(T.unsafe(nil), Integer) + +# just a lower bound +# +# source://elftools//lib/elftools/constants.rb#86 ELFTools::Constants::DT::DT_ENCODING = T.let(T.unsafe(nil), Integer) + +# source://elftools//lib/elftools/constants.rb#189 ELFTools::Constants::DT::DT_FILTER = T.let(T.unsafe(nil), Integer) + +# where the termination function is +# +# source://elftools//lib/elftools/constants.rb#68 ELFTools::Constants::DT::DT_FINI = T.let(T.unsafe(nil), Integer) + +# address of fini array +# +# source://elftools//lib/elftools/constants.rb#81 ELFTools::Constants::DT::DT_FINI_ARRAY = T.let(T.unsafe(nil), Integer) + +# total size of fini array +# +# source://elftools//lib/elftools/constants.rb#83 ELFTools::Constants::DT::DT_FINI_ARRAYSZ = T.let(T.unsafe(nil), Integer) + +# flags +# +# source://elftools//lib/elftools/constants.rb#85 ELFTools::Constants::DT::DT_FLAGS = T.let(T.unsafe(nil), Integer) + +# flags +# +# source://elftools//lib/elftools/constants.rb#120 ELFTools::Constants::DT::DT_FLAGS_1 = T.let(T.unsafe(nil), Integer) + +# source://elftools//lib/elftools/constants.rb#107 ELFTools::Constants::DT::DT_GNU_CONFLICT = T.let(T.unsafe(nil), Integer) + +# the gnu hash +# +# source://elftools//lib/elftools/constants.rb#104 ELFTools::Constants::DT::DT_GNU_HASH = T.let(T.unsafe(nil), Integer) + +# source://elftools//lib/elftools/constants.rb#108 ELFTools::Constants::DT::DT_GNU_LIBLIST = T.let(T.unsafe(nil), Integer) + +# address of symbol hash table +# +# source://elftools//lib/elftools/constants.rb#59 ELFTools::Constants::DT::DT_HASH = T.let(T.unsafe(nil), Integer) + +# see {DT_LOOS} +# +# source://elftools//lib/elftools/constants.rb#96 ELFTools::Constants::DT::DT_HIOS = T.let(T.unsafe(nil), Integer) + +# see {DT_LOPROC} +# +# source://elftools//lib/elftools/constants.rb#191 ELFTools::Constants::DT::DT_HIPROC = T.let(T.unsafe(nil), Integer) + +# where the initialization function is +# +# source://elftools//lib/elftools/constants.rb#67 ELFTools::Constants::DT::DT_INIT = T.let(T.unsafe(nil), Integer) + +# address init array +# +# source://elftools//lib/elftools/constants.rb#80 ELFTools::Constants::DT::DT_INIT_ARRAY = T.let(T.unsafe(nil), Integer) + +# total size of init array +# +# source://elftools//lib/elftools/constants.rb#82 ELFTools::Constants::DT::DT_INIT_ARRAYSZ = T.let(T.unsafe(nil), Integer) + +# address of relocation entries associated solely with procedure linkage table +# +# source://elftools//lib/elftools/constants.rb#78 ELFTools::Constants::DT::DT_JMPREL = T.let(T.unsafe(nil), Integer) + +# Values between {DT_LOOS} and {DT_HIOS} are reserved for operating system-specific semantics. +# +# source://elftools//lib/elftools/constants.rb#95 ELFTools::Constants::DT::DT_LOOS = T.let(T.unsafe(nil), Integer) + +# Values between {DT_LOPROC} and {DT_HIPROC} are reserved for processor-specific semantics. +# +# source://elftools//lib/elftools/constants.rb#127 ELFTools::Constants::DT::DT_LOPROC = T.let(T.unsafe(nil), Integer) + +# address of auxiliary +.dynamic+ +# +# source://elftools//lib/elftools/constants.rb#181 ELFTools::Constants::DT::DT_MIPS_AUX_DYNAMIC = T.let(T.unsafe(nil), Integer) + +# base address of the segment +# +# source://elftools//lib/elftools/constants.rb#144 ELFTools::Constants::DT::DT_MIPS_BASE_ADDRESS = T.let(T.unsafe(nil), Integer) + +# size of compact relocation section (O32) +# +# source://elftools//lib/elftools/constants.rb#179 ELFTools::Constants::DT::DT_MIPS_COMPACT_SIZE = T.let(T.unsafe(nil), Integer) + +# address of +.conflict+ section +# +# source://elftools//lib/elftools/constants.rb#146 ELFTools::Constants::DT::DT_MIPS_CONFLICT = T.let(T.unsafe(nil), Integer) + +# number of entries in the +.conflict+ section +# +# source://elftools//lib/elftools/constants.rb#149 ELFTools::Constants::DT::DT_MIPS_CONFLICTNO = T.let(T.unsafe(nil), Integer) + +# flags indicating information about C++ flavor +# +# source://elftools//lib/elftools/constants.rb#166 ELFTools::Constants::DT::DT_MIPS_CXX_FLAGS = T.let(T.unsafe(nil), Integer) + +# delta C++ class definition +# +# source://elftools//lib/elftools/constants.rb#156 ELFTools::Constants::DT::DT_MIPS_DELTA_CLASS = T.let(T.unsafe(nil), Integer) + +# delta symbols that hold class declarations +# +# source://elftools//lib/elftools/constants.rb#164 ELFTools::Constants::DT::DT_MIPS_DELTA_CLASSSYM = T.let(T.unsafe(nil), Integer) + +# number of entries in {DT_MIPS_DELTA_CLASSSYM} +# +# source://elftools//lib/elftools/constants.rb#165 ELFTools::Constants::DT::DT_MIPS_DELTA_CLASSSYM_NO = T.let(T.unsafe(nil), Integer) + +# number of entries in {DT_MIPS_DELTA_CLASS} +# +# source://elftools//lib/elftools/constants.rb#157 ELFTools::Constants::DT::DT_MIPS_DELTA_CLASS_NO = T.let(T.unsafe(nil), Integer) + +# delta C++ class instances +# +# source://elftools//lib/elftools/constants.rb#158 ELFTools::Constants::DT::DT_MIPS_DELTA_INSTANCE = T.let(T.unsafe(nil), Integer) + +# number of entries in {DT_MIPS_DELTA_INSTANCE} +# +# source://elftools//lib/elftools/constants.rb#159 ELFTools::Constants::DT::DT_MIPS_DELTA_INSTANCE_NO = T.let(T.unsafe(nil), Integer) + +# delta relocations +# +# source://elftools//lib/elftools/constants.rb#160 ELFTools::Constants::DT::DT_MIPS_DELTA_RELOC = T.let(T.unsafe(nil), Integer) + +# number of entries in {DT_MIPS_DELTA_RELOC} +# +# source://elftools//lib/elftools/constants.rb#161 ELFTools::Constants::DT::DT_MIPS_DELTA_RELOC_NO = T.let(T.unsafe(nil), Integer) + +# delta symbols that Delta relocations refer to +# +# source://elftools//lib/elftools/constants.rb#162 ELFTools::Constants::DT::DT_MIPS_DELTA_SYM = T.let(T.unsafe(nil), Integer) + +# number of entries in {DT_MIPS_DELTA_SYM} +# +# source://elftools//lib/elftools/constants.rb#163 ELFTools::Constants::DT::DT_MIPS_DELTA_SYM_NO = T.let(T.unsafe(nil), Integer) + +# source://elftools//lib/elftools/constants.rb#175 ELFTools::Constants::DT::DT_MIPS_DYNSTR_ALIGN = T.let(T.unsafe(nil), Integer) + +# 32 bits of flags +# +# source://elftools//lib/elftools/constants.rb#143 ELFTools::Constants::DT::DT_MIPS_FLAGS = T.let(T.unsafe(nil), Integer) + +# index of first dynamic symbol in global offset table +# +# source://elftools//lib/elftools/constants.rb#153 ELFTools::Constants::DT::DT_MIPS_GOTSYM = T.let(T.unsafe(nil), Integer) + +# GP value for auxiliary GOTs +# +# source://elftools//lib/elftools/constants.rb#180 ELFTools::Constants::DT::DT_MIPS_GP_VALUE = T.let(T.unsafe(nil), Integer) + +# GOT index of the first PTE for a hidden symbol +# +# source://elftools//lib/elftools/constants.rb#171 ELFTools::Constants::DT::DT_MIPS_HIDDEN_GOTIDX = T.let(T.unsafe(nil), Integer) + +# number of page table entries in global offset table +# +# source://elftools//lib/elftools/constants.rb#154 ELFTools::Constants::DT::DT_MIPS_HIPAGENO = T.let(T.unsafe(nil), Integer) + +# checksum of external strings and common sizes +# +# source://elftools//lib/elftools/constants.rb#141 ELFTools::Constants::DT::DT_MIPS_ICHECKSUM = T.let(T.unsafe(nil), Integer) + +# address of +.interface+ +# +# source://elftools//lib/elftools/constants.rb#174 ELFTools::Constants::DT::DT_MIPS_INTERFACE = T.let(T.unsafe(nil), Integer) + +# size of the +.interface+ section +# +# source://elftools//lib/elftools/constants.rb#176 ELFTools::Constants::DT::DT_MIPS_INTERFACE_SIZE = T.let(T.unsafe(nil), Integer) + +# index of version string in string table +# +# source://elftools//lib/elftools/constants.rb#142 ELFTools::Constants::DT::DT_MIPS_IVERSION = T.let(T.unsafe(nil), Integer) + +# address of +.liblist+ section +# +# source://elftools//lib/elftools/constants.rb#147 ELFTools::Constants::DT::DT_MIPS_LIBLIST = T.let(T.unsafe(nil), Integer) + +# number of entries in the +.liblist+ section +# +# source://elftools//lib/elftools/constants.rb#150 ELFTools::Constants::DT::DT_MIPS_LIBLISTNO = T.let(T.unsafe(nil), Integer) + +# GOT index of the first PTE for a segment +# +# source://elftools//lib/elftools/constants.rb#169 ELFTools::Constants::DT::DT_MIPS_LOCALPAGE_GOTIDX = T.let(T.unsafe(nil), Integer) + +# GOT index of the first PTE for a local symbol +# +# source://elftools//lib/elftools/constants.rb#170 ELFTools::Constants::DT::DT_MIPS_LOCAL_GOTIDX = T.let(T.unsafe(nil), Integer) + +# number of local global offset table entries +# +# source://elftools//lib/elftools/constants.rb#148 ELFTools::Constants::DT::DT_MIPS_LOCAL_GOTNO = T.let(T.unsafe(nil), Integer) + +# source://elftools//lib/elftools/constants.rb#145 ELFTools::Constants::DT::DT_MIPS_MSYM = T.let(T.unsafe(nil), Integer) + +# address of +.MIPS.options+ +# +# source://elftools//lib/elftools/constants.rb#173 ELFTools::Constants::DT::DT_MIPS_OPTIONS = T.let(T.unsafe(nil), Integer) + +# default suffix of DSO to be added by rld on +dlopen()+ calls +# +# source://elftools//lib/elftools/constants.rb#178 ELFTools::Constants::DT::DT_MIPS_PERF_SUFFIX = T.let(T.unsafe(nil), Integer) + +# source://elftools//lib/elftools/constants.rb#167 ELFTools::Constants::DT::DT_MIPS_PIXIE_INIT = T.let(T.unsafe(nil), Integer) + +# address of the base of the PLTGOT +# +# source://elftools//lib/elftools/constants.rb#182 ELFTools::Constants::DT::DT_MIPS_PLTGOT = T.let(T.unsafe(nil), Integer) + +# GOT index of the first PTE for a protected symbol +# +# source://elftools//lib/elftools/constants.rb#172 ELFTools::Constants::DT::DT_MIPS_PROTECTED_GOTIDX = T.let(T.unsafe(nil), Integer) + +# address of run time loader map, used for debugging +# +# source://elftools//lib/elftools/constants.rb#155 ELFTools::Constants::DT::DT_MIPS_RLD_MAP = T.let(T.unsafe(nil), Integer) + +# relative offset of run time loader map +# +# source://elftools//lib/elftools/constants.rb#184 ELFTools::Constants::DT::DT_MIPS_RLD_MAP_REL = T.let(T.unsafe(nil), Integer) + +# size of +rld_text_resolve+ function stored in the GOT +# +# source://elftools//lib/elftools/constants.rb#177 ELFTools::Constants::DT::DT_MIPS_RLD_TEXT_RESOLVE_ADDR = T.let(T.unsafe(nil), Integer) + +# 32 bit version number for runtime linker interface +# +# source://elftools//lib/elftools/constants.rb#139 ELFTools::Constants::DT::DT_MIPS_RLD_VERSION = T.let(T.unsafe(nil), Integer) + +# base of a writable PLT +# +# source://elftools//lib/elftools/constants.rb#183 ELFTools::Constants::DT::DT_MIPS_RWPLT = T.let(T.unsafe(nil), Integer) + +# address of +.MIPS.symlib+ +# +# source://elftools//lib/elftools/constants.rb#168 ELFTools::Constants::DT::DT_MIPS_SYMBOL_LIB = T.let(T.unsafe(nil), Integer) + +# number of entries in the +.dynsym+ section +# +# source://elftools//lib/elftools/constants.rb#151 ELFTools::Constants::DT::DT_MIPS_SYMTABNO = T.let(T.unsafe(nil), Integer) + +# time stamp +# +# source://elftools//lib/elftools/constants.rb#140 ELFTools::Constants::DT::DT_MIPS_TIME_STAMP = T.let(T.unsafe(nil), Integer) + +# index of first external dynamic symbol not referenced locally +# +# source://elftools//lib/elftools/constants.rb#152 ELFTools::Constants::DT::DT_MIPS_UNREFEXTNO = T.let(T.unsafe(nil), Integer) + +# GNU-style hash table with xlat +# +# source://elftools//lib/elftools/constants.rb#185 ELFTools::Constants::DT::DT_MIPS_XHASH = T.let(T.unsafe(nil), Integer) + +# source://elftools//lib/elftools/constants.rb#113 ELFTools::Constants::DT::DT_MOVETAB = T.let(T.unsafe(nil), Integer) + +# libraries need to be linked by loader +# +# source://elftools//lib/elftools/constants.rb#56 ELFTools::Constants::DT::DT_NEEDED = T.let(T.unsafe(nil), Integer) + +# marks the end of the _DYNAMIC array +# +# source://elftools//lib/elftools/constants.rb#55 ELFTools::Constants::DT::DT_NULL = T.let(T.unsafe(nil), Integer) + +# address of procedure linkage table or global offset table +# +# source://elftools//lib/elftools/constants.rb#58 ELFTools::Constants::DT::DT_PLTGOT = T.let(T.unsafe(nil), Integer) + +# source://elftools//lib/elftools/constants.rb#112 ELFTools::Constants::DT::DT_PLTPAD = T.let(T.unsafe(nil), Integer) + +# type of relocation entry, either {DT_REL} or {DT_RELA} +# +# source://elftools//lib/elftools/constants.rb#75 ELFTools::Constants::DT::DT_PLTREL = T.let(T.unsafe(nil), Integer) + +# total size of relocation entries +# +# source://elftools//lib/elftools/constants.rb#57 ELFTools::Constants::DT::DT_PLTRELSZ = T.let(T.unsafe(nil), Integer) + +# start of the .glink section +# +# source://elftools//lib/elftools/constants.rb#132 ELFTools::Constants::DT::DT_PPC64_GLINK = T.let(T.unsafe(nil), Integer) + +# start of the .opd section +# +# source://elftools//lib/elftools/constants.rb#133 ELFTools::Constants::DT::DT_PPC64_OPD = T.let(T.unsafe(nil), Integer) + +# size of the .opd section +# +# source://elftools//lib/elftools/constants.rb#134 ELFTools::Constants::DT::DT_PPC64_OPDSZ = T.let(T.unsafe(nil), Integer) + +# whether various optimisations are possible +# +# source://elftools//lib/elftools/constants.rb#135 ELFTools::Constants::DT::DT_PPC64_OPT = T.let(T.unsafe(nil), Integer) + +# global offset table +# +# source://elftools//lib/elftools/constants.rb#129 ELFTools::Constants::DT::DT_PPC_GOT = T.let(T.unsafe(nil), Integer) + +# whether various optimisations are possible +# +# source://elftools//lib/elftools/constants.rb#130 ELFTools::Constants::DT::DT_PPC_OPT = T.let(T.unsafe(nil), Integer) + +# pre-initialization functions array +# +# source://elftools//lib/elftools/constants.rb#87 ELFTools::Constants::DT::DT_PREINIT_ARRAY = T.let(T.unsafe(nil), Integer) + +# pre-initialization functions array size (bytes) +# +# source://elftools//lib/elftools/constants.rb#88 ELFTools::Constants::DT::DT_PREINIT_ARRAYSZ = T.let(T.unsafe(nil), Integer) + +# similar to {DT_RELA} +# +# source://elftools//lib/elftools/constants.rb#72 ELFTools::Constants::DT::DT_REL = T.let(T.unsafe(nil), Integer) + +# address of a relocation table +# +# source://elftools//lib/elftools/constants.rb#62 ELFTools::Constants::DT::DT_RELA = T.let(T.unsafe(nil), Integer) + +# relative relocation count +# +# source://elftools//lib/elftools/constants.rb#118 ELFTools::Constants::DT::DT_RELACOUNT = T.let(T.unsafe(nil), Integer) + +# size of each entry in the {DT_RELA} table +# +# source://elftools//lib/elftools/constants.rb#64 ELFTools::Constants::DT::DT_RELAENT = T.let(T.unsafe(nil), Integer) + +# total size of the {DT_RELA} table +# +# source://elftools//lib/elftools/constants.rb#63 ELFTools::Constants::DT::DT_RELASZ = T.let(T.unsafe(nil), Integer) + +# relative relocation count +# +# source://elftools//lib/elftools/constants.rb#119 ELFTools::Constants::DT::DT_RELCOUNT = T.let(T.unsafe(nil), Integer) + +# size of each entry in the {DT_REL} table +# +# source://elftools//lib/elftools/constants.rb#74 ELFTools::Constants::DT::DT_RELENT = T.let(T.unsafe(nil), Integer) + +# source://elftools//lib/elftools/constants.rb#91 ELFTools::Constants::DT::DT_RELR = T.let(T.unsafe(nil), Integer) + +# source://elftools//lib/elftools/constants.rb#92 ELFTools::Constants::DT::DT_RELRENT = T.let(T.unsafe(nil), Integer) + +# source://elftools//lib/elftools/constants.rb#90 ELFTools::Constants::DT::DT_RELRSZ = T.let(T.unsafe(nil), Integer) + +# total size of the {DT_REL} table +# +# source://elftools//lib/elftools/constants.rb#73 ELFTools::Constants::DT::DT_RELSZ = T.let(T.unsafe(nil), Integer) + +# has been superseded by {DT_RUNPATH} +# +# source://elftools//lib/elftools/constants.rb#70 ELFTools::Constants::DT::DT_RPATH = T.let(T.unsafe(nil), Integer) + +# path of libraries for searching +# +# source://elftools//lib/elftools/constants.rb#84 ELFTools::Constants::DT::DT_RUNPATH = T.let(T.unsafe(nil), Integer) + +# the shared object name +# +# source://elftools//lib/elftools/constants.rb#69 ELFTools::Constants::DT::DT_SONAME = T.let(T.unsafe(nil), Integer) + +# index of an +STT_SPARC_REGISTER+ symbol within the {DT_SYMTAB} table +# +# source://elftools//lib/elftools/constants.rb#137 ELFTools::Constants::DT::DT_SPARC_REGISTER = T.let(T.unsafe(nil), Integer) + +# total size of {DT_STRTAB} +# +# source://elftools//lib/elftools/constants.rb#65 ELFTools::Constants::DT::DT_STRSZ = T.let(T.unsafe(nil), Integer) + +# address of string table +# +# source://elftools//lib/elftools/constants.rb#60 ELFTools::Constants::DT::DT_STRTAB = T.let(T.unsafe(nil), Integer) + +# has been superseded by the DF_SYMBOLIC flag +# +# source://elftools//lib/elftools/constants.rb#71 ELFTools::Constants::DT::DT_SYMBOLIC = T.let(T.unsafe(nil), Integer) + +# size of each entry in {DT_SYMTAB} +# +# source://elftools//lib/elftools/constants.rb#66 ELFTools::Constants::DT::DT_SYMENT = T.let(T.unsafe(nil), Integer) + +# source://elftools//lib/elftools/constants.rb#114 ELFTools::Constants::DT::DT_SYMINFO = T.let(T.unsafe(nil), Integer) + +# address of symbol table +# +# source://elftools//lib/elftools/constants.rb#61 ELFTools::Constants::DT::DT_SYMTAB = T.let(T.unsafe(nil), Integer) + +# address of the +SHT_SYMTAB_SHNDX+ section associated with {DT_SYMTAB} table +# +# source://elftools//lib/elftools/constants.rb#89 ELFTools::Constants::DT::DT_SYMTAB_SHNDX = T.let(T.unsafe(nil), Integer) + +# has been superseded by the DF_TEXTREL flag +# +# source://elftools//lib/elftools/constants.rb#77 ELFTools::Constants::DT::DT_TEXTREL = T.let(T.unsafe(nil), Integer) + +# source://elftools//lib/elftools/constants.rb#106 ELFTools::Constants::DT::DT_TLSDESC_GOT = T.let(T.unsafe(nil), Integer) + +# source://elftools//lib/elftools/constants.rb#105 ELFTools::Constants::DT::DT_TLSDESC_PLT = T.let(T.unsafe(nil), Integer) + +# source://elftools//lib/elftools/constants.rb#188 ELFTools::Constants::DT::DT_USED = T.let(T.unsafe(nil), Integer) + +# see {DT_VALRNGLO} +# +# source://elftools//lib/elftools/constants.rb#100 ELFTools::Constants::DT::DT_VALRNGHI = T.let(T.unsafe(nil), Integer) + +# Values between {DT_VALRNGLO} and {DT_VALRNGHI} use the +d_un.d_val+ field of the dynamic structure. +# +# source://elftools//lib/elftools/constants.rb#99 ELFTools::Constants::DT::DT_VALRNGLO = T.let(T.unsafe(nil), Integer) + +# address of version definition table +# +# source://elftools//lib/elftools/constants.rb#121 ELFTools::Constants::DT::DT_VERDEF = T.let(T.unsafe(nil), Integer) + +# number of entries in {DT_VERDEF} +# +# source://elftools//lib/elftools/constants.rb#122 ELFTools::Constants::DT::DT_VERDEFNUM = T.let(T.unsafe(nil), Integer) + +# address of version dependency table +# +# source://elftools//lib/elftools/constants.rb#123 ELFTools::Constants::DT::DT_VERNEED = T.let(T.unsafe(nil), Integer) + +# number of entries in {DT_VERNEED} +# +# source://elftools//lib/elftools/constants.rb#124 ELFTools::Constants::DT::DT_VERNEEDNUM = T.let(T.unsafe(nil), Integer) + +# section address of .gnu.version +# +# source://elftools//lib/elftools/constants.rb#117 ELFTools::Constants::DT::DT_VERSYM = T.let(T.unsafe(nil), Integer) + +# ELF magic header +# +# source://elftools//lib/elftools/constants.rb#9 ELFTools::Constants::ELFMAG = T.let(T.unsafe(nil), String) +# These constants define the various ELF target machines. +# +# source://elftools//lib/elftools/constants.rb#196 module ELFTools::Constants::EM class << self + # Return the architecture name according to +val+. + # Used by {ELFTools::ELFFile#machine}. + # + # Only supports famous archs. + # + # @example + # mapping(3) + # #=> 'Intel 80386' + # mapping(6) + # #=> 'Intel 80386' + # mapping(62) + # #=> 'Advanced Micro Devices X86-64' + # mapping(1337) + # #=> ': 0x539' + # @param val [Integer] Value of +e_machine+. + # @return [String] Name of architecture. + # + # source://elftools//lib/elftools/constants.rb#427 def mapping(val); end end end +# Intel 80386 +# +# source://elftools//lib/elftools/constants.rb#200 ELFTools::Constants::EM::EM_386 = T.let(T.unsafe(nil), Integer) + +# Intel 80486 +# +# source://elftools//lib/elftools/constants.rb#203 ELFTools::Constants::EM::EM_486 = T.let(T.unsafe(nil), Integer) + +# Tachyum +# +# source://elftools//lib/elftools/constants.rb#397 ELFTools::Constants::EM::EM_56800EF = T.let(T.unsafe(nil), Integer) + +# Renesas 78K0R +# +# source://elftools//lib/elftools/constants.rb#358 ELFTools::Constants::EM::EM_56800EX = T.let(T.unsafe(nil), Integer) + +# Kalray VLIW core of the MPPA processor family +# +# source://elftools//lib/elftools/constants.rb#392 ELFTools::Constants::EM::EM_65816 = T.let(T.unsafe(nil), Integer) + +# Motorola MC68HC08 Microcontroller +# +# source://elftools//lib/elftools/constants.rb#256 ELFTools::Constants::EM::EM_68HC05 = T.let(T.unsafe(nil), Integer) + +# Motorola MC68HC11 Microcontroller +# +# source://elftools//lib/elftools/constants.rb#255 ELFTools::Constants::EM::EM_68HC08 = T.let(T.unsafe(nil), Integer) + +# Motorola MC68HC16 Microcontroller +# +# source://elftools//lib/elftools/constants.rb#254 ELFTools::Constants::EM::EM_68HC11 = T.let(T.unsafe(nil), Integer) + +# Motorola Coldfire +# +# source://elftools//lib/elftools/constants.rb#237 ELFTools::Constants::EM::EM_68HC12 = T.let(T.unsafe(nil), Integer) + +# STMicroelectronics ST7 8-bit microcontroller +# +# source://elftools//lib/elftools/constants.rb#253 ELFTools::Constants::EM::EM_68HC16 = T.let(T.unsafe(nil), Integer) + +# Motorola 68000 +# +# source://elftools//lib/elftools/constants.rb#201 ELFTools::Constants::EM::EM_68K = T.let(T.unsafe(nil), Integer) + +# Broadcom VideoCore V processor +# +# source://elftools//lib/elftools/constants.rb#357 ELFTools::Constants::EM::EM_78K0R = T.let(T.unsafe(nil), Integer) + +# QUALCOMM DSP6 Processor +# +# source://elftools//lib/elftools/constants.rb#324 ELFTools::Constants::EM::EM_8051 = T.let(T.unsafe(nil), Integer) + +# Intel 80860 +# +# source://elftools//lib/elftools/constants.rb#204 ELFTools::Constants::EM::EM_860 = T.let(T.unsafe(nil), Integer) + +# Motorola 88000 +# +# source://elftools//lib/elftools/constants.rb#202 ELFTools::Constants::EM::EM_88K = T.let(T.unsafe(nil), Integer) + +# Sun's "v8plus" +# +# source://elftools//lib/elftools/constants.rb#216 ELFTools::Constants::EM::EM_960 = T.let(T.unsafe(nil), Integer) + +# Intel K1OM +# +# source://elftools//lib/elftools/constants.rb#342 ELFTools::Constants::EM::EM_AARCH64 = T.let(T.unsafe(nil), Integer) + +# This is an interim value that we will use until the committee comes up with a final number. +# +# source://elftools//lib/elftools/constants.rb#402 ELFTools::Constants::EM::EM_ALPHA = T.let(T.unsafe(nil), Integer) + +# Icera Semiconductor Inc. Deep Execution Processor +# +# source://elftools//lib/elftools/constants.rb#297 ELFTools::Constants::EM::EM_ALTERA_NIOS2 = T.let(T.unsafe(nil), Integer) + +# Moxie processor family +# +# source://elftools//lib/elftools/constants.rb#378 ELFTools::Constants::EM::EM_AMDGPU = T.let(T.unsafe(nil), Integer) + +# Siemens Tricore embedded processor +# +# source://elftools//lib/elftools/constants.rb#229 ELFTools::Constants::EM::EM_ARC = T.let(T.unsafe(nil), Integer) + +# Sharp embedded microprocessor +# +# source://elftools//lib/elftools/constants.rb#293 ELFTools::Constants::EM::EM_ARCA = T.let(T.unsafe(nil), Integer) + +# OpenRISC 32-bit embedded processor +# +# source://elftools//lib/elftools/constants.rb#277 ELFTools::Constants::EM::EM_ARC_COMPACT = T.let(T.unsafe(nil), Integer) + +# KIPO-KAIST Core-A 2nd generation processor family +# +# source://elftools//lib/elftools/constants.rb#353 ELFTools::Constants::EM::EM_ARC_COMPACT2 = T.let(T.unsafe(nil), Integer) + +# MOS Technology MCS 6502 processor +# +# source://elftools//lib/elftools/constants.rb#390 ELFTools::Constants::EM::EM_ARC_COMPACT3 = T.let(T.unsafe(nil), Integer) + +# C-SKY processor family +# +# source://elftools//lib/elftools/constants.rb#388 ELFTools::Constants::EM::EM_ARC_COMPACT3_64 = T.let(T.unsafe(nil), Integer) + +# Motorola M*Core +# +# source://elftools//lib/elftools/constants.rb#225 ELFTools::Constants::EM::EM_ARM = T.let(T.unsafe(nil), Integer) + +# SiTera Prism +# +# source://elftools//lib/elftools/constants.rb#267 ELFTools::Constants::EM::EM_AVR = T.let(T.unsafe(nil), Integer) + +# ARM 64 bit +# +# source://elftools//lib/elftools/constants.rb#343 ELFTools::Constants::EM::EM_AVR32 = T.let(T.unsafe(nil), Integer) + +# Freescale 56800EX Digital Signal Controller (DSC) +# +# source://elftools//lib/elftools/constants.rb#359 ELFTools::Constants::EM::EM_BA1 = T.let(T.unsafe(nil), Integer) + +# Beyond BA1 CPU architecture +# +# source://elftools//lib/elftools/constants.rb#360 ELFTools::Constants::EM::EM_BA2 = T.let(T.unsafe(nil), Integer) + +# TI msp430 micro controller +# +# source://elftools//lib/elftools/constants.rb#290 ELFTools::Constants::EM::EM_BLACKFIN = T.let(T.unsafe(nil), Integer) + +# CEVA X2 Processor Family +# +# source://elftools//lib/elftools/constants.rb#382 ELFTools::Constants::EM::EM_BPF = T.let(T.unsafe(nil), Integer) + +# Motorola XGATE embedded processor +# +# source://elftools//lib/elftools/constants.rb#300 ELFTools::Constants::EM::EM_C116 = T.let(T.unsafe(nil), Integer) + +# KM211 KVARC processor +# +# source://elftools//lib/elftools/constants.rb#369 ELFTools::Constants::EM::EM_CDP = T.let(T.unsafe(nil), Integer) + +# Microchip Technology dsPIC30F Digital Signal Controller +# +# source://elftools//lib/elftools/constants.rb#303 ELFTools::Constants::EM::EM_CE = T.let(T.unsafe(nil), Integer) + +# Lanai 32-bit processor +# +# source://elftools//lib/elftools/constants.rb#380 ELFTools::Constants::EM::EM_CEVA = T.let(T.unsafe(nil), Integer) + +# CEVA Processor Architecture Family +# +# source://elftools//lib/elftools/constants.rb#381 ELFTools::Constants::EM::EM_CEVA_X2 = T.let(T.unsafe(nil), Integer) + +# Tilera TILE-Gx +# +# source://elftools//lib/elftools/constants.rb#350 ELFTools::Constants::EM::EM_CLOUDSHIELD = T.let(T.unsafe(nil), Integer) + +# Paneve CDP architecture family +# +# source://elftools//lib/elftools/constants.rb#370 ELFTools::Constants::EM::EM_COGE = T.let(T.unsafe(nil), Integer) + +# Stanford MIPS-X +# +# source://elftools//lib/elftools/constants.rb#236 ELFTools::Constants::EM::EM_COLDFIRE = T.let(T.unsafe(nil), Integer) + +# Cognitive Smart Memory Processor +# +# source://elftools//lib/elftools/constants.rb#371 ELFTools::Constants::EM::EM_COOL = T.let(T.unsafe(nil), Integer) + +# CloudShield architecture family +# +# source://elftools//lib/elftools/constants.rb#351 ELFTools::Constants::EM::EM_COREA_1ST = T.let(T.unsafe(nil), Integer) + +# KIPO-KAIST Core-A 1st generation processor family +# +# source://elftools//lib/elftools/constants.rb#352 ELFTools::Constants::EM::EM_COREA_2ND = T.let(T.unsafe(nil), Integer) + +# MAX Processor +# +# source://elftools//lib/elftools/constants.rb#287 ELFTools::Constants::EM::EM_CR = T.let(T.unsafe(nil), Integer) + +# Cyan Technology eCOG16 family +# +# source://elftools//lib/elftools/constants.rb#337 ELFTools::Constants::EM::EM_CR16 = T.let(T.unsafe(nil), Integer) + +# M2000 Reconfigurable RISC Microprocessor +# +# source://elftools//lib/elftools/constants.rb#332 ELFTools::Constants::EM::EM_CRAYNV2 = T.let(T.unsafe(nil), Integer) + +# Digital VAX +# +# source://elftools//lib/elftools/constants.rb#260 ELFTools::Constants::EM::EM_CRIS = T.let(T.unsafe(nil), Integer) + +# Altera Nios II soft-core processor +# +# source://elftools//lib/elftools/constants.rb#298 ELFTools::Constants::EM::EM_CRX = T.let(T.unsafe(nil), Integer) + +# NEC Vector Engine +# +# source://elftools//lib/elftools/constants.rb#387 ELFTools::Constants::EM::EM_CSKY = T.let(T.unsafe(nil), Integer) + +# Nanoradio Optimized RISC +# +# source://elftools//lib/elftools/constants.rb#373 ELFTools::Constants::EM::EM_CSR_KALIMBA = T.let(T.unsafe(nil), Integer) + +# Xilinx MicroBlaze +# +# source://elftools//lib/elftools/constants.rb#348 ELFTools::Constants::EM::EM_CUDA = T.let(T.unsafe(nil), Integer) + +# Bogus old m32r magic number, used by old tools. +# +# source://elftools//lib/elftools/constants.rb#405 ELFTools::Constants::EM::EM_CYGNUS_M32R = T.let(T.unsafe(nil), Integer) + +# Also Panasonic/MEI MN10300, AM33 +# +# source://elftools//lib/elftools/constants.rb#409 ELFTools::Constants::EM::EM_CYGNUS_MN10300 = T.let(T.unsafe(nil), Integer) + +# STMicroelectronics 64bit VLIW Data Signal Processor +# +# source://elftools//lib/elftools/constants.rb#320 ELFTools::Constants::EM::EM_CYPRESS_M8C = T.let(T.unsafe(nil), Integer) + +# Fujitsu FR30 +# +# source://elftools//lib/elftools/constants.rb#269 ELFTools::Constants::EM::EM_D10V = T.let(T.unsafe(nil), Integer) + +# Mitsubishi D10V +# +# source://elftools//lib/elftools/constants.rb#270 ELFTools::Constants::EM::EM_D30V = T.let(T.unsafe(nil), Integer) + +# Sunplus S+core7 RISC processor +# +# source://elftools//lib/elftools/constants.rb#310 ELFTools::Constants::EM::EM_DSP24 = T.let(T.unsafe(nil), Integer) + +# Renesas M16C series microprocessors +# +# source://elftools//lib/elftools/constants.rb#302 ELFTools::Constants::EM::EM_DSPIC30F = T.let(T.unsafe(nil), Integer) + +# eXcess: 16/32/64-bit configurable embedded CPU +# +# source://elftools//lib/elftools/constants.rb#296 ELFTools::Constants::EM::EM_DXP = T.let(T.unsafe(nil), Integer) + +# Andes Technology compact code size embedded RISC processor family +# +# source://elftools//lib/elftools/constants.rb#327 ELFTools::Constants::EM::EM_ECOG1 = T.let(T.unsafe(nil), Integer) + +# MCST Elbrus general purpose hardware architecture +# +# source://elftools//lib/elftools/constants.rb#336 ELFTools::Constants::EM::EM_ECOG16 = T.let(T.unsafe(nil), Integer) + +# Cyan Technology eCOG1X family +# +# source://elftools//lib/elftools/constants.rb#328 ELFTools::Constants::EM::EM_ECOG1X = T.let(T.unsafe(nil), Integer) + +# Analog Devices SHARC family of 32-bit DSP processors +# +# source://elftools//lib/elftools/constants.rb#308 ELFTools::Constants::EM::EM_ECOG2 = T.let(T.unsafe(nil), Integer) + +# National Semiconductor CompactRISC 16-bit processor +# +# source://elftools//lib/elftools/constants.rb#338 ELFTools::Constants::EM::EM_ETPU = T.let(T.unsafe(nil), Integer) + +# Microprocessor series from PKU-Unity Ltd. and MPRC of Peking University +# +# source://elftools//lib/elftools/constants.rb#295 ELFTools::Constants::EM::EM_EXCESS = T.let(T.unsafe(nil), Integer) + +# National Semiconductor CompactRISC +# +# source://elftools//lib/elftools/constants.rb#288 ELFTools::Constants::EM::EM_F2MC16 = T.let(T.unsafe(nil), Integer) + +# Infineon Technologies 32-bit embedded cpu +# +# source://elftools//lib/elftools/constants.rb#262 ELFTools::Constants::EM::EM_FIREPATH = T.let(T.unsafe(nil), Integer) + +# NEC V800 series +# +# source://elftools//lib/elftools/constants.rb#222 ELFTools::Constants::EM::EM_FR20 = T.let(T.unsafe(nil), Integer) + +# Atmel AVR 8-bit microcontroller +# +# source://elftools//lib/elftools/constants.rb#268 ELFTools::Constants::EM::EM_FR30 = T.let(T.unsafe(nil), Integer) + +# NXP 56800EF Digital Signal Controller (DSC) +# +# source://elftools//lib/elftools/constants.rb#399 ELFTools::Constants::EM::EM_FRV = T.let(T.unsafe(nil), Integer) + +# Controls and Data Services VISIUMcore processor +# +# source://elftools//lib/elftools/constants.rb#376 ELFTools::Constants::EM::EM_FT32 = T.let(T.unsafe(nil), Integer) + +# Digital Equipment Corp. PDP-11 +# +# source://elftools//lib/elftools/constants.rb#250 ELFTools::Constants::EM::EM_FX66 = T.let(T.unsafe(nil), Integer) + +# Linux BPF - in-kernel virtual machine +# +# source://elftools//lib/elftools/constants.rb#383 ELFTools::Constants::EM::EM_GRAPHCORE_IPU = T.let(T.unsafe(nil), Integer) + +# Renesas H8/300H +# +# source://elftools//lib/elftools/constants.rb#232 ELFTools::Constants::EM::EM_H8S = T.let(T.unsafe(nil), Integer) + +# ARC Cores +# +# source://elftools//lib/elftools/constants.rb#230 ELFTools::Constants::EM::EM_H8_300 = T.let(T.unsafe(nil), Integer) + +# Renesas H8/300 +# +# source://elftools//lib/elftools/constants.rb#231 ELFTools::Constants::EM::EM_H8_300H = T.let(T.unsafe(nil), Integer) + +# Renesas H8S +# +# source://elftools//lib/elftools/constants.rb#233 ELFTools::Constants::EM::EM_H8_500 = T.let(T.unsafe(nil), Integer) + +# Donald Knuth's educational 64-bit processor +# +# source://elftools//lib/elftools/constants.rb#265 ELFTools::Constants::EM::EM_HUANY = T.let(T.unsafe(nil), Integer) + +# Renesas H8/500H +# +# source://elftools//lib/elftools/constants.rb#234 ELFTools::Constants::EM::EM_IA_64 = T.let(T.unsafe(nil), Integer) + +# Graphcore Intelligent Processing Unit +# +# source://elftools//lib/elftools/constants.rb#384 ELFTools::Constants::EM::EM_IMG1 = T.let(T.unsafe(nil), Integer) + +# Microchip 8-bit PIC(r) family +# +# source://elftools//lib/elftools/constants.rb#363 ELFTools::Constants::EM::EM_INTELGT = T.let(T.unsafe(nil), Integer) + +# STMicroelectronics ST200 microcontroller +# +# source://elftools//lib/elftools/constants.rb#285 ELFTools::Constants::EM::EM_IP2K = T.let(T.unsafe(nil), Integer) + +# Axis Communications 32-bit embedded processor +# +# source://elftools//lib/elftools/constants.rb#261 ELFTools::Constants::EM::EM_JAVELIN = T.let(T.unsafe(nil), Integer) + +# Intel L1OM +# +# source://elftools//lib/elftools/constants.rb#341 ELFTools::Constants::EM::EM_K1OM = T.let(T.unsafe(nil), Integer) + +# LoongArch +# +# source://elftools//lib/elftools/constants.rb#394 ELFTools::Constants::EM::EM_KF32 = T.let(T.unsafe(nil), Integer) + +# Intel Graphics Technology +# +# source://elftools//lib/elftools/constants.rb#364 ELFTools::Constants::EM::EM_KM32 = T.let(T.unsafe(nil), Integer) + +# KM211 KMX32 32-bit processor +# +# source://elftools//lib/elftools/constants.rb#366 ELFTools::Constants::EM::EM_KMX16 = T.let(T.unsafe(nil), Integer) + +# KM211 KM32 32-bit processor +# +# source://elftools//lib/elftools/constants.rb#365 ELFTools::Constants::EM::EM_KMX32 = T.let(T.unsafe(nil), Integer) + +# KM211 KMX16 16-bit processor +# +# source://elftools//lib/elftools/constants.rb#367 ELFTools::Constants::EM::EM_KMX8 = T.let(T.unsafe(nil), Integer) + +# KM211 KMX8 8-bit processor +# +# source://elftools//lib/elftools/constants.rb#368 ELFTools::Constants::EM::EM_KVARC = T.let(T.unsafe(nil), Integer) + +# Synopsys ARCv2.3 32-bit +# +# source://elftools//lib/elftools/constants.rb#391 ELFTools::Constants::EM::EM_KVX = T.let(T.unsafe(nil), Integer) + +# Infineon Technologies SLE9X core +# +# source://elftools//lib/elftools/constants.rb#340 ELFTools::Constants::EM::EM_L1OM = T.let(T.unsafe(nil), Integer) + +# AMD GPU architecture +# +# source://elftools//lib/elftools/constants.rb#379 ELFTools::Constants::EM::EM_LANAI = T.let(T.unsafe(nil), Integer) + +# Broadcom VideoCore III processor +# +# source://elftools//lib/elftools/constants.rb#312 ELFTools::Constants::EM::EM_LATTICEMICO32 = T.let(T.unsafe(nil), Integer) + +# WDC 65816/65C816 +# +# source://elftools//lib/elftools/constants.rb#393 ELFTools::Constants::EM::EM_LOONGARCH = T.let(T.unsafe(nil), Integer) + +# Infineon C16x/XC16x processor +# +# source://elftools//lib/elftools/constants.rb#301 ELFTools::Constants::EM::EM_M16C = T.let(T.unsafe(nil), Integer) + +# AT&T WE 32100 +# +# source://elftools//lib/elftools/constants.rb#198 ELFTools::Constants::EM::EM_M32 = T.let(T.unsafe(nil), Integer) + +# Freescale Communication Engine RISC core +# +# source://elftools//lib/elftools/constants.rb#304 ELFTools::Constants::EM::EM_M32C = T.let(T.unsafe(nil), Integer) + +# Renesas V850 +# +# source://elftools//lib/elftools/constants.rb#272 ELFTools::Constants::EM::EM_M32R = T.let(T.unsafe(nil), Integer) + +# New Japan Radio (NJR) 16-bit DSP Processor +# +# source://elftools//lib/elftools/constants.rb#331 ELFTools::Constants::EM::EM_MANIK = T.let(T.unsafe(nil), Integer) + +# Ubicom IP2022 micro controller +# +# source://elftools//lib/elftools/constants.rb#286 ELFTools::Constants::EM::EM_MAX = T.let(T.unsafe(nil), Integer) + +# Cyan Technology eCOG1X family +# +# source://elftools//lib/elftools/constants.rb#329 ELFTools::Constants::EM::EM_MAXQ30 = T.let(T.unsafe(nil), Integer) + +# XMOS xCORE processor family +# +# source://elftools//lib/elftools/constants.rb#362 ELFTools::Constants::EM::EM_MCHP_PIC = T.let(T.unsafe(nil), Integer) + +# Synopsys ARCv2.3 64-bit +# +# source://elftools//lib/elftools/constants.rb#389 ELFTools::Constants::EM::EM_MCS6502 = T.let(T.unsafe(nil), Integer) + +# Imagination Technologies Meta processor architecture +# +# source://elftools//lib/elftools/constants.rb#335 ELFTools::Constants::EM::EM_MCST_ELBRUS = T.let(T.unsafe(nil), Integer) + +# Motorola Star*Core processor +# +# source://elftools//lib/elftools/constants.rb#243 ELFTools::Constants::EM::EM_ME16 = T.let(T.unsafe(nil), Integer) + +# Renesas RX family +# +# source://elftools//lib/elftools/constants.rb#334 ELFTools::Constants::EM::EM_METAG = T.let(T.unsafe(nil), Integer) + +# Tilera TILEPro +# +# source://elftools//lib/elftools/constants.rb#347 ELFTools::Constants::EM::EM_MICROBLAZE = T.let(T.unsafe(nil), Integer) + +# MIPS R3000 (officially, big-endian only) +# +# source://elftools//lib/elftools/constants.rb#205 ELFTools::Constants::EM::EM_MIPS = T.let(T.unsafe(nil), Integer) + +# Next two are historical and binaries and +# modules of these types will be rejected by Linux. +# +# source://elftools//lib/elftools/constants.rb#210 ELFTools::Constants::EM::EM_MIPS_RS3_LE = T.let(T.unsafe(nil), Integer) + +# MIPS R3000 little-endian +# +# source://elftools//lib/elftools/constants.rb#211 ELFTools::Constants::EM::EM_MIPS_RS4_BE = T.let(T.unsafe(nil), Integer) + +# HP/Intel IA-64 +# +# source://elftools//lib/elftools/constants.rb#235 ELFTools::Constants::EM::EM_MIPS_X = T.let(T.unsafe(nil), Integer) + +# Motorola M68HC12 +# +# source://elftools//lib/elftools/constants.rb#238 ELFTools::Constants::EM::EM_MMA = T.let(T.unsafe(nil), Integer) + +# Texas Instruments Programmable Realtime Unit +# +# source://elftools//lib/elftools/constants.rb#319 ELFTools::Constants::EM::EM_MMDSP_PLUS = T.let(T.unsafe(nil), Integer) + +# LSI Logic's 16-bit DSP processor +# +# source://elftools//lib/elftools/constants.rb#264 ELFTools::Constants::EM::EM_MMIX = T.let(T.unsafe(nil), Integer) + +# Matsushita MN10300 +# +# source://elftools//lib/elftools/constants.rb#274 ELFTools::Constants::EM::EM_MN10200 = T.let(T.unsafe(nil), Integer) + +# Renesas M32R +# +# source://elftools//lib/elftools/constants.rb#273 ELFTools::Constants::EM::EM_MN10300 = T.let(T.unsafe(nil), Integer) + +# FTDI Chip FT32 high performance 32-bit RISC architecture +# +# source://elftools//lib/elftools/constants.rb#377 ELFTools::Constants::EM::EM_MOXIE = T.let(T.unsafe(nil), Integer) + +# Fujitsu F2MC16 +# +# source://elftools//lib/elftools/constants.rb#289 ELFTools::Constants::EM::EM_MSP430 = T.let(T.unsafe(nil), Integer) + +# Siemens PCP +# +# source://elftools//lib/elftools/constants.rb#240 ELFTools::Constants::EM::EM_NCPU = T.let(T.unsafe(nil), Integer) + +# Sony nCPU embedded RISC processor +# +# source://elftools//lib/elftools/constants.rb#241 ELFTools::Constants::EM::EM_NDR1 = T.let(T.unsafe(nil), Integer) + +# STMicroelectronics STxP7x family +# +# source://elftools//lib/elftools/constants.rb#326 ELFTools::Constants::EM::EM_NDS32 = T.let(T.unsafe(nil), Integer) + +# Imagination Technologies +# +# source://elftools//lib/elftools/constants.rb#385 ELFTools::Constants::EM::EM_NFP = T.let(T.unsafe(nil), Integer) + +# none +# +# source://elftools//lib/elftools/constants.rb#197 ELFTools::Constants::EM::EM_NONE = T.let(T.unsafe(nil), Integer) + +# Bluechip Systems CoolEngine +# +# source://elftools//lib/elftools/constants.rb#372 ELFTools::Constants::EM::EM_NORC = T.let(T.unsafe(nil), Integer) + +# Thompson Multimedia General Purpose Processor +# +# source://elftools//lib/elftools/constants.rb#281 ELFTools::Constants::EM::EM_NS32K = T.let(T.unsafe(nil), Integer) + +# Synopsys ARCompact V2 +# +# source://elftools//lib/elftools/constants.rb#354 ELFTools::Constants::EM::EM_OPEN8 = T.let(T.unsafe(nil), Integer) + +# picoJava +# +# source://elftools//lib/elftools/constants.rb#276 ELFTools::Constants::EM::EM_OPENRISC = T.let(T.unsafe(nil), Integer) + +# MIPS R4000 big-endian +# +# source://elftools//lib/elftools/constants.rb#213 ELFTools::Constants::EM::EM_PARISC = T.let(T.unsafe(nil), Integer) + +# Fujitsu Multimedia Accelerator +# +# source://elftools//lib/elftools/constants.rb#239 ELFTools::Constants::EM::EM_PCP = T.let(T.unsafe(nil), Integer) + +# Sony DSP Processor +# +# source://elftools//lib/elftools/constants.rb#248 ELFTools::Constants::EM::EM_PDP10 = T.let(T.unsafe(nil), Integer) + +# Digital Equipment Corp. PDP-10 +# +# source://elftools//lib/elftools/constants.rb#249 ELFTools::Constants::EM::EM_PDP11 = T.let(T.unsafe(nil), Integer) + +# AMD x86-64 +# +# source://elftools//lib/elftools/constants.rb#247 ELFTools::Constants::EM::EM_PDSP = T.let(T.unsafe(nil), Integer) + +# Matsushita MN10200 +# +# source://elftools//lib/elftools/constants.rb#275 ELFTools::Constants::EM::EM_PJ = T.let(T.unsafe(nil), Integer) + +# Intel 80960 +# +# source://elftools//lib/elftools/constants.rb#217 ELFTools::Constants::EM::EM_PPC = T.let(T.unsafe(nil), Integer) + +# PowerPC +# +# source://elftools//lib/elftools/constants.rb#218 ELFTools::Constants::EM::EM_PPC64 = T.let(T.unsafe(nil), Integer) + +# Harvard's machine-independent format +# +# source://elftools//lib/elftools/constants.rb#266 ELFTools::Constants::EM::EM_PRISM = T.let(T.unsafe(nil), Integer) + +# NXP Semiconductors TriMedia architecture family +# +# source://elftools//lib/elftools/constants.rb#323 ELFTools::Constants::EM::EM_QDSP6 = T.let(T.unsafe(nil), Integer) + +# Cypress M8C microprocessor +# +# source://elftools//lib/elftools/constants.rb#321 ELFTools::Constants::EM::EM_R32C = T.let(T.unsafe(nil), Integer) + +# TRW RH32 +# +# source://elftools//lib/elftools/constants.rb#224 ELFTools::Constants::EM::EM_RCE = T.let(T.unsafe(nil), Integer) + +# Fujitsu FR20 +# +# source://elftools//lib/elftools/constants.rb#223 ELFTools::Constants::EM::EM_RH32 = T.let(T.unsafe(nil), Integer) + +# Open8 8-bit RISC soft processor core +# +# source://elftools//lib/elftools/constants.rb#355 ELFTools::Constants::EM::EM_RL78 = T.let(T.unsafe(nil), Integer) + +# Altium TSK3000 core +# +# source://elftools//lib/elftools/constants.rb#306 ELFTools::Constants::EM::EM_RS08 = T.let(T.unsafe(nil), Integer) + +# Cray Inc. NV2 vector architecture +# +# source://elftools//lib/elftools/constants.rb#333 ELFTools::Constants::EM::EM_RX = T.let(T.unsafe(nil), Integer) + +# IBM System/370 +# +# source://elftools//lib/elftools/constants.rb#206 ELFTools::Constants::EM::EM_S370 = T.let(T.unsafe(nil), Integer) + +# PowerPC64 +# +# source://elftools//lib/elftools/constants.rb#219 ELFTools::Constants::EM::EM_S390 = T.let(T.unsafe(nil), Integer) + +# This is the old interim value for S/390 architecture +# +# source://elftools//lib/elftools/constants.rb#407 ELFTools::Constants::EM::EM_S390_OLD = T.let(T.unsafe(nil), Integer) + +# Cyan Technology eCOG2 microprocessor +# +# source://elftools//lib/elftools/constants.rb#309 ELFTools::Constants::EM::EM_SCORE7 = T.let(T.unsafe(nil), Integer) + +# S1C33 Family of Seiko Epson processors +# +# source://elftools//lib/elftools/constants.rb#292 ELFTools::Constants::EM::EM_SEP = T.let(T.unsafe(nil), Integer) + +# RISC processor for Lattice FPGA architecture +# +# source://elftools//lib/elftools/constants.rb#313 ELFTools::Constants::EM::EM_SE_C17 = T.let(T.unsafe(nil), Integer) + +# ADI Blackfin Processor +# +# source://elftools//lib/elftools/constants.rb#291 ELFTools::Constants::EM::EM_SE_C33 = T.let(T.unsafe(nil), Integer) + +# ARM 32 bit +# +# source://elftools//lib/elftools/constants.rb#226 ELFTools::Constants::EM::EM_SH = T.let(T.unsafe(nil), Integer) + +# Freescale RS08 embedded processor +# +# source://elftools//lib/elftools/constants.rb#307 ELFTools::Constants::EM::EM_SHARC = T.let(T.unsafe(nil), Integer) + +# Freescale Extended Time Processing Unit +# +# source://elftools//lib/elftools/constants.rb#339 ELFTools::Constants::EM::EM_SLE9X = T.let(T.unsafe(nil), Integer) + +# Tenor Network TPC processor +# +# source://elftools//lib/elftools/constants.rb#283 ELFTools::Constants::EM::EM_SNP1K = T.let(T.unsafe(nil), Integer) + +# SPARC +# +# source://elftools//lib/elftools/constants.rb#199 ELFTools::Constants::EM::EM_SPARC = T.let(T.unsafe(nil), Integer) + +# Fujitsu VPP500 (also some older versions of PowerPC) +# +# source://elftools//lib/elftools/constants.rb#215 ELFTools::Constants::EM::EM_SPARC32PLUS = T.let(T.unsafe(nil), Integer) + +# SuperH +# +# source://elftools//lib/elftools/constants.rb#227 ELFTools::Constants::EM::EM_SPARCV9 = T.let(T.unsafe(nil), Integer) + +# IBM S/390 +# +# source://elftools//lib/elftools/constants.rb#220 ELFTools::Constants::EM::EM_SPU = T.let(T.unsafe(nil), Integer) + +# Toyota ME16 processor +# +# source://elftools//lib/elftools/constants.rb#244 ELFTools::Constants::EM::EM_ST100 = T.let(T.unsafe(nil), Integer) + +# Silicon Graphics SVx +# +# source://elftools//lib/elftools/constants.rb#258 ELFTools::Constants::EM::EM_ST19 = T.let(T.unsafe(nil), Integer) + +# Trebia SNP 1000 processor +# +# source://elftools//lib/elftools/constants.rb#284 ELFTools::Constants::EM::EM_ST200 = T.let(T.unsafe(nil), Integer) + +# STMicroelectronics ST9+ 8/16 bit microcontroller +# +# source://elftools//lib/elftools/constants.rb#252 ELFTools::Constants::EM::EM_ST7 = T.let(T.unsafe(nil), Integer) + +# Siemens FX66 microcontroller +# +# source://elftools//lib/elftools/constants.rb#251 ELFTools::Constants::EM::EM_ST9PLUS = T.let(T.unsafe(nil), Integer) + +# Denso NDR1 microprocessor +# +# source://elftools//lib/elftools/constants.rb#242 ELFTools::Constants::EM::EM_STARCORE = T.let(T.unsafe(nil), Integer) + +# Atmel Corporation 32-bit microprocessor family +# +# source://elftools//lib/elftools/constants.rb#344 ELFTools::Constants::EM::EM_STM8 = T.let(T.unsafe(nil), Integer) + +# Intel 8051 and variants +# +# source://elftools//lib/elftools/constants.rb#325 ELFTools::Constants::EM::EM_STXP7X = T.let(T.unsafe(nil), Integer) + +# Motorola MC68HC05 Microcontroller +# +# source://elftools//lib/elftools/constants.rb#257 ELFTools::Constants::EM::EM_SVX = T.let(T.unsafe(nil), Integer) + +# LAPIS nX-U16/U8 +# +# source://elftools//lib/elftools/constants.rb#396 ELFTools::Constants::EM::EM_TACHYUM = T.let(T.unsafe(nil), Integer) + +# STMicroeletronics STM8 8-bit microcontroller +# +# source://elftools//lib/elftools/constants.rb#345 ELFTools::Constants::EM::EM_TILE64 = T.let(T.unsafe(nil), Integer) + +# NVIDIA CUDA architecture +# +# source://elftools//lib/elftools/constants.rb#349 ELFTools::Constants::EM::EM_TILEGX = T.let(T.unsafe(nil), Integer) + +# Tilera TILE64 multicore architecture family +# +# source://elftools//lib/elftools/constants.rb#346 ELFTools::Constants::EM::EM_TILEPRO = T.let(T.unsafe(nil), Integer) + +# STMicroelectronics ST100 processor +# +# source://elftools//lib/elftools/constants.rb#245 ELFTools::Constants::EM::EM_TINYJ = T.let(T.unsafe(nil), Integer) + +# The Texas Instruments TMS320C55x DSP family +# +# source://elftools//lib/elftools/constants.rb#317 ELFTools::Constants::EM::EM_TI_ARP32 = T.let(T.unsafe(nil), Integer) + +# The Texas Instruments TMS320C6000 DSP family +# +# source://elftools//lib/elftools/constants.rb#315 ELFTools::Constants::EM::EM_TI_C2000 = T.let(T.unsafe(nil), Integer) + +# The Texas Instruments TMS320C2000 DSP family +# +# source://elftools//lib/elftools/constants.rb#316 ELFTools::Constants::EM::EM_TI_C5500 = T.let(T.unsafe(nil), Integer) + +# Seiko Epson C17 family +# +# source://elftools//lib/elftools/constants.rb#314 ELFTools::Constants::EM::EM_TI_C6000 = T.let(T.unsafe(nil), Integer) + +# Texas Instruments Application Specific RISC Processor, 32bit fetch +# +# source://elftools//lib/elftools/constants.rb#318 ELFTools::Constants::EM::EM_TI_PRU = T.let(T.unsafe(nil), Integer) + +# Alphamosaic VideoCore processor +# +# source://elftools//lib/elftools/constants.rb#280 ELFTools::Constants::EM::EM_TMM_GPP = T.let(T.unsafe(nil), Integer) + +# National Semiconductor 32000 series +# +# source://elftools//lib/elftools/constants.rb#282 ELFTools::Constants::EM::EM_TPC = T.let(T.unsafe(nil), Integer) + +# SPARC v9 64-bit +# +# source://elftools//lib/elftools/constants.rb#228 ELFTools::Constants::EM::EM_TRICORE = T.let(T.unsafe(nil), Integer) + +# Renesas R32C series microprocessors +# +# source://elftools//lib/elftools/constants.rb#322 ELFTools::Constants::EM::EM_TRIMEDIA = T.let(T.unsafe(nil), Integer) + +# Freescale Communication Engine RISC core +# +# source://elftools//lib/elftools/constants.rb#305 ELFTools::Constants::EM::EM_TSK3000 = T.let(T.unsafe(nil), Integer) + +# ChipON KungFu32 +# +# source://elftools//lib/elftools/constants.rb#395 ELFTools::Constants::EM::EM_U16_U8CORE = T.let(T.unsafe(nil), Integer) + +# Arca RISC Microprocessor +# +# source://elftools//lib/elftools/constants.rb#294 ELFTools::Constants::EM::EM_UNICORE = T.let(T.unsafe(nil), Integer) + +# Cell BE SPU +# +# source://elftools//lib/elftools/constants.rb#221 ELFTools::Constants::EM::EM_V800 = T.let(T.unsafe(nil), Integer) + +# Mitsubishi D30V +# +# source://elftools//lib/elftools/constants.rb#271 ELFTools::Constants::EM::EM_V850 = T.let(T.unsafe(nil), Integer) + +# STMicroelectronics ST19 8-bit cpu +# +# source://elftools//lib/elftools/constants.rb#259 ELFTools::Constants::EM::EM_VAX = T.let(T.unsafe(nil), Integer) + +# Netronome Flow Processor (NFP) +# +# source://elftools//lib/elftools/constants.rb#386 ELFTools::Constants::EM::EM_VE = T.let(T.unsafe(nil), Integer) + +# Tensilica Xtensa Architecture +# +# source://elftools//lib/elftools/constants.rb#279 ELFTools::Constants::EM::EM_VIDEOCORE = T.let(T.unsafe(nil), Integer) + +# New Japan Radio (NJR) 24-bit DSP Processor +# +# source://elftools//lib/elftools/constants.rb#311 ELFTools::Constants::EM::EM_VIDEOCORE3 = T.let(T.unsafe(nil), Integer) + +# Renesas RL78 family +# +# source://elftools//lib/elftools/constants.rb#356 ELFTools::Constants::EM::EM_VIDEOCORE5 = T.let(T.unsafe(nil), Integer) + +# Zilog Z80 +# +# source://elftools//lib/elftools/constants.rb#375 ELFTools::Constants::EM::EM_VISIUM = T.let(T.unsafe(nil), Integer) + +# HPPA +# +# source://elftools//lib/elftools/constants.rb#214 ELFTools::Constants::EM::EM_VPP500 = T.let(T.unsafe(nil), Integer) + +# Advanced Logic Corp. TinyJ embedded processor +# +# source://elftools//lib/elftools/constants.rb#246 ELFTools::Constants::EM::EM_X86_64 = T.let(T.unsafe(nil), Integer) + +# Beyond BA2 CPU architecture +# +# source://elftools//lib/elftools/constants.rb#361 ELFTools::Constants::EM::EM_XCORE = T.let(T.unsafe(nil), Integer) + +# National Semiconductor CRX +# +# source://elftools//lib/elftools/constants.rb#299 ELFTools::Constants::EM::EM_XGATE = T.let(T.unsafe(nil), Integer) + +# Dallas Semiconductor MAXQ30 Core Micro-controllers +# +# source://elftools//lib/elftools/constants.rb#330 ELFTools::Constants::EM::EM_XIMO16 = T.let(T.unsafe(nil), Integer) + +# ARC International ARCompact processor +# +# source://elftools//lib/elftools/constants.rb#278 ELFTools::Constants::EM::EM_XTENSA = T.let(T.unsafe(nil), Integer) + +# CSR Kalimba architecture family +# +# source://elftools//lib/elftools/constants.rb#374 ELFTools::Constants::EM::EM_Z80 = T.let(T.unsafe(nil), Integer) + +# Element 14 64-bit DSP processor +# +# source://elftools//lib/elftools/constants.rb#263 ELFTools::Constants::EM::EM_ZSP = T.let(T.unsafe(nil), Integer) +# This module defines ELF file types. +# +# source://elftools//lib/elftools/constants.rb#446 module ELFTools::Constants::ET class << self + # Return the type name according to +e_type+ in ELF file header. + # + # @return [String] Type in string format. + # + # source://elftools//lib/elftools/constants.rb#454 def mapping(type); end end end +# core file +# +# source://elftools//lib/elftools/constants.rb#451 ELFTools::Constants::ET::ET_CORE = T.let(T.unsafe(nil), Integer) + +# shared object +# +# source://elftools//lib/elftools/constants.rb#450 ELFTools::Constants::ET::ET_DYN = T.let(T.unsafe(nil), Integer) + +# executable file +# +# source://elftools//lib/elftools/constants.rb#449 ELFTools::Constants::ET::ET_EXEC = T.let(T.unsafe(nil), Integer) + +# no file type +# +# source://elftools//lib/elftools/constants.rb#447 ELFTools::Constants::ET::ET_NONE = T.let(T.unsafe(nil), Integer) + +# relocatable file +# +# source://elftools//lib/elftools/constants.rb#448 ELFTools::Constants::ET::ET_REL = T.let(T.unsafe(nil), Integer) + +# Program header permission flags, records bitwise OR value in +p_flags+. +# +# source://elftools//lib/elftools/constants.rb#468 module ELFTools::Constants::PF; end + +# readable +# +# source://elftools//lib/elftools/constants.rb#471 ELFTools::Constants::PF::PF_R = T.let(T.unsafe(nil), Integer) + +# writable +# +# source://elftools//lib/elftools/constants.rb#470 ELFTools::Constants::PF::PF_W = T.let(T.unsafe(nil), Integer) + +# executable +# +# source://elftools//lib/elftools/constants.rb#469 ELFTools::Constants::PF::PF_X = T.let(T.unsafe(nil), Integer) + +# Program header types, records in +p_type+. +# +# source://elftools//lib/elftools/constants.rb#476 module ELFTools::Constants::PT; end + +# platform architecture compatibility information +# +# source://elftools//lib/elftools/constants.rb#509 ELFTools::Constants::PT::PT_AARCH64_ARCHEXT = T.let(T.unsafe(nil), Integer) + +# exception unwind tables +# +# source://elftools//lib/elftools/constants.rb#510 ELFTools::Constants::PT::PT_AARCH64_UNWIND = T.let(T.unsafe(nil), Integer) + +# platform architecture compatibility information +# +# source://elftools//lib/elftools/constants.rb#501 ELFTools::Constants::PT::PT_ARM_ARCHEXT = T.let(T.unsafe(nil), Integer) + +# exception unwind tables +# +# source://elftools//lib/elftools/constants.rb#502 ELFTools::Constants::PT::PT_ARM_EXIDX = T.let(T.unsafe(nil), Integer) + +# dynamic tags +# +# source://elftools//lib/elftools/constants.rb#479 ELFTools::Constants::PT::PT_DYNAMIC = T.let(T.unsafe(nil), Integer) + +# for exception handler +# +# source://elftools//lib/elftools/constants.rb#487 ELFTools::Constants::PT::PT_GNU_EH_FRAME = T.let(T.unsafe(nil), Integer) + +# Mbind segments (upper bound) +# +# source://elftools//lib/elftools/constants.rb#491 ELFTools::Constants::PT::PT_GNU_MBIND_HI = T.let(T.unsafe(nil), Integer) + +# Mbind segments (lower bound) +# +# source://elftools//lib/elftools/constants.rb#492 ELFTools::Constants::PT::PT_GNU_MBIND_LO = T.let(T.unsafe(nil), Integer) + +# GNU property +# +# source://elftools//lib/elftools/constants.rb#490 ELFTools::Constants::PT::PT_GNU_PROPERTY = T.let(T.unsafe(nil), Integer) + +# read only after relocation +# +# source://elftools//lib/elftools/constants.rb#489 ELFTools::Constants::PT::PT_GNU_RELRO = T.let(T.unsafe(nil), Integer) + +# permission of stack +# +# source://elftools//lib/elftools/constants.rb#488 ELFTools::Constants::PT::PT_GNU_STACK = T.let(T.unsafe(nil), Integer) + +# OS-specific +# +# source://elftools//lib/elftools/constants.rb#496 ELFTools::Constants::PT::PT_HIOS = T.let(T.unsafe(nil), Integer) + +# see {PT_LOPROC} +# +# source://elftools//lib/elftools/constants.rb#514 ELFTools::Constants::PT::PT_HIPROC = T.let(T.unsafe(nil), Integer) + +# interpreter, same as .interp section +# +# source://elftools//lib/elftools/constants.rb#480 ELFTools::Constants::PT::PT_INTERP = T.let(T.unsafe(nil), Integer) + +# segment to be load +# +# source://elftools//lib/elftools/constants.rb#478 ELFTools::Constants::PT::PT_LOAD = T.let(T.unsafe(nil), Integer) + +# OS-specific +# +# source://elftools//lib/elftools/constants.rb#486 ELFTools::Constants::PT::PT_LOOS = T.let(T.unsafe(nil), Integer) + +# Values between {PT_LOPROC} and {PT_HIPROC} are reserved for processor-specific semantics. +# +# source://elftools//lib/elftools/constants.rb#499 ELFTools::Constants::PT::PT_LOPROC = T.let(T.unsafe(nil), Integer) + +# +.MIPS.abiflags+ section +# +# source://elftools//lib/elftools/constants.rb#507 ELFTools::Constants::PT::PT_MIPS_ABIFLAGS = T.let(T.unsafe(nil), Integer) + +# +.MIPS.options+ section +# +# source://elftools//lib/elftools/constants.rb#506 ELFTools::Constants::PT::PT_MIPS_OPTIONS = T.let(T.unsafe(nil), Integer) + +# register usage information +# +# source://elftools//lib/elftools/constants.rb#504 ELFTools::Constants::PT::PT_MIPS_REGINFO = T.let(T.unsafe(nil), Integer) + +# runtime procedure table +# +# source://elftools//lib/elftools/constants.rb#505 ELFTools::Constants::PT::PT_MIPS_RTPROC = T.let(T.unsafe(nil), Integer) + +# same as .note* section +# +# source://elftools//lib/elftools/constants.rb#481 ELFTools::Constants::PT::PT_NOTE = T.let(T.unsafe(nil), Integer) + +# null segment +# +# source://elftools//lib/elftools/constants.rb#477 ELFTools::Constants::PT::PT_NULL = T.let(T.unsafe(nil), Integer) + +# Section for boot arguments +# +# source://elftools//lib/elftools/constants.rb#495 ELFTools::Constants::PT::PT_OPENBSD_BOOTDATA = T.let(T.unsafe(nil), Integer) + +# Fill with random data +# +# source://elftools//lib/elftools/constants.rb#493 ELFTools::Constants::PT::PT_OPENBSD_RANDOMIZE = T.let(T.unsafe(nil), Integer) + +# Program does W^X violations +# +# source://elftools//lib/elftools/constants.rb#494 ELFTools::Constants::PT::PT_OPENBSD_WXNEEDED = T.let(T.unsafe(nil), Integer) + +# where program header starts +# +# source://elftools//lib/elftools/constants.rb#483 ELFTools::Constants::PT::PT_PHDR = T.let(T.unsafe(nil), Integer) + +# 4k page table size +# +# source://elftools//lib/elftools/constants.rb#512 ELFTools::Constants::PT::PT_S390_PGSTE = T.let(T.unsafe(nil), Integer) + +# reserved +# +# source://elftools//lib/elftools/constants.rb#482 ELFTools::Constants::PT::PT_SHLIB = T.let(T.unsafe(nil), Integer) + +# thread local storage segment +# +# source://elftools//lib/elftools/constants.rb#484 ELFTools::Constants::PT::PT_TLS = T.let(T.unsafe(nil), Integer) + +# Section flag mask types, records in +sh_flag+. +# +# source://elftools//lib/elftools/constants.rb#548 module ELFTools::Constants::SHF; end + +# Occupies memory during execution +# +# source://elftools//lib/elftools/constants.rb#550 ELFTools::Constants::SHF::SHF_ALLOC = T.let(T.unsafe(nil), Integer) + +# Section with compressed data. +# +# source://elftools//lib/elftools/constants.rb#559 ELFTools::Constants::SHF::SHF_COMPRESSED = T.let(T.unsafe(nil), Integer) + +# Section is excluded unless referenced or allocated (Solaris). +# +# source://elftools//lib/elftools/constants.rb#565 ELFTools::Constants::SHF::SHF_EXCLUDE = T.let(T.unsafe(nil), Integer) + +# Executable +# +# source://elftools//lib/elftools/constants.rb#551 ELFTools::Constants::SHF::SHF_EXECINSTR = T.let(T.unsafe(nil), Integer) + +# Mbind section +# +# source://elftools//lib/elftools/constants.rb#563 ELFTools::Constants::SHF::SHF_GNU_MBIND = T.let(T.unsafe(nil), Integer) + +# Not to be GCed by linker. +# +# source://elftools//lib/elftools/constants.rb#562 ELFTools::Constants::SHF::SHF_GNU_RETAIN = T.let(T.unsafe(nil), Integer) + +# Section is member of a group. +# +# source://elftools//lib/elftools/constants.rb#557 ELFTools::Constants::SHF::SHF_GROUP = T.let(T.unsafe(nil), Integer) + +# `sh_info' contains SHT index +# +# source://elftools//lib/elftools/constants.rb#554 ELFTools::Constants::SHF::SHF_INFO_LINK = T.let(T.unsafe(nil), Integer) + +# Preserve order after combining +# +# source://elftools//lib/elftools/constants.rb#555 ELFTools::Constants::SHF::SHF_LINK_ORDER = T.let(T.unsafe(nil), Integer) + +# OS-specific. +# +# source://elftools//lib/elftools/constants.rb#560 ELFTools::Constants::SHF::SHF_MASKOS = T.let(T.unsafe(nil), Integer) + +# Processor-specific +# +# source://elftools//lib/elftools/constants.rb#561 ELFTools::Constants::SHF::SHF_MASKPROC = T.let(T.unsafe(nil), Integer) + +# Might be merged +# +# source://elftools//lib/elftools/constants.rb#552 ELFTools::Constants::SHF::SHF_MERGE = T.let(T.unsafe(nil), Integer) + +# Special ordering requirement +# +# source://elftools//lib/elftools/constants.rb#564 ELFTools::Constants::SHF::SHF_ORDERED = T.let(T.unsafe(nil), Integer) + +# Non-standard OS specific handling required +# +# source://elftools//lib/elftools/constants.rb#556 ELFTools::Constants::SHF::SHF_OS_NONCONFORMING = T.let(T.unsafe(nil), Integer) + +# Contains nul-terminated strings +# +# source://elftools//lib/elftools/constants.rb#553 ELFTools::Constants::SHF::SHF_STRINGS = T.let(T.unsafe(nil), Integer) + +# Section hold thread-local data. +# +# source://elftools//lib/elftools/constants.rb#558 ELFTools::Constants::SHF::SHF_TLS = T.let(T.unsafe(nil), Integer) + +# Writable +# +# source://elftools//lib/elftools/constants.rb#549 ELFTools::Constants::SHF::SHF_WRITE = T.let(T.unsafe(nil), Integer) + +# Special indices to section. These are used when there is no valid index to section header. +# The meaning of these values is left upto the embedding header. +# +# source://elftools//lib/elftools/constants.rb#520 module ELFTools::Constants::SHN; end + +# specifies absolute values for the corresponding reference +# +# source://elftools//lib/elftools/constants.rb#540 ELFTools::Constants::SHN::SHN_ABS = T.let(T.unsafe(nil), Integer) + +# symbols defined relative to this section are common symbols +# +# source://elftools//lib/elftools/constants.rb#541 ELFTools::Constants::SHN::SHN_COMMON = T.let(T.unsafe(nil), Integer) + +# see {SHN_LOOS} +# +# source://elftools//lib/elftools/constants.rb#539 ELFTools::Constants::SHN::SHN_HIOS = T.let(T.unsafe(nil), Integer) + +# see {SHN_LOPROC} +# +# source://elftools//lib/elftools/constants.rb#535 ELFTools::Constants::SHN::SHN_HIPROC = T.let(T.unsafe(nil), Integer) + +# end of reserved indices +# +# source://elftools//lib/elftools/constants.rb#543 ELFTools::Constants::SHN::SHN_HIRESERVE = T.let(T.unsafe(nil), Integer) + +# Values between {SHN_LOOS} and {SHN_HIOS} are reserved for operating system-specific semantics. +# +# source://elftools//lib/elftools/constants.rb#538 ELFTools::Constants::SHN::SHN_LOOS = T.let(T.unsafe(nil), Integer) + +# Values between {SHN_LOPROC} and {SHN_HIPROC} are reserved for processor-specific semantics. +# +# source://elftools//lib/elftools/constants.rb#525 ELFTools::Constants::SHN::SHN_LOPROC = T.let(T.unsafe(nil), Integer) + +# start of reserved indices +# +# source://elftools//lib/elftools/constants.rb#522 ELFTools::Constants::SHN::SHN_LORESERVE = T.let(T.unsafe(nil), Integer) + +# defined and allocated common symbol +# +# source://elftools//lib/elftools/constants.rb#527 ELFTools::Constants::SHN::SHN_MIPS_ACOMMON = T.let(T.unsafe(nil), Integer) + +# defined and allocated data symbol +# +# source://elftools//lib/elftools/constants.rb#529 ELFTools::Constants::SHN::SHN_MIPS_DATA = T.let(T.unsafe(nil), Integer) + +# small common symbol +# +# source://elftools//lib/elftools/constants.rb#530 ELFTools::Constants::SHN::SHN_MIPS_SCOMMON = T.let(T.unsafe(nil), Integer) + +# small undefined symbol +# +# source://elftools//lib/elftools/constants.rb#531 ELFTools::Constants::SHN::SHN_MIPS_SUNDEFINED = T.let(T.unsafe(nil), Integer) + +# defined and allocated text symbol +# +# source://elftools//lib/elftools/constants.rb#528 ELFTools::Constants::SHN::SHN_MIPS_TEXT = T.let(T.unsafe(nil), Integer) + +# undefined section +# +# source://elftools//lib/elftools/constants.rb#521 ELFTools::Constants::SHN::SHN_UNDEF = T.let(T.unsafe(nil), Integer) + +# large common symbol +# +# source://elftools//lib/elftools/constants.rb#533 ELFTools::Constants::SHN::SHN_X86_64_LCOMMON = T.let(T.unsafe(nil), Integer) + +# escape value indicating that the actual section header index is too large to fit +# +# source://elftools//lib/elftools/constants.rb#542 ELFTools::Constants::SHN::SHN_XINDEX = T.let(T.unsafe(nil), Integer) + +# Section header types, records in +sh_type+. +# +# source://elftools//lib/elftools/constants.rb#570 module ELFTools::Constants::SHT; end + +# source://elftools//lib/elftools/constants.rb#661 ELFTools::Constants::SHT::SHT_AARCH64_ATTRIBUTES = T.let(T.unsafe(nil), Integer) + +# object file compatibility attributes +# +# source://elftools//lib/elftools/constants.rb#614 ELFTools::Constants::SHT::SHT_ARM_ATTRIBUTES = T.let(T.unsafe(nil), Integer) + +# support for debugging overlaid programs +# +# source://elftools//lib/elftools/constants.rb#615 ELFTools::Constants::SHT::SHT_ARM_DEBUGOVERLAY = T.let(T.unsafe(nil), Integer) + +# exception index table +# +# source://elftools//lib/elftools/constants.rb#612 ELFTools::Constants::SHT::SHT_ARM_EXIDX = T.let(T.unsafe(nil), Integer) + +# support for debugging overlaid programs +# +# source://elftools//lib/elftools/constants.rb#616 ELFTools::Constants::SHT::SHT_ARM_OVERLAYSECTION = T.let(T.unsafe(nil), Integer) + +# BPABI DLL dynamic linking pre-emption map +# +# source://elftools//lib/elftools/constants.rb#613 ELFTools::Constants::SHT::SHT_ARM_PREEMPTMAP = T.let(T.unsafe(nil), Integer) + +# object file compatibility attributes +# +# source://elftools//lib/elftools/constants.rb#663 ELFTools::Constants::SHT::SHT_CSKY_ATTRIBUTES = T.let(T.unsafe(nil), Integer) + +# information of dynamic linking +# +# source://elftools//lib/elftools/constants.rb#577 ELFTools::Constants::SHT::SHT_DYNAMIC = T.let(T.unsafe(nil), Integer) + +# symbols for dynamic +# +# source://elftools//lib/elftools/constants.rb#582 ELFTools::Constants::SHT::SHT_DYNSYM = T.let(T.unsafe(nil), Integer) + +# array of termination functions +# +# source://elftools//lib/elftools/constants.rb#584 ELFTools::Constants::SHT::SHT_FINI_ARRAY = T.let(T.unsafe(nil), Integer) + +# object attributes +# +# source://elftools//lib/elftools/constants.rb#596 ELFTools::Constants::SHT::SHT_GNU_ATTRIBUTES = T.let(T.unsafe(nil), Integer) + +# GNU style symbol hash table +# +# source://elftools//lib/elftools/constants.rb#597 ELFTools::Constants::SHT::SHT_GNU_HASH = T.let(T.unsafe(nil), Integer) + +# incremental build data +# +# source://elftools//lib/elftools/constants.rb#595 ELFTools::Constants::SHT::SHT_GNU_INCREMENTAL_GOT_PLT = T.let(T.unsafe(nil), Integer) + +# incremental build data +# +# source://elftools//lib/elftools/constants.rb#592 ELFTools::Constants::SHT::SHT_GNU_INCREMENTAL_INPUTS = T.let(T.unsafe(nil), Integer) + +# incremental build data +# +# source://elftools//lib/elftools/constants.rb#594 ELFTools::Constants::SHT::SHT_GNU_INCREMENTAL_RELOCS = T.let(T.unsafe(nil), Integer) + +# incremental build data +# +# source://elftools//lib/elftools/constants.rb#593 ELFTools::Constants::SHT::SHT_GNU_INCREMENTAL_SYMTAB = T.let(T.unsafe(nil), Integer) + +# list of prelink dependencies +# +# source://elftools//lib/elftools/constants.rb#598 ELFTools::Constants::SHT::SHT_GNU_LIBLIST = T.let(T.unsafe(nil), Integer) + +# versions defined by file +# +# source://elftools//lib/elftools/constants.rb#600 ELFTools::Constants::SHT::SHT_GNU_verdef = T.let(T.unsafe(nil), Integer) + +# versions needed by file +# +# source://elftools//lib/elftools/constants.rb#602 ELFTools::Constants::SHT::SHT_GNU_verneed = T.let(T.unsafe(nil), Integer) + +# symbol versions +# +# source://elftools//lib/elftools/constants.rb#604 ELFTools::Constants::SHT::SHT_GNU_versym = T.let(T.unsafe(nil), Integer) + +# section group +# +# source://elftools//lib/elftools/constants.rb#586 ELFTools::Constants::SHT::SHT_GROUP = T.let(T.unsafe(nil), Integer) + +# symbol hash table +# +# source://elftools//lib/elftools/constants.rb#576 ELFTools::Constants::SHT::SHT_HASH = T.let(T.unsafe(nil), Integer) + +# see {SHT_LOOS} +# +# source://elftools//lib/elftools/constants.rb#605 ELFTools::Constants::SHT::SHT_HIOS = T.let(T.unsafe(nil), Integer) + +# see {SHT_LOPROC} +# +# source://elftools//lib/elftools/constants.rb#667 ELFTools::Constants::SHT::SHT_HIPROC = T.let(T.unsafe(nil), Integer) + +# see {SHT_LOUSER} +# +# source://elftools//lib/elftools/constants.rb#671 ELFTools::Constants::SHT::SHT_HIUSER = T.let(T.unsafe(nil), Integer) + +# array of initialization functions +# +# source://elftools//lib/elftools/constants.rb#583 ELFTools::Constants::SHT::SHT_INIT_ARRAY = T.let(T.unsafe(nil), Integer) + +# Values between {SHT_LOOS} and {SHT_HIOS} are reserved for operating system-specific semantics. +# +# source://elftools//lib/elftools/constants.rb#591 ELFTools::Constants::SHT::SHT_LOOS = T.let(T.unsafe(nil), Integer) + +# Values between {SHT_LOPROC} and {SHT_HIPROC} are reserved for processor-specific semantics. +# +# source://elftools//lib/elftools/constants.rb#608 ELFTools::Constants::SHT::SHT_LOPROC = T.let(T.unsafe(nil), Integer) + +# Values between {SHT_LOUSER} and {SHT_HIUSER} are reserved for application programs. +# +# source://elftools//lib/elftools/constants.rb#670 ELFTools::Constants::SHT::SHT_LOUSER = T.let(T.unsafe(nil), Integer) + +# ABI related flags +# +# source://elftools//lib/elftools/constants.rb#658 ELFTools::Constants::SHT::SHT_MIPS_ABIFLAGS = T.let(T.unsafe(nil), Integer) + +# source://elftools//lib/elftools/constants.rb#639 ELFTools::Constants::SHT::SHT_MIPS_AUXSYM = T.let(T.unsafe(nil), Integer) + +# list of symbols whose definitions conflict with shared objects +# +# source://elftools//lib/elftools/constants.rb#622 ELFTools::Constants::SHT::SHT_MIPS_CONFLICT = T.let(T.unsafe(nil), Integer) + +# description of contents of another section +# +# source://elftools//lib/elftools/constants.rb#631 ELFTools::Constants::SHT::SHT_MIPS_CONTENT = T.let(T.unsafe(nil), Integer) + +# register usage information +# +# source://elftools//lib/elftools/constants.rb#625 ELFTools::Constants::SHT::SHT_MIPS_DEBUG = T.let(T.unsafe(nil), Integer) + +# delta C++ class table +# +# source://elftools//lib/elftools/constants.rb#646 ELFTools::Constants::SHT::SHT_MIPS_DELTACLASS = T.let(T.unsafe(nil), Integer) + +# delta C++ declarations +# +# source://elftools//lib/elftools/constants.rb#648 ELFTools::Constants::SHT::SHT_MIPS_DELTADECL = T.let(T.unsafe(nil), Integer) + +# delta C++ instance table +# +# source://elftools//lib/elftools/constants.rb#645 ELFTools::Constants::SHT::SHT_MIPS_DELTAINST = T.let(T.unsafe(nil), Integer) + +# delta C++ symbol table +# +# source://elftools//lib/elftools/constants.rb#644 ELFTools::Constants::SHT::SHT_MIPS_DELTASYM = T.let(T.unsafe(nil), Integer) + +# source://elftools//lib/elftools/constants.rb#636 ELFTools::Constants::SHT::SHT_MIPS_DENSE = T.let(T.unsafe(nil), Integer) + +# DWARF debugging section +# +# source://elftools//lib/elftools/constants.rb#647 ELFTools::Constants::SHT::SHT_MIPS_DWARF = T.let(T.unsafe(nil), Integer) + +# C++ exception handling region info +# +# source://elftools//lib/elftools/constants.rb#656 ELFTools::Constants::SHT::SHT_MIPS_EH_REGION = T.let(T.unsafe(nil), Integer) + +# events section +# +# source://elftools//lib/elftools/constants.rb#650 ELFTools::Constants::SHT::SHT_MIPS_EVENTS = T.let(T.unsafe(nil), Integer) + +# source://elftools//lib/elftools/constants.rb#635 ELFTools::Constants::SHT::SHT_MIPS_EXTSYM = T.let(T.unsafe(nil), Integer) + +# source://elftools//lib/elftools/constants.rb#634 ELFTools::Constants::SHT::SHT_MIPS_FDESC = T.let(T.unsafe(nil), Integer) + +# global pointer table +# +# source://elftools//lib/elftools/constants.rb#623 ELFTools::Constants::SHT::SHT_MIPS_GPTAB = T.let(T.unsafe(nil), Integer) + +# interface information +# +# source://elftools//lib/elftools/constants.rb#630 ELFTools::Constants::SHT::SHT_MIPS_IFACE = T.let(T.unsafe(nil), Integer) + +# set of dynamic shared objects +# +# source://elftools//lib/elftools/constants.rb#620 ELFTools::Constants::SHT::SHT_MIPS_LIBLIST = T.let(T.unsafe(nil), Integer) + +# source://elftools//lib/elftools/constants.rb#642 ELFTools::Constants::SHT::SHT_MIPS_LINE = T.let(T.unsafe(nil), Integer) + +# source://elftools//lib/elftools/constants.rb#641 ELFTools::Constants::SHT::SHT_MIPS_LOCSTR = T.let(T.unsafe(nil), Integer) + +# source://elftools//lib/elftools/constants.rb#638 ELFTools::Constants::SHT::SHT_MIPS_LOCSYM = T.let(T.unsafe(nil), Integer) + +# source://elftools//lib/elftools/constants.rb#621 ELFTools::Constants::SHT::SHT_MIPS_MSYM = T.let(T.unsafe(nil), Integer) + +# miscellaneous options +# +# source://elftools//lib/elftools/constants.rb#632 ELFTools::Constants::SHT::SHT_MIPS_OPTIONS = T.let(T.unsafe(nil), Integer) + +# source://elftools//lib/elftools/constants.rb#640 ELFTools::Constants::SHT::SHT_MIPS_OPTSYM = T.let(T.unsafe(nil), Integer) + +# source://elftools//lib/elftools/constants.rb#627 ELFTools::Constants::SHT::SHT_MIPS_PACKAGE = T.let(T.unsafe(nil), Integer) + +# source://elftools//lib/elftools/constants.rb#628 ELFTools::Constants::SHT::SHT_MIPS_PACKSYM = T.let(T.unsafe(nil), Integer) + +# source://elftools//lib/elftools/constants.rb#637 ELFTools::Constants::SHT::SHT_MIPS_PDESC = T.let(T.unsafe(nil), Integer) + +# runtime procedure descriptor table exception information +# +# source://elftools//lib/elftools/constants.rb#657 ELFTools::Constants::SHT::SHT_MIPS_PDR_EXCEPTION = T.let(T.unsafe(nil), Integer) + +# source://elftools//lib/elftools/constants.rb#652 ELFTools::Constants::SHT::SHT_MIPS_PIXIE = T.let(T.unsafe(nil), Integer) + +# section contains register usage information +# +# source://elftools//lib/elftools/constants.rb#626 ELFTools::Constants::SHT::SHT_MIPS_REGINFO = T.let(T.unsafe(nil), Integer) + +# source://elftools//lib/elftools/constants.rb#629 ELFTools::Constants::SHT::SHT_MIPS_RELD = T.let(T.unsafe(nil), Integer) + +# source://elftools//lib/elftools/constants.rb#643 ELFTools::Constants::SHT::SHT_MIPS_RFDESC = T.let(T.unsafe(nil), Integer) + +# source://elftools//lib/elftools/constants.rb#633 ELFTools::Constants::SHT::SHT_MIPS_SHDR = T.let(T.unsafe(nil), Integer) + +# list of libraries the binary depends on +# +# source://elftools//lib/elftools/constants.rb#649 ELFTools::Constants::SHT::SHT_MIPS_SYMBOL_LIB = T.let(T.unsafe(nil), Integer) + +# source://elftools//lib/elftools/constants.rb#651 ELFTools::Constants::SHT::SHT_MIPS_TRANSLATE = T.let(T.unsafe(nil), Integer) + +# microcode information +# +# source://elftools//lib/elftools/constants.rb#624 ELFTools::Constants::SHT::SHT_MIPS_UCODE = T.let(T.unsafe(nil), Integer) + +# intermediate code +# +# source://elftools//lib/elftools/constants.rb#655 ELFTools::Constants::SHT::SHT_MIPS_WHIRL = T.let(T.unsafe(nil), Integer) + +# GNU style symbol hash table with xlat +# +# source://elftools//lib/elftools/constants.rb#659 ELFTools::Constants::SHT::SHT_MIPS_XHASH = T.let(T.unsafe(nil), Integer) + +# address translation table +# +# source://elftools//lib/elftools/constants.rb#653 ELFTools::Constants::SHT::SHT_MIPS_XLATE = T.let(T.unsafe(nil), Integer) + +# SGI internal address translation table +# +# source://elftools//lib/elftools/constants.rb#654 ELFTools::Constants::SHT::SHT_MIPS_XLATE_DEBUG = T.let(T.unsafe(nil), Integer) + +# section occupies no space +# +# source://elftools//lib/elftools/constants.rb#579 ELFTools::Constants::SHT::SHT_NOBITS = T.let(T.unsafe(nil), Integer) + +# section for notes +# +# source://elftools//lib/elftools/constants.rb#578 ELFTools::Constants::SHT::SHT_NOTE = T.let(T.unsafe(nil), Integer) + +# null section +# +# source://elftools//lib/elftools/constants.rb#571 ELFTools::Constants::SHT::SHT_NULL = T.let(T.unsafe(nil), Integer) + +# source://elftools//lib/elftools/constants.rb#665 ELFTools::Constants::SHT::SHT_ORDERED = T.let(T.unsafe(nil), Integer) + +# array of functions that are invoked before all other initialization functions +# +# source://elftools//lib/elftools/constants.rb#585 ELFTools::Constants::SHT::SHT_PREINIT_ARRAY = T.let(T.unsafe(nil), Integer) + +# information defined by program itself +# +# source://elftools//lib/elftools/constants.rb#572 ELFTools::Constants::SHT::SHT_PROGBITS = T.let(T.unsafe(nil), Integer) + +# relocation +# +# source://elftools//lib/elftools/constants.rb#580 ELFTools::Constants::SHT::SHT_REL = T.let(T.unsafe(nil), Integer) + +# relocation with addends +# +# source://elftools//lib/elftools/constants.rb#575 ELFTools::Constants::SHT::SHT_RELA = T.let(T.unsafe(nil), Integer) + +# RELR relative relocations +# +# source://elftools//lib/elftools/constants.rb#588 ELFTools::Constants::SHT::SHT_RELR = T.let(T.unsafe(nil), Integer) + +# reserved +# +# source://elftools//lib/elftools/constants.rb#581 ELFTools::Constants::SHT::SHT_SHLIB = T.let(T.unsafe(nil), Integer) + +# source://elftools//lib/elftools/constants.rb#610 ELFTools::Constants::SHT::SHT_SPARC_GOTDATA = T.let(T.unsafe(nil), Integer) + +# string table section +# +# source://elftools//lib/elftools/constants.rb#574 ELFTools::Constants::SHT::SHT_STRTAB = T.let(T.unsafe(nil), Integer) + +# versions defined by file +# +# source://elftools//lib/elftools/constants.rb#599 ELFTools::Constants::SHT::SHT_SUNW_verdef = T.let(T.unsafe(nil), Integer) + +# versions needed by file +# +# source://elftools//lib/elftools/constants.rb#601 ELFTools::Constants::SHT::SHT_SUNW_verneed = T.let(T.unsafe(nil), Integer) + +# symbol versions +# +# source://elftools//lib/elftools/constants.rb#603 ELFTools::Constants::SHT::SHT_SUNW_versym = T.let(T.unsafe(nil), Integer) + +# symbol table section +# +# source://elftools//lib/elftools/constants.rb#573 ELFTools::Constants::SHT::SHT_SYMTAB = T.let(T.unsafe(nil), Integer) + +# indices for SHN_XINDEX entries +# +# source://elftools//lib/elftools/constants.rb#587 ELFTools::Constants::SHT::SHT_SYMTAB_SHNDX = T.let(T.unsafe(nil), Integer) + +# x86_64 unwind information +# +# source://elftools//lib/elftools/constants.rb#618 ELFTools::Constants::SHT::SHT_X86_64_UNWIND = T.let(T.unsafe(nil), Integer) + +# Symbol binding from Sym st_info field. +# +# source://elftools//lib/elftools/constants.rb#676 module ELFTools::Constants::STB; end + +# Global symbol +# +# source://elftools//lib/elftools/constants.rb#678 ELFTools::Constants::STB::STB_GLOBAL = T.let(T.unsafe(nil), Integer) + +# Unique symbol. +# +# source://elftools//lib/elftools/constants.rb#682 ELFTools::Constants::STB::STB_GNU_UNIQUE = T.let(T.unsafe(nil), Integer) + +# End of OS-specific +# +# source://elftools//lib/elftools/constants.rb#683 ELFTools::Constants::STB::STB_HIOS = T.let(T.unsafe(nil), Integer) + +# End of processor-specific +# +# source://elftools//lib/elftools/constants.rb#685 ELFTools::Constants::STB::STB_HIPROC = T.let(T.unsafe(nil), Integer) + +# Local symbol +# +# source://elftools//lib/elftools/constants.rb#677 ELFTools::Constants::STB::STB_LOCAL = T.let(T.unsafe(nil), Integer) + +# Start of OS-specific +# +# source://elftools//lib/elftools/constants.rb#681 ELFTools::Constants::STB::STB_LOOS = T.let(T.unsafe(nil), Integer) + +# Start of processor-specific +# +# source://elftools//lib/elftools/constants.rb#684 ELFTools::Constants::STB::STB_LOPROC = T.let(T.unsafe(nil), Integer) + +# Number of defined types. +# +# source://elftools//lib/elftools/constants.rb#680 ELFTools::Constants::STB::STB_NUM = T.let(T.unsafe(nil), Integer) + +# Weak symbol +# +# source://elftools//lib/elftools/constants.rb#679 ELFTools::Constants::STB::STB_WEAK = T.let(T.unsafe(nil), Integer) + +# Symbol types from Sym st_info field. +# +# source://elftools//lib/elftools/constants.rb#690 module ELFTools::Constants::STT; end + +# ARM: a THUMB label. +# +# source://elftools//lib/elftools/constants.rb#718 ELFTools::Constants::STT::STT_ARM_16BIT = T.let(T.unsafe(nil), Integer) + +# ARM: a THUMB function. This is not defined in ARM ELF Specification but +# used by the GNU tool-chain. +# +# source://elftools//lib/elftools/constants.rb#717 ELFTools::Constants::STT::STT_ARM_TFUNC = T.let(T.unsafe(nil), Integer) + +# Symbol is a common data object +# +# source://elftools//lib/elftools/constants.rb#696 ELFTools::Constants::STT::STT_COMMON = T.let(T.unsafe(nil), Integer) + +# Symbol's name is file name +# +# source://elftools//lib/elftools/constants.rb#695 ELFTools::Constants::STT::STT_FILE = T.let(T.unsafe(nil), Integer) + +# Symbol is a code object +# +# source://elftools//lib/elftools/constants.rb#693 ELFTools::Constants::STT::STT_FUNC = T.let(T.unsafe(nil), Integer) + +# GNU extension: symbol value points to a function which is called +# at runtime to determine the final value of the symbol. +# +# source://elftools//lib/elftools/constants.rb#704 ELFTools::Constants::STT::STT_GNU_IFUNC = T.let(T.unsafe(nil), Integer) + +# End of OS-specific +# +# source://elftools//lib/elftools/constants.rb#707 ELFTools::Constants::STT::STT_HIOS = T.let(T.unsafe(nil), Integer) + +# End of processor-specific +# +# source://elftools//lib/elftools/constants.rb#709 ELFTools::Constants::STT::STT_HIPROC = T.let(T.unsafe(nil), Integer) + +# Start of OS-specific +# +# source://elftools//lib/elftools/constants.rb#706 ELFTools::Constants::STT::STT_LOOS = T.let(T.unsafe(nil), Integer) + +# Start of processor-specific +# +# source://elftools//lib/elftools/constants.rb#708 ELFTools::Constants::STT::STT_LOPROC = T.let(T.unsafe(nil), Integer) + +# Symbol type is unspecified +# +# source://elftools//lib/elftools/constants.rb#691 ELFTools::Constants::STT::STT_NOTYPE = T.let(T.unsafe(nil), Integer) + +# Deprecated. +# +# source://elftools//lib/elftools/constants.rb#698 ELFTools::Constants::STT::STT_NUM = T.let(T.unsafe(nil), Integer) + +# Symbol is a data object +# +# source://elftools//lib/elftools/constants.rb#692 ELFTools::Constants::STT::STT_OBJECT = T.let(T.unsafe(nil), Integer) + +# Complex relocation expression +# +# source://elftools//lib/elftools/constants.rb#699 ELFTools::Constants::STT::STT_RELC = T.let(T.unsafe(nil), Integer) + +# Symbol associated with a section +# +# source://elftools//lib/elftools/constants.rb#694 ELFTools::Constants::STT::STT_SECTION = T.let(T.unsafe(nil), Integer) + +# The section type that must be used for register symbols on +# Sparc. These symbols initialize a global register. +# +# source://elftools//lib/elftools/constants.rb#713 ELFTools::Constants::STT::STT_SPARC_REGISTER = T.let(T.unsafe(nil), Integer) + +# Signed Complex relocation expression +# +# source://elftools//lib/elftools/constants.rb#700 ELFTools::Constants::STT::STT_SRELC = T.let(T.unsafe(nil), Integer) + +# Symbol is thread-local data object +# +# source://elftools//lib/elftools/constants.rb#697 ELFTools::Constants::STT::STT_TLS = T.let(T.unsafe(nil), Integer) +# Define common methods for dynamic sections and dynamic segments. +# +# @note This module can only be included by {ELFTools::Sections::DynamicSection} +# and {ELFTools::Segments::DynamicSegment} because methods here assume some +# attributes exist. +# +# source://elftools//lib/elftools/dynamic.rb#10 module ELFTools::Dynamic + # Iterate all tags. + # + # @note This method assume the following methods already exist: + # header + # tag_start + # @return [Enumerator, Array] If block is not given, an enumerator will be returned. + # Otherwise, return array of tags. + # @yieldparam tag [ELFTools::Dynamic::Tag] + # + # source://elftools//lib/elftools/dynamic.rb#21 def each_tags(&block); end + + # Get the +n+-th tag. + # + # Tags are lazy loaded. + # + # @note This method assume the following methods already exist: + # header + # tag_start + # @note We cannot do bound checking of +n+ here since the only way to get size + # of tags is calling +tags.size+. + # @param n [Integer] The index. + # @return [ELFTools::Dynamic::Tag] The desired tag. + # + # source://elftools//lib/elftools/dynamic.rb#93 def tag_at(n); end + + # Get a tag of specific type. + # + # @example + # dynamic = elf.segment_by_type(:dynamic) + # # type as integer + # dynamic.tag_by_type(0) # the null tag + # #=> #0, :d_val=>0}> + # dynamic.tag_by_type(ELFTools::Constants::DT_NULL) + # #=> #0, :d_val=>0}> + # + # # symbol + # dynamic.tag_by_type(:null) + # #=> #0, :d_val=>0}> + # dynamic.tag_by_type(:pltgot) + # #=> #3, :d_val=>6295552}> + # + # # string + # dynamic.tag_by_type('null') + # #=> #0, :d_val=>0}> + # dynamic.tag_by_type('DT_PLTGOT') + # #=> #3, :d_val=>6295552}> + # @param type [Integer, Symbol, String] Constant value, symbol, or string of type + # is acceptable. See examples for more information. + # @return [ELFTools::Dynamic::Tag] The desired tag. + # + # source://elftools//lib/elftools/dynamic.rb#64 def tag_by_type(type); end + + # Use {#tags} to get all tags. + # + # @return [Array] Array of tags. + # + # source://elftools//lib/elftools/dynamic.rb#36 def tags; end + + # Get tags of specific type. + # + # @param type [Integer, Symbol, String] Constant value, symbol, or string of type + # is acceptable. See examples for more information. + # @return [Array] The desired tags. + # @see #tag_by_type + # + # source://elftools//lib/elftools/dynamic.rb#76 def tags_by_type(type); end private + # source://elftools//lib/elftools/dynamic.rb#108 def endian; end + + # Get the DT_STRTAB's +d_val+ offset related to file. + # + # source://elftools//lib/elftools/dynamic.rb#113 def str_offset; end end +# A tag class. +# +# source://elftools//lib/elftools/dynamic.rb#119 class ELFTools::Dynamic::Tag + # Instantiate a {ELFTools::Dynamic::Tag} object. + # + # @param header [ELF_Dyn] The dynamic tag header. + # @param stream [#pos=, #read] Streaming object. + # @param str_offset [Method] Call this method to get the string offset related + # to file. + # @return [Tag] a new instance of Tag + # + # source://elftools//lib/elftools/dynamic.rb#129 def initialize(header, stream, str_offset); end + # @return [ELFTools::Structs::ELF_Dyn] The dynamic tag header. + # + # source://elftools//lib/elftools/dynamic.rb#120 def header; end + + # Return the name of this tag. + # + # Only tags with name would return a name. + # Others would return +nil+. + # + # @return [String, nil] The name. + # + # source://elftools//lib/elftools/dynamic.rb#171 def name; end + + # Is this tag has a name? + # + # The criteria here is if this tag's type is in {TYPE_WITH_NAME}. + # + # @return [Boolean] Is this tag has a name. + # + # source://elftools//lib/elftools/dynamic.rb#162 def name?; end + + # @return [#pos=, #read] Streaming object. + # + # source://elftools//lib/elftools/dynamic.rb#121 def stream; end + + # Return the content of this tag records. + # + # For normal tags, this method just return + # +header.d_val+. For tags with +header.d_val+ + # in meaning of string offset (e.g. DT_NEEDED), this method would + # return the string it specified. + # Tags with type in {TYPE_WITH_NAME} are those tags with name. + # + # @example + # dynamic = elf.segment_by_type(:dynamic) + # dynamic.tag_by_type(:init).value + # #=> 4195600 # 0x400510 + # dynamic.tag_by_type(:needed).value + # #=> 'libc.so.6' + # @return [Integer, String] The content this tag records. + # + # source://elftools//lib/elftools/dynamic.rb#154 def value; end end +# Some dynamic have name. +# +# source://elftools//lib/elftools/dynamic.rb#136 ELFTools::Dynamic::Tag::TYPE_WITH_NAME = T.let(T.unsafe(nil), Array) + +# Raised on invalid ELF class (EI_CLASS). +# +# source://elftools//lib/elftools/exceptions.rb#11 class ELFTools::ELFClassError < ::ELFTools::ELFError; end + +# Raised on invalid ELF data encoding (EI_DATA). +# +# source://elftools//lib/elftools/exceptions.rb#14 class ELFTools::ELFDataError < ::ELFTools::ELFError; end + +# Being raised when parsing error. +# +# source://elftools//lib/elftools/exceptions.rb#5 class ELFTools::ELFError < ::StandardError; end +# The main class for using elftools. +# +# source://elftools//lib/elftools/elf_file.rb#12 class ELFTools::ELFFile + # Instantiate an {ELFFile} object. + # + # @example + # ELFFile.new(File.open('/bin/cat')) + # #=> #> + # @param stream [#pos=, #read] The +File+ object to be fetch information from. + # @return [ELFFile] a new instance of ELFFile + # + # source://elftools//lib/elftools/elf_file.rb#24 def initialize(stream); end + # Return the BuildID of ELF. + # + # @example + # elf.build_id + # #=> '73ab62cb7bc9959ce053c2b711322158708cdc07' + # @return [String, nil] BuildID in hex form will be returned. + # +nil+ is returned if the .note.gnu.build-id section + # is not found. + # + # source://elftools//lib/elftools/elf_file.rb#52 def build_id; end + + # Iterate all sections. + # + # All sections are lazy loading, the section + # only be created whenever accessing it. + # This method is useful for {#section_by_name} + # since not all sections need to be created. + # + # @return [Enumerator, Array] As +Array#each+, if block is not given, a enumerator will be returned, + # otherwise, the whole sections will be returned. + # @yieldparam section [ELFTools::Sections::Section] A section. + # @yieldreturn [void] + # + # source://elftools//lib/elftools/elf_file.rb#122 def each_sections(&block); end + + # Iterate all segments. + # + # All segments are lazy loading, the segment + # only be created whenever accessing it. + # This method is useful for {#segment_by_type} + # since not all segments need to be created. + # + # @return [Array] Whole segments will be returned. + # @yieldparam segment [ELFTools::Segments::Segment] A segment. + # @yieldreturn [void] + # + # source://elftools//lib/elftools/elf_file.rb#195 def each_segments(&block); end + + # @return [Integer] 32 or 64. + # + # source://elftools//lib/elftools/elf_file.rb#14 def elf_class; end + + # Return the ELF type according to +e_type+. + # + # @example + # ELFFile.new(File.open('spec/files/libc.so.6')).elf_type + # #=> 'DYN' + # ELFFile.new(File.open('spec/files/amd64.elf')).elf_type + # #=> 'EXEC' + # @return [String] Type in string format. + # + # source://elftools//lib/elftools/elf_file.rb#82 def elf_type; end + + # @return [Symbol] +:little+ or +:big+. + # + # source://elftools//lib/elftools/elf_file.rb#15 def endian; end + + # Return the file header. + # + # Lazy loading. + # + # @return [ELFTools::Structs::ELF_Ehdr] The header. + # + # source://elftools//lib/elftools/elf_file.rb#35 def header; end + + # Get machine architecture. + # + # Mappings of architecture can be found + # in {ELFTools::Constants::EM.mapping}. + # + # @example + # elf.machine + # #=> 'Advanced Micro Devices X86-64' + # @return [String] Name of architecture. + # + # source://elftools//lib/elftools/elf_file.rb#71 def machine; end + + # Number of sections in this file. + # + # @example + # elf.num_sections + # #=> 29 + # @return [Integer] The desired number. + # + # source://elftools//lib/elftools/elf_file.rb#93 def num_sections; end + + # Number of segments in this file. + # + # @return [Integer] The desited number. + # + # source://elftools//lib/elftools/elf_file.rb#181 def num_segments; end + + # Get the offset related to file, given virtual memory address. + # + # This method should work no matter ELF is a PIE or not. + # This method refers from (actually equals to) binutils/readelf.c#offset_from_vma. + # + # @example + # elf = ELFTools::ELFFile.new(File.open('/bin/cat')) + # elf.offset_from_vma(0x401337) + # #=> 4919 # 0x1337 + # @param vma [Integer] The virtual address to be queried. + # @return [Integer] Related file offset. + # + # source://elftools//lib/elftools/elf_file.rb#293 def offset_from_vma(vma, size = T.unsafe(nil)); end + + # The patch status. + # + # @return [Hash{Integer => String}] + # + # source://elftools//lib/elftools/elf_file.rb#301 def patches; end + + # Apply patches and save as +filename+. + # + # @param filename [String] + # @return [void] + # + # source://elftools//lib/elftools/elf_file.rb#315 def save(filename); end + + # Acquire the +n+-th section, 0-based. + # + # Sections are lazy loaded. + # + # @param n [Integer] The index. + # @return [ELFTools::Sections::Section, nil] The target section. + # If +n+ is out of bound, +nil+ is returned. + # + # source://elftools//lib/elftools/elf_file.rb#144 def section_at(n); end + + # Acquire the section named as +name+. + # + # @example + # elf.section_by_name('.note.gnu.build-id') + # #=> # + # elf.section_by_name('') + # #=> # + # elf.section_by_name('no such section') + # #=> nil + # @param name [String] The desired section name. + # @return [ELFTools::Sections::Section, nil] The target section. + # + # source://elftools//lib/elftools/elf_file.rb#107 def section_by_name(name); end + + # Simply use {#sections} to get all sections. + # + # @return [Array] Whole sections. + # + # source://elftools//lib/elftools/elf_file.rb#133 def sections; end + + # Fetch all sections with specific type. + # + # The available types are listed in {ELFTools::Constants::PT}. + # This method accept giving block. + # + # @example + # elf = ELFTools::ELFFile.new(File.open('spec/files/amd64.elf')) + # elf.sections_by_type(:rela) + # #=> [#, + # # #] + # @param type [Integer, Symbol, String] The type needed, similar format as {#segment_by_type}. + # @return [Array] The target sections. + # @yieldparam section [ELFTools::Sections::Section] A section in specific type. + # @yieldreturn [void] + # + # source://elftools//lib/elftools/elf_file.rb#163 def sections_by_type(type, &block); end + + # Acquire the +n+-th segment, 0-based. + # + # Segments are lazy loaded. + # + # @param n [Integer] The index. + # @return [ELFTools::Segments::Segment, nil] The target segment. + # If +n+ is out of bound, +nil+ is returned. + # + # source://elftools//lib/elftools/elf_file.rb#278 def segment_at(n); end + + # Get the first segment with +p_type=type+. + # The available types are listed in {ELFTools::Constants::PT}. + # + # @example + # # type as an integer + # elf.segment_by_type(ELFTools::Constants::PT_NOTE) + # #=> # + # + # elf.segment_by_type(4) # PT_NOTE + # #=> # + # + # # type as a symbol + # elf.segment_by_type(:PT_NOTE) + # #=> # + # + # # you can do this + # elf.segment_by_type(:note) # will be transformed into `PT_NOTE` + # #=> # + # + # # type as a string + # elf.segment_by_type('PT_NOTE') + # #=> # + # + # # this is ok + # elf.segment_by_type('note') # will be tranformed into `PT_NOTE` + # #=> # + # @example + # elf.segment_by_type(1337) + # # ArgumentError: No constants in Constants::PT is 1337 + # + # elf.segment_by_type('oao') + # # ArgumentError: No constants in Constants::PT named "PT_OAO" + # @example + # elf.segment_by_type(0) + # #=> nil # no such segment exists + # @note This method will return the first segment found, + # to found all segments with specific type you can use {#segments_by_type}. + # @param type [Integer, Symbol, String] See examples for clear usage. + # @return [ELFTools::Segments::Segment] The target segment. + # + # source://elftools//lib/elftools/elf_file.rb#251 def segment_by_type(type); end + + # Simply use {#segments} to get all segments. + # + # @return [Array] Whole segments. + # + # source://elftools//lib/elftools/elf_file.rb#206 def segments; end + + # Fetch all segments with specific type. + # + # If you want to find only one segment, + # use {#segment_by_type} instead. + # This method accept giving block. + # + # @param type [Integer, Symbol, String] The type needed, same format as {#segment_by_type}. + # @return [Array] The target segments. + # @yieldparam segment [ELFTools::Segments::Segment] A segment in specific type. + # @yieldreturn [void] + # + # source://elftools//lib/elftools/elf_file.rb#266 def segments_by_type(type, &block); end + + # @return [#pos=, #read] The +File+ object. + # + # source://elftools//lib/elftools/elf_file.rb#13 def stream; end + + # Get the string table section. + # + # This section is acquired by using the +e_shstrndx+ + # in ELF header. + # + # @return [ELFTools::Sections::StrTabSection] The desired section. + # + # source://elftools//lib/elftools/elf_file.rb#173 def strtab_section; end private + # source://elftools//lib/elftools/elf_file.rb#359 def create_section(n); end + + # source://elftools//lib/elftools/elf_file.rb#370 def create_segment(n); end + + # @raise [ELFMagicError] + # + # source://elftools//lib/elftools/elf_file.rb#339 def identify; end + + # bad idea.. + # + # source://elftools//lib/elftools/elf_file.rb#327 def loaded_headers; end end +# Raised on invalid ELF magic. +# +# source://elftools//lib/elftools/exceptions.rb#8 class ELFTools::ELFMagicError < ::ELFTools::ELFError; end +# A helper class for {ELFTools} easy to implement +# 'lazy loading' objects. +# Mainly used when loading sections, segments, and +# symbols. +# +# source://elftools//lib/elftools/lazy_array.rb#29 class ELFTools::LazyArray < ::SimpleDelegator + # Instantiate a {LazyArray} object. + # + # @example + # arr = LazyArray.new(10) { |i| p "calc #{i}"; i * i } + # p arr[2] + # # "calc 2" + # # 4 + # + # p arr[3] + # # "calc 3" + # # 9 + # + # p arr[3] + # # 9 + # @param size [Integer] The size of array. + # @return [LazyArray] a new instance of LazyArray + # @yieldparam i [Integer] Needs the +i+-th element. + # @yieldreturn [Object] Value of the +i+-th element. + # + # source://elftools//lib/elftools/lazy_array.rb#30 def initialize(size, &block); end + # To access elements like a normal array. + # + # Elements are lazy loaded at the first time + # access it. + # + # @return [Object] The element, returned type is the + # return type of block given in {#initialize}. + # + # source://elftools//lib/elftools/lazy_array.rb#42 def [](i); end end +# Since both note sections and note segments refer to notes, this module +# defines common methods for {ELFTools::Sections::NoteSection} and +# {ELFTools::Segments::NoteSegment}. +# +# @note This module can only be included in {ELFTools::Sections::NoteSection} and +# {ELFTools::Segments::NoteSegment} since some methods here assume some +# attributes already exist. +# +# source://elftools//lib/elftools/note.rb#15 module ELFTools::Note + # Iterate all notes in a note section or segment. + # + # Structure of notes are: + # +---------------+ + # | Note 1 header | + # +---------------+ + # | Note 1 name | + # +---------------+ + # | Note 1 desc | + # +---------------+ + # | Note 2 header | + # +---------------+ + # | ... | + # +---------------+ + # + # @note This method assume following methods exist: + # stream + # note_start + # note_total_size + # @return [Enumerator, Array] If block is not given, an enumerator will be returned. + # Otherwise, return the array of notes. + # + # source://elftools//lib/elftools/note.rb#44 def each_notes; end + + # Simply +#notes+ to get all notes. + # + # @return [Array] Whole notes. + # + # source://elftools//lib/elftools/note.rb#67 def notes; end private + # source://elftools//lib/elftools/note.rb#81 def create_note(cur); end + + # Get the endian. + # + # @note This method assume method +header+ exists. + # @return [Symbol] +:little+ or +:big+. + # + # source://elftools//lib/elftools/note.rb#77 def endian; end end +# Class of a note. +# +# source://elftools//lib/elftools/note.rb#87 class ELFTools::Note::Note + # Instantiate a {ELFTools::Note::Note} object. + # + # @param header [ELF_Nhdr] The note header. + # @param stream [#pos=, #read] Streaming object. + # @param offset [Integer] Start address of this note, includes the header. + # @return [Note] a new instance of Note + # + # source://elftools//lib/elftools/note.rb#97 def initialize(header, stream, offset); end + # Description of this note. + # + # @return [String] The description. + # + # source://elftools//lib/elftools/note.rb#114 def desc; end + + # Description of this note. + # If someone likes to use full name. + # + # @return [String] The description. + # + # source://elftools//lib/elftools/note.rb#114 def description; end + + # @return [ELFTools::Structs::ELF_Nhdr] Note header. + # + # source://elftools//lib/elftools/note.rb#88 def header; end + + # Name of this note. + # + # @return [String] The name. + # + # source://elftools//lib/elftools/note.rb#105 def name; end + + # @return [Integer] Address of this note start, includes note header. + # + # source://elftools//lib/elftools/note.rb#90 def offset; end + + # @return [#pos=, #read] Streaming object. + # + # source://elftools//lib/elftools/note.rb#89 def stream; end end +# Since size of {ELFTools::Structs::ELF_Nhdr} will not change no matter in +# what endian and what arch, we can do this here. This value should equal +# to 12. +# +# source://elftools//lib/elftools/note.rb#19 ELFTools::Note::SIZE_OF_NHDR = T.let(T.unsafe(nil), Integer) +# A relocation entry. +# +# Can be either a REL or RELA relocation. +# XXX: move this to an independent file? +# +# source://elftools//lib/elftools/sections/relocation_section.rb#77 class ELFTools::Relocation + # Instantiate a {Relocation} object. + # + # @return [Relocation] a new instance of Relocation + # + # source://elftools//lib/elftools/sections/relocation_section.rb#82 def initialize(header, stream); end + # @return [ELFTools::Structs::ELF_Rel, ELFTools::Structs::ELF_Rela] Rel(a) header. + # + # source://elftools//lib/elftools/sections/relocation_section.rb#78 def header; end + + # +r_info+ contains sym and type, use two methods + # to access them easier. + # + # @return [Integer] sym infor. + # + # source://elftools//lib/elftools/sections/relocation_section.rb#90 def r_info_sym; end + + # +r_info+ contains sym and type, use two methods + # to access them easier. + # + # @return [Integer] type infor. + # + # source://elftools//lib/elftools/sections/relocation_section.rb#98 def r_info_type; end + + # @return [#pos=, #read] Streaming object. + # + # source://elftools//lib/elftools/sections/relocation_section.rb#79 def stream; end + + # +r_info+ contains sym and type, use two methods + # to access them easier. + # + # @return [Integer] sym infor. + # + # source://elftools//lib/elftools/sections/relocation_section.rb#90 def symbol_index; end + + # +r_info+ contains sym and type, use two methods + # to access them easier. + # + # @return [Integer] type infor. + # + # source://elftools//lib/elftools/sections/relocation_section.rb#98 def type; end private + # source://elftools//lib/elftools/sections/relocation_section.rb#105 def mask_bit; end end +# Defines different types of sections in this module. +# +# source://elftools//lib/elftools/sections/section.rb#5 module ELFTools::Sections; end +# Class for dynamic table section. +# +# This section should always be named .dynamic. +# This class knows how to get the list of dynamic tags. +# +# source://elftools//lib/elftools/sections/dynamic_section.rb#12 class ELFTools::Sections::DynamicSection < ::ELFTools::Sections::Section include ::ELFTools::Dynamic + # Get the start address of tags. + # + # @return [Integer] Start address of tags. + # + # source://elftools//lib/elftools/sections/dynamic_section.rb#17 def tag_start; end end +# Class of note section. +# Note section records notes +# +# source://elftools//lib/elftools/sections/note_section.rb#11 class ELFTools::Sections::NoteSection < ::ELFTools::Sections::Section include ::ELFTools::Note + # Address offset of notes start. + # + # @return [Integer] The offset. + # + # source://elftools//lib/elftools/sections/note_section.rb#16 def note_start; end + + # The total size of notes in this section. + # + # @return [Integer] The size. + # + # source://elftools//lib/elftools/sections/note_section.rb#22 def note_total_size; end end +# Class of null section. +# Null section is for specific the end +# of linked list (+sh_link+) between sections. +# +# source://elftools//lib/elftools/sections/null_section.rb#12 class ELFTools::Sections::NullSection < ::ELFTools::Sections::Section + # Is this a null section? + # + # @return [Boolean] Yes it is. + # + # source://elftools//lib/elftools/sections/null_section.rb#13 def null?; end end +# Class of note section. +# Note section records notes +# +# source://elftools//lib/elftools/sections/relocation_section.rb#13 class ELFTools::Sections::RelocationSection < ::ELFTools::Sections::Section + # Iterate all relocations. + # + # All relocations are lazy loading, the relocation + # only be created whenever accessing it. + # + # @return [Enumerator, Array] If block is not given, an enumerator will be returned. + # Otherwise, the whole relocations will be returned. + # @yieldparam rel [ELFTools::Relocation] A relocation object. + # @yieldreturn [void] + # + # source://elftools//lib/elftools/sections/relocation_section.rb#45 def each_relocations(&block); end + + # Number of relocations in this section. + # + # @return [Integer] The number. + # + # source://elftools//lib/elftools/sections/relocation_section.rb#20 def num_relocations; end + + # Is this relocation a RELA or REL type. + # + # @return [Boolean] If is RELA. + # + # source://elftools//lib/elftools/sections/relocation_section.rb#14 def rela?; end + + # Acquire the +n+-th relocation, 0-based. + # + # relocations are lazy loaded. + # + # @param n [Integer] The index. + # @return [ELFTools::Relocation, nil] The target relocation. + # If +n+ is out of bound, +nil+ is returned. + # + # source://elftools//lib/elftools/sections/relocation_section.rb#31 def relocation_at(n); end + + # Simply use {#relocations} to get all relocations. + # + # @return [Array] Whole relocations. + # + # source://elftools//lib/elftools/sections/relocation_section.rb#56 def relocations; end private + # source://elftools//lib/elftools/sections/relocation_section.rb#62 def create_relocation(n); end end +# Base class of sections. +# +# source://elftools//lib/elftools/sections/section.rb#7 class ELFTools::Sections::Section + # Instantiate a {Section} object. + # + # @param header [ELFTools::Structs::ELF_Shdr] The section header object. + # @param stream [#pos=, #read] The streaming object for further dump. + # @param strtab [ELFTools::Sections::StrTabSection, Proc] The string table object. For fetching section names. + # If +Proc+ if given, it will call at the first + # time access +#name+. + # @param offset_from_vma [Method] The method to get offset of file, given virtual memory address. + # @return [Section] a new instance of Section + # + # source://elftools//lib/elftools/sections/section.rb#22 def initialize(header, stream, offset_from_vma: T.unsafe(nil), strtab: T.unsafe(nil), **_kwargs); end + # Fetch data of this section. + # + # @return [String] Data. + # + # source://elftools//lib/elftools/sections/section.rb#44 def data; end + + # @return [ELFTools::Structs::ELF_Shdr] Section header. + # + # source://elftools//lib/elftools/sections/section.rb#8 def header; end + + # Get name of this section. + # + # @return [String] The name. + # + # source://elftools//lib/elftools/sections/section.rb#38 def name; end + + # Is this a null section? + # + # @return [Boolean] No it's not. + # + # source://elftools//lib/elftools/sections/section.rb#51 def null?; end + + # @return [#pos=, #read] Streaming object. + # + # source://elftools//lib/elftools/sections/section.rb#9 def stream; end + + # Return +header.sh_type+ in a simplier way. + # + # @return [Integer] The type, meaning of types are defined in {Constants::SHT}. + # + # source://elftools//lib/elftools/sections/section.rb#32 def type; end class << self + # Use different class according to +header.sh_type+. + # + # @param header [ELFTools::Structs::ELF_Shdr] Section header. + # @param stream [#pos=, #read] Streaming object. + # @return [ELFTools::Sections::Section] Return object dependes on +header.sh_type+. + # + # source://elftools//lib/elftools/sections/sections.rb#24 def create(header, stream, *args, **kwargs); end end end +# Class of string table section. +# Usually for section .strtab and .dynstr, +# which record names. +# +# source://elftools//lib/elftools/sections/str_tab_section.rb#15 class ELFTools::Sections::StrTabSection < ::ELFTools::Sections::Section + # Return the section or symbol name. + # + # @param offset [Integer] Usually from +shdr.sh_name+ or +sym.st_name+. + # @return [String] The name without null bytes. + # + # source://elftools//lib/elftools/sections/str_tab_section.rb#16 def name_at(offset); end end +# Class of symbol table section. +# Usually for section .symtab and .dynsym, +# which will refer to symbols in ELF file. +# +# source://elftools//lib/elftools/sections/sym_tab_section.rb#20 class ELFTools::Sections::SymTabSection < ::ELFTools::Sections::Section + # Instantiate a {SymTabSection} object. + # There's a +section_at+ lambda for {SymTabSection} + # to easily fetch other sections. + # + # @param header [ELFTools::Structs::ELF_Shdr] See {Section#initialize} for more information. + # @param stream [#pos=, #read] See {Section#initialize} for more information. + # @param section_at [Proc] The method for fetching other sections by index. + # This lambda should be {ELFTools::ELFFile#section_at}. + # @return [SymTabSection] a new instance of SymTabSection + # + # source://elftools//lib/elftools/sections/sym_tab_section.rb#21 def initialize(header, stream, section_at: T.unsafe(nil), **_kwargs); end + # Iterate all symbols. + # + # All symbols are lazy loading, the symbol + # only be created whenever accessing it. + # This method is useful for {#symbol_by_name} + # since not all symbols need to be created. + # + # @return [Enumerator, Array] If block is not given, an enumerator will be returned. + # Otherwise return array of symbols. + # @yieldparam sym [ELFTools::Sections::Symbol] A symbol object. + # @yieldreturn [void] + # + # source://elftools//lib/elftools/sections/sym_tab_section.rb#59 def each_symbols(&block); end + + # Number of symbols. + # + # @example + # symtab.num_symbols + # #=> 75 + # @return [Integer] The number. + # + # source://elftools//lib/elftools/sections/sym_tab_section.rb#32 def num_symbols; end + + # Acquire the +n+-th symbol, 0-based. + # + # Symbols are lazy loaded. + # + # @param n [Integer] The index. + # @return [ELFTools::Sections::Symbol, nil] The target symbol. + # If +n+ is out of bound, +nil+ is returned. + # + # source://elftools//lib/elftools/sections/sym_tab_section.rb#43 def symbol_at(n); end + + # Get symbol by its name. + # + # @param name [String] The name of symbol. + # @return [ELFTools::Sections::Symbol] Desired symbol. + # + # source://elftools//lib/elftools/sections/sym_tab_section.rb#78 def symbol_by_name(name); end + + # Simply use {#symbols} to get all symbols. + # + # @return [Array] The whole symbols. + # + # source://elftools//lib/elftools/sections/sym_tab_section.rb#70 def symbols; end + + # Return the symbol string section. + # Lazy loaded. + # + # @return [ELFTools::Sections::StrTabSection] The string table section. + # + # source://elftools//lib/elftools/sections/sym_tab_section.rb#85 def symstr; end private + # source://elftools//lib/elftools/sections/sym_tab_section.rb#91 def create_symbol(n); end end +# Class of symbol. +# +# XXX: Should this class be defined in an independent file? +# +# source://elftools//lib/elftools/sections/sym_tab_section.rb#102 class ELFTools::Sections::Symbol + # Instantiate a {ELFTools::Sections::Symbol} object. + # + # @param header [ELFTools::Structs::ELF32_sym, ELFTools::Structs::ELF64_sym] The symbol header. + # @param stream [#pos=, #read] The streaming object. + # @param symstr [ELFTools::Sections::StrTabSection, Proc] The symbol string section. + # If +Proc+ is given, it will be called at the first time + # access {Symbol#name}. + # @return [Symbol] a new instance of Symbol + # + # source://elftools//lib/elftools/sections/sym_tab_section.rb#114 def initialize(header, stream, symstr: T.unsafe(nil)); end + # @return [ELFTools::Structs::ELF32_sym, ELFTools::Structs::ELF64_sym] Section header. + # + # source://elftools//lib/elftools/sections/sym_tab_section.rb#103 def header; end + + # Return the symbol name. + # + # @return [String] The name. + # + # source://elftools//lib/elftools/sections/sym_tab_section.rb#122 def name; end + + # @return [#pos=, #read] Streaming object. + # + # source://elftools//lib/elftools/sections/sym_tab_section.rb#104 def stream; end end +# Module for defining different types of segments. +# +# source://elftools//lib/elftools/segments/segment.rb#4 module ELFTools::Segments; end +# Class for dynamic table segment. +# +# This class knows how to get the list of dynamic tags. +# +# source://elftools//lib/elftools/segments/dynamic_segment.rb#11 class ELFTools::Segments::DynamicSegment < ::ELFTools::Segments::Segment include ::ELFTools::Dynamic + # Get the start address of tags. + # + # @return [Integer] Start address of tags. + # + # source://elftools//lib/elftools/segments/dynamic_segment.rb#15 def tag_start; end end +# For DT_INTERP segment, knows how to get path of +# ELF interpreter. +# +# source://elftools//lib/elftools/segments/interp_segment.rb#14 class ELFTools::Segments::InterpSegment < ::ELFTools::Segments::Segment + # Get the path of interpreter. + # + # @example + # interp_segment.interp_name + # #=> '/lib64/ld-linux-x86-64.so.2' + # @return [String] Path to the interpreter. + # + # source://elftools//lib/elftools/segments/interp_segment.rb#15 def interp_name; end end +# For DT_LOAD segment. +# Able to query between file offset and virtual memory address. +# +# source://elftools//lib/elftools/segments/load_segment.rb#12 class ELFTools::Segments::LoadSegment < ::ELFTools::Segments::Segment + # Returns the start of this segment. + # + # @return [Integer] The file offset. + # + # source://elftools//lib/elftools/segments/load_segment.rb#13 def file_head; end + + # Returns the end of this segment. + # + # @return [Integer] The file offset. + # + # source://elftools//lib/elftools/segments/load_segment.rb#27 def file_tail; end + + # Returns the start virtual address of this segment. + # + # @return [Integer] The vma. + # + # source://elftools//lib/elftools/segments/load_segment.rb#34 def mem_head; end + + # Returns size in memory. + # + # @return [Integer] The size. + # + # source://elftools//lib/elftools/segments/load_segment.rb#41 def mem_size; end + + # Returns the end virtual address of this segment. + # + # @return [Integer] The vma. + # + # source://elftools//lib/elftools/segments/load_segment.rb#48 def mem_tail; end + + # Query if the given file offset located in this segment. + # + # @param offset [Integer] File offset. + # @param size [Integer] Size. + # @return [Boolean] + # + # source://elftools//lib/elftools/segments/load_segment.rb#58 def offset_in?(offset, size = T.unsafe(nil)); end + + # Convert file offset into virtual memory address. + # + # @param offset [Integer] File offset. + # @return [Integer] + # + # source://elftools//lib/elftools/segments/load_segment.rb#66 def offset_to_vma(offset); end + + # Returns size in file. + # + # @return [Integer] The size. + # + # source://elftools//lib/elftools/segments/load_segment.rb#20 def size; end + + # Query if the given virtual memory address located in this segment. + # + # @param vma [Integer] Virtual memory address. + # @param size [Integer] Size. + # @return [Boolean] + # + # source://elftools//lib/elftools/segments/load_segment.rb#77 def vma_in?(vma, size = T.unsafe(nil)); end + + # Convert virtual memory address into file offset. + # + # @param vma [Integer] Virtual memory address. + # @return [Integer] + # + # source://elftools//lib/elftools/segments/load_segment.rb#86 def vma_to_offset(vma); end end +# Class of note segment. +# +# source://elftools//lib/elftools/segments/note_segment.rb#10 class ELFTools::Segments::NoteSegment < ::ELFTools::Segments::Segment include ::ELFTools::Note + # Address offset of notes start. + # + # @return [Integer] The offset. + # + # source://elftools//lib/elftools/segments/note_segment.rb#15 def note_start; end + + # The total size of notes in this segment. + # + # @return [Integer] The size. + # + # source://elftools//lib/elftools/segments/note_segment.rb#21 def note_total_size; end end +# Base class of segments. +# +# source://elftools//lib/elftools/segments/segment.rb#6 class ELFTools::Segments::Segment + # Instantiate a {Segment} object. + # + # @param header [ELFTools::Structs::ELF32_Phdr, ELFTools::Structs::ELF64_Phdr] Program header. + # @param stream [#pos=, #read] Streaming object. + # @param offset_from_vma [Method] The method to get offset of file, given virtual memory address. + # @return [Segment] a new instance of Segment + # + # source://elftools//lib/elftools/segments/segment.rb#17 def initialize(header, stream, offset_from_vma: T.unsafe(nil)); end + # The content in this segment. + # + # @return [String] The content. + # + # source://elftools//lib/elftools/segments/segment.rb#32 def data; end + + # Is this segment executable? + # + # @return [Boolean] Ture or false. + # + # source://elftools//lib/elftools/segments/segment.rb#51 def executable?; end + + # @return [ELFTools::Structs::ELF32_Phdr, ELFTools::Structs::ELF64_Phdr] Program header. + # + # source://elftools//lib/elftools/segments/segment.rb#7 def header; end + + # Is this segment readable? + # + # @return [Boolean] Ture or false. + # + # source://elftools//lib/elftools/segments/segment.rb#39 def readable?; end + + # @return [#pos=, #read] Streaming object. + # + # source://elftools//lib/elftools/segments/segment.rb#8 def stream; end + + # Return +header.p_type+ in a simplier way. + # + # @return [Integer] The type, meaning of types are defined in {Constants::PT}. + # + # source://elftools//lib/elftools/segments/segment.rb#26 def type; end + + # Is this segment writable? + # + # @return [Boolean] Ture or false. + # + # source://elftools//lib/elftools/segments/segment.rb#45 def writable?; end class << self + # Use different class according to +header.p_type+. + # + # @param header [ELFTools::Structs::ELF32_Phdr, ELFTools::Structs::ELF64_Phdr] Program header of a segment. + # @param stream [#pos=, #read] Streaming object. + # @return [ELFTools::Segments::Segment] Return object dependes on +header.p_type+. + # + # source://elftools//lib/elftools/segments/segments.rb#22 def create(header, stream, *args, **kwargs); end end end +# Define ELF related structures in this module. +# +# Structures are fetched from https://github.com/torvalds/linux/blob/master/include/uapi/linux/elf.h. +# Use gem +bindata+ to have these structures support 32/64 bits and little/big endian simultaneously. +# +# source://elftools//lib/elftools/structs.rb#10 module ELFTools::Structs; end +# Program header structure for 32-bit. +# +# source://elftools//lib/elftools/structs.rb#123 class ELFTools::Structs::ELF32_Phdr < ::ELFTools::Structs::ELFStruct class << self + # source://bindata/2.4.15/lib/bindata/base.rb#53 def inherited(subclass); end + + # source://bindata/2.4.15/lib/bindata/dsl.rb#279 def new(*args); end end end +# Symbol structure for 32-bit. +# +# source://elftools//lib/elftools/structs.rb#155 class ELFTools::Structs::ELF32_sym < ::ELFTools::Structs::ELFStruct class << self + # source://bindata/2.4.15/lib/bindata/base.rb#53 def inherited(subclass); end + + # source://bindata/2.4.15/lib/bindata/dsl.rb#279 def new(*args); end end end +# Program header structure for 64-bit. +# +# source://elftools//lib/elftools/structs.rb#136 class ELFTools::Structs::ELF64_Phdr < ::ELFTools::Structs::ELFStruct class << self + # source://bindata/2.4.15/lib/bindata/base.rb#53 def inherited(subclass); end + + # source://bindata/2.4.15/lib/bindata/dsl.rb#279 def new(*args); end end end +# Symbol structure for 64-bit. +# +# source://elftools//lib/elftools/structs.rb#166 class ELFTools::Structs::ELF64_sym < ::ELFTools::Structs::ELFStruct class << self + # source://bindata/2.4.15/lib/bindata/base.rb#53 def inherited(subclass); end + + # source://bindata/2.4.15/lib/bindata/dsl.rb#279 def new(*args); end end end +# The base structure to define common methods. +# +# source://elftools//lib/elftools/structs.rb#13 class ELFTools::Structs::ELFStruct < ::BinData::Record + # @return [Integer] 32 or 64. + # + # source://elftools//lib/elftools/structs.rb#18 def elf_class; end + + # @return [Integer] 32 or 64. + # + # source://elftools//lib/elftools/structs.rb#18 def elf_class=(_arg0); end + + # @return [Integer] The file offset of this header. + # + # source://elftools//lib/elftools/structs.rb#19 def offset; end + + # @return [Integer] The file offset of this header. + # + # source://elftools//lib/elftools/structs.rb#19 def offset=(_arg0); end + + # Records which fields have been patched. + # + # @return [Hash{Integer => Integer}] Patches. + # + # source://elftools//lib/elftools/structs.rb#23 def patches; end + + # BinData hash(Snapshot) that behaves like HashWithIndifferentAccess + # + # source://bindata/2.4.15/lib/bindata/struct.rb#106 def to_h; end class << self + # source://bindata/2.4.15/lib/bindata/base.rb#53 def inherited(subclass); end + + # Hooks the constructor. + # + # +BinData::Record+ doesn't allow us to override +#initialize+, so we hack +new+ here. + # + # source://elftools//lib/elftools/structs.rb#34 def new(*args); end + + # Packs an integer to string. + # + # @param val [Integer] + # @param bytes [Integer] + # @raise [ArgumentError] + # @return [String] + # + # source://elftools//lib/elftools/structs.rb#64 def pack(val, bytes); end + + # Gets the endianness of current class. + # + # @return [:little, :big] The endianness. + # + # source://elftools//lib/elftools/structs.rb#56 def self_endian; end end end +# DRY. Many fields have different type in different arch. +# +# source://elftools//lib/elftools/structs.rb#14 ELFTools::Structs::ELFStruct::CHOICE_SIZE_T = T.let(T.unsafe(nil), Proc) +# Dynamic tag header. +# +# source://elftools//lib/elftools/structs.rb#191 class ELFTools::Structs::ELF_Dyn < ::ELFTools::Structs::ELFStruct class << self + # source://bindata/2.4.15/lib/bindata/base.rb#53 def inherited(subclass); end + + # source://bindata/2.4.15/lib/bindata/dsl.rb#279 def new(*args); end end end +# ELF header structure. +# +# source://elftools//lib/elftools/structs.rb#80 class ELFTools::Structs::ELF_Ehdr < ::ELFTools::Structs::ELFStruct class << self + # source://bindata/2.4.15/lib/bindata/base.rb#53 def inherited(subclass); end + + # source://bindata/2.4.15/lib/bindata/dsl.rb#279 def new(*args); end end end +# Note header. +# +# source://elftools//lib/elftools/structs.rb#183 class ELFTools::Structs::ELF_Nhdr < ::ELFTools::Structs::ELFStruct class << self + # source://bindata/2.4.15/lib/bindata/base.rb#53 def inherited(subclass); end + + # source://bindata/2.4.15/lib/bindata/dsl.rb#279 def new(*args); end end end +# Gets the class of program header according to bits. +# +# source://elftools//lib/elftools/structs.rb#149 ELFTools::Structs::ELF_Phdr = T.let(T.unsafe(nil), Hash) +# Rel header in .rel section. +# +# source://elftools//lib/elftools/structs.rb#200 class ELFTools::Structs::ELF_Rel < ::ELFTools::Structs::ELFStruct + # Compatibility with ELF_Rela, both can be used interchangeably + # + # source://elftools//lib/elftools/structs.rb#206 def r_addend; end class << self + # source://bindata/2.4.15/lib/bindata/base.rb#53 def inherited(subclass); end + + # source://bindata/2.4.15/lib/bindata/dsl.rb#279 def new(*args); end end end +# Rela header in .rela section. +# +# source://elftools//lib/elftools/structs.rb#212 class ELFTools::Structs::ELF_Rela < ::ELFTools::Structs::ELFStruct class << self + # source://bindata/2.4.15/lib/bindata/base.rb#53 def inherited(subclass); end + + # source://bindata/2.4.15/lib/bindata/dsl.rb#279 def new(*args); end end end +# Section header structure. +# +# source://elftools//lib/elftools/structs.rb#108 class ELFTools::Structs::ELF_Shdr < ::ELFTools::Structs::ELFStruct class << self + # source://bindata/2.4.15/lib/bindata/base.rb#53 def inherited(subclass); end + + # source://bindata/2.4.15/lib/bindata/dsl.rb#279 def new(*args); end end end +# Get symbol header class according to bits. +# +# source://elftools//lib/elftools/structs.rb#177 ELFTools::Structs::ELF_sym = T.let(T.unsafe(nil), Hash) +# Define some util methods. +# +# source://elftools//lib/elftools/util.rb#5 module ELFTools::Util extend ::ELFTools::Util::ClassMethods end +# Class methods. +# +# source://elftools//lib/elftools/util.rb#7 module ELFTools::Util::ClassMethods + # Round up the number to be mulitple of + # +2**bit+. + # + # @example + # align(10, 1) #=> 10 + # align(10, 2) #=> 12 + # align(10, 3) #=> 16 + # align(10, 4) #=> 16 + # align(10, 5) #=> 32 + # @param num [Integer] Number to be rounded-up. + # @param bit [Integer] How many bit to be aligned. + # @return [Integer] See examples. + # + # source://elftools//lib/elftools/util.rb#19 def align(num, bit); end + + # Read from stream until reach a null-byte. + # + # @example + # Util.cstring(File.open('/bin/cat'), 0) + # #=> "\x7FELF\x02\x01\x01" + # @param stream [#pos=, #read] Streaming object + # @param offset [Integer] Start from here. + # @return [String] Result string will never contain null byte. + # + # source://elftools//lib/elftools/util.rb#61 def cstring(stream, offset); end + + # Select objects from enumerator with +.type+ property + # equals to +type+. + # + # Different from naive +Array#select+ is this method + # will yield block whenever find a desired object. + # + # This method is used to simplify the same logic in methods + # {ELFFile#sections_by_type}, {ELFFile#segments_by_type}, etc. + # + # @param enum [Enumerator] An enumerator for further select. + # @param type [Object] The type you want. + # @return [Array] The return value will be objects in +enum+ with attribute + # +.type+ equals to +type+. + # + # source://elftools//lib/elftools/util.rb#88 def select_by_type(enum, type); end + + # Fetch the correct value from module +mod+. + # + # See {ELFTools::ELFFile#segment_by_type} for how to + # use this method. + # + # @param mod [Module] The module defined constant numbers. + # @param val [Integer, Symbol, String] Desired value. + # @raise [ArgumentError] + # @return [Integer] Currently this method always return a value + # from {ELFTools::Constants}. + # + # source://elftools//lib/elftools/util.rb#36 def to_constant(mod, val); end end +# Current gem version +# +# source://elftools//lib/elftools/version.rb#5 ELFTools::VERSION = T.let(T.unsafe(nil), String) diff --git a/Library/Homebrew/sorbet/rbi/gems/erubi@1.12.0.rbi b/Library/Homebrew/sorbet/rbi/gems/erubi@1.12.0.rbi new file mode 100644 index 00000000000000..44d28c69cec872 --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/gems/erubi@1.12.0.rbi @@ -0,0 +1,146 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `erubi` gem. +# Please instead update this file by running `bin/tapioca gem erubi`. + +# source://erubi//lib/erubi.rb#3 +module Erubi + class << self + # source://erubi//lib/erubi.rb#35 + def h(value); end + end +end + +# source://erubi//lib/erubi.rb#54 +class Erubi::Engine + # Initialize a new Erubi::Engine. Options: + # +:bufval+ :: The value to use for the buffer variable, as a string (default '::String.new'). + # +:bufvar+ :: The variable name to use for the buffer variable, as a string. + # +:chain_appends+ :: Whether to chain << calls to the buffer variable. Offers better + # performance, but can cause issues when the buffer variable is reassigned during + # template rendering (default +false+). + # +:ensure+ :: Wrap the template in a begin/ensure block restoring the previous value of bufvar. + # +:escapefunc+ :: The function to use for escaping, as a string (default: '::Erubi.h'). + # +:escape+ :: Whether to make <%= escape by default, and <%== not escape by default. + # +:escape_html+ :: Same as +:escape+, with lower priority. + # +:filename+ :: The filename for the template. + # the resulting source code. Note this may cause problems if you are wrapping the resulting + # source code in other code, because the magic comment only has an effect at the beginning of + # the file, and having the magic comment later in the file can trigger warnings. + # +:freeze_template_literals+ :: Whether to suffix all literal strings for template code with .freeze + # (default: +true+ on Ruby 2.1+, +false+ on Ruby 2.0 and older). + # Can be set to +false+ on Ruby 2.3+ when frozen string literals are enabled + # in order to improve performance. + # +:literal_prefix+ :: The prefix to output when using escaped tag delimiters (default '<%'). + # +:literal_postfix+ :: The postfix to output when using escaped tag delimiters (default '%>'). + # +:outvar+ :: Same as +:bufvar+, with lower priority. + # +:postamble+ :: The postamble for the template, by default returns the resulting source code. + # +:preamble+ :: The preamble for the template, by default initializes the buffer variable. + # +:regexp+ :: The regexp to use for scanning. + # +:src+ :: The initial value to use for the source code, an empty string by default. + # +:trim+ :: Whether to trim leading and trailing whitespace, true by default. + # + # @return [Engine] a new instance of Engine + # + # source://erubi//lib/erubi.rb#94 + def initialize(input, properties = T.unsafe(nil)); end + + # The variable name used for the buffer variable. + # + # source://erubi//lib/erubi.rb#65 + def bufvar; end + + # The filename of the template, if one was given. + # + # source://erubi//lib/erubi.rb#62 + def filename; end + + # The frozen ruby source code generated from the template, which can be evaled. + # + # source://erubi//lib/erubi.rb#59 + def src; end + + private + + # Add ruby code to the template + # + # source://erubi//lib/erubi.rb#226 + def add_code(code); end + + # Add the given ruby expression result to the template, + # escaping it based on the indicator given and escape flag. + # + # source://erubi//lib/erubi.rb#235 + def add_expression(indicator, code); end + + # Add the result of Ruby expression to the template + # + # source://erubi//lib/erubi.rb#244 + def add_expression_result(code); end + + # Add the escaped result of Ruby expression to the template + # + # source://erubi//lib/erubi.rb#249 + def add_expression_result_escaped(code); end + + # Add the given postamble to the src. Can be overridden in subclasses + # to make additional changes to src that depend on the current state. + # + # source://erubi//lib/erubi.rb#255 + def add_postamble(postamble); end + + # Add raw text to the template. Modifies argument if argument is mutable as a memory optimization. + # Must be called with a string, cannot be called with nil (Rails's subclass depends on it). + # + # source://erubi//lib/erubi.rb#213 + def add_text(text); end + + # Raise an exception, as the base engine class does not support handling other indicators. + # + # @raise [ArgumentError] + # + # source://erubi//lib/erubi.rb#261 + def handle(indicator, code, tailch, rspace, lspace); end + + # Make sure that any current expression has been terminated. + # The default is to terminate all expressions, but when + # the chain_appends option is used, expressions may not be + # terminated. + # + # source://erubi//lib/erubi.rb#289 + def terminate_expression; end + + # Make sure the buffer variable is the target of the next append + # before yielding to the block. Mark that the buffer is the target + # of the next append after the block executes. + # + # This method should only be called if the block will result in + # code where << will append to the bufvar. + # + # source://erubi//lib/erubi.rb#271 + def with_buffer; end +end + +# The default regular expression used for scanning. +# +# source://erubi//lib/erubi.rb#56 +Erubi::Engine::DEFAULT_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://erubi//lib/erubi.rb#17 +Erubi::FREEZE_TEMPLATE_LITERALS = T.let(T.unsafe(nil), TrueClass) + +# source://erubi//lib/erubi.rb#15 +Erubi::MATCH_METHOD = T.let(T.unsafe(nil), Symbol) + +# source://erubi//lib/erubi.rb#8 +Erubi::RANGE_FIRST = T.let(T.unsafe(nil), Integer) + +# source://erubi//lib/erubi.rb#9 +Erubi::RANGE_LAST = T.let(T.unsafe(nil), Integer) + +# source://erubi//lib/erubi.rb#16 +Erubi::SKIP_DEFINED_FOR_INSTANCE_VARIABLE = T.let(T.unsafe(nil), TrueClass) + +# source://erubi//lib/erubi.rb#4 +Erubi::VERSION = T.let(T.unsafe(nil), String) diff --git a/Library/Homebrew/sorbet/rbi/gems/hana@1.3.7.rbi b/Library/Homebrew/sorbet/rbi/gems/hana@1.3.7.rbi index 042aa1baf1a3f9..3b036aba947ee0 100644 --- a/Library/Homebrew/sorbet/rbi/gems/hana@1.3.7.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/hana@1.3.7.rbi @@ -4,63 +4,154 @@ # This is an autogenerated file for types exported from the `hana` gem. # Please instead update this file by running `bin/tapioca gem hana`. +# source://hana//lib/hana.rb#3 module Hana; end +# source://hana//lib/hana.rb#56 class Hana::Patch + # @return [Patch] a new instance of Patch + # + # source://hana//lib/hana.rb#88 def initialize(is); end + # source://hana//lib/hana.rb#94 def apply(doc); end private + # @raise [MissingTargetException] + # + # source://hana//lib/hana.rb#107 def add(ins, doc); end + + # source://hana//lib/hana.rb#223 def add_op(dest, key, obj); end + + # @raise [ObjectOperationOnArrayException] + # + # source://hana//lib/hana.rb#214 def check_index(obj, key); end + + # @raise [MissingTargetException] + # + # source://hana//lib/hana.rb#144 def copy(ins, doc); end + + # source://hana//lib/hana.rb#202 def get_path(ins); end + + # @raise [MissingTargetException] + # + # source://hana//lib/hana.rb#128 def move(ins, doc); end + + # source://hana//lib/hana.rb#193 def remove(ins, doc); end + + # source://hana//lib/hana.rb#180 def replace(ins, doc); end + + # source://hana//lib/hana.rb#232 def rm_op(obj, key); end + + # source://hana//lib/hana.rb#170 def test(ins, doc); end end +# source://hana//lib/hana.rb#57 class Hana::Patch::Exception < ::StandardError; end + +# source://hana//lib/hana.rb#104 Hana::Patch::FROM = T.let(T.unsafe(nil), String) +# source://hana//lib/hana.rb#60 class Hana::Patch::FailedTestException < ::Hana::Patch::Exception + # @return [FailedTestException] a new instance of FailedTestException + # + # source://hana//lib/hana.rb#63 def initialize(path, value); end + # Returns the value of attribute path. + # + # source://hana//lib/hana.rb#61 def path; end + + # Sets the attribute path + # + # @param value the value to set the attribute path to. + # + # source://hana//lib/hana.rb#61 def path=(_arg0); end + + # Returns the value of attribute value. + # + # source://hana//lib/hana.rb#61 def value; end + + # Sets the attribute value + # + # @param value the value to set the attribute value to. + # + # source://hana//lib/hana.rb#61 def value=(_arg0); end end +# source://hana//lib/hana.rb#79 class Hana::Patch::IndexError < ::Hana::Patch::Exception; end + +# source://hana//lib/hana.rb#76 class Hana::Patch::InvalidObjectOperationException < ::Hana::Patch::Exception; end + +# source://hana//lib/hana.rb#85 class Hana::Patch::InvalidPath < ::Hana::Patch::Exception; end + +# source://hana//lib/hana.rb#82 class Hana::Patch::MissingTargetException < ::Hana::Patch::Exception; end + +# source://hana//lib/hana.rb#73 class Hana::Patch::ObjectOperationOnArrayException < ::Hana::Patch::Exception; end + +# source://hana//lib/hana.rb#70 class Hana::Patch::OutOfBoundsException < ::Hana::Patch::Exception; end + +# source://hana//lib/hana.rb#92 Hana::Patch::VALID = T.let(T.unsafe(nil), Hash) + +# source://hana//lib/hana.rb#105 Hana::Patch::VALUE = T.let(T.unsafe(nil), String) +# source://hana//lib/hana.rb#6 class Hana::Pointer include ::Enumerable + # @return [Pointer] a new instance of Pointer + # + # source://hana//lib/hana.rb#15 def initialize(path); end + # source://hana//lib/hana.rb#19 def each(&block); end + + # source://hana//lib/hana.rb#21 def eval(object); end class << self + # source://hana//lib/hana.rb#27 def eval(list, object); end + + # source://hana//lib/hana.rb#39 def parse(path); end end end +# source://hana//lib/hana.rb#25 Hana::Pointer::ESC = T.let(T.unsafe(nil), Hash) + +# source://hana//lib/hana.rb#9 class Hana::Pointer::Exception < ::StandardError; end + +# source://hana//lib/hana.rb#12 class Hana::Pointer::FormatError < ::Hana::Pointer::Exception; end + +# source://hana//lib/hana.rb#4 Hana::VERSION = T.let(T.unsafe(nil), String) diff --git a/Library/Homebrew/sorbet/rbi/gems/highline@2.0.3.rbi b/Library/Homebrew/sorbet/rbi/gems/highline@2.0.3.rbi index 87172a89cc86e0..47c5411cf19145 100644 --- a/Library/Homebrew/sorbet/rbi/gems/highline@2.0.3.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/highline@2.0.3.rbi @@ -4,628 +4,3137 @@ # This is an autogenerated file for types exported from the `highline` gem. # Please instead update this file by running `bin/tapioca gem highline`. -::RUBY19 = T.let(T.unsafe(nil), TrueClass) - +# A HighLine object is a "high-level line oriented" shell over an input and an +# output stream. HighLine simplifies common console interaction, effectively +# replacing {Kernel#puts} and {Kernel#gets}. User code can simply specify the +# question to ask and any details about user interaction, then leave the rest +# of the work to HighLine. When {HighLine#ask} returns, you'll have the answer +# you requested, even if HighLine had to ask many times, validate results, +# perform range checking, convert types, etc. +# +# @example Basic usage +# cli = HighLine.new +# answer = cli.ask "What do you think?" +# puts "You have answered: #{answer}" +# +# source://highline//lib/highline/terminal.rb#14 class HighLine include ::HighLine::BuiltinStyles include ::HighLine::CustomErrors extend ::HighLine::BuiltinStyles::ClassMethods extend ::SingleForwardable + # Create an instance of HighLine connected to the given _input_ + # and _output_ streams. + # + # @param input [IO] the default input stream for HighLine. + # @param output [IO] the default output stream for HighLine. + # @param wrap_at [Integer] all statements outputed through + # HighLine will be wrapped to this column size if set. + # @param page_at [Integer] page size and paginating. + # @param indent_size [Integer] indentation size in spaces. + # @param indent_level [Integer] how deep is indentated. + # @return [HighLine] a new instance of HighLine + # + # source://highline//lib/highline.rb#102 def initialize(input = T.unsafe(nil), output = T.unsafe(nil), wrap_at = T.unsafe(nil), page_at = T.unsafe(nil), indent_size = T.unsafe(nil), indent_level = T.unsafe(nil)); end + # A shortcut to HighLine.ask() a question that only accepts "yes" or "no" + # answers ("y" and "n" are allowed) and returns +true+ or +false+ + # (+true+ for "yes"). If provided a +true+ value, _character_ will cause + # HighLine to fetch a single character response. A block can be provided + # to further configure the question as in HighLine.ask() + # + # Raises EOFError if input is exhausted. + # + # @param yes_or_no_question [String] a question that accepts yes and no as + # answers + # @param character [Boolean, :getc] character mode to be passed to + # Question#character + # @see Question#character + # + # source://highline//lib/highline.rb#193 def agree(yes_or_no_question, character = T.unsafe(nil)); end + + # This method is the primary interface for user input. Just provide a + # _question_ to ask the user, the _answer_type_ you want returned, and + # optionally a code block setting up details of how you want the question + # handled. See {#say} for details on the format of _question_, and + # {Question} for more information about _answer_type_ and what's + # valid in the code block. + # + # Raises EOFError if input is exhausted. + # + # @param template_or_question [String, Question] what to ask + # @param answer_type [Class] to what class to convert the answer + # @param details to be passed to Question.new + # @return answer converted to the class in answer_type + # + # source://highline//lib/highline.rb#217 def ask(template_or_question, answer_type = T.unsafe(nil), &details); end + + # This method is HighLine's menu handler. For simple usage, you can just + # pass all the menu items you wish to display. At that point, choose() will + # build and display a menu, walk the user through selection, and return + # their choice among the provided items. You might use this in a case + # statement for quick and dirty menus. + # + # However, choose() is capable of much more. If provided, a block will be + # passed a HighLine::Menu object to configure. Using this method, you can + # customize all the details of menu handling from index display, to building + # a complete shell-like menuing system. See HighLine::Menu for all the + # methods it responds to. + # + # Raises EOFError if input is exhausted. + # + # @param items [Array] + # @param details [Proc] to be passed to Menu.new + # @return [String] answer + # + # source://highline//lib/highline.rb#245 def choose(*items, &details); end + + # This method provides easy access to ANSI color sequences, without the user + # needing to remember to CLEAR at the end of each sequence. Just pass the + # _string_ to color, followed by a list of _colors_ you would like it to be + # affected by. The _colors_ can be HighLine class constants, or symbols + # (:blue for BLUE, for example). A CLEAR will automatically be embedded to + # the end of the returned String. + # + # This method returns the original _string_ unchanged if use_color? + # is +false+. + # + # @example + # cli = HighLine.new + # cli.color("Sustainable", :green, :bold) + # # => "\e[32m\e[1mSustainable\e[0m" + # + # # As class method (delegating to HighLine.default_instance) + # HighLine.color("Sustainable", :green, :bold) + # @param string [String] string to be colored + # @param colors [Array] array of colors like [:red, :blue] + # @return [String] (ANSI escaped) colored string + # + # source://highline//lib/highline.rb#321 def color(string, *colors); end + + # In case you just want the color code, without the embedding and + # the CLEAR sequence. + # + # @example + # s = HighLine.Style(:red, :blue) + # s.code # => "\e[31m\e[34m" + # + # HighLine.color_code(:red, :blue) # => "\e[31m\e[34m" + # + # cli = HighLine.new + # cli.color_code(:red, :blue) # => "\e[31m\e[34m" + # @param colors [Array] + # @return [String] ANSI escape code for the given colors. + # + # source://highline//lib/highline.rb#341 def color_code(*colors); end + + # Get response each character per turn + # + # @param question [Question] + # @return [String] response + # + # source://highline//lib/highline.rb#607 def get_response_character_mode(question); end + + # Get response using #getc + # + # @param question [Question] + # @return [String] response + # + # source://highline//lib/highline.rb#597 def get_response_getc_mode(question); end + + # Get response one line at time + # + # @param question [Question] + # @return [String] response + # + # source://highline//lib/highline.rb#514 def get_response_line_mode(question); end + + # Executes block or outputs statement with indentation + # + # @param increase [Integer] how much to increase indentation + # @param statement [Statement, String] to be said + # @param multiline [Boolean] + # @return [void] + # @see #multi_indent + # + # source://highline//lib/highline.rb#431 def indent(increase = T.unsafe(nil), statement = T.unsafe(nil), multiline = T.unsafe(nil)); end + + # @return [Integer] The indentation level + # + # source://highline//lib/highline.rb#158 def indent_level; end + + # @return [Integer] The indentation level + # + # source://highline//lib/highline.rb#158 def indent_level=(_arg0); end + + # @return [Integer] The indentation size in characters + # + # source://highline//lib/highline.rb#155 def indent_size; end + + # @return [Integer] The indentation size in characters + # + # source://highline//lib/highline.rb#155 def indent_size=(_arg0); end + + # Outputs indentation with current settings + # + # source://highline//lib/highline.rb#419 def indentation; end + + # @return [IO] the default input stream for a HighLine instance + # + # source://highline//lib/highline.rb#161 def input; end + + # When gathering a Hash with {QuestionAsker#gather_hash}, + # it tracks the current key being asked. + # + # @todo We should probably move this into the HighLine::Question + # object. + # + # source://highline//lib/highline.rb#171 def key; end + + # When gathering a Hash with {QuestionAsker#gather_hash}, + # it tracks the current key being asked. + # + # @todo We should probably move this into the HighLine::Question + # object. + # + # source://highline//lib/highline.rb#171 def key=(_arg0); end + + # Renders a list of itens using a {ListRenderer} + # + # @param items [Array] + # @param mode [Symbol] + # @param option + # @return [String] + # @see ListRenderer#initialize ListRenderer#initialize for parameter details + # + # source://highline//lib/highline.rb#358 def list(items, mode = T.unsafe(nil), option = T.unsafe(nil)); end + + # @return [Boolean] Indentation over multiple lines + # + # source://highline//lib/highline.rb#152 def multi_indent; end + + # @return [Boolean] Indentation over multiple lines + # + # source://highline//lib/highline.rb#152 def multi_indent=(_arg0); end + + # Creates a new HighLine instance with the same options + # + # source://highline//lib/highline.rb#485 def new_scope; end + + # Outputs newline + # + # source://highline//lib/highline.rb#450 def newline; end + + # @return [IO] the default output stream for a HighLine instance + # + # source://highline//lib/highline.rb#164 def output; end + + # Returns the number of columns for the console, or a default it they cannot + # be determined. + # + # source://highline//lib/highline.rb#458 def output_cols; end + + # Returns the number of rows for the console, or a default if they cannot be + # determined. + # + # source://highline//lib/highline.rb#469 def output_rows; end + + # @return [Integer] The current row setting for paging output. + # + # source://highline//lib/highline.rb#149 def page_at; end + + # Set to an integer value to cause HighLine to page output lines over the + # indicated line limit. When +nil+, the default, no paging occurs. If + # set to :auto, HighLine will attempt to determine the rows available + # for the @output or use a sensible default. + # + # source://highline//lib/highline.rb#412 def page_at=(setting); end + + # Call #puts on the HighLine's output stream + # + # @param args [String] same args for Kernel#puts + # + # source://highline//lib/highline.rb#478 def puts(*args); end + + # Renders a statement using {HighLine::Statement} + # + # @param statement [String] any string + # @return [Statement] rendered statement + # + # source://highline//lib/highline.rb#392 def render_statement(statement); end + + # Resets the use of color. + # + # source://highline//lib/highline.rb#133 def reset_use_color; end + + # The basic output method for HighLine objects. If the provided _statement_ + # ends with a space or tab character, a newline will not be appended (output + # will be flush()ed). All other cases are passed straight to Kernel.puts(). + # + # The _statement_ argument is processed as an ERb template, supporting + # embedded Ruby code. The template is evaluated within a HighLine + # instance's binding for providing easy access to the ANSI color constants + # and the HighLine#color() method. + # + # @param statement [Statement, String] what to be said + # + # source://highline//lib/highline.rb#373 def say(statement); end + + # Convenience method to craft a lambda suitable for + # beind used in autocompletion operations by {#choose} + # + # @return [lambda] lambda to be used in autocompletion operations + # + # source://highline//lib/highline.rb#285 def shell_style_lambda(menu); end + + # System specific that responds to #initialize_system_extensions, + # #terminal_size, #raw_no_echo_mode, #restore_mode, #get_character. + # It polymorphically handles specific cases for different platforms. + # + # @return [HighLine::Terminal] + # + # source://highline//lib/highline.rb#177 def terminal; end + + # Pass +false+ to turn off HighLine's EOF tracking. + # + # source://highline//lib/highline.rb#138 def track_eof; end + + # Pass +false+ to turn off HighLine's EOF tracking. + # + # source://highline//lib/highline.rb#138 def track_eof=(_arg0); end + + # Returns true if HighLine is currently tracking EOF for input. + # + # @return [Boolean] + # + # source://highline//lib/highline.rb#141 def track_eof?; end + + # Remove color codes from a string. + # + # @param string [String] to be decolorized + # @return [String] without the ANSI escape sequence (colors) + # + # source://highline//lib/highline.rb#348 def uncolor(string); end + + # Set it to false to disable ANSI coloring + # + # source://highline//lib/highline.rb#125 def use_color; end + + # Set it to false to disable ANSI coloring + # + # source://highline//lib/highline.rb#125 def use_color=(_arg0); end + + # Returns truethy if HighLine instance is currently using color escapes. + # + # @return [Boolean] + # + # source://highline//lib/highline.rb#128 def use_color?; end + + # @return [Integer] The current column setting for wrapping output. + # + # source://highline//lib/highline.rb#146 def wrap_at; end + + # Set to an integer value to cause HighLine to wrap output lines at the + # indicated character limit. When +nil+, the default, no wrapping occurs. If + # set to :auto, HighLine will attempt to determine the columns + # available for the @output or use a sensible default. + # + # source://highline//lib/highline.rb#402 def wrap_at=(setting); end private + # source://highline//lib/highline.rb#628 def actual_length(text); end + + # Adds a layer of scope (new_scope) to ask a question inside a + # question, without destroying instance data + # + # source://highline//lib/highline.rb#494 def confirm(question); end + + # Check to see if there's already a HighLine.default_instance or if + # this is the first time the method is called (eg: at + # HighLine.default_instance initialization). + # If there's already one, copy use_color settings. + # This is here most to help migrate code from HighLine 1.7.x to 2.0.x + # + # @return [Boolean] + # + # source://highline//lib/highline.rb#639 def default_use_color; end + + # source://highline//lib/highline.rb#620 def erase_current_line; end + + # Read a line of input from the input stream and process whitespace as + # requested by the Question object. + # + # If Question's _readline_ property is set, that library will be used to + # fetch input. *WARNING*: This ignores the currently set input stream. + # + # Raises EOFError if input is exhausted. + # + # source://highline//lib/highline.rb#531 def get_line(question); end + + # source://highline//lib/highline.rb#535 def get_line_raw_no_echo_mode(question); end + + # source://highline//lib/highline.rb#575 def ignore_arrow_key; end + + # source://highline//lib/highline.rb#507 def last_answer(answers); end + + # @return [Boolean] + # + # source://highline//lib/highline.rb#586 def line_overflow_for_question?(line, question); end + + # source://highline//lib/highline.rb#590 def output_erase_char; end + + # source://highline//lib/highline.rb#581 def say_last_char_or_echo_char(line, question); end + + # source://highline//lib/highline.rb#566 def say_new_line_or_overwrite(question); end + + # A helper method used by HighLine::Question.verify_match + # for finding whether a list of answers match or differ + # from each other. + # + # source://highline//lib/highline.rb#503 def unique_answers(list); end class << self + # Returns a HighLine::String from any given String. + # + # @param s [String] + # @return [HighLine::String] from the given string. + # + # source://highline//lib/highline/string_extensions.rb#7 def String(s); end + + # Creates a style using {.find_or_create_style} or + # {.find_or_create_style_list} + # + # @param args [Array] style properties + # @return [Style] + # + # source://highline//lib/highline/style.rb#16 def Style(*args); end - def agree(*args, &block); end - def ask(*args, &block); end - def choose(*args, &block); end - def color(*args, &block); end - def color_code(*args, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def agree(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def ask(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def choose(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def color(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def color_code(*args, **_arg1, &block); end + + # Pass ColorScheme to set a HighLine color scheme. + # + # source://highline//lib/highline.rb#58 def color_scheme; end + + # Pass ColorScheme to set a HighLine color scheme. + # + # source://highline//lib/highline.rb#58 def color_scheme=(_arg0); end + + # Adds color support to the base String class + # + # source://highline//lib/highline/string_extensions.rb#127 def colorize_strings; end + + # Returns the value of attribute default_instance. + # + # source://highline//lib/highline.rb#55 def default_instance; end + + # Sets the attribute default_instance + # + # @param value the value to set the attribute default_instance to. + # + # source://highline//lib/highline.rb#55 def default_instance=(_arg0); end + + # Search for a Style with the given properties and return it. + # If there's no matched Style, it creates one. + # You can pass a Style, String or a Hash. + # + # @param arg [Style, String, Hash] style properties + # @return [Style] found or creted Style + # + # source://highline//lib/highline/style.rb#30 def find_or_create_style(arg); end + + # Find a Style list or create a new one. + # + # @example Creating a Style list of the combined RED and BOLD styles. + # style_list = HighLine.find_or_create_style_list(:red, :bold) + # @param args [Array] an Array of Symbols of each style + # that will be on the style list. + # @return [Style] Style list + # + # source://highline//lib/highline/style.rb#62 def find_or_create_style_list(*args); end + + # Reset HighLine to default. + # Clears Style index and resets color_scheme and use_color settings. + # + # source://highline//lib/highline.rb#72 def reset; end + + # Reset color scheme to default (+nil+) + # + # source://highline//lib/highline.rb#66 def reset_color_scheme; end - def reset_use_color(*args, &block); end - def say(*args, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def reset_use_color(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def say(*args, **_arg1, &block); end + + # For checking if the current version of HighLine supports RGB colors + # Usage: HighLine.supports_rgb_color? rescue false + # using rescue for compatibility with older versions + # Note: color usage also depends on HighLine.use_color being set + # TODO: Discuss removing this method + # + # @return [Boolean] + # + # source://highline//lib/highline.rb#83 def supports_rgb_color?; end - def track_eof=(*args, &block); end - def track_eof?(*args, &block); end - def uncolor(*args, &block); end - def use_color=(*args, &block); end - def use_color?(*args, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def track_eof=(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def track_eof?(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def uncolor(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def use_color=(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def use_color?(*args, **_arg1, &block); end + + # Returns +true+ if HighLine is currently using a color scheme. + # + # @return [Boolean] + # + # source://highline//lib/highline.rb#61 def using_color_scheme?; end end end +# Builtin Styles that are included at HighLine initialization. +# It has the basic styles like :bold and :underline. +# +# source://highline//lib/highline/builtin_styles.rb#6 module HighLine::BuiltinStyles mixes_in_class_methods ::HighLine::BuiltinStyles::ClassMethods class << self + # Included callback + # + # @param base [Class, Module] base class + # + # source://highline//lib/highline/builtin_styles.rb#9 def included(base); end end end +# The builtin styles basic colors like black, red, green. +# +# source://highline//lib/highline/builtin_styles.rb#69 HighLine::BuiltinStyles::BASIC_COLORS = T.let(T.unsafe(nil), Array) + +# source://highline//lib/highline/builtin_styles.rb#88 HighLine::BuiltinStyles::BLACK = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#65 HighLine::BuiltinStyles::BLACK_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#31 HighLine::BuiltinStyles::BLINK = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#32 HighLine::BuiltinStyles::BLINK_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#88 HighLine::BuiltinStyles::BLUE = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#65 HighLine::BuiltinStyles::BLUE_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#31 HighLine::BuiltinStyles::BOLD = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#32 HighLine::BuiltinStyles::BOLD_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#88 HighLine::BuiltinStyles::BRIGHT_BLACK = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#77 HighLine::BuiltinStyles::BRIGHT_BLACK_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#88 HighLine::BuiltinStyles::BRIGHT_BLUE = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#77 HighLine::BuiltinStyles::BRIGHT_BLUE_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#88 HighLine::BuiltinStyles::BRIGHT_CYAN = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#77 HighLine::BuiltinStyles::BRIGHT_CYAN_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#88 HighLine::BuiltinStyles::BRIGHT_GRAY = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#77 HighLine::BuiltinStyles::BRIGHT_GRAY_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#88 HighLine::BuiltinStyles::BRIGHT_GREEN = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#77 HighLine::BuiltinStyles::BRIGHT_GREEN_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#88 HighLine::BuiltinStyles::BRIGHT_GREY = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#77 HighLine::BuiltinStyles::BRIGHT_GREY_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#88 HighLine::BuiltinStyles::BRIGHT_MAGENTA = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#77 HighLine::BuiltinStyles::BRIGHT_MAGENTA_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#88 HighLine::BuiltinStyles::BRIGHT_NONE = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#77 HighLine::BuiltinStyles::BRIGHT_NONE_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#88 HighLine::BuiltinStyles::BRIGHT_RED = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#77 HighLine::BuiltinStyles::BRIGHT_RED_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#88 HighLine::BuiltinStyles::BRIGHT_WHITE = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#77 HighLine::BuiltinStyles::BRIGHT_WHITE_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#88 HighLine::BuiltinStyles::BRIGHT_YELLOW = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#77 HighLine::BuiltinStyles::BRIGHT_YELLOW_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#31 HighLine::BuiltinStyles::CLEAR = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#32 HighLine::BuiltinStyles::CLEAR_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# The builtin styles' colors like LIGHT_RED and BRIGHT_BLUE. +# +# source://highline//lib/highline/builtin_styles.rb#85 HighLine::BuiltinStyles::COLORS = T.let(T.unsafe(nil), Array) + +# A Hash with the basic colors an their ANSI escape codes. +# +# source://highline//lib/highline/builtin_styles.rb#41 HighLine::BuiltinStyles::COLOR_LIST = T.let(T.unsafe(nil), Hash) + +# source://highline//lib/highline/builtin_styles.rb#31 HighLine::BuiltinStyles::CONCEALED = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#32 HighLine::BuiltinStyles::CONCEALED_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#88 HighLine::BuiltinStyles::CYAN = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#65 HighLine::BuiltinStyles::CYAN_STYLE = T.let(T.unsafe(nil), HighLine::Style) +# BuiltinStyles class methods to be extended. +# +# source://highline//lib/highline/builtin_styles.rb#96 module HighLine::BuiltinStyles::ClassMethods + # const_missing callback for automatically respond to + # builtin constants (without explicitly defining them) + # + # @param name [Symbol] missing constant name + # @raise [NameError] + # + # source://highline//lib/highline/builtin_styles.rb#103 def const_missing(name); end end +# Regexp to match against RGB style constant names. +# +# source://highline//lib/highline/builtin_styles.rb#98 HighLine::BuiltinStyles::ClassMethods::RGB_COLOR_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://highline//lib/highline/builtin_styles.rb#31 HighLine::BuiltinStyles::DARK = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#32 HighLine::BuiltinStyles::DARK_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#31 HighLine::BuiltinStyles::ERASE_CHAR = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#32 HighLine::BuiltinStyles::ERASE_CHAR_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#31 HighLine::BuiltinStyles::ERASE_LINE = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#32 HighLine::BuiltinStyles::ERASE_LINE_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#88 HighLine::BuiltinStyles::GRAY = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#65 HighLine::BuiltinStyles::GRAY_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#88 HighLine::BuiltinStyles::GREEN = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#65 HighLine::BuiltinStyles::GREEN_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#88 HighLine::BuiltinStyles::GREY = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#65 HighLine::BuiltinStyles::GREY_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#88 HighLine::BuiltinStyles::LIGHT_BLACK = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#81 HighLine::BuiltinStyles::LIGHT_BLACK_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#88 HighLine::BuiltinStyles::LIGHT_BLUE = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#81 HighLine::BuiltinStyles::LIGHT_BLUE_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#88 HighLine::BuiltinStyles::LIGHT_CYAN = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#81 HighLine::BuiltinStyles::LIGHT_CYAN_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#88 HighLine::BuiltinStyles::LIGHT_GRAY = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#81 HighLine::BuiltinStyles::LIGHT_GRAY_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#88 HighLine::BuiltinStyles::LIGHT_GREEN = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#81 HighLine::BuiltinStyles::LIGHT_GREEN_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#88 HighLine::BuiltinStyles::LIGHT_GREY = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#81 HighLine::BuiltinStyles::LIGHT_GREY_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#88 HighLine::BuiltinStyles::LIGHT_MAGENTA = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#81 HighLine::BuiltinStyles::LIGHT_MAGENTA_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#88 HighLine::BuiltinStyles::LIGHT_NONE = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#81 HighLine::BuiltinStyles::LIGHT_NONE_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#88 HighLine::BuiltinStyles::LIGHT_RED = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#81 HighLine::BuiltinStyles::LIGHT_RED_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#88 HighLine::BuiltinStyles::LIGHT_WHITE = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#81 HighLine::BuiltinStyles::LIGHT_WHITE_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#88 HighLine::BuiltinStyles::LIGHT_YELLOW = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#81 HighLine::BuiltinStyles::LIGHT_YELLOW_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#88 HighLine::BuiltinStyles::MAGENTA = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#65 HighLine::BuiltinStyles::MAGENTA_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#88 HighLine::BuiltinStyles::NONE = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#65 HighLine::BuiltinStyles::NONE_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#90 HighLine::BuiltinStyles::ON_BLACK = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#89 HighLine::BuiltinStyles::ON_BLACK_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#90 HighLine::BuiltinStyles::ON_BLUE = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#89 HighLine::BuiltinStyles::ON_BLUE_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#90 HighLine::BuiltinStyles::ON_BRIGHT_BLACK = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#89 HighLine::BuiltinStyles::ON_BRIGHT_BLACK_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#90 HighLine::BuiltinStyles::ON_BRIGHT_BLUE = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#89 HighLine::BuiltinStyles::ON_BRIGHT_BLUE_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#90 HighLine::BuiltinStyles::ON_BRIGHT_CYAN = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#89 HighLine::BuiltinStyles::ON_BRIGHT_CYAN_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#90 HighLine::BuiltinStyles::ON_BRIGHT_GRAY = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#89 HighLine::BuiltinStyles::ON_BRIGHT_GRAY_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#90 HighLine::BuiltinStyles::ON_BRIGHT_GREEN = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#89 HighLine::BuiltinStyles::ON_BRIGHT_GREEN_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#90 HighLine::BuiltinStyles::ON_BRIGHT_GREY = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#89 HighLine::BuiltinStyles::ON_BRIGHT_GREY_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#90 HighLine::BuiltinStyles::ON_BRIGHT_MAGENTA = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#89 HighLine::BuiltinStyles::ON_BRIGHT_MAGENTA_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#90 HighLine::BuiltinStyles::ON_BRIGHT_NONE = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#89 HighLine::BuiltinStyles::ON_BRIGHT_NONE_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#90 HighLine::BuiltinStyles::ON_BRIGHT_RED = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#89 HighLine::BuiltinStyles::ON_BRIGHT_RED_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#90 HighLine::BuiltinStyles::ON_BRIGHT_WHITE = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#89 HighLine::BuiltinStyles::ON_BRIGHT_WHITE_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#90 HighLine::BuiltinStyles::ON_BRIGHT_YELLOW = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#89 HighLine::BuiltinStyles::ON_BRIGHT_YELLOW_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#90 HighLine::BuiltinStyles::ON_CYAN = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#89 HighLine::BuiltinStyles::ON_CYAN_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#90 HighLine::BuiltinStyles::ON_GRAY = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#89 HighLine::BuiltinStyles::ON_GRAY_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#90 HighLine::BuiltinStyles::ON_GREEN = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#89 HighLine::BuiltinStyles::ON_GREEN_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#90 HighLine::BuiltinStyles::ON_GREY = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#89 HighLine::BuiltinStyles::ON_GREY_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#90 HighLine::BuiltinStyles::ON_LIGHT_BLACK = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#89 HighLine::BuiltinStyles::ON_LIGHT_BLACK_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#90 HighLine::BuiltinStyles::ON_LIGHT_BLUE = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#89 HighLine::BuiltinStyles::ON_LIGHT_BLUE_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#90 HighLine::BuiltinStyles::ON_LIGHT_CYAN = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#89 HighLine::BuiltinStyles::ON_LIGHT_CYAN_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#90 HighLine::BuiltinStyles::ON_LIGHT_GRAY = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#89 HighLine::BuiltinStyles::ON_LIGHT_GRAY_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#90 HighLine::BuiltinStyles::ON_LIGHT_GREEN = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#89 HighLine::BuiltinStyles::ON_LIGHT_GREEN_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#90 HighLine::BuiltinStyles::ON_LIGHT_GREY = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#89 HighLine::BuiltinStyles::ON_LIGHT_GREY_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#90 HighLine::BuiltinStyles::ON_LIGHT_MAGENTA = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#89 HighLine::BuiltinStyles::ON_LIGHT_MAGENTA_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#90 HighLine::BuiltinStyles::ON_LIGHT_NONE = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#89 HighLine::BuiltinStyles::ON_LIGHT_NONE_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#90 HighLine::BuiltinStyles::ON_LIGHT_RED = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#89 HighLine::BuiltinStyles::ON_LIGHT_RED_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#90 HighLine::BuiltinStyles::ON_LIGHT_WHITE = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#89 HighLine::BuiltinStyles::ON_LIGHT_WHITE_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#90 HighLine::BuiltinStyles::ON_LIGHT_YELLOW = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#89 HighLine::BuiltinStyles::ON_LIGHT_YELLOW_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#90 HighLine::BuiltinStyles::ON_MAGENTA = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#89 HighLine::BuiltinStyles::ON_MAGENTA_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#90 HighLine::BuiltinStyles::ON_NONE = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#89 HighLine::BuiltinStyles::ON_NONE_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#90 HighLine::BuiltinStyles::ON_RED = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#89 HighLine::BuiltinStyles::ON_RED_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#90 HighLine::BuiltinStyles::ON_WHITE = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#89 HighLine::BuiltinStyles::ON_WHITE_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#90 HighLine::BuiltinStyles::ON_YELLOW = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#89 HighLine::BuiltinStyles::ON_YELLOW_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#88 HighLine::BuiltinStyles::RED = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#65 HighLine::BuiltinStyles::RED_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#31 HighLine::BuiltinStyles::RESET = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#32 HighLine::BuiltinStyles::RESET_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#31 HighLine::BuiltinStyles::REVERSE = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#32 HighLine::BuiltinStyles::REVERSE_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# Basic Style names like CLEAR, BOLD, UNDERLINE +# +# source://highline//lib/highline/builtin_styles.rb#37 HighLine::BuiltinStyles::STYLES = T.let(T.unsafe(nil), Array) + +# Basic styles' ANSI escape codes like :bold => "\e[1m" +# +# source://highline//lib/highline/builtin_styles.rb#14 HighLine::BuiltinStyles::STYLE_LIST = T.let(T.unsafe(nil), Hash) + +# source://highline//lib/highline/builtin_styles.rb#31 HighLine::BuiltinStyles::UNDERLINE = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#32 HighLine::BuiltinStyles::UNDERLINE_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#31 HighLine::BuiltinStyles::UNDERSCORE = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#32 HighLine::BuiltinStyles::UNDERSCORE_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#88 HighLine::BuiltinStyles::WHITE = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#65 HighLine::BuiltinStyles::WHITE_STYLE = T.let(T.unsafe(nil), HighLine::Style) + +# source://highline//lib/highline/builtin_styles.rb#88 HighLine::BuiltinStyles::YELLOW = T.let(T.unsafe(nil), String) + +# source://highline//lib/highline/builtin_styles.rb#65 HighLine::BuiltinStyles::YELLOW_STYLE = T.let(T.unsafe(nil), HighLine::Style) +# ColorScheme objects encapsulate a named set of colors to be used in the +# {HighLine.color} method call. For example, by applying a ColorScheme that +# has a :warning color then the following could be used: +# +# color("This is a warning", :warning) +# +# A ColorScheme contains named sets of HighLine color constants. +# +# @example Instantiating a color scheme, applying it to HighLine, +# and using it: +# ft = HighLine::ColorScheme.new do |cs| +# cs[:headline] = [ :bold, :yellow, :on_black ] +# cs[:horizontal_line] = [ :bold, :white ] +# cs[:even_row] = [ :green ] +# cs[:odd_row] = [ :magenta ] +# end +# +# HighLine.color_scheme = ft +# say("<%= color('Headline', :headline) %>") +# say("<%= color('-'*20, :horizontal_line) %>") +# i = true +# ("A".."D").each do |row| +# if i then +# say("<%= color('#{row}', :even_row ) %>") +# else +# say("<%= color('#{row}', :odd_row) %>") +# end +# i = !i +# end +# +# source://highline//lib/highline/color_scheme.rb#44 class HighLine::ColorScheme + # Create an instance of HighLine::ColorScheme. The customization can + # happen as a passed in Hash or via the yielded block. Keys are + # converted to :symbols and values are converted to HighLine + # constants. + # + # @param h [Hash] + # @return [ColorScheme] a new instance of ColorScheme + # @yield [_self] + # @yieldparam _self [HighLine::ColorScheme] the object that the method was called on + # + # source://highline//lib/highline/color_scheme.rb#52 def initialize(h = T.unsafe(nil)); end + # Allow the scheme to be accessed like a Hash. + # + # @param color_tag [#to_sym] + # @return [Style] + # + # source://highline//lib/highline/color_scheme.rb#76 def [](color_tag); end + + # Allow the scheme to be set like a Hash. + # + # @param color_tag [#to_sym] + # @param constants [Array] Array of Style symbols + # + # source://highline//lib/highline/color_scheme.rb#96 def []=(color_tag, constants); end + + # Retrieve the original form of the scheme + # + # @param color_tag [#to_sym] + # + # source://highline//lib/highline/color_scheme.rb#82 def definition(color_tag); end + + # Does this color scheme include the given tag name? + # + # @param color_tag [#to_sym] + # @return [Boolean] + # + # source://highline//lib/highline/color_scheme.rb#69 def include?(color_tag); end + + # Retrieve the keys in the scheme + # + # @return [Array] of keys + # + # source://highline//lib/highline/color_scheme.rb#89 def keys; end + + # Load multiple colors from key/value pairs. + # + # @param h [Hash] + # + # source://highline//lib/highline/color_scheme.rb#60 def load_from_hash(h); end + + # Retrieve the color scheme hash (in original definition format) + # + # @return [Hash] scheme as Hash. It may be reused in a new ColorScheme. + # + # source://highline//lib/highline/color_scheme.rb#105 def to_hash; end private + # Return a normalized representation of a color setting. + # + # source://highline//lib/highline/color_scheme.rb#120 def to_constant(v); end + + # Return a normalized representation of a color name. + # + # source://highline//lib/highline/color_scheme.rb#115 def to_symbol(t); end end +# Internal HighLine errors. +# +# source://highline//lib/highline/custom_errors.rb#5 module HighLine::CustomErrors; end +# An error that responds to :explanation_key +# +# source://highline//lib/highline/custom_errors.rb#11 class HighLine::CustomErrors::ExplainableError < ::StandardError + # Explanation key as Symbol or nil. Used to + # select the proper error message to be displayed. + # + # @return [nil, Symbol] explanation key to get the + # proper error message. + # + # source://highline//lib/highline/custom_errors.rb#12 def explanation_key; end end +# Unavailable auto complete error +# +# source://highline//lib/highline/custom_errors.rb#51 class HighLine::CustomErrors::NoAutoCompleteMatch < ::HighLine::CustomErrors::ExplainableError + # Explanation key as Symbol or nil. Used to + # select the proper error message to be displayed. + # + # @return [nil, Symbol] explanation key to get the + # proper error message. + # + # source://highline//lib/highline/custom_errors.rb#52 def explanation_key; end end +# Unconfirmed Question error +# +# source://highline//lib/highline/custom_errors.rb#43 class HighLine::CustomErrors::NoConfirmationQuestionError < ::HighLine::CustomErrors::ExplainableError + # Explanation key as Symbol or nil. Used to + # select the proper error message to be displayed. + # + # @return [nil, Symbol] explanation key to get the + # proper error message. + # + # source://highline//lib/highline/custom_errors.rb#44 def explanation_key; end end +# Out of Range Question error +# +# source://highline//lib/highline/custom_errors.rb#35 class HighLine::CustomErrors::NotInRangeQuestionError < ::HighLine::CustomErrors::ExplainableError + # Explanation key as Symbol or nil. Used to + # select the proper error message to be displayed. + # + # @return [nil, Symbol] explanation key to get the + # proper error message. + # + # source://highline//lib/highline/custom_errors.rb#36 def explanation_key; end end +# Invalid Question error +# +# source://highline//lib/highline/custom_errors.rb#27 class HighLine::CustomErrors::NotValidQuestionError < ::HighLine::CustomErrors::ExplainableError + # Explanation key as Symbol or nil. Used to + # select the proper error message to be displayed. + # + # @return [nil, Symbol] explanation key to get the + # proper error message. + # + # source://highline//lib/highline/custom_errors.rb#28 def explanation_key; end end +# Bare Question error +# +# source://highline//lib/highline/custom_errors.rb#19 class HighLine::CustomErrors::QuestionError < ::HighLine::CustomErrors::ExplainableError + # Explanation key as Symbol or nil. Used to + # select the proper error message to be displayed. + # + # @return [nil, Symbol] explanation key to get the + # proper error message. + # + # source://highline//lib/highline/custom_errors.rb#20 def explanation_key; end end +# List class with some convenience methods like {#col_down}. +# +# source://highline//lib/highline/list.rb#5 class HighLine::List + # @option options + # @option options + # @option options + # @param items [#to_a] an array of items to compose the list. + # @param options [Hash] a hash of options to tailor the list. + # @return [List] a new instance of List + # + # source://highline//lib/highline/list.rb#61 def initialize(items, options = T.unsafe(nil)); end + # Slice the list by rows and transpose it. + # + # @return [self] + # + # source://highline//lib/highline/list.rb#81 def col_down; end + + # Content are distributed first by column in col down mode. + # + # @example A two columns array like this: + # [ [ "a", "b" ], + # [ "c", "d" ], + # [ "e", "f" ], + # [ "g", "h" ], + # [ "i", "j" ] ] + # @example In col down mode will be like this: + # [ [ "a", "f"], + # [ "b", "g"], + # [ "c", "h"], + # [ "d", "i"], + # [ "e", "j"] ] + # @return [Boolean] + # @see #transpose_mode + # + # source://highline//lib/highline/list.rb#53 def col_down_mode; end + + # Number of columns for each list row. + # + # @return [Integer] + # + # source://highline//lib/highline/list.rb#14 def cols; end + + # Set the cols number. + # + # @return [self] + # + # source://highline//lib/highline/list.rb#104 def cols=(cols); end + + # Original given *items* argument. + # It's frozen at initialization time and + # all later transformations will happen on {#list}. + # + # @return [Array] + # + # source://highline//lib/highline/list.rb#10 def items; end + + # Returns an Array representation of the list + # in its current state. + # + # @return [Array] @list.dup + # + # source://highline//lib/highline/list.rb#112 def list; end + + # Returns the row join string size. + # Useful for calculating the actual size of + # rendered list. + # + # @return [Integer] + # + # source://highline//lib/highline/list.rb#148 def row_join_str_size; end + + # The String that will be used to join each + # cell of the list and stringfying it. + # + # @return [String] defaults to " " (space) + # + # source://highline//lib/highline/list.rb#136 def row_join_string; end + + # Set the {#row_join_string}. + # + # @see #row_join_string + # + # source://highline//lib/highline/list.rb#142 def row_join_string=(_arg0); end + + # Slice the list by cols based on the {#cols} param. + # + # @return [self] + # + # source://highline//lib/highline/list.rb#97 def slice_by_cols; end + + # Slice the list by rows. The row count is calculated + # indirectly based on the {#cols} param and the items count. + # + # @return [self] + # + # source://highline//lib/highline/list.rb#90 def slice_by_rows; end + + # Returns an Array representation of the list + # in its current state. + # + # @return [Array] @list.dup + # + # source://highline//lib/highline/list.rb#117 def to_a; end + + # Stringfies the list in its current state. + # It joins each individual _cell_ with the current + # {#row_join_string} between them. + # It joins each individual row with a + # newline character. So the returned String is + # suitable to be directly outputed + # to the screen, preserving row/columns divisions. + # + # @return [String] + # + # source://highline//lib/highline/list.rb#129 def to_s; end + + # Transpose the (already sliced by rows) list, + # turning its rows into columns. + # + # @return [self] + # + # source://highline//lib/highline/list.rb#72 def transpose; end + + # Columns turn into rows in transpose mode. + # + # @example A two columns array like this: + # [ [ "a", "b" ], + # [ "c", "d" ], + # [ "e", "f" ], + # [ "g", "h" ], + # [ "i", "j" ] ] + # @example When in transpose mode will be like this: + # [ [ "a", "c", "e", "g", "i" ], + # [ "b", "d", "f", "h", "j" ] ] + # @return [Boolean] + # @see #col_down_mode + # + # source://highline//lib/highline/list.rb#32 def transpose_mode; end private + # source://highline//lib/highline/list.rb#154 def build; end + + # source://highline//lib/highline/list.rb#161 def items_sliced_by_cols; end + + # source://highline//lib/highline/list.rb#165 def items_sliced_by_rows; end + + # source://highline//lib/highline/list.rb#169 def row_count; end + + # source://highline//lib/highline/list.rb#173 def stringfy(row); end end +# This class is a utility for quickly and easily laying out lists +# to be used by HighLine. +# +# source://highline//lib/highline/list_renderer.rb#12 class HighLine::ListRenderer + # The only required parameters are _items_ and _highline_. + # Recognized modes are: + # + # :columns_across:: _items_ will be placed in columns, + # flowing from left to right. If given, + # _option_ is the number of columns to be + # used. When absent, columns will be + # determined based on _wrap_at_ or a + # default of 80 characters. + # :columns_down:: Identical to :columns_across, + # save flow goes down. + # :uneven_columns_across:: Like :columns_across but each + # column is sized independently. + # :uneven_columns_down:: Like :columns_down but each + # column is sized independently. + # :inline:: All _items_ are placed on a single + # line. The last two _items_ are + # separated by _option_ or a default of + # " or ". All other _items_ are + # separated by ", ". + # :rows:: The default mode. Each of the _items_ + # is placed on its own line. The _option_ + # parameter is ignored in this mode. + # + # Each member of the _items_ Array is passed through ERb and thus can + # contain their own expansions. Color escape expansions do not contribute to + # the final field width. + # + # @param items [Array] the Array of items to list + # @param mode [Symbol] controls how that list is formed + # @param option has different effects, depending on the _mode_. + # @param highline [HighLine] a HighLine instance to direct the output to. + # @return [ListRenderer] a new instance of ListRenderer + # + # source://highline//lib/highline/list_renderer.rb#62 def initialize(items, mode = T.unsafe(nil), option = T.unsafe(nil), highline); end + # @return [HighLine] context + # + # source://highline//lib/highline/list_renderer.rb#27 def highline; end + + # Items list + # + # @return [Array] + # + # source://highline//lib/highline/list_renderer.rb#15 def items; end + + # @return [Symbol] the current mode the List is being rendered + # @see #initialize for more details see mode parameter of #initialize + # + # source://highline//lib/highline/list_renderer.rb#19 def mode; end + + # Changes the behaviour of some modes. Example, in :inline mode + # the option is treated as the 'end separator' (defaults to " or ") + # + # @return option parameter that changes the behaviour of some modes. + # + # source://highline//lib/highline/list_renderer.rb#24 def option; end + + # Render the list using the appropriate mode and options. + # + # @return [String] rendered list as String + # + # source://highline//lib/highline/list_renderer.rb#71 def render; end private + # source://highline//lib/highline/list_renderer.rb#212 def actual_length(text); end + + # source://highline//lib/highline/list_renderer.rb#195 def actual_lengths_for(line); end + + # source://highline//lib/highline/list_renderer.rb#243 def col_count; end + + # source://highline//lib/highline/list_renderer.rb#238 def col_count_calculate; end + + # source://highline//lib/highline/list_renderer.rb#180 def get_col_widths(lines); end + + # source://highline//lib/highline/list_renderer.rb#185 def get_row_widths(lines); end + + # source://highline//lib/highline/list_renderer.rb#189 def get_segment_widths(lines); end + + # @return [Boolean] + # + # source://highline//lib/highline/list_renderer.rb#207 def inside_line_size_limit?(widths); end + + # source://highline//lib/highline/list_renderer.rb#216 def items_max_length; end + + # source://highline//lib/highline/list_renderer.rb#224 def line_size_limit; end + + # source://highline//lib/highline/list_renderer.rb#120 def list_columns_across_mode; end + + # source://highline//lib/highline/list_renderer.rb#124 def list_columns_down_mode; end + + # source://highline//lib/highline/list_renderer.rb#106 def list_default_mode; end + + # source://highline//lib/highline/list_renderer.rb#110 def list_inline_mode; end + + # source://highline//lib/highline/list_renderer.rb#148 def list_uneven_columns_down_mode; end + + # source://highline//lib/highline/list_renderer.rb#132 def list_uneven_columns_mode(list = T.unsafe(nil)); end + + # source://highline//lib/highline/list_renderer.rb#220 def max_length(items); end + + # source://highline//lib/highline/list_renderer.rb#253 def pad_char; end + + # source://highline//lib/highline/list_renderer.rb#153 def pad_uneven_rows(list, widths); end + + # source://highline//lib/highline/list_renderer.rb#92 def render_list_items(items); end + + # source://highline//lib/highline/list_renderer.rb#174 def right_pad_field(field, width); end + + # source://highline//lib/highline/list_renderer.rb#168 def right_pad_row(row, widths); end + + # source://highline//lib/highline/list_renderer.rb#247 def right_padded_items; end + + # source://highline//lib/highline/list_renderer.rb#257 def row_count; end + + # source://highline//lib/highline/list_renderer.rb#234 def row_join_str_size; end + + # source://highline//lib/highline/list_renderer.rb#228 def row_join_string; end + + # Sets the attribute row_join_string + # + # @param value the value to set the attribute row_join_string to. + # + # source://highline//lib/highline/list_renderer.rb#232 def row_join_string=(_arg0); end + + # source://highline//lib/highline/list_renderer.rb#164 def row_to_s(row); end + + # source://highline//lib/highline/list_renderer.rb#160 def stringfy_list(list); end + + # source://highline//lib/highline/list_renderer.rb#201 def transpose(lines); end end +# Menu objects encapsulate all the details of a call to +# {HighLine#choose HighLine#choose}. +# Using the accessors and {Menu#choice} and {Menu#choices}, the block passed +# to {HighLine#choose} can detail all aspects of menu display and control. +# +# source://highline//lib/highline/menu/item.rb#6 class HighLine::Menu < ::HighLine::Question + # Create an instance of HighLine::Menu. All customization is done + # through the passed block, which should call accessors, {#choice} and + # {#choices} as needed to define the Menu. Note that Menus are also + # {HighLine::Question Questions}, so all that functionality is available + # to the block as well. + # + # @example Implicit menu creation through HighLine#choose + # cli = HighLine.new + # answer = cli.choose do |menu| + # menu.prompt = "Please choose your favorite programming language? " + # menu.choice(:ruby) { say("Good choice!") } + # menu.choices(:python, :perl) { say("Not from around here, are you?") } + # end + # @return [Menu] a new instance of Menu + # @yield [_self] + # @yieldparam _self [HighLine::Menu] the object that the method was called on + # + # source://highline//lib/highline/menu.rb#52 def initialize; end + # Adds an item directly to the menu. If you want more configuration + # or options, use this method + # + # @param item [Menu::Item] item containing choice fields and more + # @return [void] + # + # source://highline//lib/highline/menu.rb#217 def add_item(item); end + + # source://highline//lib/highline/menu.rb#390 def all_items; end + + # This method helps reduce the namespaces in the original call, + # which would look like this: HighLine::Menu::Item.new(...) + # With #build_item, it looks like this: menu.build_item(...) + # + # @param *args splat args, the same args you would pass to an + # initialization of HighLine::Menu::Item + # @return [HighLine::Menu::Item] the menu item + # + # source://highline//lib/highline/menu.rb#206 def build_item(*args); end + + # Adds _name_ to the list of available menu items. Menu items will be + # displayed in the order they are added. + # + # An optional _action_ can be associated with this name and if provided, + # it will be called if the item is selected. The result of the method + # will be returned, unless _nil_on_handled_ is set (when you would get + # +nil+ instead). In _shell_ mode, a provided block will be passed the + # command chosen and any details that followed the command. Otherwise, + # just the command is passed. The @highline variable is set to + # the current HighLine context before the action code is called and can + # thus be used for adding output and the like. + # + # @example Use of help string on menu items + # cli = HighLine.new + # cli.choose do |menu| + # menu.shell = true + # + # menu.choice(:load, text: 'Load a file', + # help: "Load a file using your favourite editor.") + # menu.choice(:save, help: "Save data in file.") + # menu.choice(:quit, help: "Exit program.") + # + # menu.help("rules", "The rules of this system are as follows...") + # end + # @example Implicit menu creation through HighLine#choose + # cli = HighLine.new + # answer = cli.choose do |menu| + # menu.prompt = "Please choose your favorite programming language? " + # menu.choice(:ruby) { say("Good choice!") } + # menu.choices(:python, :perl) { say("Not from around here, are you?") } + # end + # @param name [#to_s] menu item title/header/name to be displayed. + # @param action [Proc] callback action to be run when the item is selected. + # @param help [String] help/hint string to be displayed. + # @return [void] + # + # source://highline//lib/highline/menu.rb#191 def choice(name, help = T.unsafe(nil), text = T.unsafe(nil), &action); end + + # A shortcut for multiple calls to the sister method {#choice}. Be + # warned: An _action_ set here will apply to *all* provided + # _names_. This is considered to be a feature, so you can easily + # hand-off interface processing to a different chunk of code. + # choice has more options available to you, like longer text or help (and + # of course, individual actions) + # + # @example Implicit menu creation through HighLine#choose + # cli = HighLine.new + # answer = cli.choose do |menu| + # menu.prompt = "Please choose your favorite programming language? " + # menu.choice(:ruby) { say("Good choice!") } + # menu.choices(:python, :perl) { say("Not from around here, are you?") } + # end + # @param names [Array<#to_s>] menu item titles/headers/names to be + # displayed. + # @param action [Proc] callback action to be run when the item is selected. + # @return [void] + # + # source://highline//lib/highline/menu.rb#237 def choices(*names, &action); end + + # source://highline//lib/highline/menu.rb#495 def decorate_index(index); end + + # source://highline//lib/highline/menu.rb#512 def decorate_item(text, ix); end + + # source://highline//lib/highline/menu.rb#418 def find_item_from_selection(items, selection); end + + # This attribute is passed directly on as the mode to HighLine.list() by + # all the preset layouts. See that method for appropriate settings. + # + # source://highline//lib/highline/menu.rb#116 def flow; end + + # This attribute is passed directly on as the mode to HighLine.list() by + # all the preset layouts. See that method for appropriate settings. + # + # source://highline//lib/highline/menu.rb#116 def flow=(_arg0); end + + # source://highline//lib/highline/menu.rb#457 def gather_selected(highline_context, selections, details = T.unsafe(nil)); end + + # Returns the menu item referenced by its title/header/name. + # + # @param selection [String] menu's title/header/name + # + # source://highline//lib/highline/menu.rb#434 def get_item_by_letter(items, selection); end + + # Returns the menu item referenced by its index + # + # @param selection [Integer] menu item's index. + # + # source://highline//lib/highline/menu.rb#428 def get_item_by_number(items, selection); end + + # Used by all the preset layouts to display title and/or introductory + # information, when set. Defaults to +nil+. + # + # source://highline//lib/highline/menu.rb#127 def header; end + + # Used by all the preset layouts to display title and/or introductory + # information, when set. Defaults to +nil+. + # + # source://highline//lib/highline/menu.rb#127 def header=(_arg0); end + + # Used to set help for arbitrary topics. Use the topic "help" + # to override the default message. Mainly for internal use. + # + # @param topic [String] the menu item header/title/name to be associated + # with a help message. + # @param help [String] the help message to be associated with the menu + # item/title/name. + # + # source://highline//lib/highline/menu.rb#317 def help(topic, help); end + + # Identical to {#choice}, but the item will not be listed for the user. + # + # @param name [#to_s] menu item title/header/name to be displayed. + # @param help [String] help/hint string to be displayed. + # @param action [Proc] callback action to be run when the item is selected. + # @return [void] + # @see #choice + # + # source://highline//lib/highline/menu.rb#248 def hidden(name, help = T.unsafe(nil), &action); end + + # An _index_ to append to each menu item in display. See + # Menu.index=() for details. + # + # source://highline//lib/highline/menu.rb#92 def index; end + + # Sets the indexing style for this Menu object. Indexes are appended to + # menu items, when displayed in list form. The available settings are: + # + # :number:: Menu items will be indexed numerically, starting + # with 1. This is the default method of indexing. + # :letter:: Items will be indexed alphabetically, starting + # with a. + # :none:: No index will be appended to menu items. + # any String:: Will be used as the literal _index_. + # + # Setting the _index_ to :none or a literal String also adjusts + # _index_suffix_ to a single space and _select_by_ to :name. + # Because of this, you should make a habit of setting the _index_ first. + # + # source://highline//lib/highline/menu.rb#269 def index=(style); end + + # The color of the index when displaying the menu. See Style class for + # available colors. + # + # source://highline//lib/highline/menu.rb#158 def index_color; end + + # The color of the index when displaying the menu. See Style class for + # available colors. + # + # source://highline//lib/highline/menu.rb#158 def index_color=(_arg0); end + + # The String placed between an _index_ and a menu item. Defaults to + # ". ". Switches to " ", when _index_ is set to a String (like "-"). + # + # source://highline//lib/highline/menu.rb#97 def index_suffix; end + + # The String placed between an _index_ and a menu item. Defaults to + # ". ". Switches to " ", when _index_ is set to a String (like "-"). + # + # source://highline//lib/highline/menu.rb#97 def index_suffix=(_arg0); end + + # Initializes the help system by adding a :help choice, some + # action code, and the default help listing. + # + # source://highline//lib/highline/menu.rb#283 def init_help; end + + # An ERb _layout_ to use when displaying this Menu object. See + # Menu.layout=() for details. + # + # source://highline//lib/highline/menu.rb#137 def layout; end + + # Setting a _layout_ with this method also adjusts some other attributes + # of the Menu object, to ideal defaults for the chosen _layout_. To + # account for that, you probably want to set a _layout_ first in your + # configuration block, if needed. + # + # Accepted settings for _layout_ are: + # + # :list:: The default _layout_. The _header_ if set + # will appear at the top on its own line with + # a trailing colon. Then the list of menu + # items will follow. Finally, the _prompt_ + # will be used as the ask()-like question. + # :one_line:: A shorter _layout_ that fits on one line. + # The _header_ comes first followed by a + # colon and spaces, then the _prompt_ with menu + # items between trailing parenthesis. + # :menu_only:: Just the menu items, followed up by a likely + # short _prompt_. + # any ERb String:: Will be taken as the literal _layout_. This + # String can access header, + # menu and prompt, but is + # otherwise evaluated in the TemplateRenderer + # context so each method is properly delegated. + # + # If set to either :one_line, or :menu_only, _index_ + # will default to :none and _flow_ will default to + # :inline. + # + # source://highline//lib/highline/menu.rb#350 def layout=(new_layout); end + + # This setting is passed on as the third parameter to HighLine.list() + # by all the preset layouts. See that method for details of its + # effects. Defaults to +nil+. + # + # source://highline//lib/highline/menu.rb#122 def list_option; end + + # This setting is passed on as the third parameter to HighLine.list() + # by all the preset layouts. See that method for details of its + # effects. Defaults to +nil+. + # + # source://highline//lib/highline/menu.rb#122 def list_option=(_arg0); end + + # source://highline//lib/highline/menu.rb#376 def map_items_by_index; end + + # source://highline//lib/highline/menu.rb#386 def map_items_by_name; end + + # source://highline//lib/highline/menu.rb#517 def mark_for_decoration(text, ix); end + + # When +true+, any selected item handled by provided action code will + # return +nil+, instead of the results to the action code. This may + # prove handy when dealing with mixed menus where only the names of + # items without any code (and +nil+, of course) will be returned. + # Defaults to +false+. + # + # source://highline//lib/highline/menu.rb#153 def nil_on_handled; end + + # When +true+, any selected item handled by provided action code will + # return +nil+, instead of the results to the action code. This may + # prove handy when dealing with mixed menus where only the names of + # items without any code (and +nil+, of course) will be returned. + # Defaults to +false+. + # + # source://highline//lib/highline/menu.rb#153 def nil_on_handled=(_arg0); end + + # This method returns all possible options for auto-completion, based + # on the settings of _index_ and _select_by_. + # + # source://highline//lib/highline/menu.rb#365 def options; end + + # source://highline//lib/highline/menu.rb#557 def parse_list; end + + # Used by all the preset layouts to ask the actual question to fetch a + # menu selection from the user. Defaults to "? ". + # + # source://highline//lib/highline/menu.rb#132 def prompt; end + + # Used by all the preset layouts to ask the actual question to fetch a + # menu selection from the user. Defaults to "? ". + # + # source://highline//lib/highline/menu.rb#132 def prompt=(_arg0); end + + # This method processes the auto-completed user selection, based on the + # rules for this Menu object. If an action was provided for the + # selection, it will be executed as described in {#choice}. + # + # @param highline_context [HighLine] a HighLine instance to be used + # as context. + # @param selection [String, Integer] index or title of the selected + # menu item. + # @param details additional parameter to be passed when in shell mode. + # @return [nil, Object] if @nil_on_handled is set it returns +nil+, + # else it returns the action return value. + # + # source://highline//lib/highline/menu.rb#406 def select(highline_context, selection, details = T.unsafe(nil)); end + + # The _select_by_ attribute controls how the user is allowed to pick a + # menu item. The available choices are: + # + # :index:: The user is allowed to type the numerical + # or alphabetical index for their selection. + # :index_or_name:: Allows both methods from the + # :index option and the + # :name option. + # :name:: Menu items are selected by typing a portion + # of the item name that will be + # auto-completed. + # + # source://highline//lib/highline/menu.rb#111 def select_by; end + + # The _select_by_ attribute controls how the user is allowed to pick a + # menu item. The available choices are: + # + # :index:: The user is allowed to type the numerical + # or alphabetical index for their selection. + # :index_or_name:: Allows both methods from the + # :index option and the + # :name option. + # :name:: Menu items are selected by typing a portion + # of the item name that will be + # auto-completed. + # + # source://highline//lib/highline/menu.rb#111 def select_by=(_arg0); end + + # When set to +true+, responses are allowed to be an entire line of + # input, including details beyond the command itself. Only the first + # "word" of input will be matched against the menu choices, but both the + # command selected and the rest of the line will be passed to provided + # action blocks. Defaults to +false+. + # + # source://highline//lib/highline/menu.rb#145 def shell; end + + # When set to +true+, responses are allowed to be an entire line of + # input, including details beyond the command itself. Only the first + # "word" of input will be matched against the menu choices, but both the + # command selected and the rest of the line will be passed to provided + # action blocks. Defaults to +false+. + # + # source://highline//lib/highline/menu.rb#145 def shell=(_arg0); end + + # source://highline//lib/highline/menu.rb#562 def show_default_if_any; end + + # Allows Menu objects to pass as Arrays, for use with HighLine.list(). + # This method returns all menu items to be displayed, complete with + # indexes. + # + # source://highline//lib/highline/menu.rb#508 def to_ary; end + + # Allows Menu to behave as a String, just like Question. Returns the + # _layout_ to be rendered, which is used by HighLine.say(). + # + # source://highline//lib/highline/menu.rb#535 def to_s; end + + # This method will update the intelligent responses to account for + # Menu specific differences. Calls the superclass' (Question's) + # build_responses method, overriding its default arguments to specify + # 'options' will be used to populate choice lists. + # + # source://highline//lib/highline/menu.rb#572 def update_responses; end + + # source://highline//lib/highline/menu.rb#471 def value_for_array_selections(items, selections, details); end + + # source://highline//lib/highline/menu.rb#484 def value_for_hash_selections(items, selections, details); end + + # source://highline//lib/highline/menu.rb#444 def value_for_selected_item(item, details); end class << self + # Returns the value of attribute index_color. + # + # source://highline//lib/highline/menu.rb#34 def index_color; end + + # Sets the attribute index_color + # + # @param value the value to set the attribute index_color to. + # + # source://highline//lib/highline/menu.rb#26 def index_color=(_arg0); end end end +# Represents an Item of a HighLine::Menu. +# +# source://highline//lib/highline/menu/item.rb#7 class HighLine::Menu::Item + # @option attributes + # @option attributes + # @option attributes + # @param name [String] The name that is matched against the user input + # @param attributes [Hash] options Hash to tailor menu item to your needs + # @return [Item] a new instance of Item + # + # source://highline//lib/highline/menu/item.rb#19 def initialize(name, attributes); end + # Returns the value of attribute action. + # + # source://highline//lib/highline/menu/item.rb#8 def action; end + + # Returns the value of attribute help. + # + # source://highline//lib/highline/menu/item.rb#8 def help; end + + # source://highline//lib/highline/menu/item.rb#26 def item_help; end + + # Returns the value of attribute name. + # + # source://highline//lib/highline/menu/item.rb#8 def name; end + + # Returns the value of attribute text. + # + # source://highline//lib/highline/menu/item.rb#8 def text; end end +# Take the task of paginating some piece of text given a HighLine context +# +# source://highline//lib/highline/paginator.rb#5 class HighLine::Paginator + # Returns a HighLine::Paginator instance where you can + # call {#page_print} on it. + # + # @example + # HighLine::Paginator.new(highline).page_print(statement) + # @param highline [HighLine] context + # @return [Paginator] a new instance of Paginator + # + # source://highline//lib/highline/paginator.rb#14 def initialize(highline); end + # Ask user if they wish to continue paging output. Allows them to + # type "q" to cancel the paging process. + # + # @return [Boolean] + # + # source://highline//lib/highline/paginator.rb#45 def continue_paging?; end + + # @return [HighLine] HighLine context + # + # source://highline//lib/highline/paginator.rb#7 def highline; end + + # Page print a series of at most _page_at_ lines for _output_. After each + # page is printed, HighLine will pause until the user presses enter/return + # then display the next page of data. + # + # Note that the final page of _output_ is *not* printed, but returned + # instead. This is to support any special handling for the final sequence. + # + # @param text [String] text to be paginated + # @return [String] last line if paging is aborted + # + # source://highline//lib/highline/paginator.rb#28 def page_print(text); end end +# Question objects contain all the details of a single invocation of +# HighLine.ask(). The object is initialized by the parameters passed to +# HighLine.ask() and then queried to make sure each step of the input +# process is handled according to the users wishes. +# +# source://highline//lib/highline/question/answer_converter.rb#6 class HighLine::Question include ::HighLine::CustomErrors + # Create an instance of HighLine::Question. Expects a _template_ to ask + # (can be "") and an _answer_type_ to convert the answer to. + # The _answer_type_ parameter must be a type recognized by + # Question.convert(). If given, a block is yielded the new Question + # object to allow custom initialization. + # + # @param template [String] any String + # @param answer_type [Class] the type the answer will be converted to it. + # @return [Question] a new instance of Question + # @yield [_self] + # @yieldparam _self [HighLine::Question] the object that the method was called on + # + # source://highline//lib/highline/question.rb#52 def initialize(template, answer_type); end + # Used to control range checks for answer. + # + # source://highline//lib/highline/question.rb#146 def above; end + + # Used to control range checks for answer. + # + # source://highline//lib/highline/question.rb#146 def above=(_arg0); end + + # The answer, set by HighLine#ask + # + # source://highline//lib/highline/question.rb#80 def answer; end + + # The answer, set by HighLine#ask + # + # source://highline//lib/highline/question.rb#80 def answer=(_arg0); end + + # Returns the provided _answer_string_ or the default answer for this + # Question if a default was set and the answer is empty. + # + # @param answer_string [String] + # @return [String] the answer itself or a default message. + # + # source://highline//lib/highline/question.rb#240 def answer_or_default(answer_string); end + + # The type that will be used to convert this answer. + # + # source://highline//lib/highline/question.rb#83 def answer_type; end + + # The type that will be used to convert this answer. + # + # source://highline//lib/highline/question.rb#83 def answer_type=(_arg0); end + + # Provides the String to be asked when at an error situation. + # It may be just the question itself (repeat on error). + # + # @return [self] if :ask_on_error on responses Hash is set to :question + # @return [String] if :ask_on_error on responses Hash is set to + # something else + # + # source://highline//lib/highline/question.rb#566 def ask_on_error_msg; end + + # Used to control range checks for answer. + # + # source://highline//lib/highline/question.rb#146 def below; end + + # Used to control range checks for answer. + # + # source://highline//lib/highline/question.rb#146 def below=(_arg0); end + + # Called late in the initialization process to build intelligent + # responses based on the details of this Question object. + # Also used by Menu#update_responses. + # + # @param message_source [Class] Array or String for example. + # Same as {#answer_type}. + # @return [Hash] responses Hash winner (new and old merge). + # + # source://highline//lib/highline/question.rb#254 def build_responses(message_source = T.unsafe(nil)); end + + # When updating the responses hash, it generates the new one. + # + # @param message_source [Class] Array or String for example. + # Same as {#answer_type}. + # @return [Hash] responses hash + # + # source://highline//lib/highline/question.rb#273 def build_responses_new_hash(message_source); end + + # Used to control character case processing for the answer to this question. + # See HighLine::Question.change_case() for acceptable settings. + # + # source://highline//lib/highline/question.rb#136 def case; end + + # Used to control character case processing for the answer to this question. + # See HighLine::Question.change_case() for acceptable settings. + # + # source://highline//lib/highline/question.rb#136 def case=(_arg0); end + + # Returns the provided _answer_string_ after changing character case by + # the rules of this Question. Valid settings for whitespace are: + # + # +nil+:: Do not alter character case. + # (Default.) + # :up:: Calls upcase(). + # :upcase:: Calls upcase(). + # :down:: Calls downcase(). + # :downcase:: Calls downcase(). + # :capitalize:: Calls capitalize(). + # + # An unrecognized choice (like :none) is treated as +nil+. + # + # @param answer_string [String] + # @return [String] upcased, downcased, capitalized + # or unchanged answer String. + # + # source://highline//lib/highline/question.rb#318 def change_case(answer_string); end + + # Can be set to +true+ to use HighLine's cross-platform character reader + # instead of fetching an entire line of input. (Note: HighLine's character + # reader *ONLY* supports STDIN on Windows and Unix.) Can also be set to + # :getc to use that method on the input stream. + # + # *WARNING*: The _echo_ and _overwrite_ attributes for a question are + # ignored when using the :getc method. + # + # source://highline//lib/highline/question.rb#95 def character; end + + # Can be set to +true+ to use HighLine's cross-platform character reader + # instead of fetching an entire line of input. (Note: HighLine's character + # reader *ONLY* supports STDIN on Windows and Unix.) Can also be set to + # :getc to use that method on the input stream. + # + # *WARNING*: The _echo_ and _overwrite_ attributes for a question are + # ignored when using the :getc method. + # + # source://highline//lib/highline/question.rb#95 def character=(_arg0); end + + # Run {#in_range?} and raise an error if not succesful + # + # @raise [NotInRangeQuestionError] + # + # source://highline//lib/highline/question.rb#364 def check_range; end + + # Try to auto complete answer_string + # + # @param answer_string [String] + # @raise [NoAutoCompleteMatch] + # @return [String] + # + # source://highline//lib/highline/question.rb#371 def choices_complete(answer_string); end + + # For Auto-completion + # + # source://highline//lib/highline/question.rb#85 def completion; end + + # For Auto-completion + # + # source://highline//lib/highline/question.rb#85 def completion=(_arg0); end + + # Asks a yes or no confirmation question, to ensure a user knows what + # they have just agreed to. The confirm attribute can be set to : + # +true+ : In this case the question will be, "Are you sure?". + # Proc : The Proc is yielded the answer given. The Proc must + # output a string which is then used as the confirm + # question. + # String : The String must use ERB syntax. The String is + # evaluated with access to question and answer and + # is then used as the confirm question. + # When set to +false+ or +nil+ (the default), answers are not confirmed. + # + # source://highline//lib/highline/question.rb#160 def confirm; end + + # Asks a yes or no confirmation question, to ensure a user knows what + # they have just agreed to. The confirm attribute can be set to : + # +true+ : In this case the question will be, "Are you sure?". + # Proc : The Proc is yielded the answer given. The Proc must + # output a string which is then used as the confirm + # question. + # String : The String must use ERB syntax. The String is + # evaluated with access to question and answer and + # is then used as the confirm question. + # When set to +false+ or +nil+ (the default), answers are not confirmed. + # + # source://highline//lib/highline/question.rb#160 def confirm=(_arg0); end + + # Returns the String to be shown when asking for an answer confirmation. + # + # @param highline [HighLine] context + # @return [String] default "Are you sure?" if {#confirm} is +true+ + # @return [String] {#confirm} rendered as a template if it is a String + # + # source://highline//lib/highline/question.rb#543 def confirm_question(highline); end + + # Transforms the given _answer_string_ into the expected type for this + # Question. Currently supported conversions are: + # + # [...]:: Answer must be a member of the passed Array. + # Auto-completion is used to expand partial + # answers. + # lambda {...}:: Answer is passed to lambda for conversion. + # Date:: Date.parse() is called with answer. + # DateTime:: DateTime.parse() is called with answer. + # File:: The entered file name is auto-completed in + # terms of _directory_ + _glob_, opened, and + # returned. + # Float:: Answer is converted with Kernel.Float(). + # Integer:: Answer is converted with Kernel.Integer(). + # +nil+:: Answer is left in String format. (Default.) + # Pathname:: Same as File, save that a Pathname object is + # returned. + # String:: Answer is converted with Kernel.String(). + # HighLine::String:: Answer is converted with HighLine::String() + # Regexp:: Answer is fed to Regexp.new(). + # Symbol:: The method to_sym() is called on answer and + # the result returned. + # any other Class:: The answer is passed on to + # Class.parse(). + # + # This method throws ArgumentError, if the conversion cannot be + # completed for any reason. + # + # source://highline//lib/highline/question.rb#359 def convert; end + + # Used to provide a default answer to this question. + # + # source://highline//lib/highline/question.rb#138 def default; end + + # Used to provide a default answer to this question. + # + # source://highline//lib/highline/question.rb#138 def default=(_arg0); end + + # source://highline//lib/highline/question.rb#263 def default_responses_hash; end + + # The directory from which a user will be allowed to select files, when + # File or Pathname is specified as an _answer_type_. Initially set to + # Pathname.new(File.expand_path(File.dirname($0))). + # + # source://highline//lib/highline/question.rb#193 def directory; end + + # The directory from which a user will be allowed to select files, when + # File or Pathname is specified as an _answer_type_. Initially set to + # Pathname.new(File.expand_path(File.dirname($0))). + # + # source://highline//lib/highline/question.rb#193 def directory=(_arg0); end + + # Can be set to +true+ or +false+ to control whether or not input will + # be echoed back to the user. A setting of +true+ will cause echo to + # match input, but any other true value will be treated as a String to + # echo for each character typed. + # + # This requires HighLine's character reader. See the _character_ + # attribute for details. + # + # *Note*: When using HighLine to manage echo on Unix based systems, we + # recommend installing the termios gem. Without it, it's possible to type + # fast enough to have letters still show up (when reading character by + # character only). + # + # source://highline//lib/highline/question.rb#116 def echo; end + + # Can be set to +true+ or +false+ to control whether or not input will + # be echoed back to the user. A setting of +true+ will cause echo to + # match input, but any other true value will be treated as a String to + # echo for each character typed. + # + # This requires HighLine's character reader. See the _character_ + # attribute for details. + # + # *Note*: When using HighLine to manage echo on Unix based systems, we + # recommend installing the termios gem. Without it, it's possible to type + # fast enough to have letters still show up (when reading character by + # character only). + # + # source://highline//lib/highline/question.rb#116 def echo=(_arg0); end + + # Returns an English explanation of the current range settings. + # + # source://highline//lib/highline/question.rb#381 def expected_range; end + + # source://highline//lib/highline/question.rb#292 def final_response(error); end + + # This is the actual responses hash that gets used in determining output + # Notice that we give @user_responses precedence over the responses + # generated internally via build_response + # + # source://highline//lib/highline/question.rb#288 def final_responses; end + + # Returns _first_answer_, which will be unset following this call. + # + # source://highline//lib/highline/question.rb#397 def first_answer; end + + # When set to a non *nil* value, this will be tried as an answer to the + # question. If this answer passes validations, it will become the result + # without the user ever being prompted. Otherwise this value is discarded, + # and this Question is resolved as a normal call to HighLine.ask(). + # + # source://highline//lib/highline/question.rb#187 def first_answer=(_arg0); end + + # Returns true if _first_answer_ is set. + # + # @return [Boolean] + # + # source://highline//lib/highline/question.rb#404 def first_answer?; end + + # Convert to String, remove whitespace and change case + # when necessary + # + # @param answer_string [String] + # @return [String] converted String + # + # source://highline//lib/highline/question.rb#462 def format_answer(answer_string); end + + # When set, the user will be prompted for multiple answers which will + # be collected into an Array or Hash and returned as the final answer. + # + # You can set _gather_ to an Integer to have an Array of exactly that + # many answers collected, or a String/Regexp to match an end input which + # will not be returned in the Array. + # + # Optionally _gather_ can be set to a Hash. In this case, the question + # will be asked once for each key and the answers will be returned in a + # Hash, mapped by key. The @key variable is set before each + # question is evaluated, so you can use it in your question. + # + # source://highline//lib/highline/question.rb#174 def gather; end + + # When set, the user will be prompted for multiple answers which will + # be collected into an Array or Hash and returned as the final answer. + # + # You can set _gather_ to an Integer to have an Array of exactly that + # many answers collected, or a String/Regexp to match an end input which + # will not be returned in the Array. + # + # Optionally _gather_ can be set to a Hash. In this case, the question + # will be asked once for each key and the answers will be returned in a + # Hash, mapped by key. The @key variable is set before each + # question is evaluated, so you can use it in your question. + # + # source://highline//lib/highline/question.rb#174 def gather=(_arg0); end + + # Returns an echo string that is adequate for this Question settings. + # + # @param response [String] + # @return [String] the response itself if {#echo} is +true+. + # @return [String] echo character if {#echo} is truethy. Mainly a String. + # @return [String] empty string if {#echo} is falsy. + # + # source://highline//lib/highline/question.rb#590 def get_echo_for_response(response); end + + # Return a line or character of input, as requested for this question. + # Character input will be returned as a single character String, + # not an Integer. + # + # This question's _first_answer_ will be returned instead of input, if set. + # + # Raises EOFError if input is exhausted. + # + # @param highline [HighLine] context + # @return [String] a character or line + # + # source://highline//lib/highline/question.rb#515 def get_response(highline); end + + # Uses {#get_response} but returns a default answer + # using {#answer_or_default} in case no answers was + # returned. + # + # @param highline [HighLine] context + # @return [String] + # + # source://highline//lib/highline/question.rb#535 def get_response_or_default(highline); end + + # The glob pattern used to limit file selection when File or Pathname is + # specified as an _answer_type_. Initially set to "*". + # + # source://highline//lib/highline/question.rb#198 def glob; end + + # The glob pattern used to limit file selection when File or Pathname is + # specified as an _answer_type_. Initially set to "*". + # + # source://highline//lib/highline/question.rb#198 def glob=(_arg0); end + + # If set, answer must pass an include?() check on this object. + # + # source://highline//lib/highline/question.rb#148 def in; end + + # If set, answer must pass an include?() check on this object. + # + # source://highline//lib/highline/question.rb#148 def in=(_arg0); end + + # Returns +true+ if the _answer_object_ is greater than the _above_ + # attribute, less than the _below_ attribute and include?()ed in the + # _in_ attribute. Otherwise, +false+ is returned. Any +nil+ attributes + # are not checked. + # + # @return [Boolean] + # + # source://highline//lib/highline/question.rb#414 def in_range?; end + + # Allows you to set a character limit for input. + # + # *WARNING*: This option forces a character by character read. + # + # source://highline//lib/highline/question.rb#101 def limit; end + + # Allows you to set a character limit for input. + # + # *WARNING*: This option forces a character by character read. + # + # source://highline//lib/highline/question.rb#101 def limit=(_arg0); end + + # When set to +true+ the question is asked, but output does not progress to + # the next line. The Cursor is moved back to the beginning of the question + # line and it is cleared so that all the contents of the line disappear from + # the screen. + # + # source://highline//lib/highline/question.rb#232 def overwrite; end + + # When set to +true+ the question is asked, but output does not progress to + # the next line. The Cursor is moved back to the beginning of the question + # line and it is cleared so that all the contents of the line disappear from + # the screen. + # + # source://highline//lib/highline/question.rb#232 def overwrite=(_arg0); end + + # Use the Readline library to fetch input. This allows input editing as + # well as keeping a history. In addition, tab will auto-complete + # within an Array of choices or a file listing. + # + # *WARNING*: This option is incompatible with all of HighLine's + # character reading modes and it causes HighLine to ignore the + # specified _input_ stream. + # + # source://highline//lib/highline/question.rb#126 def readline; end + + # Use the Readline library to fetch input. This allows input editing as + # well as keeping a history. In addition, tab will auto-complete + # within an Array of choices or a file listing. + # + # *WARNING*: This option is incompatible with all of HighLine's + # character reading modes and it causes HighLine to ignore the + # specified _input_ stream. + # + # source://highline//lib/highline/question.rb#126 def readline=(_arg0); end + + # Returns the provided _answer_string_ after processing whitespace by + # the rules of this Question. Valid settings for whitespace are: + # + # +nil+:: Do not alter whitespace. + # :strip:: Calls strip(). (Default.) + # :chomp:: Calls chomp(). + # :collapse:: Collapses all whitespace runs to a + # single space. + # :strip_and_collapse:: Calls strip(), then collapses all + # whitespace runs to a single space. + # :chomp_and_collapse:: Calls chomp(), then collapses all + # whitespace runs to a single space. + # :remove:: Removes all whitespace. + # + # An unrecognized choice (like :none) is treated as +nil+. + # + # This process is skipped for single character input. + # + # @param answer_string [String] + # @return [String] answer string with whitespaces removed + # + # source://highline//lib/highline/question.rb#441 def remove_whitespace(answer_string); end + + # A Hash that stores the various responses used by HighLine to notify + # the user. The currently used responses and their purpose are as + # follows: + # + # :ambiguous_completion:: Used to notify the user of an + # ambiguous answer the auto-completion + # system cannot resolve. + # :ask_on_error:: This is the question that will be + # redisplayed to the user in the event + # of an error. Can be set to + # :question to repeat the + # original question. + # :invalid_type:: The error message shown when a type + # conversion fails. + # :no_completion:: Used to notify the user that their + # selection does not have a valid + # auto-completion match. + # :not_in_range:: Used to notify the user that a + # provided answer did not satisfy + # the range requirement tests. + # :not_valid:: The error message shown when + # validation checks fail. + # + # source://highline//lib/highline/question.rb#223 def responses; end + + # Returns an Array of valid answers to this question. These answers are + # only known when _answer_type_ is set to an Array of choices, File, or + # Pathname. Any other time, this method will return an empty Array. + # + # source://highline//lib/highline/question.rb#473 def selection; end + + # readline() needs to handle its own output, but readline only supports + # full line reading. Therefore if question.echo is anything but true, + # the prompt will not be issued. And we have to account for that now. + # Also, JRuby-1.7's ConsoleReader.readLine() needs to be passed the prompt + # to handle line editing properly. + # + # @param highline [HighLine] context + # @return [void] + # + # source://highline//lib/highline/question.rb#581 def show_question(highline); end + + # The ERb template of the question to be asked. + # + # source://highline//lib/highline/question.rb#77 def template; end + + # The ERb template of the question to be asked. + # + # source://highline//lib/highline/question.rb#77 def template=(_arg0); end + + # Stringifies the template to be asked. + # + # source://highline//lib/highline/question.rb#486 def to_s; end + + # Returns +true+ if the provided _answer_string_ is accepted by the + # _validate_ attribute or +false+ if it's not. + # + # It's important to realize that an answer is validated after whitespace + # and case handling. + # + # @return [Boolean] + # + # source://highline//lib/highline/question.rb#497 def valid_answer?; end + + # If set to a Regexp, the answer must match (before type conversion). + # Can also be set to a Proc which will be called with the provided + # answer to validate with a +true+ or +false+ return. + # + # source://highline//lib/highline/question.rb#144 def validate; end + + # If set to a Regexp, the answer must match (before type conversion). + # Can also be set to a Proc which will be called with the provided + # answer to validate with a +true+ or +false+ return. + # + # source://highline//lib/highline/question.rb#144 def validate=(_arg0); end + + # When set to +true+ multiple entries will be collected according to + # the setting for _gather_, except they will be required to match + # each other. Multiple identical entries will return a single answer. + # + # source://highline//lib/highline/question.rb#180 def verify_match; end + + # When set to +true+ multiple entries will be collected according to + # the setting for _gather_, except they will be required to match + # each other. Multiple identical entries will return a single answer. + # + # source://highline//lib/highline/question.rb#180 def verify_match=(_arg0); end + + # Used to control whitespace processing for the answer to this question. + # See HighLine::Question.remove_whitespace() for acceptable settings. + # + # source://highline//lib/highline/question.rb#131 def whitespace; end + + # Used to control whitespace processing for the answer to this question. + # See HighLine::Question.remove_whitespace() for acceptable settings. + # + # source://highline//lib/highline/question.rb#131 def whitespace=(_arg0); end private + # Adds the default choice to the end of question between |...|. + # Trailing whitespace is preserved so the function of HighLine.say() is + # not affected. + # + # source://highline//lib/highline/question.rb#610 def append_default; end + + # source://highline//lib/highline/question.rb#622 def choice_error_str(message_source); end class << self + # If _template_or_question_ is already a Question object just return it. + # If not, build it. + # + # @param template_or_question [String, Question] what to ask + # @param answer_type [Class] to what class to convert the answer + # @param details to be passed to Question.new + # @return [Question] + # + # source://highline//lib/highline/question.rb#35 def build(template_or_question, answer_type = T.unsafe(nil), &details); end end end +# It provides all answer conversion flow. +# +# source://highline//lib/highline/question/answer_converter.rb#8 class HighLine::Question::AnswerConverter extend ::Forwardable + # It should be initialized with a Question object. + # The class will get the answer from {Question#answer} + # and then convert it to the proper {Question#answer_type}. + # It is mainly used by {Question#convert} + # + # @param question [Question] + # @return [AnswerConverter] a new instance of AnswerConverter + # + # source://highline//lib/highline/question/answer_converter.rb#21 def initialize(question); end - def answer(*args, &block); end - def answer=(*args, &block); end - def answer_type(*args, &block); end - def check_range(*args, &block); end - def choices_complete(*args, &block); end + # source://forwardable/1.3.2/forwardable.rb#229 + def answer(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def answer=(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def answer_type(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def check_range(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def choices_complete(*args, **_arg1, &block); end + + # Based on the given Question object's settings, + # it makes the conversion and returns the answer. + # + # @return [Object] the converted answer. + # + # source://highline//lib/highline/question/answer_converter.rb#28 def convert; end - def directory(*args, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def directory(*args, **_arg1, &block); end + + # @return [Array] answer converted to an Array + # + # source://highline//lib/highline/question/answer_converter.rb#80 def to_array; end + + # @return [File] answer converted to a File + # + # source://highline//lib/highline/question/answer_converter.rb#68 def to_file; end + + # @return [Float] answer converted to a Float + # + # source://highline//lib/highline/question/answer_converter.rb#53 def to_float; end + + # @return [Integer] answer converted to an Integer + # + # source://highline//lib/highline/question/answer_converter.rb#48 def to_integer; end + + # @return [Pathname] answer converted to an Pathname + # + # source://highline//lib/highline/question/answer_converter.rb#74 def to_pathname; end + + # @return [Proc] answer converted to an Proc + # + # source://highline//lib/highline/question/answer_converter.rb#86 def to_proc; end + + # @return [Regexp] answer converted to a Regexp + # + # source://highline//lib/highline/question/answer_converter.rb#63 def to_regexp; end + + # @return [HighLine::String] answer converted to a HighLine::String + # + # source://highline//lib/highline/question/answer_converter.rb#37 def to_string; end + + # @return [Symbol] answer converted to an Symbol + # + # source://highline//lib/highline/question/answer_converter.rb#58 def to_symbol; end private + # source://highline//lib/highline/question/answer_converter.rb#92 def convert_by_answer_type; end end +# Deals with the task of "asking" a question +# +# source://highline//lib/highline/question_asker.rb#5 class HighLine::QuestionAsker include ::HighLine::CustomErrors + # To do its work QuestionAsker needs a Question + # to be asked and a HighLine context where to + # direct output. + # + # @param question [Question] question to be asked + # @param highline [HighLine] context + # @return [QuestionAsker] a new instance of QuestionAsker + # + # source://highline//lib/highline/question_asker.rb#17 def initialize(question, highline); end + # Gets just one answer, as opposed to #gather_answers + # + # @return [String] answer + # + # source://highline//lib/highline/question_asker.rb#26 def ask_once; end + + # Collects an Array/Hash full of answers as described in + # HighLine::Question.gather(). + # + # @return [Array, Hash] answers + # + # source://highline//lib/highline/question_asker.rb#68 def gather_answers; end + + # Gather multiple values and store them on a Hash + # with keys provided by the Hash on {Question#gather} + # + # @return [Hash] + # + # source://highline//lib/highline/question_asker.rb#106 def gather_hash; end + + # Gather multiple integer values based on {Question#gather} count + # + # @return [Array] answers + # + # source://highline//lib/highline/question_asker.rb#87 def gather_integer; end + + # Gather multiple values until any of them matches the + # {Question#gather} Regexp. + # + # @return [Array] answers + # + # source://highline//lib/highline/question_asker.rb#96 def gather_regexp; end + + # @return [Question] question to be asked + # + # source://highline//lib/highline/question_asker.rb#7 def question; end private + # source://highline//lib/highline/question_asker.rb#131 def answer_matches_regex(answer); end + + # Delegate to Highline + # + # source://highline//lib/highline/question_asker.rb#117 def explain_error(explanation_key); end + + # source://highline//lib/highline/question_asker.rb#139 def gather_answers_based_on_type; end + + # source://highline//lib/highline/question_asker.rb#122 def gather_with_array; end end +# A sample ColorScheme. +# +# source://highline//lib/highline/color_scheme.rb#131 class HighLine::SampleColorScheme < ::HighLine::ColorScheme + # Builds the sample scheme with settings for :critical, + # :error, :warning, :notice, :info, + # :debug, :row_even, and :row_odd colors. + # + # @return [SampleColorScheme] a new instance of SampleColorScheme + # + # source://highline//lib/highline/color_scheme.rb#147 def initialize(_h = T.unsafe(nil)); end end +# source://highline//lib/highline/color_scheme.rb#132 HighLine::SampleColorScheme::SAMPLE_SCHEME = T.let(T.unsafe(nil), Hash) +# This class handles proper formatting based +# on a HighLine context, applying wrapping, +# pagination, indentation and color rendering +# when necessary. It's used by {HighLine#render_statement} +# +# @see HighLine#render_statement +# +# source://highline//lib/highline/statement.rb#13 class HighLine::Statement + # It needs the input String and the HighLine context + # + # @param source [#to_s] + # @param highline [HighLine] context + # @return [Statement] a new instance of Statement + # + # source://highline//lib/highline/statement.rb#28 def initialize(source, highline); end + # The HighLine context + # + # @return [HighLine] + # + # source://highline//lib/highline/statement.rb#19 def highline; end + + # The source object to be stringfied and formatted. + # + # source://highline//lib/highline/statement.rb#15 def source; end + + # Returns the formated statement. + # Applies wrapping, pagination, indentation and color rendering + # based on HighLine instance settings. + # + # @return [String] formated statement + # + # source://highline//lib/highline/statement.rb#38 def statement; end + + # The stringfied source object + # + # @return [String] + # + # source://highline//lib/highline/statement.rb#23 def template_string; end + + # Returns the formated statement. + # Applies wrapping, pagination, indentation and color rendering + # based on HighLine instance settings. + # Delegates to {#statement} + # + # @return [String] formated statement + # + # source://highline//lib/highline/statement.rb#44 def to_s; end private + # source://highline//lib/highline/statement.rb#58 def format_statement; end + + # source://highline//lib/highline/statement.rb#72 def render_template; end + + # source://highline//lib/highline/statement.rb#54 def stringfy(template_string); end + + # source://highline//lib/highline/statement.rb#80 def template; end class << self + # source://highline//lib/highline/statement.rb#48 def const_missing(constant); end end end +# HighLine::String is a subclass of String with convenience methods added +# for colorization. +# +# Available convenience methods include: +# * 'color' method e.g. highline_string.color(:bright_blue, +# :underline) +# * colors e.g. highline_string.magenta +# * RGB colors e.g. highline_string.rgb_ff6000 +# or highline_string.rgb(255,96,0) +# * background colors e.g. highline_string.on_magenta +# * RGB background colors e.g. highline_string.on_rgb_ff6000 +# or highline_string.on_rgb(255,96,0) +# * styles e.g. highline_string.underline +# +# Additionally, convenience methods can be chained, for instance the +# following are equivalent: +# highline_string.bright_blue.blink.underline +# highline_string.color(:bright_blue, :blink, :underline) +# HighLine.color(highline_string, :bright_blue, :blink, :underline) +# +# For those less squeamish about possible conflicts, the same convenience +# methods can be added to the built-in String class, as follows: +# +# require 'highline' +# Highline.colorize_strings +# +# source://highline//lib/highline/string.rb#33 class HighLine::String < ::String include ::HighLine::StringExtensions @@ -645,11 +3154,17 @@ class HighLine::String < ::String def bright_white; end def bright_yellow; end def clear; end + + # source://highline//lib/highline/string_extensions.rb#33 def color(*args); end + def concealed; end def cyan; end def dark; end + + # source://highline//lib/highline/string_extensions.rb#33 def foreground(*args); end + def gray; end def green; end def grey; end @@ -665,9 +3180,15 @@ class HighLine::String < ::String def light_white; end def light_yellow; end def magenta; end + + # source://highline//lib/highline/string_extensions.rb#62 def method_missing(method, *_args); end + def none; end + + # source://highline//lib/highline/string_extensions.rb#39 def on(arg); end + def on_black; end def on_blue; end def on_bright_black; end @@ -699,14 +3220,22 @@ class HighLine::String < ::String def on_magenta; end def on_none; end def on_red; end + + # source://highline//lib/highline/string_extensions.rb#55 def on_rgb(*colors); end + def on_white; end def on_yellow; end def red; end def reset; end def reverse; end + + # source://highline//lib/highline/string_extensions.rb#49 def rgb(*colors); end + + # source://highline//lib/highline/string_extensions.rb#44 def uncolor; end + def underline; end def underscore; end def white; end @@ -714,140 +3243,579 @@ class HighLine::String < ::String private + # source://highline//lib/highline/string_extensions.rb#71 def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end + + # source://highline//lib/highline/string_extensions.rb#77 def setup_color_code(*colors); end end +# HighLine extensions for String class. +# Included by HighLine::String. +# +# source://highline//lib/highline/string_extensions.rb#13 module HighLine::StringExtensions class << self + # At include time, it defines all basic builtin styles. + # + # @param base [Class, Module] base Class/Module + # + # source://highline//lib/highline/string_extensions.rb#96 def define_builtin_style_methods(base); end + + # At include time, it defines all basic style + # support method like #color, #on, #uncolor, + # #rgb, #on_rgb and the #method_missing callback + # + # @param base [Class, Module] the base class/module + # @return [void] + # + # source://highline//lib/highline/string_extensions.rb#29 def define_style_support_methods(base); end + + # Included hook. Actions to take when being included. + # + # @param base [Class, Module] base class + # + # source://highline//lib/highline/string_extensions.rb#18 def included(base); end end end +# source://highline//lib/highline/string_extensions.rb#14 HighLine::StringExtensions::STYLE_METHOD_NAME_PATTERN = T.let(T.unsafe(nil), Regexp) +# ANSI styles to be used by HighLine. +# +# source://highline//lib/highline/style.rb#68 class HighLine::Style + # Single color/styles have :name, :code, :rgb (possibly), :builtin + # Compound styles have :name, :list, :builtin + # + # @param defn [Hash] options for the Style to be created. + # @return [Style] a new instance of Style + # + # source://highline//lib/highline/style.rb#204 def initialize(defn = T.unsafe(nil)); end + # @return [Integer] the BLUE component of the rgb code + # + # source://highline//lib/highline/style.rb#261 def blue; end + + # @return [Style] a brighter version of this Style + # + # source://highline//lib/highline/style.rb#296 def bright; end + + # @return [Boolean] true if the Style is builtin or not. + # + # source://highline//lib/highline/style.rb#198 def builtin; end + + # @return [Boolean] true if the Style is builtin or not. + # + # source://highline//lib/highline/style.rb#198 def builtin=(_arg0); end + + # @return [String] all codes of the Style list joined together + # (if a Style list) + # @return [String] the Style code + # + # source://highline//lib/highline/style.rb#242 def code; end + + # Uses the Style definition to add ANSI color escape codes + # to a a given String + # + # @param string [String] to be colored + # @return [String] an ANSI colored string + # + # source://highline//lib/highline/style.rb#235 def color(string); end + + # Duplicate current Style using the same definition used to create it. + # + # @return [Style] duplicated Style + # + # source://highline//lib/highline/style.rb#222 def dup; end + + # @return [Integer] the GREEN component of the rgb code + # + # source://highline//lib/highline/style.rb#256 def green; end + + # @return [Style] a lighter version of this Style + # + # source://highline//lib/highline/style.rb#301 def light; end + + # When a compound Style, returns a list of its components. + # + # @return [Array] components of a Style list + # + # source://highline//lib/highline/style.rb#192 def list; end + + # Style name + # + # @return [Symbol] the name of the Style + # + # source://highline//lib/highline/style.rb#188 def name; end + + # Uses the color as background and return a new style. + # + # @return [Style] + # + # source://highline//lib/highline/style.rb#290 def on; end + + # @return [Integer] the RED component of the rgb code + # + # source://highline//lib/highline/style.rb#251 def red; end + + # @return [Array] the three numerical rgb codes. Ex: [10, 12, 127] + # + # source://highline//lib/highline/style.rb#195 def rgb; end + + # @return [Array] the three numerical rgb codes. Ex: [10, 12, 127] + # + # source://highline//lib/highline/style.rb#195 def rgb=(_arg0); end + + # @return [Hash] the definition used to create this Style + # + # source://highline//lib/highline/style.rb#227 def to_hash; end + + # Duplicate Style with some minor changes + # + # @param new_name [Symbol] + # @param options [Hash] Style attributes to be changed + # @return [Style] new Style with changed attributes + # + # source://highline//lib/highline/style.rb#269 def variant(new_name, options = T.unsafe(nil)); end private + # source://highline//lib/highline/style.rb#307 def create_bright_variant(variant_name); end + + # source://highline//lib/highline/style.rb#321 def find_style(name); end class << self + # From an ANSI number (color escape code), craft an 'rgb_hex' code of it + # + # @param ansi_number [Integer] ANSI escape code + # @return [String] all color codes joined as {.rgb_hex} + # + # source://highline//lib/highline/style.rb#157 def ansi_rgb_to_hex(ansi_number); end + + # Clear all custom Styles, restoring the Style index to + # builtin styles only. + # + # @return [void] + # + # source://highline//lib/highline/style.rb#92 def clear_index; end + + # @return [Hash] list of all cached Style codes + # + # source://highline//lib/highline/style.rb#175 def code_index; end + + # Index the given style. + # Uses @code_index (Hash) as repository. + # + # @param style [Style] + # @return [Style] the given style + # + # source://highline//lib/highline/style.rb#73 def index(style); end + + # @return [Hash] list of all cached Styles + # + # source://highline//lib/highline/style.rb#170 def list; end + + # Search for or create a new Style from the colors provided. + # + # @example Creating a new Style based on rgb code + # rgb_style = HighLine::Style.rgb(9, 10, 11) + # + # rgb_style.name # => :rgb_090a0b + # rgb_style.code # => "\e[38;5;16m" + # rgb_style.rgb # => [9, 10, 11] + # @param colors [Array] color codes + # @return [Style] a Style with the rgb colors provided. + # + # source://highline//lib/highline/style.rb#133 def rgb(*colors); end + + # Converts all given color codes to hexadecimal and + # join them in a single string. If any given color code + # is already a String, doesn't perform any convertion. + # + # @example + # HighLine::Style.rgb_hex(9, 10, "11") # => "090a11" + # @param colors [Array] color codes + # @return [String] all color codes joined + # + # source://highline//lib/highline/style.rb#107 def rgb_hex(*colors); end + + # Returns the rgb number to be used as escape code on ANSI terminals. + # + # @param parts [Array] three numerical codes for red, green + # and blue + # @return [Numeric] to be used as escape code on ANSI terminals + # + # source://highline//lib/highline/style.rb#147 def rgb_number(*parts); end + + # Split an rgb code string into its 3 numerical compounds. + # + # @example + # HighLine::Style.rgb_parts("090A0B") # => [9, 10, 11] + # @param hex [String] rgb code string like "010F0F" + # @return [Array] numerical compounds like [1, 15, 15] + # + # source://highline//lib/highline/style.rb#119 def rgb_parts(hex); end + + # Remove any ANSI color escape sequence of the given String. + # + # @param string [String] + # @return [String] + # + # source://highline//lib/highline/style.rb#182 def uncolor(string); end end end +# Renders an erb template taking a {Question} and a {HighLine} instance +# as context. +# +# source://highline//lib/highline/template_renderer.rb#8 class HighLine::TemplateRenderer extend ::Forwardable + # Initializes the TemplateRenderer object with its template and + # HighLine and Question contexts. + # + # @param template [ERB] ERB template. + # @param source [Question] question object. + # @param highline [HighLine] HighLine instance. + # @return [TemplateRenderer] a new instance of TemplateRenderer + # + # source://highline//lib/highline/template_renderer.rb#30 def initialize(template, source, highline); end - def answer(*args, &block); end - def answer_type(*args, &block); end - def color(*args, &block); end - def header(*args, &block); end + # source://forwardable/1.3.2/forwardable.rb#229 + def answer(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def answer_type(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def color(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def header(*args, **_arg1, &block); end + + # @return [HighLine] HighLine instance used as context + # + # source://highline//lib/highline/template_renderer.rb#21 def highline; end - def key(*args, &block); end - def list(*args, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def key(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def list(*args, **_arg1, &block); end + + # @return [Question, Menu] {#source} attribute. + # + # source://highline//lib/highline/template_renderer.rb#51 def menu; end + + # Returns an error message when the called method + # is not available. + # + # @return [String] error message. + # + # source://highline//lib/highline/template_renderer.rb#44 def method_missing(method, *args); end - def prompt(*args, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def prompt(*args, **_arg1, &block); end + + # @return [String] rendered template + # + # source://highline//lib/highline/template_renderer.rb#37 def render; end + + # @return [Question, Menu] Question instance used as context + # + # source://highline//lib/highline/template_renderer.rb#18 def source; end + + # @return [ERB] ERB template being rendered + # + # source://highline//lib/highline/template_renderer.rb#15 def template; end class << self + # If some constant is missing at this TemplateRenderer instance, + # get it from HighLine. Useful to get color and style contants. + # + # @param name [Symbol] automatically passed constant's name as Symbol + # + # source://highline//lib/highline/template_renderer.rb#58 def const_missing(name); end end end +# Basic Terminal class which HighLine will direct +# input and output to. +# The specialized Terminals all decend from this HighLine::Terminal class +# +# source://highline//lib/highline/terminal.rb#18 class HighLine::Terminal + # Creates a terminal instance based on given input and output streams. + # + # @param input [IO] input stream + # @param output [IO] output stream + # @return [Terminal] a new instance of Terminal + # + # source://highline//lib/highline/terminal.rb#46 def initialize(input, output); end + # Returns the class name as String. Useful for debuggin. + # + # @return [String] class name. Ex: "HighLine::Terminal::IOConsole" + # + # source://highline//lib/highline/terminal.rb#162 def character_mode; end + + # Get one character from the terminal + # + # @return [String] one character + # + # source://highline//lib/highline/terminal.rb#78 def get_character; end + + # Get one line from the terminal and format accordling. + # Use readline if question has readline mode set. + # + # @param question [HighLine::Question] + # @param highline [HighLine] + # + # source://highline//lib/highline/terminal.rb#84 def get_line(question, highline); end + + # Get one line from terminal using default #gets method. + # + # @param highline [HighLine] + # @raise [EOFError] + # + # source://highline//lib/highline/terminal.rb#135 def get_line_default(highline); end + + # Get one line using #readline_read + # + # @param question [HighLine::Question] + # @param highline [HighLine] + # + # source://highline//lib/highline/terminal.rb#97 def get_line_with_readline(question, highline); end + + # An initialization callback. + # It is called by {.get_terminal}. + # + # source://highline//lib/highline/terminal.rb#53 def initialize_system_extensions; end + + # @return [IO] input stream + # + # source://highline//lib/highline/terminal.rb#38 def input; end + + # Running on JRuby? + # + # @return [Boolean] + # + # source://highline//lib/highline/terminal.rb#144 def jruby?; end + + # @return [IO] output stream + # + # source://highline//lib/highline/terminal.rb#41 def output; end + + # Enter Raw No Echo mode. + # + # source://highline//lib/highline/terminal.rb#62 def raw_no_echo_mode; end + + # Yieds a block to be executed in Raw No Echo mode and + # then restore the terminal state. + # + # source://highline//lib/highline/terminal.rb#66 def raw_no_echo_mode_exec; end + + # Use readline to read one line + # + # @param question [HighLine::Question] question from where to get + # autocomplete candidate strings + # + # source://highline//lib/highline/terminal.rb#112 def readline_read(question); end + + # Restore terminal to its default mode + # + # source://highline//lib/highline/terminal.rb#74 def restore_mode; end + + # Running on Rubinius? + # + # @return [Boolean] + # + # source://highline//lib/highline/terminal.rb#149 def rubinius?; end + + # @return [Array] two value terminal + # size like [columns, lines] + # + # source://highline//lib/highline/terminal.rb#57 def terminal_size; end + + # Running on Windows? + # + # @return [Boolean] + # + # source://highline//lib/highline/terminal.rb#154 def windows?; end private + # Restores terminal state using shell stty command. + # + # source://highline//lib/highline/terminal.rb#186 def restore_stty; end + + # Yield a block using stty shell commands to preserve the terminal state. + # + # source://highline//lib/highline/terminal.rb#169 def run_preserving_stty; end + + # Saves terminal state using shell stty command. + # + # source://highline//lib/highline/terminal.rb#177 def save_stty; end class << self + # Probe for and return a suitable Terminal instance + # + # @param input [IO] input stream + # @param output [IO] output stream + # + # source://highline//lib/highline/terminal.rb#22 def get_terminal(input, output); end end end +# io/console option for HighLine::Terminal. +# It's the most used terminal. +# TODO: We're rescuing when not a terminal. +# We should make a more robust implementation. +# +# source://highline//lib/highline/terminal/io_console.rb#10 class HighLine::Terminal::IOConsole < ::HighLine::Terminal + # Get one character from the terminal + # + # @return [String] one character + # + # source://highline//lib/highline/terminal/io_console.rb#29 def get_character; end + + # Enter Raw No Echo mode. + # + # source://highline//lib/highline/terminal/io_console.rb#17 def raw_no_echo_mode; end + + # Restore terminal to its default mode + # + # source://highline//lib/highline/terminal/io_console.rb#23 def restore_mode; end + + # @return [Array] two value terminal + # size like [columns, lines] + # + # source://highline//lib/highline/terminal/io_console.rb#11 def terminal_size; end end +# The version of the installed library. +# +# source://highline//lib/highline/version.rb#5 HighLine::VERSION = T.let(T.unsafe(nil), String) +# A simple Wrapper module that is aware of ANSI escape codes. +# It compensates for the ANSI escape codes so it works on the +# actual (visual) line length. +# +# source://highline//lib/highline/wrapper.rb#9 module HighLine::Wrapper class << self + # Returns the length of the passed +string_with_escapes+, minus and color + # sequence escapes. + # + # @param string_with_escapes [String] any ANSI colored String + # @return [Integer] length based on the visual size of the String + # (without the escape codes) + # + # source://highline//lib/highline/wrapper.rb#49 def actual_length(string_with_escapes); end + + # Wrap a sequence of _lines_ at _wrap_at_ characters per line. Existing + # newlines will not be affected by this process, but additional newlines + # may be added. + # + # @param text [String] text to be wrapped + # @param wrap_at [#to_i] column count to wrap the text into + # + # source://highline//lib/highline/wrapper.rb#17 def wrap(text, wrap_at); end end end +# When requiring 'highline/import' HighLine adds {#or_ask} to Object so +# it is globally available. +# +# source://highline//lib/highline/import.rb#30 class Object < ::BasicObject - include ::ActiveSupport::ToJsonWithActiveSupportEncoder include ::ActiveSupport::ForkTracker::CoreExt - include ::ActiveSupport::ForkTracker::CoreExtPrivate include ::Kernel - include ::JSON::Ext::Generator::GeneratorMethods::Object include ::PP::ObjectMixin - include ::ActiveSupport::Dependencies::Loadable - include ::ActiveSupport::Tryable + # Tries this object as a _first_answer_ for a HighLine::Question. See that + # attribute for details. + # + # *Warning*: This Object will be passed to String() before set. + # + # @param args [Array<#to_s>] + # @param details [lambda] block to be called with the question + # instance as argument. + # @return [String] answer + # + # source://highline//lib/highline/import.rb#41 def or_ask(*args, &details); end end diff --git a/Library/Homebrew/sorbet/rbi/gems/hpricot@0.8.6.rbi b/Library/Homebrew/sorbet/rbi/gems/hpricot@0.8.6.rbi index c07ed11de18cb9..6d1aaa89d7d49c 100644 --- a/Library/Homebrew/sorbet/rbi/gems/hpricot@0.8.6.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/hpricot@0.8.6.rbi @@ -4,49 +4,118 @@ # This is an autogenerated file for types exported from the `hpricot` gem. # Please instead update this file by running `bin/tapioca gem hpricot`. -::RUBY19 = T.let(T.unsafe(nil), TrueClass) - +# source://hpricot//lib/hpricot/tag.rb#1 module Hpricot class << self + # Hpricot::XML parses input, disregarding all the HTML rules + # and returning a document tree. + # + # source://hpricot//lib/hpricot/parse.rb#20 def XML(input = T.unsafe(nil), opts = T.unsafe(nil), &blk); end + def buffer_size; end def buffer_size=(_arg0); end + + # source://hpricot//lib/hpricot/builder.rb#15 def build(ele = T.unsafe(nil), assigns = T.unsafe(nil), &blk); end + def css(_arg0, _arg1, _arg2); end + + # :stopdoc: + # + # source://hpricot//lib/hpricot/parse.rb#27 def make(input = T.unsafe(nil), opts = T.unsafe(nil), &blk); end + + # Hpricot.parse parses input and return a document tree. + # represented by Hpricot::Doc. + # + # source://hpricot//lib/hpricot/parse.rb#14 def parse(input = T.unsafe(nil), opts = T.unsafe(nil), &blk); end + def scan(*_arg0); end + + # XML unescape + # + # source://hpricot//lib/hpricot/builder.rb#8 def uxs(str); end end end +# Common sets of attributes. +# +# source://hpricot//lib/hpricot/tags.rb#7 Hpricot::AttrCore = T.let(T.unsafe(nil), Array) + +# source://hpricot//lib/hpricot/tags.rb#9 Hpricot::AttrEvents = T.let(T.unsafe(nil), Array) + +# source://hpricot//lib/hpricot/tags.rb#11 Hpricot::AttrFocus = T.let(T.unsafe(nil), Array) + +# source://hpricot//lib/hpricot/tags.rb#12 Hpricot::AttrHAlign = T.let(T.unsafe(nil), Array) + +# source://hpricot//lib/hpricot/tags.rb#8 Hpricot::AttrI18n = T.let(T.unsafe(nil), Array) + +# source://hpricot//lib/hpricot/tags.rb#13 Hpricot::AttrVAlign = T.let(T.unsafe(nil), Array) +# source://hpricot//lib/hpricot/tag.rb#41 class Hpricot::Attributes + # @return [Attributes] a new instance of Attributes + # + # source://hpricot//lib/hpricot/tag.rb#43 def initialize(e); end + # source://hpricot//lib/hpricot/tag.rb#46 def [](k); end + + # source://hpricot//lib/hpricot/tag.rb#49 def []=(k, v); end + + # Returns the value of attribute element. + # + # source://hpricot//lib/hpricot/tag.rb#42 def element; end + + # Sets the attribute element + # + # @param value the value to set the attribute element to. + # + # source://hpricot//lib/hpricot/tag.rb#42 def element=(_arg0); end + + # source://hpricot//lib/hpricot/tag.rb#65 def inspect; end + + # source://hpricot//lib/hpricot/tag.rb#52 def to_hash; end + + # source://hpricot//lib/hpricot/tag.rb#62 def to_s; end end +# source://hpricot//lib/hpricot/tags.rb#14 Hpricot::Attrs = T.let(T.unsafe(nil), Array) +# BlankSlate provides an abstract base class with no predefined +# methods (except for \_\_send__ and \_\_id__). +# BlankSlate is useful as a base class when writing classes that +# depend upon method_missing (e.g. dynamic proxies). +# +# source://hpricot//lib/hpricot/blankslate.rb#17 class Hpricot::BlankSlate class << self + # Hide the method named +name+ in the BlankSlate class. Don't + # hide +instance_eval+ or any method beginning with "__". + # + # source://hpricot//lib/hpricot/blankslate.rb#22 def hide(name); end end end +# source://hpricot//lib/hpricot/tag.rb#124 class Hpricot::BogusETag include ::Hpricot include ::Hpricot::Node @@ -55,25 +124,42 @@ class Hpricot::BogusETag include ::Hpricot::Leaf::Trav include ::Hpricot::BogusETag::Trav + # @return [BogusETag] a new instance of BogusETag + # + # source://hpricot//lib/hpricot/tag.rb#125 def initialize(name); end def clear_raw; end + + # source://hpricot//lib/hpricot/tag.rb#126 def output(out, opts = T.unsafe(nil)); end + + # source://hpricot//lib/hpricot/inspect.rb#90 def pretty_print(q); end + def raw_string; end end +# source://hpricot//lib/hpricot/modules.rb#36 module Hpricot::BogusETag::Trav include ::Hpricot::Traverse include ::Hpricot::Leaf::Trav end +# source://hpricot//lib/hpricot/builder.rb#24 module Hpricot::Builder + # Write a +string+ to the HTML stream without escaping it. + # + # source://hpricot//lib/hpricot/builder.rb#55 def <<(string); end + def a(*args, &block); end def abbr(*args, &block); end def acronym(*args, &block); end + + # source://hpricot//lib/hpricot/builder.rb#42 def add_child(ele); end + def address(*args, &block); end def applet(*args, &block); end def area(*args, &block); end @@ -85,7 +171,10 @@ module Hpricot::Builder def blockquote(*args, &block); end def body(*args, &block); end def br(*args, &block); end + + # source://hpricot//lib/hpricot/builder.rb#121 def build(*a, &b); end + def button(*args, &block); end def caption(*args, &block); end def center(*args, &block); end @@ -93,14 +182,22 @@ module Hpricot::Builder def code(*args, &block); end def col(*args, &block); end def colgroup(*args, &block); end + + # Write a +string+ to the HTML stream without escaping it. + # + # source://hpricot//lib/hpricot/builder.rb#55 def concat(string); end + def dd(*args, &block); end def del(*args, &block); end def dfn(*args, &block); end def dir(*args, &block); end def div(*args, &block); end def dl(*args, &block); end + + # source://hpricot//lib/hpricot/builder.rb#149 def doctype(target, pub, sys); end + def dt(*args, &block); end def em(*args, &block); end def fieldset(*args, &block); end @@ -112,10 +209,26 @@ module Hpricot::Builder def h4(*args, &block); end def h5(*args, &block); end def h6(*args, &block); end + + # Builds a head tag. Adds a meta tag inside with Content-Type + # set to text/html; charset=utf-8. + # + # source://hpricot//lib/hpricot/builder.rb#157 def head(*args, &block); end + def hr(*args, &block); end def html(*args, &block); end + + # Every HTML tag method goes through an html_tag call. So, calling div is equivalent + # to calling html_tag(:div). All HTML tags in Hpricot's list are given generated wrappers + # for this method. + # + # If the @auto_validation setting is on, this method will check for many common mistakes which + # could lead to invalid XHTML. + # + # source://hpricot//lib/hpricot/builder.rb#131 def html_tag(sym, *args, &block); end + def i(*args, &block); end def iframe(*args, &block); end def img(*args, &block); end @@ -152,11 +265,26 @@ module Hpricot::Builder def sub(*args, &block); end def sup(*args, &block); end def table(*args, &block); end + + # Create a tag named +tag+. Other than the first argument which is the tag name, + # the arguments are the same as the tags implemented via method_missing. + # + # source://hpricot//lib/hpricot/builder.rb#64 def tag!(tag, *args, &block); end + def tbody(*args, &block); end def td(*args, &block); end + + # Write a +string+ to the HTML stream without escaping it. + # + # source://hpricot//lib/hpricot/builder.rb#55 def text(string); end + + # Write a +string+ to the HTML stream, making sure to escape it. + # + # source://hpricot//lib/hpricot/builder.rb#50 def text!(string); end + def textarea(*args, &block); end def tfoot(*args, &block); end def th(*args, &block); end @@ -167,18 +295,31 @@ module Hpricot::Builder def u(*args, &block); end def ul(*args, &block); end def var(*args, &block); end + + # Builds an html tag with XHTML 1.0 Strict doctype instead. + # + # source://hpricot//lib/hpricot/builder.rb#173 def xhtml_strict(attrs = T.unsafe(nil), &block); end + + # Builds an html tag. An XML 1.0 instruction and an XHTML 1.0 Transitional doctype + # are prepended. Also assumes :xmlns => "http://www.w3.org/1999/xhtml", + # :lang => "en". + # + # source://hpricot//lib/hpricot/builder.rb#167 def xhtml_transitional(attrs = T.unsafe(nil), &block); end private + # source://hpricot//lib/hpricot/builder.rb#180 def xhtml_html(attrs = T.unsafe(nil), &block); end class << self + # source://hpricot//lib/hpricot/builder.rb#38 def set(option, value); end end end +# source://hpricot//lib/hpricot/tag.rb#152 class Hpricot::CData include ::Hpricot include ::Hpricot::Node @@ -187,22 +328,32 @@ class Hpricot::CData include ::Hpricot::Leaf::Trav include ::Hpricot::CData::Trav + # @return [CData] a new instance of CData + # + # source://hpricot//lib/hpricot/tag.rb#153 def initialize(content); end def content; end def content=(_arg0); end def inner_text; end + + # source://hpricot//lib/hpricot/tag.rb#158 def output(out, opts = T.unsafe(nil)); end + + # source://hpricot//lib/hpricot/tag.rb#157 def raw_string; end + def to_plain_text; end def to_s; end end +# source://hpricot//lib/hpricot/modules.rb#30 module Hpricot::CData::Trav include ::Hpricot::Traverse include ::Hpricot::Leaf::Trav end +# source://hpricot//lib/hpricot/tag.rb#207 class Hpricot::Comment include ::Hpricot include ::Hpricot::Node @@ -213,60 +364,215 @@ class Hpricot::Comment def content; end def content=(_arg0); end + + # source://hpricot//lib/hpricot/tag.rb#210 def output(out, opts = T.unsafe(nil)); end + + # source://hpricot//lib/hpricot/tag.rb#208 def pathname; end + + # source://hpricot//lib/hpricot/tag.rb#209 def raw_string; end end +# source://hpricot//lib/hpricot/modules.rb#35 module Hpricot::Comment::Trav include ::Hpricot::Traverse include ::Hpricot::Leaf::Trav end +# source://hpricot//lib/hpricot/modules.rb#12 module Hpricot::Container include ::Hpricot include ::Hpricot::Node end +# :startdoc: +# +# source://hpricot//lib/hpricot/modules.rb#26 module Hpricot::Container::Trav include ::Hpricot::Traverse + # Returns a list of CSS classes to which this element belongs. + # + # source://hpricot//lib/hpricot/traverse.rb#518 def classes; end + + # Return all children of this node which can contain other + # nodes. This is a good way to get all HTML elements which + # aren't text, comment, doctype or processing instruction nodes. + # + # source://hpricot//lib/hpricot/traverse.rb#404 def containers; end + + # +each_child+ iterates over each child. + # + # source://hpricot//lib/hpricot/traverse.rb#498 def each_child(&block); end + + # +each_child_with_index+ iterates over each child. + # + # source://hpricot//lib/hpricot/traverse.rb#504 def each_child_with_index(&block); end + + # +each_hyperlink+ traverses hyperlinks such as HTML href attribute + # of A element. + # + # It yields Hpricot::Text. + # + # Note that +each_hyperlink+ yields HTML href attribute of BASE element. + # + # source://hpricot//lib/hpricot/traverse.rb#614 def each_hyperlink; end + + # +each_hyperlink_uri+ traverses hyperlinks such as HTML href attribute + # of A element. + # + # It yields Hpricot::Text and URI for each hyperlink. + # + # The URI objects are created with a base URI which is given by + # HTML BASE element or the argument ((|base_uri|)). + # +each_hyperlink_uri+ doesn't yields href of the BASE element. + # + # source://hpricot//lib/hpricot/traverse.rb#591 def each_hyperlink_uri(base_uri = T.unsafe(nil)); end + + # +each_uri+ traverses hyperlinks such as HTML href attribute + # of A element. + # + # It yields URI for each hyperlink. + # + # The URI objects are created with a base URI which is given by + # HTML BASE element or the argument ((|base_uri|)). + # + # source://hpricot//lib/hpricot/traverse.rb#628 def each_uri(base_uri = T.unsafe(nil)); end + + # +filter+ rebuilds the tree without some components. + # + # node.filter {|descendant_node| predicate } -> node + # loc.filter {|descendant_loc| predicate } -> node + # + # +filter+ yields each node except top node. + # If given block returns false, corresponding node is dropped. + # If given block returns true, corresponding node is retained and + # inner nodes are examined. + # + # +filter+ returns an node. + # It doesn't return location object even if self is location object. + # + # source://hpricot//lib/hpricot/traverse.rb#719 def filter(&block); end + + # +find_element+ searches an element which universal name is specified by + # the arguments. + # It returns nil if not found. + # + # source://hpricot//lib/hpricot/traverse.rb#512 def find_element(*names); end + + # Find sibling elements which follow the current one. Like the other "sibling" methods, this weeds + # out text and comment nodes. + # + # source://hpricot//lib/hpricot/traverse.rb#435 def following_siblings; end + + # source://hpricot//lib/hpricot/traverse.rb#522 def get_element_by_id(id); end + + # source://hpricot//lib/hpricot/traverse.rb#531 def get_elements_by_tag_name(*a); end + + # Insert +nodes+, an array of HTML elements or a single element, + # after the node +ele+, a child of the current node. + # + # source://hpricot//lib/hpricot/traverse.rb#486 def insert_after(nodes, ele); end + + # Insert +nodes+, an array of HTML elements or a single element, + # before the node +ele+, a child of the current node. + # + # source://hpricot//lib/hpricot/traverse.rb#474 def insert_before(nodes, ele); end + + # Returns the container node neighboring this node to the south: just below it. + # By "container" node, I mean: this method does not find text nodes or comments or cdata or any of that. + # See Hpricot::Traverse#next_node if you need to hunt out all kinds of nodes. + # + # source://hpricot//lib/hpricot/traverse.rb#411 def next_sibling; end + + # Find all preceding sibling elements. Like the other "sibling" methods, this weeds + # out text and comment nodes. + # + # source://hpricot//lib/hpricot/traverse.rb#427 def preceding_siblings; end + + # Returns the container node neighboring this node to the north: just above it. + # By "container" node, I mean: this method does not find text nodes or comments or cdata or any of that. + # See Hpricot::Traverse#previous_node if you need to hunt out all kinds of nodes. + # + # source://hpricot//lib/hpricot/traverse.rb#419 def previous_sibling; end + + # Replace +old+, a child of the current node, with +new+ node. + # + # source://hpricot//lib/hpricot/traverse.rb#467 def replace_child(old, new); end + + # Puts together an array of neighboring sibling elements based on their proximity + # to this element. + # + # This method accepts ranges and sets of numbers. + # + # ele.siblings_at(-3..-1, 1..3) # gets three elements before and three after + # ele.siblings_at(1, 5, 7) # gets three elements at offsets below the current element + # ele.siblings_at(0, 5..6) # the current element and two others + # + # Like the other "sibling" methods, this doesn't find text and comment nodes. + # Use nodes_at to include those nodes. + # + # source://hpricot//lib/hpricot/traverse.rb#452 def siblings_at(*pos); end + + # source://hpricot//lib/hpricot/traverse.rb#688 def traverse_text_internal(&block); end private + # source://hpricot//lib/hpricot/traverse.rb#540 def each_hyperlink_attribute; end end +# source://hpricot//lib/hpricot/modules.rb#3 class Hpricot::Context include ::Hpricot end +# Class used by Markaby::Builder to store element options. Methods called +# against the CssProxy object are added as element classes or IDs. +# +# See the README for examples. +# +# source://hpricot//lib/hpricot/builder.rb#192 class Hpricot::CssProxy < ::Hpricot::BlankSlate + # Creates a CssProxy object. + # + # @return [CssProxy] a new instance of CssProxy + # + # source://hpricot//lib/hpricot/builder.rb#195 def initialize(builder, sym); end + # Adds attributes to an element. Bang methods set the :id attribute. + # Other methods add to the :class attribute. + # + # source://hpricot//lib/hpricot/builder.rb#201 def method_missing(id_or_class, *args, &block); end end +# :stopdoc: +# +# source://hpricot//lib/hpricot/tag.rb#4 class Hpricot::Doc include ::Hpricot include ::Hpricot::Node @@ -275,27 +581,75 @@ class Hpricot::Doc include ::Hpricot::Container::Trav include ::Hpricot::Doc::Trav + # source://hpricot//lib/hpricot/tag.rb#14 def altered!; end + + # source://pp/0.3.0/pp.rb#356 def inspect; end + + # source://hpricot//lib/hpricot/tag.rb#15 def inspect_tree; end + + # source://hpricot//lib/hpricot/tag.rb#11 def make(input = T.unsafe(nil), &blk); end + + # source://hpricot//lib/hpricot/tag.rb#5 def output(out, opts = T.unsafe(nil)); end + + # source://hpricot//lib/hpricot/inspect.rb#13 def pretty_print(q); end end +# :stopdoc: +# +# source://hpricot//lib/hpricot/modules.rb#28 module Hpricot::Doc::Trav include ::Hpricot::Traverse include ::Hpricot::Container::Trav + # +author+ searches author and return it as a text. + # It returns nil if not found. + # + # +author+ searchs following information. + # + # - in HTML + # - in HTML + # - author-name in RSS + # - author-name in RSS + # + # source://hpricot//lib/hpricot/traverse.rb#761 def author; end + + # source://hpricot//lib/hpricot/traverse.rb#641 def css_path; end + + # @raise [Hpricot::Error] + # + # source://hpricot//lib/hpricot/traverse.rb#805 def root; end + + # +title+ searches title and return it as a text. + # It returns nil if not found. + # + # +title+ searchs following information. + # + # - ... in HTML + # - ... in RSS + # + # source://hpricot//lib/hpricot/traverse.rb#744 def title; end + + # source://hpricot//lib/hpricot/traverse.rb#635 def traverse_all_element(&block); end + + # source://hpricot//lib/hpricot/traverse.rb#660 def traverse_some_element(name_set, &block); end + + # source://hpricot//lib/hpricot/traverse.rb#638 def xpath; end end +# source://hpricot//lib/hpricot/tag.rb#179 class Hpricot::DocType include ::Hpricot include ::Hpricot::Node @@ -304,11 +658,19 @@ class Hpricot::DocType include ::Hpricot::Leaf::Trav include ::Hpricot::DocType::Trav + # @return [DocType] a new instance of DocType + # + # source://hpricot//lib/hpricot/tag.rb#180 def initialize(target, pub, sys); end def clear_raw; end + + # source://hpricot//lib/hpricot/tag.rb#184 def output(out, opts = T.unsafe(nil)); end + + # source://hpricot//lib/hpricot/tag.rb#183 def pathname; end + def public_id; end def public_id=(_arg0); end def raw_string; end @@ -318,19 +680,27 @@ class Hpricot::DocType def target=(_arg0); end end +# source://hpricot//lib/hpricot/modules.rb#33 module Hpricot::DocType::Trav include ::Hpricot::Traverse include ::Hpricot::Leaf::Trav end +# source://hpricot//lib/hpricot/tag.rb#131 class Hpricot::ETag < ::Hpricot::BogusETag include ::Hpricot::Tag + # source://pp/0.3.0/pp.rb#356 def inspect; end + + # source://hpricot//lib/hpricot/tag.rb#132 def output(out, opts = T.unsafe(nil)); end + + # source://hpricot//lib/hpricot/inspect.rb#75 def pretty_print(q); end end +# source://hpricot//lib/hpricot/tag.rb#70 class Hpricot::Elem include ::Hpricot include ::Hpricot::Node @@ -339,127 +709,467 @@ class Hpricot::Elem include ::Hpricot::Container::Trav include ::Hpricot::Elem::Trav + # @return [Elem] a new instance of Elem + # + # source://hpricot//lib/hpricot/tag.rb#71 def initialize(tag, attrs = T.unsafe(nil), children = T.unsafe(nil), etag = T.unsafe(nil)); end + # source://hpricot//lib/hpricot/tag.rb#76 def attributes; end + + # source://hpricot//lib/hpricot/tag.rb#110 def attributes_as_html; end + def clear_raw; end + + # @return [Boolean] + # + # source://hpricot//lib/hpricot/tag.rb#75 def empty?; end + + # source://pp/0.3.0/pp.rb#356 def inspect; end + + # source://hpricot//lib/hpricot/tag.rb#118 def inspect_tree(depth = T.unsafe(nil)); end + + # source://hpricot//lib/hpricot/tag.rb#93 def output(out, opts = T.unsafe(nil)); end + + # source://hpricot//lib/hpricot/tag.rb#92 def pathname; end + + # source://hpricot//lib/hpricot/inspect.rb#38 def pretty_print(q); end + + # source://hpricot//lib/hpricot/inspect.rb#55 def pretty_print_stag(q); end + + # source://hpricot//lib/hpricot/tag.rb#79 def to_plain_text; end end +# source://hpricot//lib/hpricot/modules.rb#29 module Hpricot::Elem::Trav include ::Hpricot::Traverse include ::Hpricot::Container::Trav + # source://hpricot//lib/hpricot/traverse.rb#818 def [](name); end + + # source://hpricot//lib/hpricot/traverse.rb#824 def []=(name, val); end + + # source://hpricot//lib/hpricot/traverse.rb#818 def get_attribute(name); end + + # @return [Boolean] + # + # source://hpricot//lib/hpricot/traverse.rb#815 def has_attribute?(name); end + + # source://hpricot//lib/hpricot/traverse.rb#830 def remove_attribute(name); end + + # source://hpricot//lib/hpricot/traverse.rb#824 def set_attribute(name, val); end + + # @yield [_self] + # @yieldparam _self [Hpricot::Elem::Trav] the object that the method was called on + # + # source://hpricot//lib/hpricot/traverse.rb#647 def traverse_all_element(&block); end + + # @yield [_self] + # @yieldparam _self [Hpricot::Elem::Trav] the object that the method was called on + # + # source://hpricot//lib/hpricot/traverse.rb#666 def traverse_some_element(name_set, &block); end end +# source://hpricot//lib/hpricot/htmlinfo.rb#59 Hpricot::ElementContent = T.let(T.unsafe(nil), Hash) + +# source://hpricot//lib/hpricot/htmlinfo.rb#494 Hpricot::ElementExclusions = T.let(T.unsafe(nil), Hash) + +# source://hpricot//lib/hpricot/htmlinfo.rb#486 Hpricot::ElementInclusions = T.let(T.unsafe(nil), Hash) +# :stopdoc: +# +# source://hpricot//lib/hpricot/elements.rb#52 class Hpricot::Elements < ::Array + # Searches this list for the first element (or child of these elements) matching + # the CSS or XPath expression +expr+. Root is assumed to be the element scanned. + # + # See Hpricot::Container::Trav.at for more. + # + # source://hpricot//lib/hpricot/elements.rb#67 def %(expr, &blk); end + + # Searches this list for any elements (or children of these elements) matching + # the CSS or XPath expression +expr+. Root is assumed to be the element scanned. + # + # See Hpricot::Container::Trav.search for more. + # + # source://hpricot//lib/hpricot/elements.rb#58 def /(*expr, &blk); end + + # Adds the class to all matched elements. + # + # (doc/"p").add_class("bacon") + # + # Now all paragraphs will have class="bacon". + # + # source://hpricot//lib/hpricot/elements.rb#226 def add_class(class_name); end + + # Just after each element in this list, add some HTML. + # Pass in an HTML +str+, which is turned into Hpricot elements. + # + # source://hpricot//lib/hpricot/elements.rb#154 def after(str = T.unsafe(nil), &blk); end + + # Add to the end of the contents inside each element in this list. + # Pass in an HTML +str+, which is turned into Hpricot elements. + # + # source://hpricot//lib/hpricot/elements.rb#136 def append(str = T.unsafe(nil), &blk); end + + # Searches this list for the first element (or child of these elements) matching + # the CSS or XPath expression +expr+. Root is assumed to be the element scanned. + # + # See Hpricot::Container::Trav.at for more. + # + # source://hpricot//lib/hpricot/elements.rb#67 def at(expr, &blk); end + + # Gets and sets attributes on all matched elements. + # + # Pass in a +key+ on its own and this method will return the string value + # assigned to that attribute for the first elements. Or +nil+ if the + # attribute isn't found. + # + # doc.search("a").attr("href") + # #=> "http://hacketyhack.net/" + # + # Or, pass in a +key+ and +value+. This will set an attribute for all + # matched elements. + # + # doc.search("p").attr("class", "basic") + # + # You may also use a Hash to set a series of attributes: + # + # (doc/"a").attr(:class => "basic", :href => "http://hackety.org/") + # + # Lastly, a block can be used to rewrite an attribute based on the element + # it belongs to. The block will pass in an element. Return from the block + # the new value of the attribute. + # + # records.attr("href") { |e| e['href'] + "#top" } + # + # This example adds a #top anchor to each link. + # + # source://hpricot//lib/hpricot/elements.rb#205 def attr(key, value = T.unsafe(nil), &blk); end + + # Add some HTML just previous to each element in this list. + # Pass in an HTML +str+, which is turned into Hpricot elements. + # + # source://hpricot//lib/hpricot/elements.rb#148 def before(str = T.unsafe(nil), &blk); end + + # Empty the elements in this list, by removing their insides. + # + # doc = Hpricot("

We have so much to say.

") + # doc.search("i").empty + # doc.to_html + # => "

We have to say.

" + # + # source://hpricot//lib/hpricot/elements.rb#130 def empty; end + + # source://hpricot//lib/hpricot/elements.rb#351 def filter(expr); end + + # Returns an HTML fragment built of the contents of each element in this list. + # + # If a HTML +string+ is supplied, this method acts like inner_html=. + # + # source://hpricot//lib/hpricot/elements.rb#86 def html(*string); end + + # Replaces the contents of each element in this list. Supply an HTML +string+, + # which is loaded into Hpricot objects and inserted into every element in this + # list. + # + # source://hpricot//lib/hpricot/elements.rb#99 def html=(string); end + + # Returns an HTML fragment built of the contents of each element in this list. + # + # If a HTML +string+ is supplied, this method acts like inner_html=. + # + # source://hpricot//lib/hpricot/elements.rb#86 def innerHTML(*string); end + + # Replaces the contents of each element in this list. Supply an HTML +string+, + # which is loaded into Hpricot objects and inserted into every element in this + # list. + # + # source://hpricot//lib/hpricot/elements.rb#99 def innerHTML=(string); end + + # Returns an HTML fragment built of the contents of each element in this list. + # + # If a HTML +string+ is supplied, this method acts like inner_html=. + # + # source://hpricot//lib/hpricot/elements.rb#86 def inner_html(*string); end + + # Replaces the contents of each element in this list. Supply an HTML +string+, + # which is loaded into Hpricot objects and inserted into every element in this + # list. + # + # source://hpricot//lib/hpricot/elements.rb#99 def inner_html=(string); end + + # Returns an string containing the text contents of each element in this list. + # All HTML tags are removed. + # + # source://hpricot//lib/hpricot/elements.rb#107 def inner_text; end + + # source://pp/0.3.0/pp.rb#356 def inspect; end + + # source://hpricot//lib/hpricot/elements.rb#356 def not(expr); end + + # Add to the start of the contents inside each element in this list. + # Pass in an HTML +str+, which is turned into Hpricot elements. + # + # source://hpricot//lib/hpricot/elements.rb#142 def prepend(str = T.unsafe(nil), &blk); end + + # source://hpricot//lib/hpricot/inspect.rb#6 def pretty_print(q); end + + # Remove all elements in this list from the document which contains them. + # + # doc = Hpricot("Remove this: here") + # doc.search("b").remove + # doc.to_html + # => "Remove this: " + # + # source://hpricot//lib/hpricot/elements.rb#119 def remove; end + + # Remove an attribute from each of the matched elements. + # + # (doc/"input").remove_attr("disabled") + # + # source://hpricot//lib/hpricot/elements.rb#239 def remove_attr(name); end + + # Removes a class from all matched elements. + # + # (doc/"span").remove_class("lightgrey") + # + # Or, to remove all classes: + # + # (doc/"span").remove_class + # + # source://hpricot//lib/hpricot/elements.rb#255 def remove_class(name = T.unsafe(nil)); end + + # Searches this list for any elements (or children of these elements) matching + # the CSS or XPath expression +expr+. Root is assumed to be the element scanned. + # + # See Hpricot::Container::Trav.search for more. + # + # source://hpricot//lib/hpricot/elements.rb#58 def search(*expr, &blk); end + + # Gets and sets attributes on all matched elements. + # + # Pass in a +key+ on its own and this method will return the string value + # assigned to that attribute for the first elements. Or +nil+ if the + # attribute isn't found. + # + # doc.search("a").attr("href") + # #=> "http://hacketyhack.net/" + # + # Or, pass in a +key+ and +value+. This will set an attribute for all + # matched elements. + # + # doc.search("p").attr("class", "basic") + # + # You may also use a Hash to set a series of attributes: + # + # (doc/"a").attr(:class => "basic", :href => "http://hackety.org/") + # + # Lastly, a block can be used to rewrite an attribute based on the element + # it belongs to. The block will pass in an element. Return from the block + # the new value of the attribute. + # + # records.attr("href") { |e| e['href'] + "#top" } + # + # This example adds a #top anchor to each link. + # + # source://hpricot//lib/hpricot/elements.rb#205 def set(key, value = T.unsafe(nil), &blk); end + + # Returns an string containing the text contents of each element in this list. + # All HTML tags are removed. + # + # source://hpricot//lib/hpricot/elements.rb#107 def text; end + + # Convert this group of elements into a complete HTML fragment, returned as a + # string. + # + # source://hpricot//lib/hpricot/elements.rb#78 def to_html; end + + # Convert this group of elements into a complete HTML fragment, returned as a + # string. + # + # source://hpricot//lib/hpricot/elements.rb#78 def to_s; end + + # Wraps each element in the list inside the element created by HTML +str+. + # If more than one element is found in the string, Hpricot locates the + # deepest spot inside the first element. + # + # doc.search("a[@href]"). + # wrap(%{}) + # + # This code wraps every link on the page inside a +div.link+ and a +div.link_inner+ nest. + # + # source://hpricot//lib/hpricot/elements.rb#166 def wrap(str = T.unsafe(nil), &blk); end private + # source://hpricot//lib/hpricot/elements.rb#366 def copy_node(node, l); end class << self + # Given two elements, attempt to gather an Elements array of everything between + # (and including) those two elements. + # + # source://hpricot//lib/hpricot/elements.rb#319 def expand(ele1, ele2, excl = T.unsafe(nil)); end + + # source://hpricot//lib/hpricot/elements.rb#274 def filter(nodes, expr, truth = T.unsafe(nil)); end end end +# " (for emacs) +# +# source://hpricot//lib/hpricot/elements.rb#268 Hpricot::Elements::ATTR_RE = T.let(T.unsafe(nil), Regexp) + +# source://hpricot//lib/hpricot/elements.rb#269 Hpricot::Elements::BRACK_RE = T.let(T.unsafe(nil), Regexp) + +# source://hpricot//lib/hpricot/elements.rb#272 Hpricot::Elements::CATCH_RE = T.let(T.unsafe(nil), Regexp) + +# source://hpricot//lib/hpricot/elements.rb#271 Hpricot::Elements::CUST_RE = T.let(T.unsafe(nil), Regexp) + +# source://hpricot//lib/hpricot/elements.rb#270 Hpricot::Elements::FUNC_RE = T.let(T.unsafe(nil), Regexp) + +# Exception class used for any errors related to deficiencies in the system when +# handling the character encodings of a document. +# +# source://hpricot//lib/hpricot/parse.rb#10 class Hpricot::EncodingError < ::StandardError; end + +# source://hpricot//lib/hpricot/modules.rb#38 class Hpricot::Error < ::StandardError; end + +# source://hpricot//lib/hpricot/tags.rb#3 Hpricot::FORM_TAGS = T.let(T.unsafe(nil), Array) +# source://hpricot//lib/hpricot/modules.rb#16 module Hpricot::Leaf include ::Hpricot include ::Hpricot::Node + # source://pp/0.3.0/pp.rb#356 def inspect; end + + # source://hpricot//lib/hpricot/inspect.rb#20 def pretty_print(q); end end +# source://hpricot//lib/hpricot/modules.rb#27 module Hpricot::Leaf::Trav include ::Hpricot::Traverse + # @yield [_self] + # @yieldparam _self [Hpricot::Leaf::Trav] the object that the method was called on + # + # source://hpricot//lib/hpricot/traverse.rb#654 def traverse_all_element; end + + # source://hpricot//lib/hpricot/traverse.rb#673 def traverse_some_element(name_set); end + + # source://hpricot//lib/hpricot/traverse.rb#694 def traverse_text_internal; end end +# source://hpricot//lib/hpricot/modules.rb#2 class Hpricot::Name include ::Hpricot end +# :stopdoc: +# +# source://hpricot//lib/hpricot/htmlinfo.rb#4 Hpricot::NamedCharacters = T.let(T.unsafe(nil), Hash) + +# source://hpricot//lib/hpricot/htmlinfo.rb#57 Hpricot::NamedCharactersPattern = T.let(T.unsafe(nil), Regexp) +# :startdoc: +# +# source://hpricot//lib/hpricot/tag.rb#20 module Hpricot::Node include ::Hpricot + # source://hpricot//lib/hpricot/tag.rb#33 def altered!; end + + # source://hpricot//lib/hpricot/tag.rb#24 def clear_raw; end + + # source://hpricot//lib/hpricot/tag.rb#21 def html_quote(str); end + + # source://hpricot//lib/hpricot/tag.rb#25 def if_output(opts); end + + # source://hpricot//lib/hpricot/tag.rb#36 def inspect_tree(depth = T.unsafe(nil)); end + + # source://hpricot//lib/hpricot/tag.rb#32 def pathname; end end +# source://hpricot//lib/hpricot/htmlinfo.rb#519 Hpricot::OmittedAttrName = T.let(T.unsafe(nil), Hash) + class Hpricot::ParseError < ::StandardError; end +# source://hpricot//lib/hpricot/tag.rb#194 class Hpricot::ProcIns include ::Hpricot include ::Hpricot::Node @@ -470,25 +1180,39 @@ class Hpricot::ProcIns def content; end def content=(_arg0); end + + # source://hpricot//lib/hpricot/tag.rb#197 def output(out, opts = T.unsafe(nil)); end + + # source://hpricot//lib/hpricot/tag.rb#195 def pathname; end + + # source://hpricot//lib/hpricot/tag.rb#196 def raw_string; end + def target; end def target=(_arg0); end end +# source://hpricot//lib/hpricot/modules.rb#34 module Hpricot::ProcIns::Trav include ::Hpricot::Traverse include ::Hpricot::Leaf::Trav end Hpricot::ProcInsParse = T.let(T.unsafe(nil), Regexp) + +# source://hpricot//lib/hpricot/tags.rb#4 Hpricot::SELF_CLOSING_TAGS = T.let(T.unsafe(nil), Array) +# :stopdoc: +# +# source://hpricot//lib/hpricot/modules.rb#6 module Hpricot::Tag include ::Hpricot end +# source://hpricot//lib/hpricot/tag.rb#135 class Hpricot::Text include ::Hpricot include ::Hpricot::Node @@ -497,113 +1221,490 @@ class Hpricot::Text include ::Hpricot::Leaf::Trav include ::Hpricot::Text::Trav + # @return [Text] a new instance of Text + # + # source://hpricot//lib/hpricot/tag.rb#136 def initialize(content); end + # source://hpricot//lib/hpricot/tag.rb#143 def <<(str); end + def clear_raw; end def content; end def content=(_arg0); end + + # source://hpricot//lib/hpricot/tag.rb#138 def inner_text; end + + # source://hpricot//lib/hpricot/tag.rb#144 def output(out, opts = T.unsafe(nil)); end + + # source://hpricot//lib/hpricot/tag.rb#137 def pathname; end + + # source://hpricot//lib/hpricot/inspect.rb#84 def pretty_print(q); end + def raw_string; end + + # source://hpricot//lib/hpricot/tag.rb#138 def to_plain_text; end + + # source://hpricot//lib/hpricot/tag.rb#138 def to_s; end end +# source://hpricot//lib/hpricot/modules.rb#31 module Hpricot::Text::Trav include ::Hpricot::Traverse include ::Hpricot::Leaf::Trav + # @yield [_self] + # @yieldparam _self [Hpricot::Text::Trav] the object that the method was called on + # + # source://hpricot//lib/hpricot/traverse.rb#699 def traverse_text_internal; end end +# :startdoc: +# +# source://hpricot//lib/hpricot/modules.rb#25 module Hpricot::Traverse + # Find the first matching node for the CSS or XPath + # +expr+ string. + # + # source://hpricot//lib/hpricot/traverse.rb#341 def %(expr); end + + # Searches this node for all elements matching + # the CSS or XPath +expr+. Returns an Elements array + # containing the matching nodes. If +blk+ is given, it + # is used to iterate through the matching set. + # + # source://hpricot//lib/hpricot/traverse.rb#254 def /(expr, &blk); end + + # Adds elements immediately after this element, contained in the +html+ string. + # + # source://hpricot//lib/hpricot/traverse.rb#121 def after(html = T.unsafe(nil), &blk); end + + # Find the first matching node for the CSS or XPath + # +expr+ string. + # + # source://hpricot//lib/hpricot/traverse.rb#341 def at(expr); end + + # Adds elements immediately before this element, contained in the +html+ string. + # + # source://hpricot//lib/hpricot/traverse.rb#126 def before(html = T.unsafe(nil), &blk); end + + # Is this object a stranded end tag? + # + # @return [Boolean] + # + # source://hpricot//lib/hpricot/traverse.rb#21 def bogusetag?; end + + # Find children of a given +tag_name+. + # + # ele.children_of_type('p') + # #=> [...array of paragraphs...] + # + # source://hpricot//lib/hpricot/traverse.rb#390 def children_of_type(tag_name); end + + # source://hpricot//lib/hpricot/traverse.rb#203 def clean_path(path); end + + # Is this object a comment? + # + # @return [Boolean] + # + # source://hpricot//lib/hpricot/traverse.rb#19 def comment?; end + + # Builds a unique CSS string for this node, from the + # root of the document containing it. + # + # source://hpricot//lib/hpricot/traverse.rb#226 def css_path; end + + # Is this object the enclosing HTML or XML document? + # + # @return [Boolean] + # + # source://hpricot//lib/hpricot/traverse.rb#7 def doc?; end + + # Is this object a doctype tag? + # + # @return [Boolean] + # + # source://hpricot//lib/hpricot/traverse.rb#15 def doctype?; end + + # Is this object an HTML or XML element? + # + # @return [Boolean] + # + # source://hpricot//lib/hpricot/traverse.rb#9 def elem?; end + + # Find all nodes which follow the current one. + # + # source://hpricot//lib/hpricot/traverse.rb#114 def following; end + + # source://hpricot//lib/hpricot/traverse.rb#138 def get_subnode(*indexes); end + + # Builds an HTML string from the contents of this node. + # + # source://hpricot//lib/hpricot/traverse.rb#168 def html(inner = T.unsafe(nil), &blk); end + + # source://hpricot//lib/hpricot/traverse.rb#47 def index(name); end + + # Builds an HTML string from the contents of this node. + # + # source://hpricot//lib/hpricot/traverse.rb#168 def innerHTML(inner = T.unsafe(nil), &blk); end + + # Inserts new contents into the current node, based on + # the HTML contained in string +inner+. + # + # source://hpricot//lib/hpricot/traverse.rb#191 def innerHTML=(inner); end + + # Builds a string from the text contained in this node. All + # HTML elements are removed. + # + # source://hpricot//lib/hpricot/traverse.rb#158 def innerText; end + + # Builds an HTML string from the contents of this node. + # + # source://hpricot//lib/hpricot/traverse.rb#168 def inner_html(inner = T.unsafe(nil), &blk); end + + # Inserts new contents into the current node, based on + # the HTML contained in string +inner+. + # + # source://hpricot//lib/hpricot/traverse.rb#191 def inner_html=(inner); end + + # Builds a string from the text contained in this node. All + # HTML elements are removed. + # + # source://hpricot//lib/hpricot/traverse.rb#158 def inner_text; end + + # Parses an HTML string, making an HTML fragment based on + # the options used to create the container document. + # + # source://hpricot//lib/hpricot/traverse.rb#25 def make(input = T.unsafe(nil), &blk); end + + # Returns the node neighboring this node to the south: just below it. + # This method includes text nodes and comments and such. + # + # source://hpricot//lib/hpricot/traverse.rb#91 def next; end + + # Returns the node neighboring this node to the south: just below it. + # This method includes text nodes and comments and such. + # + # source://hpricot//lib/hpricot/traverse.rb#91 def next_node; end + + # source://hpricot//lib/hpricot/traverse.rb#242 def node_position; end + + # Puts together an array of neighboring nodes based on their proximity + # to this node. So, for example, to get the next node, you could use + # nodes_at(1). Or, to get the previous node, use nodes_at(1). + # + # This method also accepts ranges and sets of numbers. + # + # ele.nodes_at(-3..-1, 1..3) # gets three nodes before and three after + # ele.nodes_at(1, 5, 7) # gets three nodes at offsets below the current node + # ele.nodes_at(0, 5..6) # the current node and two others + # + # source://hpricot//lib/hpricot/traverse.rb#67 def nodes_at(*pos); end + + # source://hpricot//lib/hpricot/traverse.rb#246 def position; end + + # Find all preceding nodes. + # + # source://hpricot//lib/hpricot/traverse.rb#107 def preceding; end + + # Returns to node neighboring this node to the north: just above it. + # This method includes text nodes and comments and such. + # + # source://hpricot//lib/hpricot/traverse.rb#99 def previous; end + + # Returns to node neighboring this node to the north: just above it. + # This method includes text nodes and comments and such. + # + # source://hpricot//lib/hpricot/traverse.rb#99 def previous_node; end + + # Is this object an XML processing instruction? + # + # @return [Boolean] + # + # source://hpricot//lib/hpricot/traverse.rb#17 def procins?; end + + # Searches this node for all elements matching + # the CSS or XPath +expr+. Returns an Elements array + # containing the matching nodes. If +blk+ is given, it + # is used to iterate through the matching set. + # + # source://hpricot//lib/hpricot/traverse.rb#254 def search(expr, &blk); end + + # Replace this element and its contents with the nodes contained + # in the +html+ string. + # + # source://hpricot//lib/hpricot/traverse.rb#133 def swap(html = T.unsafe(nil), &blk); end + + # Is this object an HTML text node? + # + # @return [Boolean] + # + # source://hpricot//lib/hpricot/traverse.rb#11 def text?; end + + # Builds an HTML string from this node and its contents. + # If you need to write to a stream, try calling output(io) + # as a method on this object. + # + # source://hpricot//lib/hpricot/traverse.rb#36 def to_html; end + + # Attempts to preserve the original HTML of the document, only + # outputing new tags for elements which have changed. + # + # source://hpricot//lib/hpricot/traverse.rb#43 def to_original_html; end + + # Builds a string from the text contained in this node. All + # HTML elements are removed. + # + # source://hpricot//lib/hpricot/traverse.rb#148 def to_plain_text; end + + # Builds an HTML string from this node and its contents. + # If you need to write to a stream, try calling output(io) + # as a method on this object. + # + # source://hpricot//lib/hpricot/traverse.rb#36 def to_s; end + + # +traverse_element+ traverses elements in the tree. + # It yields elements in depth first order. + # + # If _names_ are empty, it yields all elements. + # If non-empty _names_ are given, it should be list of universal names. + # + # A nested element is yielded in depth first order as follows. + # + # t = Hpricot('') + # t.traverse_element("a", "c") {|e| p e} + # # => + # {elem {elem {emptyelem } } {emptyelem } } + # {emptyelem } + # {emptyelem } + # + # Universal names are specified as follows. + # + # t = Hpricot(<<'End') + # + # + # + # + # End + # t.traverse_element("{http://www.w3.org/1999/xhtml}meta") {|e| p e} + # # => + # {emptyelem <{http://www.w3.org/1999/xhtml}meta name="robots" content="index,nofollow">} + # {emptyelem <{http://www.w3.org/1999/xhtml}meta name="author" content="Who am I?">} + # + # source://hpricot//lib/hpricot/traverse.rb#374 def traverse_element(*names, &block); end + + # +traverse_text+ traverses texts in the tree + # + # source://hpricot//lib/hpricot/traverse.rb#680 def traverse_text(&block); end + + # Is this object an XML declaration? + # + # @return [Boolean] + # + # source://hpricot//lib/hpricot/traverse.rb#13 def xmldecl?; end + + # Builds a unique XPath string for this node, from the + # root of the document containing it. + # + # source://hpricot//lib/hpricot/traverse.rb#209 def xpath; end private + # source://hpricot//lib/hpricot/traverse.rb#196 def reparent(nodes); end class << self + # source://hpricot//lib/hpricot/elements.rb#375 def filter(tok, &blk); end end end +# All the tags and attributes from XHTML 1.0 Strict +# +# source://hpricot//lib/hpricot/tags.rb#17 class Hpricot::XHTMLStrict class << self + # Returns the value of attribute doctype. + # + # source://hpricot//lib/hpricot/tags.rb#19 def doctype; end + + # Sets the attribute doctype + # + # @param value the value to set the attribute doctype to. + # + # source://hpricot//lib/hpricot/tags.rb#19 def doctype=(_arg0); end + + # Returns the value of attribute forms. + # + # source://hpricot//lib/hpricot/tags.rb#19 def forms; end + + # Sets the attribute forms + # + # @param value the value to set the attribute forms to. + # + # source://hpricot//lib/hpricot/tags.rb#19 def forms=(_arg0); end + + # Returns the value of attribute self_closing. + # + # source://hpricot//lib/hpricot/tags.rb#19 def self_closing; end + + # Sets the attribute self_closing + # + # @param value the value to set the attribute self_closing to. + # + # source://hpricot//lib/hpricot/tags.rb#19 def self_closing=(_arg0); end + + # Returns the value of attribute tags. + # + # source://hpricot//lib/hpricot/tags.rb#19 def tags; end + + # Sets the attribute tags + # + # @param value the value to set the attribute tags to. + # + # source://hpricot//lib/hpricot/tags.rb#19 def tags=(_arg0); end + + # Returns the value of attribute tagset. + # + # source://hpricot//lib/hpricot/tags.rb#19 def tagset; end + + # Sets the attribute tagset + # + # @param value the value to set the attribute tagset to. + # + # source://hpricot//lib/hpricot/tags.rb#19 def tagset=(_arg0); end end end +# Additional tags found in XHTML 1.0 Transitional +# +# source://hpricot//lib/hpricot/tags.rb#108 class Hpricot::XHTMLTransitional class << self + # Returns the value of attribute doctype. + # + # source://hpricot//lib/hpricot/tags.rb#110 def doctype; end + + # Sets the attribute doctype + # + # @param value the value to set the attribute doctype to. + # + # source://hpricot//lib/hpricot/tags.rb#110 def doctype=(_arg0); end + + # Returns the value of attribute forms. + # + # source://hpricot//lib/hpricot/tags.rb#110 def forms; end + + # Sets the attribute forms + # + # @param value the value to set the attribute forms to. + # + # source://hpricot//lib/hpricot/tags.rb#110 def forms=(_arg0); end + + # Returns the value of attribute self_closing. + # + # source://hpricot//lib/hpricot/tags.rb#110 def self_closing; end + + # Sets the attribute self_closing + # + # @param value the value to set the attribute self_closing to. + # + # source://hpricot//lib/hpricot/tags.rb#110 def self_closing=(_arg0); end + + # Returns the value of attribute tags. + # + # source://hpricot//lib/hpricot/tags.rb#110 def tags; end + + # Sets the attribute tags + # + # @param value the value to set the attribute tags to. + # + # source://hpricot//lib/hpricot/tags.rb#110 def tags=(_arg0); end + + # Returns the value of attribute tagset. + # + # source://hpricot//lib/hpricot/tags.rb#110 def tagset; end + + # Sets the attribute tagset + # + # @param value the value to set the attribute tagset to. + # + # source://hpricot//lib/hpricot/tags.rb#110 def tagset=(_arg0); end end end +# source://hpricot//lib/hpricot/tag.rb#166 class Hpricot::XMLDecl include ::Hpricot include ::Hpricot::Node @@ -615,8 +1716,13 @@ class Hpricot::XMLDecl def clear_raw; end def encoding; end def encoding=(_arg0); end + + # source://hpricot//lib/hpricot/tag.rb#168 def output(out, opts = T.unsafe(nil)); end + + # source://hpricot//lib/hpricot/tag.rb#167 def pathname; end + def raw_string; end def standalone; end def standalone=(_arg0); end @@ -624,26 +1730,46 @@ class Hpricot::XMLDecl def version=(_arg0); end end +# source://hpricot//lib/hpricot/modules.rb#32 module Hpricot::XMLDecl::Trav include ::Hpricot::Traverse include ::Hpricot::Leaf::Trav end +# Since Ruby is very dynamic, methods added to the ancestors of +# BlankSlate after BlankSlate is defined will show up in the +# list of available BlankSlate methods. We handle this by defining a +# hook in the Object and Kernel classes that will hide any defined +# +# source://hpricot//lib/hpricot/blankslate.rb#37 +module Kernel + include ::ActiveSupport::ForkTracker::CoreExt + + class << self + # Detect method additions to Kernel and remove them in the + # BlankSlate class. + # + # source://hpricot//lib/hpricot/blankslate.rb#43 + def method_added(name); end + end +end + +# source://hpricot//lib/hpricot/blankslate.rb#51 class Object < ::BasicObject - include ::ActiveSupport::ToJsonWithActiveSupportEncoder include ::ActiveSupport::ForkTracker::CoreExt - include ::ActiveSupport::ForkTracker::CoreExtPrivate include ::Kernel - include ::JSON::Ext::Generator::GeneratorMethods::Object include ::PP::ObjectMixin - include ::ActiveSupport::Dependencies::Loadable - include ::ActiveSupport::Tryable private + # source://hpricot//lib/hpricot/parse.rb#3 def Hpricot(input = T.unsafe(nil), opts = T.unsafe(nil), &blk); end class << self + # Detect method additions to Object and remove them in the + # BlankSlate class. + # + # source://hpricot//lib/hpricot/blankslate.rb#57 def method_added(name); end end end diff --git a/Library/Homebrew/sorbet/rbi/gems/i18n@1.14.1.rbi b/Library/Homebrew/sorbet/rbi/gems/i18n@1.14.1.rbi index af690fd6af3f4d..e6c7fbd4136932 100644 --- a/Library/Homebrew/sorbet/rbi/gems/i18n@1.14.1.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/i18n@1.14.1.rbi @@ -4,10 +4,14 @@ # This is an autogenerated file for types exported from the `i18n` gem. # Please instead update this file by running `bin/tapioca gem i18n`. +# source://i18n//lib/i18n/gettext/po_parser.rb#15 module GetText; end +# source://i18n//lib/i18n/gettext/po_parser.rb#17 class GetText::PoParser < ::Racc::Parser + # source://i18n//lib/i18n/gettext/po_parser.rb#19 def _(x); end + def _reduce_10(val, _values, result); end def _reduce_12(val, _values, result); end def _reduce_13(val, _values, result); end @@ -16,7 +20,10 @@ class GetText::PoParser < ::Racc::Parser def _reduce_5(val, _values, result); end def _reduce_8(val, _values, result); end def _reduce_9(val, _values, result); end + + # source://i18n//lib/i18n/gettext/po_parser.rb#323 def _reduce_none(val, _values, result); end + def next_token; end def on_comment(comment); end def on_message(msgid, msgstr); end @@ -24,208 +31,695 @@ class GetText::PoParser < ::Racc::Parser def unescape(orig); end end +# source://i18n//lib/i18n/gettext/po_parser.rb#184 GetText::PoParser::Racc_arg = T.let(T.unsafe(nil), Array) + +# source://i18n//lib/i18n/gettext/po_parser.rb#221 GetText::PoParser::Racc_debug_parser = T.let(T.unsafe(nil), TrueClass) + +# source://i18n//lib/i18n/gettext/po_parser.rb#200 GetText::PoParser::Racc_token_to_s_table = T.let(T.unsafe(nil), Array) +# Simple Locale tag implementation that computes subtags by simply splitting +# the locale tag at '-' occurrences. +# +# source://i18n//lib/i18n/version.rb#3 module I18n extend ::I18n::Base class << self + # source://i18n//lib/i18n/backend/cache.rb#64 def cache_key_digest; end + + # source://i18n//lib/i18n/backend/cache.rb#68 def cache_key_digest=(key_digest); end + + # source://i18n//lib/i18n/backend/cache.rb#56 def cache_namespace; end + + # source://i18n//lib/i18n/backend/cache.rb#60 def cache_namespace=(namespace); end + + # source://i18n//lib/i18n/backend/cache.rb#48 def cache_store; end + + # source://i18n//lib/i18n/backend/cache.rb#52 def cache_store=(store); end + + # Returns the current fallbacks implementation. Defaults to +I18n::Locale::Fallbacks+. + # + # source://i18n//lib/i18n/backend/fallbacks.rb#17 def fallbacks; end + + # Sets the current fallbacks implementation. Use this to set a different fallbacks implementation. + # + # source://i18n//lib/i18n/backend/fallbacks.rb#23 def fallbacks=(fallbacks); end + + # Return String or raises MissingInterpolationArgument exception. + # Missing argument's logic is handled by I18n.config.missing_interpolation_argument_handler. + # + # @raise [ReservedInterpolationKey] + # + # source://i18n//lib/i18n/interpolate/ruby.rb#23 def interpolate(string, values); end + + # source://i18n//lib/i18n/interpolate/ruby.rb#29 def interpolate_hash(string, values); end + + # source://i18n//lib/i18n.rb#37 def new_double_nested_cache; end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/cache.rb#72 def perform_caching?; end + + # Marks a key as reserved. Reserved keys are used internally, + # and can't also be used for interpolation. If you are using any + # extra keys as I18n options, you should call I18n.reserve_key + # before any I18n.translate (etc) calls are made. + # + # source://i18n//lib/i18n.rb#45 def reserve_key(key); end + + # source://i18n//lib/i18n.rb#50 def reserved_keys_pattern; end end end +# source://i18n//lib/i18n/exceptions.rb#16 class I18n::ArgumentError < ::ArgumentError; end + +# source://i18n//lib/i18n/backend.rb#4 module I18n::Backend; end +# source://i18n//lib/i18n/backend/base.rb#8 module I18n::Backend::Base include ::I18n::Backend::Transliterator + # Returns an array of locales for which translations are available + # ignoring the reserved translation meta data key :i18n. + # + # @raise [NotImplementedError] + # + # source://i18n//lib/i18n/backend/base.rb#94 def available_locales; end + + # source://i18n//lib/i18n/backend/base.rb#102 def eager_load!; end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/base.rb#68 def exists?(locale, key, options = T.unsafe(nil)); end + + # Accepts a list of paths to translation files. Loads translations from + # plain Ruby (*.rb), YAML files (*.yml), or JSON files (*.json). See #load_rb, #load_yml, and #load_json + # for details. + # + # source://i18n//lib/i18n/backend/base.rb#14 def load_translations(*filenames); end + + # Acts the same as +strftime+, but uses a localized version of the + # format string. Takes a key from the date/time formats translations as + # a format argument (e.g., :short in :'date.formats'). + # + # @raise [ArgumentError] + # + # source://i18n//lib/i18n/backend/base.rb#75 def localize(locale, object, format = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://i18n//lib/i18n/backend/base.rb#98 def reload!; end + + # This method receives a locale, a data hash and options for storing translations. + # Should be implemented + # + # @raise [NotImplementedError] + # + # source://i18n//lib/i18n/backend/base.rb#24 def store_translations(locale, data, options = T.unsafe(nil)); end + + # @raise [I18n::ArgumentError] + # + # source://i18n//lib/i18n/backend/base.rb#28 def translate(locale, key, options = T.unsafe(nil)); end protected + # Deep interpolation + # + # deep_interpolate { people: { ann: "Ann is %{ann}", john: "John is %{john}" } }, + # ann: 'good', john: 'big' + # #=> { people: { ann: "Ann is good", john: "John is big" } } + # + # source://i18n//lib/i18n/backend/base.rb#207 def deep_interpolate(locale, data, values = T.unsafe(nil)); end + + # Evaluates defaults. + # If given subject is an Array, it walks the array and returns the + # first translation that can be resolved. Otherwise it tries to resolve + # the translation directly. + # + # source://i18n//lib/i18n/backend/base.rb#125 def default(locale, object, subject, options = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/base.rb#108 def eager_loaded?; end + + # Interpolates values into a given subject. + # + # if the given subject is a string then: + # method interpolates "file %{file} opened by %%{user}", :file => 'test.txt', :user => 'Mr. X' + # # => "file test.txt opened by %{user}" + # + # if the given subject is an array then: + # each element of the array is recursively interpolated (until it finds a string) + # method interpolates ["yes, %{user}", ["maybe no, %{user}, "no, %{user}"]], :user => "bartuz" + # # => "["yes, bartuz",["maybe no, bartuz", "no, bartuz"]]" + # + # source://i18n//lib/i18n/backend/base.rb#191 def interpolate(locale, subject, values = T.unsafe(nil)); end + + # Loads a single translations file by delegating to #load_rb or + # #load_yml depending on the file extension and directly merges the + # data to the existing translations. Raises I18n::UnknownFileType + # for all other file extensions. + # + # @raise [UnknownFileType] + # + # source://i18n//lib/i18n/backend/base.rb#230 def load_file(filename); end + + # Loads a JSON translations file. The data must have locales as + # toplevel keys. + # + # source://i18n//lib/i18n/backend/base.rb#266 def load_json(filename); end + + # Loads a plain Ruby translations file. eval'ing the file must yield + # a Hash containing translation data with locales as toplevel keys. + # + # source://i18n//lib/i18n/backend/base.rb#244 def load_rb(filename); end + + # Loads a YAML translations file. The data must have locales as + # toplevel keys. + # + # source://i18n//lib/i18n/backend/base.rb#251 def load_yaml(filename); end + + # Loads a YAML translations file. The data must have locales as + # toplevel keys. + # + # source://i18n//lib/i18n/backend/base.rb#251 def load_yml(filename); end + + # The method which actually looks up for the translation in the store. + # + # @raise [NotImplementedError] + # + # source://i18n//lib/i18n/backend/base.rb#113 def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://i18n//lib/i18n/backend/base.rb#298 def pluralization_key(entry, count); end + + # Picks a translation from a pluralized mnemonic subkey according to English + # pluralization rules : + # - It will pick the :one subkey if count is equal to 1. + # - It will pick the :other subkey otherwise. + # - It will pick the :zero subkey in the special case where count is + # equal to 0 and there is a :zero subkey present. This behaviour is + # not standard with regards to the CLDR pluralization rules. + # Other backends can implement more flexible or complex pluralization rules. + # + # @raise [InvalidPluralizationData] + # + # source://i18n//lib/i18n/backend/base.rb#172 def pluralize(locale, entry, count); end + + # Resolves a translation. + # If the given subject is a Symbol, it will be translated with the + # given options. If it is a Proc then it will be evaluated. All other + # subjects will be returned directly. + # + # source://i18n//lib/i18n/backend/base.rb#147 def resolve(locale, object, subject, options = T.unsafe(nil)); end + + # Resolves a translation. + # If the given subject is a Symbol, it will be translated with the + # given options. If it is a Proc then it will be evaluated. All other + # subjects will be returned directly. + # + # source://i18n//lib/i18n/backend/base.rb#147 def resolve_entry(locale, object, subject, options = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/base.rb#117 def subtrees?; end + + # source://i18n//lib/i18n/backend/base.rb#279 def translate_localization_format(locale, object, format, options); end end +# TODO Should the cache be cleared if new translations are stored? +# +# source://i18n//lib/i18n/backend/cache.rb#79 module I18n::Backend::Cache + # source://i18n//lib/i18n/backend/cache.rb#80 def translate(locale, key, options = T.unsafe(nil)); end protected + # source://i18n//lib/i18n/backend/cache.rb#93 def _fetch(cache_key, &block); end + + # source://i18n//lib/i18n/backend/cache.rb#101 def cache_key(locale, key, options); end + + # source://i18n//lib/i18n/backend/cache.rb#86 def fetch(cache_key, &block); end private + # source://i18n//lib/i18n/backend/cache.rb#108 def digest_item(key); end end +# Overwrites the Base load_file method to cache loaded file contents. +# +# source://i18n//lib/i18n/backend/cache_file.rb#8 module I18n::Backend::CacheFile + # Optionally provide path_roots array to normalize filename paths, + # to make the cached i18n data portable across environments. + # + # source://i18n//lib/i18n/backend/cache_file.rb#11 def path_roots; end + + # Optionally provide path_roots array to normalize filename paths, + # to make the cached i18n data portable across environments. + # + # source://i18n//lib/i18n/backend/cache_file.rb#11 def path_roots=(_arg0); end protected + # Track loaded translation files in the `i18n.load_file` scope, + # and skip loading the file if its contents are still up-to-date. + # + # source://i18n//lib/i18n/backend/cache_file.rb#17 def load_file(filename); end + + # Translate absolute filename to relative path for i18n key. + # + # source://i18n//lib/i18n/backend/cache_file.rb#28 def normalized_path(file); end end +# source://i18n//lib/i18n/backend/cascade.rb#35 module I18n::Backend::Cascade + # source://i18n//lib/i18n/backend/cascade.rb#36 def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end end +# Backend that chains multiple other backends and checks each of them when +# a translation needs to be looked up. This is useful when you want to use +# standard translations with a Simple backend but store custom application +# translations in a database or other backends. +# +# To use the Chain backend instantiate it and set it to the I18n module. +# You can add chained backends through the initializer or backends +# accessor: +# +# # preserves the existing Simple backend set to I18n.backend +# I18n.backend = I18n::Backend::Chain.new(I18n::Backend::ActiveRecord.new, I18n.backend) +# +# The implementation assumes that all backends added to the Chain implement +# a lookup method with the same API as Simple backend does. +# +# Fallback translations using the :default option are only used by the last backend of a chain. +# +# source://i18n//lib/i18n/backend/chain.rb#21 class I18n::Backend::Chain include ::I18n::Backend::Transliterator include ::I18n::Backend::Base include ::I18n::Backend::Chain::Implementation end +# source://i18n//lib/i18n/backend/chain.rb#22 module I18n::Backend::Chain::Implementation include ::I18n::Backend::Transliterator include ::I18n::Backend::Base + # source://i18n//lib/i18n/backend/chain.rb#27 def initialize(*backends); end + # source://i18n//lib/i18n/backend/chain.rb#52 def available_locales; end + + # Returns the value of attribute backends. + # + # source://i18n//lib/i18n/backend/chain.rb#25 def backends; end + + # Sets the attribute backends + # + # @param value the value to set the attribute backends to. + # + # source://i18n//lib/i18n/backend/chain.rb#25 def backends=(_arg0); end + + # source://i18n//lib/i18n/backend/chain.rb#44 def eager_load!; end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/chain.rb#76 def exists?(locale, key, options = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/chain.rb#31 def initialized?; end + + # source://i18n//lib/i18n/backend/chain.rb#82 def localize(locale, object, format = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://i18n//lib/i18n/backend/chain.rb#40 def reload!; end + + # source://i18n//lib/i18n/backend/chain.rb#48 def store_translations(locale, data, options = T.unsafe(nil)); end + + # source://i18n//lib/i18n/backend/chain.rb#56 def translate(locale, key, default_options = T.unsafe(nil)); end protected + # source://i18n//lib/i18n/backend/chain.rb#92 def init_translations; end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/chain.rb#108 def namespace_lookup?(result, options); end + + # source://i18n//lib/i18n/backend/chain.rb#98 def translations; end private + # This is approximately what gets used in ActiveSupport. + # However since we are not guaranteed to run in an ActiveSupport context + # it is wise to have our own copy. We underscore it + # to not pollute the namespace of the including class. + # + # source://i18n//lib/i18n/backend/chain.rb#117 def _deep_merge(hash, other_hash); end end +# source://i18n//lib/i18n/backend/fallbacks.rb#30 module I18n::Backend::Fallbacks + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/fallbacks.rb#94 def exists?(locale, key, options = T.unsafe(nil)); end + + # source://i18n//lib/i18n/backend/fallbacks.rb#85 def extract_non_symbol_default!(options); end + + # source://i18n//lib/i18n/backend/fallbacks.rb#67 def resolve_entry(locale, object, subject, options = T.unsafe(nil)); end + + # Overwrites the Base backend translate method so that it will try each + # locale given by I18n.fallbacks for the given locale. E.g. for the + # locale :"de-DE" it might try the locales :"de-DE", :de and :en + # (depends on the fallbacks implementation) until it finds a result with + # the given options. If it does not find any result for any of the + # locales it will then throw MissingTranslation as usual. + # + # The default option takes precedence over fallback locales only when + # it's a Symbol. When the default contains a String, Proc or Hash + # it is evaluated last after all the fallback locales have been tried. + # + # source://i18n//lib/i18n/backend/fallbacks.rb#41 def translate(locale, key, options = T.unsafe(nil)); end private + # Overwrite on_fallback to add specified logic when the fallback succeeds. + # + # source://i18n//lib/i18n/backend/fallbacks.rb#110 def on_fallback(_original_locale, _fallback_locale, _key, _options); end end +# This module contains several helpers to assist flattening translations. +# You may want to flatten translations for: +# +# 1) speed up lookups, as in the Memoize backend; +# 2) In case you want to store translations in a data store, as in ActiveRecord backend; +# +# You can check both backends above for some examples. +# This module also keeps all links in a hash so they can be properly resolved when flattened. +# +# source://i18n//lib/i18n/backend/flatten.rb#13 module I18n::Backend::Flatten + # Flatten keys for nested Hashes by chaining up keys: + # + # >> { "a" => { "b" => { "c" => "d", "e" => "f" }, "g" => "h" }, "i" => "j"}.wind + # => { "a.b.c" => "d", "a.b.e" => "f", "a.g" => "h", "i" => "j" } + # + # source://i18n//lib/i18n/backend/flatten.rb#59 def flatten_keys(hash, escape, prev_key = T.unsafe(nil), &block); end + + # Receives a hash of translations (where the key is a locale and + # the value is another hash) and return a hash with all + # translations flattened. + # + # Nested hashes are included in the flattened hash just if subtree + # is true and Symbols are automatically stored as links. + # + # source://i18n//lib/i18n/backend/flatten.rb#74 def flatten_translations(locale, data, escape, subtree); end + + # Store flattened links. + # + # source://i18n//lib/i18n/backend/flatten.rb#50 def links; end + + # Shortcut to I18n::Backend::Flatten.normalize_flat_keys + # and then resolve_links. + # + # source://i18n//lib/i18n/backend/flatten.rb#44 def normalize_flat_keys(locale, key, scope, separator); end protected + # source://i18n//lib/i18n/backend/flatten.rb#112 def escape_default_separator(key); end + + # source://i18n//lib/i18n/backend/flatten.rb#106 def find_link(locale, key); end + + # source://i18n//lib/i18n/backend/flatten.rb#93 def resolve_link(locale, key); end + + # source://i18n//lib/i18n/backend/flatten.rb#89 def store_link(locale, key, link); end class << self + # Receives a string and escape the default separator. + # + # source://i18n//lib/i18n/backend/flatten.rb#38 def escape_default_separator(key); end + + # normalize_keys the flatten way. This method is significantly faster + # and creates way less objects than the one at I18n.normalize_keys. + # It also handles escaping the translation keys. + # + # source://i18n//lib/i18n/backend/flatten.rb#20 def normalize_flat_keys(locale, key, scope, separator); end end end +# source://i18n//lib/i18n/backend/flatten.rb#15 I18n::Backend::Flatten::FLATTEN_SEPARATOR = T.let(T.unsafe(nil), String) + +# source://i18n//lib/i18n/backend/flatten.rb#14 I18n::Backend::Flatten::SEPARATOR_ESCAPE_CHAR = T.let(T.unsafe(nil), String) +# Experimental support for using Gettext po files to store translations. +# +# To use this you can simply include the module to the Simple backend - or +# whatever other backend you are using. +# +# I18n::Backend::Simple.include(I18n::Backend::Gettext) +# +# Now you should be able to include your Gettext translation (*.po) files to +# the +I18n.load_path+ so they're loaded to the backend and you can use them as +# usual: +# +# I18n.load_path += Dir["path/to/locales/*.po"] +# +# Following the Gettext convention this implementation expects that your +# translation files are named by their locales. E.g. the file en.po would +# contain the translations for the English locale. +# +# To translate text you must use one of the translate methods provided by +# I18n::Gettext::Helpers. +# +# include I18n::Gettext::Helpers +# puts _("some string") +# +# Without it strings containing periods (".") will not be translated. +# +# source://i18n//lib/i18n/backend/gettext.rb#33 module I18n::Backend::Gettext protected + # source://i18n//lib/i18n/backend/gettext.rb#41 def load_po(filename); end + + # source://i18n//lib/i18n/backend/gettext.rb#51 def normalize(locale, data); end + + # source://i18n//lib/i18n/backend/gettext.rb#68 def normalize_pluralization(locale, key, value); end + + # source://i18n//lib/i18n/backend/gettext.rb#47 def parse(filename); end end +# source://i18n//lib/i18n/backend/gettext.rb#34 class I18n::Backend::Gettext::PoData < ::Hash + # source://i18n//lib/i18n/backend/gettext.rb#35 def set_comment(msgid_or_sym, comment); end end +# source://i18n//lib/i18n/backend/interpolation_compiler.rb#20 module I18n::Backend::InterpolationCompiler + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#99 def interpolate(locale, string, values); end + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#109 def store_translations(locale, data, options = T.unsafe(nil)); end protected + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#115 def compile_all_strings_in(data); end end +# source://i18n//lib/i18n/backend/interpolation_compiler.rb#21 module I18n::Backend::InterpolationCompiler::Compiler extend ::I18n::Backend::InterpolationCompiler::Compiler + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#27 def compile_if_an_interpolation(string); end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#39 def interpolated_str?(str); end protected + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#60 def compile_interpolation_token(key); end + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#49 def compiled_interpolation_body(str); end + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#73 def direct_key(key); end + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#93 def escape_key_sym(key); end + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#89 def escape_plain_str(str); end + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#55 def handle_interpolation_token(interpolation, matchdata); end + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#69 def interpolate_key(key); end + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#64 def interpolate_or_raise_missing(key); end + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#81 def missing_key(key); end + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#77 def nil_key(key); end + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#85 def reserved_key(key); end + + # tokenize("foo %{bar} baz %%{buz}") # => ["foo ", "%{bar}", " baz ", "%%{buz}"] + # + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#45 def tokenize(str); end end +# source://i18n//lib/i18n/backend/interpolation_compiler.rb#25 I18n::Backend::InterpolationCompiler::Compiler::INTERPOLATION_SYNTAX_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://i18n//lib/i18n/backend/interpolation_compiler.rb#24 I18n::Backend::InterpolationCompiler::Compiler::TOKENIZER = T.let(T.unsafe(nil), Regexp) +# This is a basic backend for key value stores. It receives on +# initialization the store, which should respond to three methods: +# +# * store#[](key) - Used to get a value +# * store#[]=(key, value) - Used to set a value +# * store#keys - Used to get all keys +# +# Since these stores only supports string, all values are converted +# to JSON before being stored, allowing it to also store booleans, +# hashes and arrays. However, this store does not support Procs. +# +# As the ActiveRecord backend, Symbols are just supported when loading +# translations from the filesystem or through explicit store translations. +# +# Also, avoid calling I18n.available_locales since it's a somehow +# expensive operation in most stores. +# +# == Example +# +# To setup I18n to use TokyoCabinet in memory is quite straightforward: +# +# require 'rufus/tokyo/cabinet' # gem install rufus-tokyo +# I18n.backend = I18n::Backend::KeyValue.new(Rufus::Tokyo::Cabinet.new('*')) +# +# == Performance +# +# You may make this backend even faster by including the Memoize module. +# However, notice that you should properly clear the cache if you change +# values directly in the key-store. +# +# == Subtrees +# +# In most backends, you are allowed to retrieve part of a translation tree: +# +# I18n.backend.store_translations :en, :foo => { :bar => :baz } +# I18n.t "foo" #=> { :bar => :baz } +# +# This backend supports this feature by default, but it slows down the storage +# of new data considerably and makes hard to delete entries. That said, you are +# allowed to disable the storage of subtrees on initialization: +# +# I18n::Backend::KeyValue.new(@store, false) +# +# This is useful if you are using a KeyValue backend chained to a Simple backend. +# +# source://i18n//lib/i18n/backend/key_value.rb#69 class I18n::Backend::KeyValue include ::I18n::Backend::Flatten include ::I18n::Backend::Transliterator @@ -233,457 +727,1599 @@ class I18n::Backend::KeyValue include ::I18n::Backend::KeyValue::Implementation end +# source://i18n//lib/i18n/backend/key_value.rb#70 module I18n::Backend::KeyValue::Implementation include ::I18n::Backend::Flatten include ::I18n::Backend::Transliterator include ::I18n::Backend::Base + # source://i18n//lib/i18n/backend/key_value.rb#75 def initialize(store, subtrees = T.unsafe(nil)); end + # source://i18n//lib/i18n/backend/key_value.rb#102 def available_locales; end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/key_value.rb#79 def initialized?; end + + # Returns the value of attribute store. + # + # source://i18n//lib/i18n/backend/key_value.rb#71 def store; end + + # Sets the attribute store + # + # @param value the value to set the attribute store to. + # + # source://i18n//lib/i18n/backend/key_value.rb#71 def store=(_arg0); end + + # source://i18n//lib/i18n/backend/key_value.rb#83 def store_translations(locale, data, options = T.unsafe(nil)); end protected + # source://i18n//lib/i18n/backend/key_value.rb#124 def init_translations; end + + # source://i18n//lib/i18n/backend/key_value.rb#136 def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://i18n//lib/i18n/backend/key_value.rb#150 def pluralize(locale, entry, count); end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/key_value.rb#132 def subtrees?; end + + # Queries the translations from the key-value store and converts + # them into a hash such as the one returned from loading the + # haml files + # + # source://i18n//lib/i18n/backend/key_value.rb#115 def translations; end end +# source://i18n//lib/i18n/backend/key_value.rb#161 class I18n::Backend::KeyValue::SubtreeProxy + # @return [SubtreeProxy] a new instance of SubtreeProxy + # + # source://i18n//lib/i18n/backend/key_value.rb#162 def initialize(master_key, store); end + # source://i18n//lib/i18n/backend/key_value.rb#172 def [](key); end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/key_value.rb#168 def has_key?(key); end + + # source://i18n//lib/i18n/backend/key_value.rb#196 def inspect; end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/key_value.rb#188 def instance_of?(klass); end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/key_value.rb#183 def is_a?(klass); end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/key_value.rb#183 def kind_of?(klass); end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/key_value.rb#192 def nil?; end end +# source://i18n//lib/i18n/backend/lazy_loadable.rb#65 class I18n::Backend::LazyLoadable < ::I18n::Backend::Simple + # @return [LazyLoadable] a new instance of LazyLoadable + # + # source://i18n//lib/i18n/backend/lazy_loadable.rb#66 def initialize(lazy_load: T.unsafe(nil)); end + # Parse the load path and extract all locales. + # + # source://i18n//lib/i18n/backend/lazy_loadable.rb#99 def available_locales; end + + # Eager loading is not supported in the lazy context. + # + # source://i18n//lib/i18n/backend/lazy_loadable.rb#90 def eager_load!; end + + # Returns whether the current locale is initialized. + # + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/lazy_loadable.rb#71 def initialized?; end + + # source://i18n//lib/i18n/backend/lazy_loadable.rb#107 def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end + + # Clean up translations and uninitialize all locales. + # + # source://i18n//lib/i18n/backend/lazy_loadable.rb#80 def reload!; end protected + # Load translations from files that belong to the current locale. + # + # @raise [InvalidFilenames] + # + # source://i18n//lib/i18n/backend/lazy_loadable.rb#121 def init_translations; end + + # source://i18n//lib/i18n/backend/lazy_loadable.rb#133 def initialized_locales; end private + # Checks if a filename is named in correspondence to the translations it loaded. + # The locale extracted from the path must be the single locale loaded in the translations. + # + # @raise [FilenameIncorrect] + # + # source://i18n//lib/i18n/backend/lazy_loadable.rb#175 def assert_file_named_correctly!(file, translations); end + + # Select all files from I18n load path that belong to current locale. + # These files must start with the locale identifier (ie. "en", "pt-BR"), + # followed by an "_" demarcation to separate proceeding text. + # + # source://i18n//lib/i18n/backend/lazy_loadable.rb#167 def filenames_for_current_locale; end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/lazy_loadable.rb#139 def lazy_load?; end + + # Loads each file supplied and asserts that the file only loads + # translations as expected by the name. The method returns a list of + # errors corresponding to offending files. + # + # source://i18n//lib/i18n/backend/lazy_loadable.rb#152 def load_translations_and_collect_file_errors(files); end end +# source://i18n//lib/i18n/backend/lazy_loadable.rb#143 class I18n::Backend::LazyLoadable::FilenameIncorrect < ::StandardError + # @return [FilenameIncorrect] a new instance of FilenameIncorrect + # + # source://i18n//lib/i18n/backend/lazy_loadable.rb#144 def initialize(file, expected_locale, unexpected_locales); end end +# Backend that lazy loads translations based on the current locale. This +# implementation avoids loading all translations up front. Instead, it only +# loads the translations that belong to the current locale. This offers a +# performance incentive in local development and test environments for +# applications with many translations for many different locales. It's +# particularly useful when the application only refers to a single locales' +# translations at a time (ex. A Rails workload). The implementation +# identifies which translation files from the load path belong to the +# current locale by pattern matching against their path name. +# +# Specifically, a translation file is considered to belong to a locale if: +# a) the filename is in the I18n load path +# b) the filename ends in a supported extension (ie. .yml, .json, .po, .rb) +# c) the filename starts with the locale identifier +# d) the locale identifier and optional proceeding text is separated by an underscore, ie. "_". +# +# Examples: +# Valid files that will be selected by this backend: +# +# "files/locales/en_translation.yml" (Selected for locale "en") +# "files/locales/fr.po" (Selected for locale "fr") +# +# Invalid files that won't be selected by this backend: +# +# "files/locales/translation-file" +# "files/locales/en-translation.unsupported" +# "files/locales/french/translation.yml" +# "files/locales/fr/translation.yml" +# +# The implementation uses this assumption to defer the loading of +# translation files until the current locale actually requires them. +# +# The backend has two working modes: lazy_load and eager_load. +# +# Note: This backend should only be enabled in test environments! +# When the mode is set to false, the backend behaves exactly like the +# Simple backend, with an additional check that the paths being loaded +# abide by the format. If paths can't be matched to the format, an error is raised. +# +# You can configure lazy loaded backends through the initializer or backends +# accessor: +# +# # In test environments +# +# I18n.backend = I18n::Backend::LazyLoadable.new(lazy_load: true) +# +# # In other environments, such as production and CI +# +# I18n.backend = I18n::Backend::LazyLoadable.new(lazy_load: false) # default +# +# source://i18n//lib/i18n/backend/lazy_loadable.rb#55 class I18n::Backend::LocaleExtractor class << self + # source://i18n//lib/i18n/backend/lazy_loadable.rb#57 def locale_from_path(path); end end end +# source://i18n//lib/i18n/backend/memoize.rb#14 module I18n::Backend::Memoize + # source://i18n//lib/i18n/backend/memoize.rb#15 def available_locales; end + + # source://i18n//lib/i18n/backend/memoize.rb#29 def eager_load!; end + + # source://i18n//lib/i18n/backend/memoize.rb#24 def reload!; end + + # source://i18n//lib/i18n/backend/memoize.rb#19 def store_translations(locale, data, options = T.unsafe(nil)); end protected + # source://i18n//lib/i18n/backend/memoize.rb#37 def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://i18n//lib/i18n/backend/memoize.rb#44 def memoized_lookup; end + + # source://i18n//lib/i18n/backend/memoize.rb#48 def reset_memoizations!(locale = T.unsafe(nil)); end end +# source://i18n//lib/i18n/backend/metadata.rb#21 module I18n::Backend::Metadata + # source://i18n//lib/i18n/backend/metadata.rb#52 def interpolate(locale, entry, values = T.unsafe(nil)); end + + # source://i18n//lib/i18n/backend/metadata.rb#57 def pluralize(locale, entry, count); end + + # source://i18n//lib/i18n/backend/metadata.rb#40 def translate(locale, key, options = T.unsafe(nil)); end protected + # source://i18n//lib/i18n/backend/metadata.rb#63 def with_metadata(metadata, &block); end class << self + # @private + # + # source://i18n//lib/i18n/backend/metadata.rb#23 def included(base); end end end +# source://i18n//lib/i18n/backend/pluralization.rb#16 module I18n::Backend::Pluralization + # Overwrites the Base backend translate method so that it will check the + # translation meta data space (:i18n) for a locale specific pluralization + # rule and use it to pluralize the given entry. I.e., the library expects + # pluralization rules to be stored at I18n.t(:'i18n.plural.rule') + # + # Pluralization rules are expected to respond to #call(count) and + # return a pluralization key. Valid keys depend on the pluralization + # rules for the locale, as defined in the CLDR. + # As of v41, 6 locale-specific plural categories are defined: + # :few, :many, :one, :other, :two, :zero + # + # n.b., The :one plural category does not imply the number 1. + # Instead, :one is a category for any number that behaves like 1 in + # that locale. For example, in some locales, :one is used for numbers + # that end in "1" (like 1, 21, 151) but that don't end in + # 11 (like 11, 111, 10311). + # Similar notes apply to the :two, and :zero plural categories. + # + # If you want to have different strings for the categories of count == 0 + # (e.g. "I don't have any cars") or count == 1 (e.g. "I have a single car") + # use the explicit `"0"` and `"1"` keys. + # https://unicode-org.github.io/cldr/ldml/tr35-numbers.html#Explicit_0_1_rules + # + # source://i18n//lib/i18n/backend/pluralization.rb#39 def pluralize(locale, entry, count); end protected + # source://i18n//lib/i18n/backend/pluralization.rb#81 def pluralizer(locale); end + + # source://i18n//lib/i18n/backend/pluralization.rb#77 def pluralizers; end private + # Normalizes categories of 0.0 and 1.0 + # and returns the symbolic version + # + # source://i18n//lib/i18n/backend/pluralization.rb#89 def symbolic_count(count); end end +# A simple backend that reads translations from YAML files and stores them in +# an in-memory hash. Relies on the Base backend. +# +# The implementation is provided by a Implementation module allowing to easily +# extend Simple backend's behavior by including modules. E.g.: +# +# module I18n::Backend::Pluralization +# def pluralize(*args) +# # extended pluralization logic +# super +# end +# end +# +# I18n::Backend::Simple.include(I18n::Backend::Pluralization) +# +# source://i18n//lib/i18n/backend/simple.rb#21 class I18n::Backend::Simple include ::I18n::Backend::Transliterator include ::I18n::Backend::Base include ::I18n::Backend::Simple::Implementation end +# source://i18n//lib/i18n/backend/simple.rb#22 module I18n::Backend::Simple::Implementation include ::I18n::Backend::Transliterator include ::I18n::Backend::Base + # Get available locales from the translations hash + # + # source://i18n//lib/i18n/backend/simple.rb#49 def available_locales; end + + # source://i18n//lib/i18n/backend/simple.rb#64 def eager_load!; end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/simple.rb#28 def initialized?; end + + # Clean up translations hash and set initialized to false on reload! + # + # source://i18n//lib/i18n/backend/simple.rb#58 def reload!; end + + # Stores translations for the given locale in memory. + # This uses a deep merge for the translations hash, so existing + # translations will be overwritten by new ones only at the deepest + # level of the hash. + # + # source://i18n//lib/i18n/backend/simple.rb#36 def store_translations(locale, data, options = T.unsafe(nil)); end + + # source://i18n//lib/i18n/backend/simple.rb#69 def translations(do_init: T.unsafe(nil)); end protected + # source://i18n//lib/i18n/backend/simple.rb#83 def init_translations; end + + # Looks up a translation from the translations hash. Returns nil if + # either key is nil, or locale, scope or key do not exist as a key in the + # nested translations hash. Splits keys or scopes containing dots + # into multiple keys, i.e. currency.format is regarded the same as + # %w(currency format). + # + # source://i18n//lib/i18n/backend/simple.rb#93 def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end end +# Mutex to ensure that concurrent translations loading will be thread-safe +# +# source://i18n//lib/i18n/backend/simple.rb#26 I18n::Backend::Simple::Implementation::MUTEX = T.let(T.unsafe(nil), Thread::Mutex) +# source://i18n//lib/i18n/backend/transliterator.rb#6 module I18n::Backend::Transliterator + # Given a locale and a UTF-8 string, return the locale's ASCII + # approximation for the string. + # + # source://i18n//lib/i18n/backend/transliterator.rb#11 def transliterate(locale, string, replacement = T.unsafe(nil)); end class << self + # Get a transliterator instance. + # + # source://i18n//lib/i18n/backend/transliterator.rb#19 def get(rule = T.unsafe(nil)); end end end +# source://i18n//lib/i18n/backend/transliterator.rb#7 I18n::Backend::Transliterator::DEFAULT_REPLACEMENT_CHAR = T.let(T.unsafe(nil), String) +# A transliterator which accepts a Hash of characters as its translation +# rule. +# +# source://i18n//lib/i18n/backend/transliterator.rb#42 class I18n::Backend::Transliterator::HashTransliterator + # @return [HashTransliterator] a new instance of HashTransliterator + # + # source://i18n//lib/i18n/backend/transliterator.rb#74 def initialize(rule = T.unsafe(nil)); end + # source://i18n//lib/i18n/backend/transliterator.rb#80 def transliterate(string, replacement = T.unsafe(nil)); end private + # Add transliteration rules to the approximations hash. + # + # source://i18n//lib/i18n/backend/transliterator.rb#100 def add(hash); end + + # source://i18n//lib/i18n/backend/transliterator.rb#93 def add_default_approximations; end + + # source://i18n//lib/i18n/backend/transliterator.rb#89 def approximations; end end +# source://i18n//lib/i18n/backend/transliterator.rb#43 I18n::Backend::Transliterator::HashTransliterator::DEFAULT_APPROXIMATIONS = T.let(T.unsafe(nil), Hash) +# A transliterator which accepts a Proc as its transliteration rule. +# +# source://i18n//lib/i18n/backend/transliterator.rb#30 class I18n::Backend::Transliterator::ProcTransliterator + # @return [ProcTransliterator] a new instance of ProcTransliterator + # + # source://i18n//lib/i18n/backend/transliterator.rb#31 def initialize(rule); end + # source://i18n//lib/i18n/backend/transliterator.rb#35 def transliterate(string, replacement = T.unsafe(nil)); end end +# source://i18n//lib/i18n.rb#54 module I18n::Base + # source://i18n//lib/i18n.rb#69 def available_locales; end + + # source://i18n//lib/i18n.rb#73 def available_locales=(value); end + + # @return [Boolean] + # + # source://i18n//lib/i18n.rb#355 def available_locales_initialized?; end + + # source://i18n//lib/i18n.rb#69 def backend; end + + # source://i18n//lib/i18n.rb#73 def backend=(value); end + + # Gets I18n configuration object. + # + # source://i18n//lib/i18n.rb#56 def config; end + + # Sets I18n configuration object. + # + # source://i18n//lib/i18n.rb#61 def config=(value); end + + # source://i18n//lib/i18n.rb#69 def default_locale; end + + # source://i18n//lib/i18n.rb#73 def default_locale=(value); end + + # source://i18n//lib/i18n.rb#69 def default_separator; end + + # source://i18n//lib/i18n.rb#73 def default_separator=(value); end + + # Tells the backend to load translations now. Used in situations like the + # Rails production environment. Backends can implement whatever strategy + # is useful. + # + # source://i18n//lib/i18n.rb#90 def eager_load!; end + + # source://i18n//lib/i18n.rb#69 def enforce_available_locales; end + + # Raises an InvalidLocale exception when the passed locale is not available. + # + # source://i18n//lib/i18n.rb#349 def enforce_available_locales!(locale); end + + # source://i18n//lib/i18n.rb#73 def enforce_available_locales=(value); end + + # source://i18n//lib/i18n.rb#69 def exception_handler; end + + # source://i18n//lib/i18n.rb#73 def exception_handler=(value); end + + # Returns true if a translation exists for a given key, otherwise returns false. + # + # @raise [Disabled] + # @return [Boolean] + # + # source://i18n//lib/i18n.rb#235 def exists?(key, _locale = T.unsafe(nil), locale: T.unsafe(nil), **options); end + + # Localizes certain objects, such as dates and numbers to local formatting. + # + # @raise [Disabled] + # + # source://i18n//lib/i18n.rb#304 def l(object, locale: T.unsafe(nil), format: T.unsafe(nil), **options); end + + # source://i18n//lib/i18n.rb#69 def load_path; end + + # source://i18n//lib/i18n.rb#73 def load_path=(value); end + + # source://i18n//lib/i18n.rb#69 def locale; end + + # source://i18n//lib/i18n.rb#73 def locale=(value); end + + # Returns true when the passed locale, which can be either a String or a + # Symbol, is in the list of available locales. Returns false otherwise. + # + # @return [Boolean] + # + # source://i18n//lib/i18n.rb#344 def locale_available?(locale); end + + # Localizes certain objects, such as dates and numbers to local formatting. + # + # @raise [Disabled] + # + # source://i18n//lib/i18n.rb#304 def localize(object, locale: T.unsafe(nil), format: T.unsafe(nil), **options); end + + # Merges the given locale, key and scope into a single array of keys. + # Splits keys that contain dots into multiple keys. Makes sure all + # keys are Symbols. + # + # source://i18n//lib/i18n.rb#332 def normalize_keys(locale, key, scope, separator = T.unsafe(nil)); end + + # Tells the backend to reload translations. Used in situations like the + # Rails development environment. Backends can implement whatever strategy + # is useful. + # + # source://i18n//lib/i18n.rb#82 def reload!; end + + # Translates, pluralizes and interpolates a given key using a given locale, + # scope, and default, as well as interpolation values. + # + # *LOOKUP* + # + # Translation data is organized as a nested hash using the upper-level keys + # as namespaces. E.g., ActionView ships with the translation: + # :date => {:formats => {:short => "%b %d"}}. + # + # Translations can be looked up at any level of this hash using the key argument + # and the scope option. E.g., in this example I18n.t :date + # returns the whole translations hash {:formats => {:short => "%b %d"}}. + # + # Key can be either a single key or a dot-separated key (both Strings and Symbols + # work). E.g., the short format can be looked up using both: + # I18n.t 'date.formats.short' + # I18n.t :'date.formats.short' + # + # Scope can be either a single key, a dot-separated key or an array of keys + # or dot-separated keys. Keys and scopes can be combined freely. So these + # examples will all look up the same short date format: + # I18n.t 'date.formats.short' + # I18n.t 'formats.short', :scope => 'date' + # I18n.t 'short', :scope => 'date.formats' + # I18n.t 'short', :scope => %w(date formats) + # + # *INTERPOLATION* + # + # Translations can contain interpolation variables which will be replaced by + # values passed to #translate as part of the options hash, with the keys matching + # the interpolation variable names. + # + # E.g., with a translation :foo => "foo %{bar}" the option + # value for the key +bar+ will be interpolated into the translation: + # I18n.t :foo, :bar => 'baz' # => 'foo baz' + # + # *PLURALIZATION* + # + # Translation data can contain pluralized translations. Pluralized translations + # are arrays of singular/plural versions of translations like ['Foo', 'Foos']. + # + # Note that I18n::Backend::Simple only supports an algorithm for English + # pluralization rules. Other algorithms can be supported by custom backends. + # + # This returns the singular version of a pluralized translation: + # I18n.t :foo, :count => 1 # => 'Foo' + # + # These both return the plural version of a pluralized translation: + # I18n.t :foo, :count => 0 # => 'Foos' + # I18n.t :foo, :count => 2 # => 'Foos' + # + # The :count option can be used both for pluralization and interpolation. + # E.g., with the translation + # :foo => ['%{count} foo', '%{count} foos'], count will + # be interpolated to the pluralized translation: + # I18n.t :foo, :count => 1 # => '1 foo' + # + # *DEFAULTS* + # + # This returns the translation for :foo or default if no translation was found: + # I18n.t :foo, :default => 'default' + # + # This returns the translation for :foo or the translation for :bar if no + # translation for :foo was found: + # I18n.t :foo, :default => :bar + # + # Returns the translation for :foo or the translation for :bar + # or default if no translations for :foo and :bar were found. + # I18n.t :foo, :default => [:bar, 'default'] + # + # *BULK LOOKUP* + # + # This returns an array with the translations for :foo and :bar. + # I18n.t [:foo, :bar] + # + # Can be used with dot-separated nested keys: + # I18n.t [:'baz.foo', :'baz.bar'] + # + # Which is the same as using a scope option: + # I18n.t [:foo, :bar], :scope => :baz + # + # *LAMBDAS* + # + # Both translations and defaults can be given as Ruby lambdas. Lambdas will be + # called and passed the key and options. + # + # E.g. assuming the key :salutation resolves to: + # lambda { |key, options| options[:gender] == 'm' ? "Mr. #{options[:name]}" : "Mrs. #{options[:name]}" } + # + # Then I18n.t(:salutation, :gender => 'w', :name => 'Smith') will result in "Mrs. Smith". + # + # Note that the string returned by lambda will go through string interpolation too, + # so the following lambda would give the same result: + # lambda { |key, options| options[:gender] == 'm' ? "Mr. %{name}" : "Mrs. %{name}" } + # + # It is recommended to use/implement lambdas in an "idempotent" way. E.g. when + # a cache layer is put in front of I18n.translate it will generate a cache key + # from the argument values passed to #translate. Therefore your lambdas should + # always return the same translations/values per unique combination of argument + # values. + # + # *Ruby 2.7+ keyword arguments warning* + # + # This method uses keyword arguments. + # There is a breaking change in ruby that produces warning with ruby 2.7 and won't work as expected with ruby 3.0 + # The "hash" parameter must be passed as keyword argument. + # + # Good: + # I18n.t(:salutation, :gender => 'w', :name => 'Smith') + # I18n.t(:salutation, **{ :gender => 'w', :name => 'Smith' }) + # I18n.t(:salutation, **any_hash) + # + # Bad: + # I18n.t(:salutation, { :gender => 'w', :name => 'Smith' }) + # I18n.t(:salutation, any_hash) + # + # @raise [Disabled] + # + # source://i18n//lib/i18n.rb#210 def t(key = T.unsafe(nil), throw: T.unsafe(nil), raise: T.unsafe(nil), locale: T.unsafe(nil), **options); end + + # Wrapper for translate that adds :raise => true. With + # this option, if no translation is found, it will raise I18n::MissingTranslationData + # + # source://i18n//lib/i18n.rb#229 def t!(key, **options); end + + # Translates, pluralizes and interpolates a given key using a given locale, + # scope, and default, as well as interpolation values. + # + # *LOOKUP* + # + # Translation data is organized as a nested hash using the upper-level keys + # as namespaces. E.g., ActionView ships with the translation: + # :date => {:formats => {:short => "%b %d"}}. + # + # Translations can be looked up at any level of this hash using the key argument + # and the scope option. E.g., in this example I18n.t :date + # returns the whole translations hash {:formats => {:short => "%b %d"}}. + # + # Key can be either a single key or a dot-separated key (both Strings and Symbols + # work). E.g., the short format can be looked up using both: + # I18n.t 'date.formats.short' + # I18n.t :'date.formats.short' + # + # Scope can be either a single key, a dot-separated key or an array of keys + # or dot-separated keys. Keys and scopes can be combined freely. So these + # examples will all look up the same short date format: + # I18n.t 'date.formats.short' + # I18n.t 'formats.short', :scope => 'date' + # I18n.t 'short', :scope => 'date.formats' + # I18n.t 'short', :scope => %w(date formats) + # + # *INTERPOLATION* + # + # Translations can contain interpolation variables which will be replaced by + # values passed to #translate as part of the options hash, with the keys matching + # the interpolation variable names. + # + # E.g., with a translation :foo => "foo %{bar}" the option + # value for the key +bar+ will be interpolated into the translation: + # I18n.t :foo, :bar => 'baz' # => 'foo baz' + # + # *PLURALIZATION* + # + # Translation data can contain pluralized translations. Pluralized translations + # are arrays of singular/plural versions of translations like ['Foo', 'Foos']. + # + # Note that I18n::Backend::Simple only supports an algorithm for English + # pluralization rules. Other algorithms can be supported by custom backends. + # + # This returns the singular version of a pluralized translation: + # I18n.t :foo, :count => 1 # => 'Foo' + # + # These both return the plural version of a pluralized translation: + # I18n.t :foo, :count => 0 # => 'Foos' + # I18n.t :foo, :count => 2 # => 'Foos' + # + # The :count option can be used both for pluralization and interpolation. + # E.g., with the translation + # :foo => ['%{count} foo', '%{count} foos'], count will + # be interpolated to the pluralized translation: + # I18n.t :foo, :count => 1 # => '1 foo' + # + # *DEFAULTS* + # + # This returns the translation for :foo or default if no translation was found: + # I18n.t :foo, :default => 'default' + # + # This returns the translation for :foo or the translation for :bar if no + # translation for :foo was found: + # I18n.t :foo, :default => :bar + # + # Returns the translation for :foo or the translation for :bar + # or default if no translations for :foo and :bar were found. + # I18n.t :foo, :default => [:bar, 'default'] + # + # *BULK LOOKUP* + # + # This returns an array with the translations for :foo and :bar. + # I18n.t [:foo, :bar] + # + # Can be used with dot-separated nested keys: + # I18n.t [:'baz.foo', :'baz.bar'] + # + # Which is the same as using a scope option: + # I18n.t [:foo, :bar], :scope => :baz + # + # *LAMBDAS* + # + # Both translations and defaults can be given as Ruby lambdas. Lambdas will be + # called and passed the key and options. + # + # E.g. assuming the key :salutation resolves to: + # lambda { |key, options| options[:gender] == 'm' ? "Mr. #{options[:name]}" : "Mrs. #{options[:name]}" } + # + # Then I18n.t(:salutation, :gender => 'w', :name => 'Smith') will result in "Mrs. Smith". + # + # Note that the string returned by lambda will go through string interpolation too, + # so the following lambda would give the same result: + # lambda { |key, options| options[:gender] == 'm' ? "Mr. %{name}" : "Mrs. %{name}" } + # + # It is recommended to use/implement lambdas in an "idempotent" way. E.g. when + # a cache layer is put in front of I18n.translate it will generate a cache key + # from the argument values passed to #translate. Therefore your lambdas should + # always return the same translations/values per unique combination of argument + # values. + # + # *Ruby 2.7+ keyword arguments warning* + # + # This method uses keyword arguments. + # There is a breaking change in ruby that produces warning with ruby 2.7 and won't work as expected with ruby 3.0 + # The "hash" parameter must be passed as keyword argument. + # + # Good: + # I18n.t(:salutation, :gender => 'w', :name => 'Smith') + # I18n.t(:salutation, **{ :gender => 'w', :name => 'Smith' }) + # I18n.t(:salutation, **any_hash) + # + # Bad: + # I18n.t(:salutation, { :gender => 'w', :name => 'Smith' }) + # I18n.t(:salutation, any_hash) + # + # @raise [Disabled] + # + # source://i18n//lib/i18n.rb#210 def translate(key = T.unsafe(nil), throw: T.unsafe(nil), raise: T.unsafe(nil), locale: T.unsafe(nil), **options); end + + # Wrapper for translate that adds :raise => true. With + # this option, if no translation is found, it will raise I18n::MissingTranslationData + # + # source://i18n//lib/i18n.rb#229 def translate!(key, **options); end + + # Transliterates UTF-8 characters to ASCII. By default this method will + # transliterate only Latin strings to an ASCII approximation: + # + # I18n.transliterate("Ærøskøbing") + # # => "AEroskobing" + # + # I18n.transliterate("日本語") + # # => "???" + # + # It's also possible to add support for per-locale transliterations. I18n + # expects transliteration rules to be stored at + # i18n.transliterate.rule. + # + # Transliteration rules can either be a Hash or a Proc. Procs must accept a + # single string argument. Hash rules inherit the default transliteration + # rules, while Procs do not. + # + # *Examples* + # + # Setting a Hash in .yml: + # + # i18n: + # transliterate: + # rule: + # ü: "ue" + # ö: "oe" + # + # Setting a Hash using Ruby: + # + # store_translations(:de, i18n: { + # transliterate: { + # rule: { + # 'ü' => 'ue', + # 'ö' => 'oe' + # } + # } + # }) + # + # Setting a Proc: + # + # translit = lambda {|string| MyTransliterator.transliterate(string) } + # store_translations(:xx, :i18n => {:transliterate => {:rule => translit}) + # + # Transliterating strings: + # + # I18n.locale = :en + # I18n.transliterate("Jürgen") # => "Jurgen" + # I18n.locale = :de + # I18n.transliterate("Jürgen") # => "Juergen" + # I18n.transliterate("Jürgen", :locale => :en) # => "Jurgen" + # I18n.transliterate("Jürgen", :locale => :de) # => "Juergen" + # + # source://i18n//lib/i18n.rb#293 def transliterate(key, throw: T.unsafe(nil), raise: T.unsafe(nil), locale: T.unsafe(nil), replacement: T.unsafe(nil), **options); end + + # Executes block with given I18n.locale set. + # + # source://i18n//lib/i18n.rb#315 def with_locale(tmp_locale = T.unsafe(nil)); end private + # Any exceptions thrown in translate will be sent to the @@exception_handler + # which can be a Symbol, a Proc or any other Object unless they're forced to + # be raised or thrown (MissingTranslation). + # + # If exception_handler is a Symbol then it will simply be sent to I18n as + # a method call. A Proc will simply be called. In any other case the + # method #call will be called on the exception_handler object. + # + # Examples: + # + # I18n.exception_handler = :custom_exception_handler # this is the default + # I18n.custom_exception_handler(exception, locale, key, options) # will be called like this + # + # I18n.exception_handler = lambda { |*args| ... } # a lambda + # I18n.exception_handler.call(exception, locale, key, options) # will be called like this + # + # I18n.exception_handler = I18nExceptionHandler.new # an object + # I18n.exception_handler.call(exception, locale, key, options) # will be called like this + # + # source://i18n//lib/i18n.rb#391 def handle_exception(handling, exception, locale, key, options); end + + # source://i18n//lib/i18n.rb#409 def normalize_key(key, separator); end + + # source://i18n//lib/i18n.rb#361 def translate_key(key, throw, raise, locale, backend, options); end end +# source://i18n//lib/i18n/config.rb#6 class I18n::Config + # Returns an array of locales for which translations are available. + # Unless you explicitly set these through I18n.available_locales= + # the call will be delegated to the backend. + # + # source://i18n//lib/i18n/config.rb#43 def available_locales; end + + # Sets the available locales. + # + # source://i18n//lib/i18n/config.rb#57 def available_locales=(locales); end + + # Returns true if the available_locales have been initialized + # + # @return [Boolean] + # + # source://i18n//lib/i18n/config.rb#64 def available_locales_initialized?; end + + # Caches the available locales list as both strings and symbols in a Set, so + # that we can have faster lookups to do the available locales enforce check. + # + # source://i18n//lib/i18n/config.rb#50 def available_locales_set; end + + # Returns the current backend. Defaults to +Backend::Simple+. + # + # source://i18n//lib/i18n/config.rb#20 def backend; end + + # Sets the current backend. Used to set a custom backend. + # + # source://i18n//lib/i18n/config.rb#25 def backend=(backend); end + + # Clears the available locales set so it can be recomputed again after I18n + # gets reloaded. + # + # source://i18n//lib/i18n/config.rb#70 def clear_available_locales_set; end + + # Returns the current default locale. Defaults to :'en' + # + # source://i18n//lib/i18n/config.rb#30 def default_locale; end + + # Sets the current default locale. Used to set a custom default locale. + # + # source://i18n//lib/i18n/config.rb#35 def default_locale=(locale); end + + # Returns the current default scope separator. Defaults to '.' + # + # source://i18n//lib/i18n/config.rb#75 def default_separator; end + + # Sets the current default scope separator. + # + # source://i18n//lib/i18n/config.rb#80 def default_separator=(separator); end + + # source://i18n//lib/i18n/config.rb#141 def enforce_available_locales; end + + # source://i18n//lib/i18n/config.rb#145 def enforce_available_locales=(enforce_available_locales); end + + # Returns the current exception handler. Defaults to an instance of + # I18n::ExceptionHandler. + # + # source://i18n//lib/i18n/config.rb#86 def exception_handler; end + + # Sets the exception handler. + # + # source://i18n//lib/i18n/config.rb#91 def exception_handler=(exception_handler); end + + # Returns the current interpolation patterns. Defaults to + # I18n::DEFAULT_INTERPOLATION_PATTERNS. + # + # source://i18n//lib/i18n/config.rb#151 def interpolation_patterns; end + + # Sets the current interpolation patterns. Used to set a interpolation + # patterns. + # + # E.g. using {{}} as a placeholder like "{{hello}}, world!": + # + # I18n.config.interpolation_patterns << /\{\{(\w+)\}\}/ + # + # source://i18n//lib/i18n/config.rb#161 def interpolation_patterns=(interpolation_patterns); end + + # Allow clients to register paths providing translation data sources. The + # backend defines acceptable sources. + # + # E.g. the provided SimpleBackend accepts a list of paths to translation + # files which are either named *.rb and contain plain Ruby Hashes or are + # named *.yml and contain YAML data. So for the SimpleBackend clients may + # register translation files like this: + # I18n.load_path << 'path/to/locale/en.yml' + # + # source://i18n//lib/i18n/config.rb#126 def load_path; end + + # Sets the load path instance. Custom implementations are expected to + # behave like a Ruby Array. + # + # source://i18n//lib/i18n/config.rb#132 def load_path=(load_path); end + + # The only configuration value that is not global and scoped to thread is :locale. + # It defaults to the default_locale. + # + # source://i18n//lib/i18n/config.rb#9 def locale; end + + # Sets the current locale pseudo-globally, i.e. in the Thread.current hash. + # + # source://i18n//lib/i18n/config.rb#14 def locale=(locale); end + + # Returns the current handler for situations when interpolation argument + # is missing. MissingInterpolationArgument will be raised by default. + # + # source://i18n//lib/i18n/config.rb#97 def missing_interpolation_argument_handler; end + + # Sets the missing interpolation argument handler. It can be any + # object that responds to #call. The arguments that will be passed to #call + # are the same as for MissingInterpolationArgument initializer. Use +Proc.new+ + # if you don't care about arity. + # + # == Example: + # You can suppress raising an exception and return string instead: + # + # I18n.config.missing_interpolation_argument_handler = Proc.new do |key| + # "#{key} is missing" + # end + # + # source://i18n//lib/i18n/config.rb#114 def missing_interpolation_argument_handler=(exception_handler); end end +# source://i18n//lib/i18n/interpolate/ruby.rb#7 I18n::DEFAULT_INTERPOLATION_PATTERNS = T.let(T.unsafe(nil), Array) +# source://i18n//lib/i18n/exceptions.rb#18 class I18n::Disabled < ::I18n::ArgumentError + # @return [Disabled] a new instance of Disabled + # + # source://i18n//lib/i18n/exceptions.rb#19 def initialize(method); end end +# source://i18n//lib/i18n.rb#35 I18n::EMPTY_HASH = T.let(T.unsafe(nil), Hash) +# source://i18n//lib/i18n/exceptions.rb#6 class I18n::ExceptionHandler + # source://i18n//lib/i18n/exceptions.rb#7 def call(exception, _locale, _key, _options); end end +# source://i18n//lib/i18n/gettext.rb#4 module I18n::Gettext class << self + # source://i18n//lib/i18n/gettext.rb#21 def extract_scope(msgid, separator); end + + # returns an array of plural keys for the given locale or the whole hash + # of locale mappings to plural keys so that we can convert from gettext's + # integer-index based style + # TODO move this information to the pluralization module + # + # source://i18n//lib/i18n/gettext.rb#17 def plural_keys(*args); end end end +# source://i18n//lib/i18n/gettext.rb#6 I18n::Gettext::CONTEXT_SEPARATOR = T.let(T.unsafe(nil), String) +# Implements classical Gettext style accessors. To use this include the +# module to the global namespace or wherever you want to use it. +# +# include I18n::Gettext::Helpers +# +# source://i18n//lib/i18n/gettext/helpers.rb#11 module I18n::Gettext::Helpers + # Makes dynamic translation messages readable for the gettext parser. + # _(fruit) cannot be understood by the gettext parser. To help the parser find all your translations, + # you can add fruit = N_("Apple") which does not translate, but tells the parser: "Apple" needs translation. + # * msgid: the message id. + # * Returns: msgid. + # + # source://i18n//lib/i18n/gettext/helpers.rb#17 def N_(msgsid); end + + # source://i18n//lib/i18n/gettext/helpers.rb#21 def _(msgid, options = T.unsafe(nil)); end + + # source://i18n//lib/i18n/gettext/helpers.rb#21 def gettext(msgid, options = T.unsafe(nil)); end + + # source://i18n//lib/i18n/gettext/helpers.rb#38 def n_(msgid, msgid_plural, n = T.unsafe(nil)); end + + # source://i18n//lib/i18n/gettext/helpers.rb#38 def ngettext(msgid, msgid_plural, n = T.unsafe(nil)); end + + # Method signatures: + # npgettext('Fruits', 'apple', 'apples', 2) + # npgettext('Fruits', ['apple', 'apples'], 2) + # + # source://i18n//lib/i18n/gettext/helpers.rb#61 def np_(msgctxt, msgid, msgid_plural, n = T.unsafe(nil)); end + + # Method signatures: + # npgettext('Fruits', 'apple', 'apples', 2) + # npgettext('Fruits', ['apple', 'apples'], 2) + # + # source://i18n//lib/i18n/gettext/helpers.rb#61 def npgettext(msgctxt, msgid, msgid_plural, n = T.unsafe(nil)); end + + # Method signatures: + # nsgettext('Fruits|apple', 'apples', 2) + # nsgettext(['Fruits|apple', 'apples'], 2) + # + # source://i18n//lib/i18n/gettext/helpers.rb#46 def ns_(msgid, msgid_plural, n = T.unsafe(nil), separator = T.unsafe(nil)); end + + # Method signatures: + # nsgettext('Fruits|apple', 'apples', 2) + # nsgettext(['Fruits|apple', 'apples'], 2) + # + # source://i18n//lib/i18n/gettext/helpers.rb#46 def nsgettext(msgid, msgid_plural, n = T.unsafe(nil), separator = T.unsafe(nil)); end + + # source://i18n//lib/i18n/gettext/helpers.rb#32 def p_(msgctxt, msgid); end + + # source://i18n//lib/i18n/gettext/helpers.rb#32 def pgettext(msgctxt, msgid); end + + # source://i18n//lib/i18n/gettext/helpers.rb#26 def s_(msgid, separator = T.unsafe(nil)); end + + # source://i18n//lib/i18n/gettext/helpers.rb#26 def sgettext(msgid, separator = T.unsafe(nil)); end end +# source://i18n//lib/i18n/gettext.rb#5 I18n::Gettext::PLURAL_SEPARATOR = T.let(T.unsafe(nil), String) + +# source://i18n//lib/i18n/interpolate/ruby.rb#12 I18n::INTERPOLATION_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://i18n//lib/i18n/interpolate/ruby.rb#15 I18n::INTERPOLATION_PATTERNS_CACHE = T.let(T.unsafe(nil), Hash) +# source://i18n//lib/i18n/exceptions.rb#134 class I18n::InvalidFilenames < ::I18n::ArgumentError + # @return [InvalidFilenames] a new instance of InvalidFilenames + # + # source://i18n//lib/i18n/exceptions.rb#136 def initialize(file_errors); end end +# source://i18n//lib/i18n/exceptions.rb#135 I18n::InvalidFilenames::NUMBER_OF_ERRORS_SHOWN = T.let(T.unsafe(nil), Integer) +# source://i18n//lib/i18n/exceptions.rb#32 class I18n::InvalidLocale < ::I18n::ArgumentError + # @return [InvalidLocale] a new instance of InvalidLocale + # + # source://i18n//lib/i18n/exceptions.rb#34 def initialize(locale); end + # Returns the value of attribute locale. + # + # source://i18n//lib/i18n/exceptions.rb#33 def locale; end end +# source://i18n//lib/i18n/exceptions.rb#40 class I18n::InvalidLocaleData < ::I18n::ArgumentError + # @return [InvalidLocaleData] a new instance of InvalidLocaleData + # + # source://i18n//lib/i18n/exceptions.rb#42 def initialize(filename, exception_message); end + # Returns the value of attribute filename. + # + # source://i18n//lib/i18n/exceptions.rb#41 def filename; end end +# source://i18n//lib/i18n/exceptions.rb#92 class I18n::InvalidPluralizationData < ::I18n::ArgumentError + # @return [InvalidPluralizationData] a new instance of InvalidPluralizationData + # + # source://i18n//lib/i18n/exceptions.rb#94 def initialize(entry, count, key); end + # Returns the value of attribute count. + # + # source://i18n//lib/i18n/exceptions.rb#93 def count; end + + # Returns the value of attribute entry. + # + # source://i18n//lib/i18n/exceptions.rb#93 def entry; end + + # Returns the value of attribute key. + # + # source://i18n//lib/i18n/exceptions.rb#93 def key; end end +# source://i18n//lib/i18n/backend/key_value.rb#21 I18n::JSON = ActiveSupport::JSON + +# source://i18n//lib/i18n/locale.rb#4 module I18n::Locale; end +# source://i18n//lib/i18n/locale/fallbacks.rb#48 class I18n::Locale::Fallbacks < ::Hash + # @return [Fallbacks] a new instance of Fallbacks + # + # source://i18n//lib/i18n/locale/fallbacks.rb#49 def initialize(*mappings); end + # @raise [InvalidLocale] + # + # source://i18n//lib/i18n/locale/fallbacks.rb#60 def [](locale); end + + # Returns the value of attribute defaults. + # + # source://i18n//lib/i18n/locale/fallbacks.rb#58 def defaults; end + + # source://i18n//lib/i18n/locale/fallbacks.rb#55 def defaults=(defaults); end + + # source://i18n//lib/i18n/locale/fallbacks.rb#67 def map(*args, &block); end protected + # source://i18n//lib/i18n/locale/fallbacks.rb#84 def compute(tags, include_defaults = T.unsafe(nil), exclude = T.unsafe(nil)); end end +# source://i18n//lib/i18n/locale/tag.rb#5 module I18n::Locale::Tag class << self + # Returns the current locale tag implementation. Defaults to +I18n::Locale::Tag::Simple+. + # + # source://i18n//lib/i18n/locale/tag.rb#12 def implementation; end + + # Sets the current locale tag implementation. Use this to set a different locale tag implementation. + # + # source://i18n//lib/i18n/locale/tag.rb#17 def implementation=(implementation); end + + # Factory method for locale tags. Delegates to the current locale tag implementation. + # + # source://i18n//lib/i18n/locale/tag.rb#22 def tag(tag); end end end +# source://i18n//lib/i18n/locale/tag/parents.rb#4 module I18n::Locale::Tag::Parents + # source://i18n//lib/i18n/locale/tag/parents.rb#5 def parent; end + + # source://i18n//lib/i18n/locale/tag/parents.rb#18 def parents; end + + # source://i18n//lib/i18n/locale/tag/parents.rb#14 def self_and_parents; end end +# source://i18n//lib/i18n/locale/tag/rfc4646.rb#12 I18n::Locale::Tag::RFC4646_FORMATS = T.let(T.unsafe(nil), Hash) + +# source://i18n//lib/i18n/locale/tag/rfc4646.rb#11 I18n::Locale::Tag::RFC4646_SUBTAGS = T.let(T.unsafe(nil), Array) +# source://i18n//lib/i18n/locale/tag/rfc4646.rb#14 class I18n::Locale::Tag::Rfc4646 < ::Struct include ::I18n::Locale::Tag::Parents + # source://i18n//lib/i18n/locale/tag/rfc4646.rb#35 def language; end + + # source://i18n//lib/i18n/locale/tag/rfc4646.rb#35 def region; end + + # source://i18n//lib/i18n/locale/tag/rfc4646.rb#35 def script; end + + # source://i18n//lib/i18n/locale/tag/rfc4646.rb#46 def to_a; end + + # source://i18n//lib/i18n/locale/tag/rfc4646.rb#42 def to_s; end + + # source://i18n//lib/i18n/locale/tag/rfc4646.rb#38 def to_sym; end + + # source://i18n//lib/i18n/locale/tag/rfc4646.rb#35 def variant; end class << self + # source://i18n//lib/i18n/locale/tag/rfc4646.rb#23 def parser; end + + # source://i18n//lib/i18n/locale/tag/rfc4646.rb#27 def parser=(parser); end + + # Parses the given tag and returns a Tag instance if it is valid. + # Returns false if the given tag is not valid according to RFC 4646. + # + # source://i18n//lib/i18n/locale/tag/rfc4646.rb#18 def tag(tag); end end end +# source://i18n//lib/i18n/locale/tag/rfc4646.rb#50 module I18n::Locale::Tag::Rfc4646::Parser class << self + # source://i18n//lib/i18n/locale/tag/rfc4646.rb#63 def match(tag); end end end +# source://i18n//lib/i18n/locale/tag/rfc4646.rb#51 I18n::Locale::Tag::Rfc4646::Parser::PATTERN = T.let(T.unsafe(nil), Regexp) +# source://i18n//lib/i18n/locale/tag/simple.rb#6 class I18n::Locale::Tag::Simple include ::I18n::Locale::Tag::Parents + # @return [Simple] a new instance of Simple + # + # source://i18n//lib/i18n/locale/tag/simple.rb#17 def initialize(*tag); end + # source://i18n//lib/i18n/locale/tag/simple.rb#21 def subtags; end + + # Returns the value of attribute tag. + # + # source://i18n//lib/i18n/locale/tag/simple.rb#15 def tag; end + + # source://i18n//lib/i18n/locale/tag/simple.rb#33 def to_a; end + + # source://i18n//lib/i18n/locale/tag/simple.rb#29 def to_s; end + + # source://i18n//lib/i18n/locale/tag/simple.rb#25 def to_sym; end class << self + # source://i18n//lib/i18n/locale/tag/simple.rb#8 def tag(tag); end end end +# source://i18n//lib/i18n/middleware.rb#4 class I18n::Middleware + # @return [Middleware] a new instance of Middleware + # + # source://i18n//lib/i18n/middleware.rb#6 def initialize(app); end + # source://i18n//lib/i18n/middleware.rb#10 def call(env); end end +# source://i18n//lib/i18n/exceptions.rb#100 class I18n::MissingInterpolationArgument < ::I18n::ArgumentError + # @return [MissingInterpolationArgument] a new instance of MissingInterpolationArgument + # + # source://i18n//lib/i18n/exceptions.rb#102 def initialize(key, values, string); end + # Returns the value of attribute key. + # + # source://i18n//lib/i18n/exceptions.rb#101 def key; end + + # Returns the value of attribute string. + # + # source://i18n//lib/i18n/exceptions.rb#101 def string; end + + # Returns the value of attribute values. + # + # source://i18n//lib/i18n/exceptions.rb#101 def values; end end +# source://i18n//lib/i18n/exceptions.rb#48 class I18n::MissingTranslation < ::I18n::ArgumentError include ::I18n::MissingTranslation::Base end +# source://i18n//lib/i18n/exceptions.rb#49 module I18n::MissingTranslation::Base + # source://i18n//lib/i18n/exceptions.rb#54 def initialize(locale, key, options = T.unsafe(nil)); end + # Returns the value of attribute key. + # + # source://i18n//lib/i18n/exceptions.rb#52 def key; end + + # source://i18n//lib/i18n/exceptions.rb#59 def keys; end + + # Returns the value of attribute locale. + # + # source://i18n//lib/i18n/exceptions.rb#52 def locale; end + + # source://i18n//lib/i18n/exceptions.rb#65 def message; end + + # source://i18n//lib/i18n/exceptions.rb#74 def normalized_option(key); end + + # Returns the value of attribute options. + # + # source://i18n//lib/i18n/exceptions.rb#52 def options; end + + # source://i18n//lib/i18n/exceptions.rb#80 def to_exception; end + + # source://i18n//lib/i18n/exceptions.rb#65 def to_s; end end +# source://i18n//lib/i18n/exceptions.rb#50 I18n::MissingTranslation::Base::PERMITTED_KEYS = T.let(T.unsafe(nil), Array) +# source://i18n//lib/i18n/exceptions.rb#88 class I18n::MissingTranslationData < ::I18n::ArgumentError include ::I18n::MissingTranslation::Base end +# source://i18n//lib/i18n.rb#19 I18n::RESERVED_KEYS = T.let(T.unsafe(nil), Array) +# source://i18n//lib/i18n/exceptions.rb#108 class I18n::ReservedInterpolationKey < ::I18n::ArgumentError + # @return [ReservedInterpolationKey] a new instance of ReservedInterpolationKey + # + # source://i18n//lib/i18n/exceptions.rb#110 def initialize(key, string); end + # Returns the value of attribute key. + # + # source://i18n//lib/i18n/exceptions.rb#109 def key; end + + # Returns the value of attribute string. + # + # source://i18n//lib/i18n/exceptions.rb#109 def string; end end +# source://i18n//lib/i18n/tests.rb#4 module I18n::Tests; end +# source://i18n//lib/i18n/tests/localization.rb#3 module I18n::Tests::Localization class << self + # @private + # + # source://i18n//lib/i18n/tests/localization.rb#9 def included(base); end end end +# source://i18n//lib/i18n/exceptions.rb#116 class I18n::UnknownFileType < ::I18n::ArgumentError + # @return [UnknownFileType] a new instance of UnknownFileType + # + # source://i18n//lib/i18n/exceptions.rb#118 def initialize(type, filename); end + # Returns the value of attribute filename. + # + # source://i18n//lib/i18n/exceptions.rb#117 def filename; end + + # Returns the value of attribute type. + # + # source://i18n//lib/i18n/exceptions.rb#117 def type; end end +# source://i18n//lib/i18n/exceptions.rb#124 class I18n::UnsupportedMethod < ::I18n::ArgumentError + # @return [UnsupportedMethod] a new instance of UnsupportedMethod + # + # source://i18n//lib/i18n/exceptions.rb#126 def initialize(method, backend_klass, msg); end + # Returns the value of attribute backend_klass. + # + # source://i18n//lib/i18n/exceptions.rb#125 def backend_klass; end + + # Returns the value of attribute method. + # + # source://i18n//lib/i18n/exceptions.rb#125 def method; end + + # Returns the value of attribute msg. + # + # source://i18n//lib/i18n/exceptions.rb#125 def msg; end end +# source://i18n//lib/i18n/utils.rb#4 module I18n::Utils class << self + # source://i18n//lib/i18n/utils.rb#18 def deep_merge(hash, other_hash, &block); end + + # source://i18n//lib/i18n/utils.rb#22 def deep_merge!(hash, other_hash, &block); end + + # source://i18n//lib/i18n/utils.rb#34 def deep_symbolize_keys(hash); end + + # source://i18n//lib/i18n/utils.rb#7 def except(hash, *keys); end private + # source://i18n//lib/i18n/utils.rb#43 def deep_symbolize_keys_in_object(value); end end end +# source://i18n//lib/i18n/version.rb#4 I18n::VERSION = T.let(T.unsafe(nil), String) diff --git a/Library/Homebrew/sorbet/rbi/gems/json_schemer@2.1.1.rbi b/Library/Homebrew/sorbet/rbi/gems/json_schemer@2.1.1.rbi index 448ac137668f1d..b69c3095d281de 100644 --- a/Library/Homebrew/sorbet/rbi/gems/json_schemer@2.1.1.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/json_schemer@2.1.1.rbi @@ -4,533 +4,1086 @@ # This is an autogenerated file for types exported from the `json_schemer` gem. # Please instead update this file by running `bin/tapioca gem json_schemer`. +# Based on code from @robacarp found in issue 48: +# https://github.com/davishmcclurg/json_schemer/issues/48 +# +# source://json_schemer//lib/json_schemer/version.rb#2 module JSONSchemer class << self + # source://json_schemer//lib/json_schemer.rb#157 def draft201909; end + + # source://json_schemer//lib/json_schemer.rb#145 def draft202012; end + + # source://json_schemer//lib/json_schemer.rb#193 def draft4; end + + # source://json_schemer//lib/json_schemer.rb#181 def draft6; end + + # source://json_schemer//lib/json_schemer.rb#169 def draft7; end + + # source://json_schemer//lib/json_schemer.rb#245 def openapi(document, **options); end + + # source://json_schemer//lib/json_schemer.rb#215 def openapi30; end + + # source://json_schemer//lib/json_schemer.rb#237 def openapi30_document; end + + # source://json_schemer//lib/json_schemer.rb#205 def openapi31; end + + # source://json_schemer//lib/json_schemer.rb#229 def openapi31_document; end + + # source://json_schemer//lib/json_schemer.rb#116 def schema(schema, meta_schema: T.unsafe(nil), **options); end + + # @return [Boolean] + # + # source://json_schemer//lib/json_schemer.rb#137 def valid_schema?(schema, **options); end + + # source://json_schemer//lib/json_schemer.rb#141 def validate_schema(schema, **options); end end end +# source://json_schemer//lib/json_schemer/result.rb#3 JSONSchemer::CATCHALL = T.let(T.unsafe(nil), String) + +# source://json_schemer//lib/json_schemer/result.rb#8 JSONSchemer::CLASSIC_ERROR_TYPES = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/cached_resolver.rb#15 class JSONSchemer::CachedRefResolver < ::JSONSchemer::CachedResolver; end +# source://json_schemer//lib/json_schemer/cached_resolver.rb#3 class JSONSchemer::CachedResolver + # @return [CachedResolver] a new instance of CachedResolver + # + # source://json_schemer//lib/json_schemer/cached_resolver.rb#4 def initialize(&resolver); end + # source://json_schemer//lib/json_schemer/cached_resolver.rb#9 def call(*args); end end +# source://json_schemer//lib/json_schemer/content.rb#3 module JSONSchemer::ContentEncoding; end + +# source://json_schemer//lib/json_schemer/content.rb#4 JSONSchemer::ContentEncoding::BASE64 = T.let(T.unsafe(nil), Proc) + +# source://json_schemer//lib/json_schemer/content.rb#11 module JSONSchemer::ContentMediaType; end + +# source://json_schemer//lib/json_schemer/content.rb#12 JSONSchemer::ContentMediaType::JSON = T.let(T.unsafe(nil), Proc) + +# source://json_schemer//lib/json_schemer/draft201909/meta.rb#3 module JSONSchemer::Draft201909; end + +# source://json_schemer//lib/json_schemer/draft201909/meta.rb#4 JSONSchemer::Draft201909::BASE_URI = T.let(T.unsafe(nil), URI::HTTPS) + +# source://json_schemer//lib/json_schemer/draft201909/meta.rb#6 JSONSchemer::Draft201909::CONTENT_ENCODINGS = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft201909/meta.rb#7 JSONSchemer::Draft201909::CONTENT_MEDIA_TYPES = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft201909/meta.rb#5 JSONSchemer::Draft201909::FORMATS = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft201909/meta.rb#50 module JSONSchemer::Draft201909::Meta; end + +# source://json_schemer//lib/json_schemer/draft201909/meta.rb#105 JSONSchemer::Draft201909::Meta::APPLICATOR = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft201909/meta.rb#297 JSONSchemer::Draft201909::Meta::CONTENT = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft201909/meta.rb#51 JSONSchemer::Draft201909::Meta::CORE = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft201909/meta.rb#286 JSONSchemer::Draft201909::Meta::FORMAT = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft201909/meta.rb#253 JSONSchemer::Draft201909::Meta::META_DATA = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft201909/meta.rb#310 JSONSchemer::Draft201909::Meta::SCHEMAS = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft201909/meta.rb#158 JSONSchemer::Draft201909::Meta::VALIDATION = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft201909/meta.rb#8 JSONSchemer::Draft201909::SCHEMA = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft201909/vocab/core.rb#4 module JSONSchemer::Draft201909::Vocab; end + +# source://json_schemer//lib/json_schemer/draft201909/vocab.rb#14 JSONSchemer::Draft201909::Vocab::APPLICATOR = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft201909/vocab/applicator.rb#5 module JSONSchemer::Draft201909::Vocab::Applicator; end +# source://json_schemer//lib/json_schemer/draft201909/vocab/applicator.rb#38 class JSONSchemer::Draft201909::Vocab::Applicator::AdditionalItems < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft201909/vocab/applicator.rb#39 def error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/draft201909/vocab/applicator.rb#43 def parse; end + + # source://json_schemer//lib/json_schemer/draft201909/vocab/applicator.rb#47 def validate(instance, instance_location, keyword_location, context); end end +# source://json_schemer//lib/json_schemer/draft201909/vocab/applicator.rb#6 class JSONSchemer::Draft201909::Vocab::Applicator::Items < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft201909/vocab/applicator.rb#7 def error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/draft201909/vocab/applicator.rb#11 def parse; end + + # source://json_schemer//lib/json_schemer/draft201909/vocab/applicator.rb#21 def validate(instance, instance_location, keyword_location, context); end end +# source://json_schemer//lib/json_schemer/draft201909/vocab/applicator.rb#61 class JSONSchemer::Draft201909::Vocab::Applicator::UnevaluatedItems < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft201909/vocab/applicator.rb#62 def error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/draft201909/vocab/applicator.rb#66 def parse; end + + # source://json_schemer//lib/json_schemer/draft201909/vocab/applicator.rb#70 def validate(instance, instance_location, keyword_location, context); end private + # source://json_schemer//lib/json_schemer/draft201909/vocab/applicator.rb#88 def collect_unevaluated_items(result, instance_location, unevaluated_items); end end +# source://json_schemer//lib/json_schemer/draft201909/vocab.rb#27 JSONSchemer::Draft201909::Vocab::CONTENT = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft201909/vocab.rb#5 JSONSchemer::Draft201909::Vocab::CORE = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft201909/vocab/core.rb#5 module JSONSchemer::Draft201909::Vocab::Core; end +# source://json_schemer//lib/json_schemer/draft201909/vocab/core.rb#6 class JSONSchemer::Draft201909::Vocab::Core::RecursiveAnchor < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft201909/vocab/core.rb#7 def parse; end end +# source://json_schemer//lib/json_schemer/draft201909/vocab/core.rb#13 class JSONSchemer::Draft201909::Vocab::Core::RecursiveRef < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft201909/vocab/core.rb#22 def recursive_anchor; end + + # source://json_schemer//lib/json_schemer/draft201909/vocab/core.rb#18 def ref_schema; end + + # source://json_schemer//lib/json_schemer/draft201909/vocab/core.rb#14 def ref_uri; end + + # source://json_schemer//lib/json_schemer/draft201909/vocab/core.rb#27 def validate(instance, instance_location, keyword_location, context); end end +# source://json_schemer//lib/json_schemer/draft201909/vocab.rb#26 JSONSchemer::Draft201909::Vocab::FORMAT = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft201909/vocab.rb#28 JSONSchemer::Draft201909::Vocab::META_DATA = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft201909/vocab.rb#25 JSONSchemer::Draft201909::Vocab::VALIDATION = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft202012/meta.rb#3 module JSONSchemer::Draft202012; end + +# source://json_schemer//lib/json_schemer/draft202012/meta.rb#4 JSONSchemer::Draft202012::BASE_URI = T.let(T.unsafe(nil), URI::HTTPS) + +# source://json_schemer//lib/json_schemer/draft202012/meta.rb#26 JSONSchemer::Draft202012::CONTENT_ENCODINGS = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft202012/meta.rb#29 JSONSchemer::Draft202012::CONTENT_MEDIA_TYPES = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft202012/meta.rb#5 JSONSchemer::Draft202012::FORMATS = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft202012/meta.rb#90 module JSONSchemer::Draft202012::Meta; end + +# source://json_schemer//lib/json_schemer/draft202012/meta.rb#138 JSONSchemer::Draft202012::Meta::APPLICATOR = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft202012/meta.rb#339 JSONSchemer::Draft202012::Meta::CONTENT = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft202012/meta.rb#91 JSONSchemer::Draft202012::Meta::CORE = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft202012/meta.rb#319 JSONSchemer::Draft202012::Meta::FORMAT_ANNOTATION = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft202012/meta.rb#329 JSONSchemer::Draft202012::Meta::FORMAT_ASSERTION = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft202012/meta.rb#287 JSONSchemer::Draft202012::Meta::META_DATA = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft202012/meta.rb#352 JSONSchemer::Draft202012::Meta::SCHEMAS = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft202012/meta.rb#182 JSONSchemer::Draft202012::Meta::UNEVALUATED = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft202012/meta.rb#193 JSONSchemer::Draft202012::Meta::VALIDATION = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft202012/meta.rb#32 JSONSchemer::Draft202012::SCHEMA = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft202012/vocab/core.rb#4 module JSONSchemer::Draft202012::Vocab; end + +# https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-01#section-10 +# +# source://json_schemer//lib/json_schemer/draft202012/vocab.rb#24 JSONSchemer::Draft202012::Vocab::APPLICATOR = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#5 module JSONSchemer::Draft202012::Vocab::Applicator; end +# source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#297 class JSONSchemer::Draft202012::Vocab::Applicator::AdditionalProperties < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#298 def error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#302 def false_schema_error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#306 def parse; end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#310 def validate(instance, instance_location, keyword_location, context); end end +# source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#6 class JSONSchemer::Draft202012::Vocab::Applicator::AllOf < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#7 def error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#11 def parse; end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#17 def validate(instance, instance_location, keyword_location, context); end end +# source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#25 class JSONSchemer::Draft202012::Vocab::Applicator::AnyOf < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#26 def error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#30 def parse; end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#36 def validate(instance, instance_location, keyword_location, context); end end +# source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#191 class JSONSchemer::Draft202012::Vocab::Applicator::Contains < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#192 def error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#196 def parse; end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#200 def validate(instance, instance_location, keyword_location, context); end end +# source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#349 class JSONSchemer::Draft202012::Vocab::Applicator::Dependencies < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#350 def error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#354 def parse; end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#360 def validate(instance, instance_location, keyword_location, context); end end +# source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#122 class JSONSchemer::Draft202012::Vocab::Applicator::DependentSchemas < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#123 def error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#127 def parse; end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#133 def validate(instance, instance_location, keyword_location, context); end end +# source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#106 class JSONSchemer::Draft202012::Vocab::Applicator::Else < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#107 def error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#111 def parse; end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#115 def validate(instance, instance_location, keyword_location, context); end end +# source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#79 class JSONSchemer::Draft202012::Vocab::Applicator::If < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#80 def parse; end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#84 def validate(instance, instance_location, keyword_location, context); end end +# source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#168 class JSONSchemer::Draft202012::Vocab::Applicator::Items < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#169 def error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#173 def parse; end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#177 def validate(instance, instance_location, keyword_location, context); end end +# source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#64 class JSONSchemer::Draft202012::Vocab::Applicator::Not < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#65 def error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#69 def parse; end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#73 def validate(instance, instance_location, keyword_location, context); end end +# source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#44 class JSONSchemer::Draft202012::Vocab::Applicator::OneOf < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#45 def error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#49 def parse; end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#55 def validate(instance, instance_location, keyword_location, context); end end +# source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#266 class JSONSchemer::Draft202012::Vocab::Applicator::PatternProperties < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#267 def error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#271 def parse; end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#277 def validate(instance, instance_location, keyword_location, context); end end +# source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#146 class JSONSchemer::Draft202012::Vocab::Applicator::PrefixItems < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#147 def error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#151 def parse; end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#157 def validate(instance, instance_location, keyword_location, context); end end +# source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#218 class JSONSchemer::Draft202012::Vocab::Applicator::Properties < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#219 def error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#223 def parse; end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#229 def validate(instance, instance_location, keyword_location, context); end end +# source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#329 class JSONSchemer::Draft202012::Vocab::Applicator::PropertyNames < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#330 def error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#334 def parse; end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#338 def validate(instance, instance_location, keyword_location, context); end end +# source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#90 class JSONSchemer::Draft202012::Vocab::Applicator::Then < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#91 def error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#95 def parse; end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/applicator.rb#99 def validate(instance, instance_location, keyword_location, context); end end +# https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-01#section-8 +# +# source://json_schemer//lib/json_schemer/draft202012/vocab.rb#88 JSONSchemer::Draft202012::Vocab::CONTENT = T.let(T.unsafe(nil), Hash) + +# https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-01#section-8 +# +# source://json_schemer//lib/json_schemer/draft202012/vocab.rb#6 JSONSchemer::Draft202012::Vocab::CORE = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft202012/vocab/content.rb#5 module JSONSchemer::Draft202012::Vocab::Content; end +# source://json_schemer//lib/json_schemer/draft202012/vocab/content.rb#6 class JSONSchemer::Draft202012::Vocab::Content::ContentEncoding < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/content.rb#7 def parse; end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/content.rb#11 def validate(instance, instance_location, keyword_location, _context); end end +# source://json_schemer//lib/json_schemer/draft202012/vocab/content.rb#20 class JSONSchemer::Draft202012::Vocab::Content::ContentMediaType < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/content.rb#21 def parse; end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/content.rb#25 def validate(instance, instance_location, keyword_location, context); end end +# source://json_schemer//lib/json_schemer/draft202012/vocab/content.rb#35 class JSONSchemer::Draft202012::Vocab::Content::ContentSchema < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/content.rb#36 def parse; end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/content.rb#40 def validate(instance, instance_location, keyword_location, context); end end +# source://json_schemer//lib/json_schemer/draft202012/vocab/core.rb#5 module JSONSchemer::Draft202012::Vocab::Core; end +# source://json_schemer//lib/json_schemer/draft202012/vocab/core.rb#45 class JSONSchemer::Draft202012::Vocab::Core::Anchor < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/core.rb#46 def parse; end end +# source://json_schemer//lib/json_schemer/draft202012/vocab/core.rb#120 class JSONSchemer::Draft202012::Vocab::Core::Comment < ::JSONSchemer::Keyword; end +# source://json_schemer//lib/json_schemer/draft202012/vocab/core.rb#112 class JSONSchemer::Draft202012::Vocab::Core::Defs < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/core.rb#113 def parse; end end +# source://json_schemer//lib/json_schemer/draft202012/vocab/core.rb#71 class JSONSchemer::Draft202012::Vocab::Core::DynamicAnchor < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/core.rb#72 def parse; end end +# source://json_schemer//lib/json_schemer/draft202012/vocab/core.rb#80 class JSONSchemer::Draft202012::Vocab::Core::DynamicRef < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/core.rb#89 def dynamic_anchor; end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/core.rb#85 def ref_schema; end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/core.rb#81 def ref_uri; end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/core.rb#95 def validate(instance, instance_location, keyword_location, context); end end +# source://json_schemer//lib/json_schemer/draft202012/vocab/core.rb#36 class JSONSchemer::Draft202012::Vocab::Core::Id < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/core.rb#37 def parse; end end +# source://json_schemer//lib/json_schemer/draft202012/vocab/core.rb#53 class JSONSchemer::Draft202012::Vocab::Core::Ref < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/core.rb#62 def ref_schema; end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/core.rb#58 def ref_uri; end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/core.rb#66 def validate(instance, instance_location, keyword_location, context); end class << self + # @return [Boolean] + # + # source://json_schemer//lib/json_schemer/draft202012/vocab/core.rb#54 def exclusive?; end end end +# source://json_schemer//lib/json_schemer/draft202012/vocab/core.rb#6 class JSONSchemer::Draft202012::Vocab::Core::Schema < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/core.rb#7 def parse; end end +# source://json_schemer//lib/json_schemer/draft202012/vocab/core.rb#128 class JSONSchemer::Draft202012::Vocab::Core::UnknownKeyword < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/core.rb#139 def fetch(token); end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/core.rb#129 def parse; end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/core.rb#149 def parsed_schema; end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/core.rb#153 def validate(instance, instance_location, keyword_location, _context); end end +# source://json_schemer//lib/json_schemer/draft202012/vocab/core.rb#17 class JSONSchemer::Draft202012::Vocab::Core::Vocabulary < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/core.rb#18 def parse; end end +# source://json_schemer//lib/json_schemer/draft202012/vocab/core.rb#122 class JSONSchemer::Draft202012::Vocab::Core::XError < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/core.rb#123 def message(error_key); end end +# https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-01#section-7.2.1 +# +# source://json_schemer//lib/json_schemer/draft202012/vocab.rb#80 JSONSchemer::Draft202012::Vocab::FORMAT_ANNOTATION = T.let(T.unsafe(nil), Hash) + +# https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-01#section-7.2.2 +# +# source://json_schemer//lib/json_schemer/draft202012/vocab.rb#84 JSONSchemer::Draft202012::Vocab::FORMAT_ASSERTION = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft202012/vocab/format_annotation.rb#5 module JSONSchemer::Draft202012::Vocab::FormatAnnotation; end +# source://json_schemer//lib/json_schemer/draft202012/vocab/format_annotation.rb#6 class JSONSchemer::Draft202012::Vocab::FormatAnnotation::Format < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/format_annotation.rb#7 def error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/format_annotation.rb#11 def parse; end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/format_annotation.rb#15 def validate(instance, instance_location, keyword_location, _context); end end +# source://json_schemer//lib/json_schemer/draft202012/vocab/format_assertion.rb#5 module JSONSchemer::Draft202012::Vocab::FormatAssertion; end +# source://json_schemer//lib/json_schemer/draft202012/vocab/format_assertion.rb#6 class JSONSchemer::Draft202012::Vocab::FormatAssertion::Format < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/format_assertion.rb#7 def error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/format_assertion.rb#11 def parse; end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/format_assertion.rb#15 def validate(instance, instance_location, keyword_location, _context); end end +# https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-01#section-9 +# +# source://json_schemer//lib/json_schemer/draft202012/vocab.rb#94 JSONSchemer::Draft202012::Vocab::META_DATA = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft202012/vocab/meta_data.rb#5 module JSONSchemer::Draft202012::Vocab::MetaData; end +# source://json_schemer//lib/json_schemer/draft202012/vocab/meta_data.rb#6 class JSONSchemer::Draft202012::Vocab::MetaData::ReadOnly < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/meta_data.rb#7 def error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/meta_data.rb#11 def validate(instance, instance_location, keyword_location, context); end end +# source://json_schemer//lib/json_schemer/draft202012/vocab/meta_data.rb#17 class JSONSchemer::Draft202012::Vocab::MetaData::WriteOnly < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/meta_data.rb#18 def error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/meta_data.rb#22 def validate(instance, instance_location, keyword_location, context); end end +# https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-01#section-11 +# +# source://json_schemer//lib/json_schemer/draft202012/vocab.rb#47 JSONSchemer::Draft202012::Vocab::UNEVALUATED = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft202012/vocab/unevaluated.rb#5 module JSONSchemer::Draft202012::Vocab::Unevaluated; end +# source://json_schemer//lib/json_schemer/draft202012/vocab/unevaluated.rb#6 class JSONSchemer::Draft202012::Vocab::Unevaluated::UnevaluatedItems < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/unevaluated.rb#7 def error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/unevaluated.rb#11 def parse; end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/unevaluated.rb#15 def validate(instance, instance_location, keyword_location, context); end private + # source://json_schemer//lib/json_schemer/draft202012/vocab/unevaluated.rb#33 def collect_unevaluated_items(result, instance_location, unevaluated_items); end end +# source://json_schemer//lib/json_schemer/draft202012/vocab/unevaluated.rb#49 class JSONSchemer::Draft202012::Vocab::Unevaluated::UnevaluatedProperties < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/unevaluated.rb#50 def error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/unevaluated.rb#54 def parse; end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/unevaluated.rb#58 def validate(instance, instance_location, keyword_location, context); end private + # source://json_schemer//lib/json_schemer/draft202012/vocab/unevaluated.rb#80 def collect_evaluated_keys(result, instance_location, evaluated_keys); end end +# https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-01#section-6 +# +# source://json_schemer//lib/json_schemer/draft202012/vocab.rb#52 JSONSchemer::Draft202012::Vocab::VALIDATION = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#5 module JSONSchemer::Draft202012::Vocab::Validation; end +# source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#71 class JSONSchemer::Draft202012::Vocab::Validation::Const < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#72 def error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#76 def validate(instance, instance_location, keyword_location, _context); end end +# source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#264 class JSONSchemer::Draft202012::Vocab::Validation::DependentRequired < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#265 def error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#269 def validate(instance, instance_location, keyword_location, _context); end end +# source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#61 class JSONSchemer::Draft202012::Vocab::Validation::Enum < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#62 def error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#66 def validate(instance, instance_location, keyword_location, _context); end end +# source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#101 class JSONSchemer::Draft202012::Vocab::Validation::ExclusiveMaximum < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#102 def error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#106 def validate(instance, instance_location, keyword_location, _context); end end +# source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#121 class JSONSchemer::Draft202012::Vocab::Validation::ExclusiveMinimum < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#122 def error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#126 def validate(instance, instance_location, keyword_location, _context); end end +# source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#195 class JSONSchemer::Draft202012::Vocab::Validation::MaxContains < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#196 def error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#200 def validate(instance, instance_location, keyword_location, context); end end +# source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#165 class JSONSchemer::Draft202012::Vocab::Validation::MaxItems < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#166 def error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#170 def validate(instance, instance_location, keyword_location, _context); end end +# source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#131 class JSONSchemer::Draft202012::Vocab::Validation::MaxLength < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#132 def error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#136 def validate(instance, instance_location, keyword_location, _context); end end +# source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#219 class JSONSchemer::Draft202012::Vocab::Validation::MaxProperties < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#220 def error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#224 def validate(instance, instance_location, keyword_location, _context); end end +# source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#91 class JSONSchemer::Draft202012::Vocab::Validation::Maximum < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#92 def error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#96 def validate(instance, instance_location, keyword_location, _context); end end +# source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#207 class JSONSchemer::Draft202012::Vocab::Validation::MinContains < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#208 def error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#212 def validate(instance, instance_location, keyword_location, context); end end +# source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#175 class JSONSchemer::Draft202012::Vocab::Validation::MinItems < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#176 def error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#180 def validate(instance, instance_location, keyword_location, _context); end end +# source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#141 class JSONSchemer::Draft202012::Vocab::Validation::MinLength < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#142 def error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#146 def validate(instance, instance_location, keyword_location, _context); end end +# source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#229 class JSONSchemer::Draft202012::Vocab::Validation::MinProperties < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#230 def error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#234 def validate(instance, instance_location, keyword_location, _context); end end +# source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#111 class JSONSchemer::Draft202012::Vocab::Validation::Minimum < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#112 def error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#116 def validate(instance, instance_location, keyword_location, _context); end end +# source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#81 class JSONSchemer::Draft202012::Vocab::Validation::MultipleOf < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#82 def error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#86 def validate(instance, instance_location, keyword_location, _context); end end +# source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#151 class JSONSchemer::Draft202012::Vocab::Validation::Pattern < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#152 def error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#156 def parse; end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#160 def validate(instance, instance_location, keyword_location, _context); end end +# source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#239 class JSONSchemer::Draft202012::Vocab::Validation::Required < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#240 def error(formatted_instance_location:, details:, **_arg2); end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#244 def validate(instance, instance_location, keyword_location, context); end end +# source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#6 class JSONSchemer::Draft202012::Vocab::Validation::Type < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#7 def error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#28 def validate(instance, instance_location, keyword_location, _context); end private + # source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#39 def valid_type(type, instance); end end +# source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#185 class JSONSchemer::Draft202012::Vocab::Validation::UniqueItems < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#186 def error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/draft202012/vocab/validation.rb#190 def validate(instance, instance_location, keyword_location, _context); end end +# source://json_schemer//lib/json_schemer/draft4/meta.rb#3 module JSONSchemer::Draft4; end + +# source://json_schemer//lib/json_schemer/draft4/meta.rb#4 JSONSchemer::Draft4::BASE_URI = T.let(T.unsafe(nil), URI::HTTP) + +# source://json_schemer//lib/json_schemer/draft4/meta.rb#9 JSONSchemer::Draft4::CONTENT_ENCODINGS = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft4/meta.rb#10 JSONSchemer::Draft4::CONTENT_MEDIA_TYPES = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft4/meta.rb#5 JSONSchemer::Draft4::FORMATS = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft4/meta.rb#11 JSONSchemer::Draft4::SCHEMA = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft4/vocab/validation.rb#4 module JSONSchemer::Draft4::Vocab; end + +# source://json_schemer//lib/json_schemer/draft4/vocab.rb#5 JSONSchemer::Draft4::Vocab::ALL = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft4/vocab/validation.rb#5 module JSONSchemer::Draft4::Vocab::Validation; end +# source://json_schemer//lib/json_schemer/draft4/vocab/validation.rb#13 class JSONSchemer::Draft4::Vocab::Validation::ExclusiveMaximum < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft4/vocab/validation.rb#14 def error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/draft4/vocab/validation.rb#18 def validate(instance, instance_location, keyword_location, _context); end end +# source://json_schemer//lib/json_schemer/draft4/vocab/validation.rb#25 class JSONSchemer::Draft4::Vocab::Validation::ExclusiveMinimum < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft4/vocab/validation.rb#26 def error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/draft4/vocab/validation.rb#30 def validate(instance, instance_location, keyword_location, _context); end end +# source://json_schemer//lib/json_schemer/draft4/vocab/validation.rb#6 class JSONSchemer::Draft4::Vocab::Validation::Type < ::JSONSchemer::Draft202012::Vocab::Validation::Type private + # source://json_schemer//lib/json_schemer/draft4/vocab/validation.rb#8 def valid_type(type, instance); end end +# source://json_schemer//lib/json_schemer/draft6/meta.rb#3 module JSONSchemer::Draft6; end + +# source://json_schemer//lib/json_schemer/draft6/meta.rb#4 JSONSchemer::Draft6::BASE_URI = T.let(T.unsafe(nil), URI::HTTP) + +# source://json_schemer//lib/json_schemer/draft6/meta.rb#14 JSONSchemer::Draft6::CONTENT_ENCODINGS = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft6/meta.rb#15 JSONSchemer::Draft6::CONTENT_MEDIA_TYPES = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft6/meta.rb#5 JSONSchemer::Draft6::FORMATS = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft6/meta.rb#16 JSONSchemer::Draft6::SCHEMA = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft6/vocab.rb#4 module JSONSchemer::Draft6::Vocab; end + +# source://json_schemer//lib/json_schemer/draft6/vocab.rb#5 JSONSchemer::Draft6::Vocab::ALL = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft7/meta.rb#3 module JSONSchemer::Draft7; end + +# source://json_schemer//lib/json_schemer/draft7/meta.rb#4 JSONSchemer::Draft7::BASE_URI = T.let(T.unsafe(nil), URI::HTTP) + +# source://json_schemer//lib/json_schemer/draft7/meta.rb#8 JSONSchemer::Draft7::CONTENT_ENCODINGS = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft7/meta.rb#9 JSONSchemer::Draft7::CONTENT_MEDIA_TYPES = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft7/meta.rb#5 JSONSchemer::Draft7::FORMATS = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft7/meta.rb#10 JSONSchemer::Draft7::SCHEMA = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft7/vocab/validation.rb#4 module JSONSchemer::Draft7::Vocab; end + +# source://json_schemer//lib/json_schemer/draft7/vocab.rb#5 JSONSchemer::Draft7::Vocab::ALL = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/draft7/vocab/validation.rb#5 module JSONSchemer::Draft7::Vocab::Validation; end +# source://json_schemer//lib/json_schemer/draft7/vocab/validation.rb#12 class JSONSchemer::Draft7::Vocab::Validation::AdditionalItems < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/draft7/vocab/validation.rb#13 def error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/draft7/vocab/validation.rb#17 def parse; end + + # source://json_schemer//lib/json_schemer/draft7/vocab/validation.rb#21 def validate(instance, instance_location, keyword_location, context); end end +# source://json_schemer//lib/json_schemer/draft7/vocab/validation.rb#38 class JSONSchemer::Draft7::Vocab::Validation::ContentEncoding < ::JSONSchemer::Draft202012::Vocab::Content::ContentEncoding + # source://json_schemer//lib/json_schemer/draft7/vocab/validation.rb#39 def error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/draft7/vocab/validation.rb#43 def validate(instance, instance_location, keyword_location, _context); end end +# source://json_schemer//lib/json_schemer/draft7/vocab/validation.rb#52 class JSONSchemer::Draft7::Vocab::Validation::ContentMediaType < ::JSONSchemer::Draft202012::Vocab::Content::ContentMediaType + # source://json_schemer//lib/json_schemer/draft7/vocab/validation.rb#53 def error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/draft7/vocab/validation.rb#57 def validate(instance, instance_location, keyword_location, context); end end +# source://json_schemer//lib/json_schemer/draft7/vocab/validation.rb#6 class JSONSchemer::Draft7::Vocab::Validation::Ref < ::JSONSchemer::Draft202012::Vocab::Core::Ref class << self + # @return [Boolean] + # + # source://json_schemer//lib/json_schemer/draft7/vocab/validation.rb#7 def exclusive?; end end end +# source://json_schemer//lib/json_schemer/ecma_regexp.rb#3 class JSONSchemer::EcmaRegexp class << self + # source://json_schemer//lib/json_schemer/ecma_regexp.rb#39 def ruby_equivalent(pattern); end end end +# source://json_schemer//lib/json_schemer/ecma_regexp.rb#27 JSONSchemer::EcmaRegexp::RUBY_EQUIVALENTS = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/ecma_regexp.rb#6 class JSONSchemer::EcmaRegexp::Syntax < ::Regexp::Syntax::Base; end + +# regexp_parser >= 2.3.0 uses syntax classes directly instead of instances +# :nocov: +# +# source://json_schemer//lib/json_schemer/ecma_regexp.rb#7 JSONSchemer::EcmaRegexp::Syntax::SYNTAX = JSONSchemer::EcmaRegexp::Syntax +# source://json_schemer//lib/json_schemer/errors.rb#6 module JSONSchemer::Errors class << self + # source://json_schemer//lib/json_schemer/errors.rb#8 def pretty(error); end end end +# source://json_schemer//lib/json_schemer.rb#107 JSONSchemer::FILE_URI_REF_RESOLVER = T.let(T.unsafe(nil), Proc) +# source://json_schemer//lib/json_schemer/format/duration.rb#3 module JSONSchemer::Format extend ::JSONSchemer::Format::Duration extend ::JSONSchemer::Format::Email @@ -539,425 +1092,1387 @@ module JSONSchemer::Format extend ::JSONSchemer::Format::URITemplate class << self + # source://json_schemer//lib/json_schemer/format.rb#133 def iri_escape(data); end + + # @raise [::URI::InvalidURIError] + # + # source://json_schemer//lib/json_schemer/format.rb#113 def parse_uri_scheme(data); end + + # source://json_schemer//lib/json_schemer/format.rb#90 def percent_encode(data, regexp); end + + # @return [Boolean] + # + # source://json_schemer//lib/json_schemer/format.rb#97 def valid_date_time?(data); end + + # @return [Boolean] + # + # source://json_schemer//lib/json_schemer/format.rb#106 def valid_ip?(data, family); end + + # @return [Boolean] + # + # source://json_schemer//lib/json_schemer/format.rb#137 def valid_regex?(data); end + + # @return [Boolean] + # + # source://json_schemer//lib/json_schemer/format.rb#120 def valid_uri?(data); end + + # @return [Boolean] + # + # source://json_schemer//lib/json_schemer/format.rb#126 def valid_uri_reference?(data); end + + # @return [Boolean] + # + # source://json_schemer//lib/json_schemer/format.rb#143 def valid_uuid?(data); end end end +# source://json_schemer//lib/json_schemer/format.rb#79 JSONSchemer::Format::ASCII_8BIT_TO_PERCENT_ENCODED = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/format.rb#8 JSONSchemer::Format::DATE = T.let(T.unsafe(nil), Proc) + +# https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-01#section-7.3 +# +# source://json_schemer//lib/json_schemer/format.rb#5 JSONSchemer::Format::DATE_TIME = T.let(T.unsafe(nil), Proc) + +# source://json_schemer//lib/json_schemer/format.rb#70 JSONSchemer::Format::DATE_TIME_OFFSET_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://json_schemer//lib/json_schemer/format.rb#71 JSONSchemer::Format::DATE_TIME_SEPARATOR_CHARACTER_CLASS = T.let(T.unsafe(nil), String) + +# source://json_schemer//lib/json_schemer/format.rb#14 JSONSchemer::Format::DURATION = T.let(T.unsafe(nil), Proc) +# source://json_schemer//lib/json_schemer/format/duration.rb#4 module JSONSchemer::Format::Duration + # @return [Boolean] + # + # source://json_schemer//lib/json_schemer/format/duration.rb#18 def valid_duration?(data); end end +# duration = "P" (dur-date / dur-time / dur-week) +# +# source://json_schemer//lib/json_schemer/format/duration.rb#15 JSONSchemer::Format::Duration::DURATION = T.let(T.unsafe(nil), String) + +# source://json_schemer//lib/json_schemer/format/duration.rb#16 JSONSchemer::Format::Duration::DURATION_REGEX = T.let(T.unsafe(nil), Regexp) + +# dur-date = (dur-day / dur-month / dur-year) [dur-time] +# +# source://json_schemer//lib/json_schemer/format/duration.rb#14 JSONSchemer::Format::Duration::DUR_DATE = T.let(T.unsafe(nil), String) + +# dur-day = 1*DIGIT "D" +# +# source://json_schemer//lib/json_schemer/format/duration.rb#10 JSONSchemer::Format::Duration::DUR_DAY = T.let(T.unsafe(nil), String) + +# dur-hour = 1*DIGIT "H" [dur-minute] +# +# source://json_schemer//lib/json_schemer/format/duration.rb#8 JSONSchemer::Format::Duration::DUR_HOUR = T.let(T.unsafe(nil), String) + +# dur-second = 1*DIGIT "S" +# +# source://json_schemer//lib/json_schemer/format/duration.rb#7 JSONSchemer::Format::Duration::DUR_MINUTE = T.let(T.unsafe(nil), String) + +# dur-month = 1*DIGIT "M" [dur-day] +# +# source://json_schemer//lib/json_schemer/format/duration.rb#12 JSONSchemer::Format::Duration::DUR_MONTH = T.let(T.unsafe(nil), String) + +# https://datatracker.ietf.org/doc/html/rfc3339#appendix-A +# +# source://json_schemer//lib/json_schemer/format/duration.rb#6 JSONSchemer::Format::Duration::DUR_SECOND = T.let(T.unsafe(nil), String) + +# dur-time = "T" (dur-hour / dur-minute / dur-second) +# +# source://json_schemer//lib/json_schemer/format/duration.rb#9 JSONSchemer::Format::Duration::DUR_TIME = T.let(T.unsafe(nil), String) + +# dur-week = 1*DIGIT "W" +# +# source://json_schemer//lib/json_schemer/format/duration.rb#11 JSONSchemer::Format::Duration::DUR_WEEK = T.let(T.unsafe(nil), String) + +# dur-year = 1*DIGIT "Y" [dur-month] +# +# source://json_schemer//lib/json_schemer/format/duration.rb#13 JSONSchemer::Format::Duration::DUR_YEAR = T.let(T.unsafe(nil), String) + +# https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-01#section-7.3.2 +# +# source://json_schemer//lib/json_schemer/format.rb#18 JSONSchemer::Format::EMAIL = T.let(T.unsafe(nil), Proc) +# source://json_schemer//lib/json_schemer/format/email.rb#4 module JSONSchemer::Format::Email + # @return [Boolean] + # + # source://json_schemer//lib/json_schemer/format/email.rb#44 def valid_email?(data); end end +# using `valid_id?` to check ip addresses because it's complicated. # IPv6-address-literal = "IPv6:" IPv6-addr +# +# source://json_schemer//lib/json_schemer/format/email.rb#36 JSONSchemer::Format::Email::ADDRESS_LITERAL = T.let(T.unsafe(nil), String) + +# Atom = 1*atext +# +# source://json_schemer//lib/json_schemer/format/email.rb#30 JSONSchemer::Format::Email::ATOM = T.let(T.unsafe(nil), String) + +# https://datatracker.ietf.org/doc/html/rfc5321#section-4.1.2 +# +# source://json_schemer//lib/json_schemer/format/email.rb#9 JSONSchemer::Format::Email::A_TEXT = T.let(T.unsafe(nil), String) + +# Dot-string = Atom *("." Atom) +# +# source://json_schemer//lib/json_schemer/format/email.rb#31 JSONSchemer::Format::Email::DOT_STRING = T.let(T.unsafe(nil), String) + +# source://json_schemer//lib/json_schemer/format/email.rb#42 JSONSchemer::Format::Email::EMAIL_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://json_schemer//lib/json_schemer/format/email.rb#32 JSONSchemer::Format::Email::LOCAL_PART = T.let(T.unsafe(nil), String) + +# using `valid_hostname?` to check domain because it's complicated +# +# source://json_schemer//lib/json_schemer/format/email.rb#41 JSONSchemer::Format::Email::MAILBOX = T.let(T.unsafe(nil), String) + +# qtextSMTP = %d32-33 / %d35-91 / %d93-126 +# ; i.e., within a quoted string, any +# ; ASCII graphic or space is permitted +# ; without blackslash-quoting except +# ; double-quote and the backslash itself. +# +# source://json_schemer//lib/json_schemer/format/email.rb#25 JSONSchemer::Format::Email::QUOTED_PAIR_SMTP = T.let(T.unsafe(nil), String) + +# Quoted-string = DQUOTE *QcontentSMTP DQUOTE +# +# source://json_schemer//lib/json_schemer/format/email.rb#29 JSONSchemer::Format::Email::QUOTED_STRING = T.let(T.unsafe(nil), String) + +# quoted-pairSMTP = %d92 %d32-126 +# ; i.e., backslash followed by any ASCII +# ; graphic (including itself) or SPace +# +# source://json_schemer//lib/json_schemer/format/email.rb#28 JSONSchemer::Format::Email::Q_CONTENT_SMTP = T.let(T.unsafe(nil), String) + +# atext = ALPHA / DIGIT / ; Printable US-ASCII +# "!" / "#" / ; characters not including +# "$" / "%" / ; specials. Used for atoms. +# "&" / "'" / +# "*" / "+" / +# "-" / "/" / +# "=" / "?" / +# "^" / "_" / +# "`" / "{" / +# "|" / "}" / +# "~" +# +# source://json_schemer//lib/json_schemer/format/email.rb#20 JSONSchemer::Format::Email::Q_TEXT_SMTP = T.let(T.unsafe(nil), String) + +# https://datatracker.ietf.org/doc/html/rfc6531#section-3.3 +# I think this is the same as "UTF8-non-ascii"? (https://datatracker.ietf.org/doc/html/rfc6532#section-3.1) +# +# source://json_schemer//lib/json_schemer/format/email.rb#7 JSONSchemer::Format::Email::UTF8_NON_ASCII = T.let(T.unsafe(nil), String) + +# https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-01#section-7.3.3 +# +# source://json_schemer//lib/json_schemer/format.rb#25 JSONSchemer::Format::HOSTNAME = T.let(T.unsafe(nil), Proc) + +# source://json_schemer//lib/json_schemer/format.rb#72 JSONSchemer::Format::HOUR_24_REGEX = T.let(T.unsafe(nil), Regexp) +# source://json_schemer//lib/json_schemer/format/hostname.rb#4 module JSONSchemer::Format::Hostname + # @return [Boolean] + # + # source://json_schemer//lib/json_schemer/format/hostname.rb#42 def valid_hostname?(data); end end +# source://json_schemer//lib/json_schemer/format/hostname.rb#40 JSONSchemer::Format::Hostname::ARABIC_EXTENDED_DIGITS_REGEX = T.let(T.unsafe(nil), Regexp) + +# https://datatracker.ietf.org/doc/html/rfc5892#appendix-A.8 +# https://datatracker.ietf.org/doc/html/rfc5892#appendix-A.9 +# +# source://json_schemer//lib/json_schemer/format/hostname.rb#39 JSONSchemer::Format::Hostname::ARABIC_INDIC_DIGITS_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://json_schemer//lib/json_schemer/format/hostname.rb#33 JSONSchemer::Format::Hostname::CONTEXT_REGEX = T.let(T.unsafe(nil), Regexp) + +# \u{00DF}\u{03C2} covered by \p{Ll} +# +# source://json_schemer//lib/json_schemer/format/hostname.rb#10 JSONSchemer::Format::Hostname::EXCEPTIONS_DISALLOWED = T.let(T.unsafe(nil), String) + +# https://datatracker.ietf.org/doc/html/rfc5892#section-2.6 +# +# source://json_schemer//lib/json_schemer/format/hostname.rb#9 JSONSchemer::Format::Hostname::EXCEPTIONS_PVALID = T.let(T.unsafe(nil), String) + +# https://datatracker.ietf.org/doc/html/rfc5892#appendix-A.4 +# +# source://json_schemer//lib/json_schemer/format/hostname.rb#29 JSONSchemer::Format::Hostname::GREEK_LOWER_NUMERAL_SIGN = T.let(T.unsafe(nil), String) + +# https://datatracker.ietf.org/doc/html/rfc5892#appendix-A.5 +# https://datatracker.ietf.org/doc/html/rfc5892#appendix-A.6 +# +# source://json_schemer//lib/json_schemer/format/hostname.rb#32 JSONSchemer::Format::Hostname::HEBREW_PUNCTUATION = T.let(T.unsafe(nil), String) + +# source://json_schemer//lib/json_schemer/format/hostname.rb#15 JSONSchemer::Format::Hostname::HOSTNAME_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://json_schemer//lib/json_schemer/format/hostname.rb#19 JSONSchemer::Format::Hostname::JOINING_TYPE_D_CHARACTER_CLASS = T.let(T.unsafe(nil), String) + +# source://json_schemer//lib/json_schemer/format/hostname.rb#18 JSONSchemer::Format::Hostname::JOINING_TYPE_L_CHARACTER_CLASS = T.let(T.unsafe(nil), String) + +# source://json_schemer//lib/json_schemer/format/hostname.rb#21 JSONSchemer::Format::Hostname::JOINING_TYPE_R_CHARACTER_CLASS = T.let(T.unsafe(nil), String) + +# source://json_schemer//lib/json_schemer/format/hostname.rb#20 JSONSchemer::Format::Hostname::JOINING_TYPE_T_CHARACTER_CLASS = T.let(T.unsafe(nil), String) + +# source://json_schemer//lib/json_schemer/format/hostname.rb#36 JSONSchemer::Format::Hostname::KATAKANA_MIDDLE_DOT_CONTEXT_REGEX = T.let(T.unsafe(nil), Regexp) + +# https://datatracker.ietf.org/doc/html/rfc5892#appendix-A.7 +# +# source://json_schemer//lib/json_schemer/format/hostname.rb#35 JSONSchemer::Format::Hostname::KATAKANA_MIDDLE_DOT_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://json_schemer//lib/json_schemer/format/hostname.rb#11 JSONSchemer::Format::Hostname::LABEL_CHARACTER_CLASS = T.let(T.unsafe(nil), String) + +# source://json_schemer//lib/json_schemer/format/hostname.rb#14 JSONSchemer::Format::Hostname::LABEL_REGEX_STRING = T.let(T.unsafe(nil), String) + +# https://datatracker.ietf.org/doc/html/rfc5891#section-4.2.3.2 +# +# source://json_schemer//lib/json_schemer/format/hostname.rb#13 JSONSchemer::Format::Hostname::LEADING_CHARACTER_CLASS = T.let(T.unsafe(nil), String) + +# source://json_schemer//lib/json_schemer/format/hostname.rb#7 JSONSchemer::Format::Hostname::LETTER_DIGITS = T.let(T.unsafe(nil), String) + +# https://datatracker.ietf.org/doc/html/rfc5892#section-2.1 +# +# source://json_schemer//lib/json_schemer/format/hostname.rb#6 JSONSchemer::Format::Hostname::MARKS = T.let(T.unsafe(nil), String) + +# https://datatracker.ietf.org/doc/html/rfc5892#appendix-A.3 +# +# source://json_schemer//lib/json_schemer/format/hostname.rb#27 JSONSchemer::Format::Hostname::MIDDLE_DOT = T.let(T.unsafe(nil), String) + +# bin/hostname_character_classes +# +# source://json_schemer//lib/json_schemer/format/hostname.rb#17 JSONSchemer::Format::Hostname::VIRAMA_CHARACTER_CLASS = T.let(T.unsafe(nil), String) + +# source://json_schemer//lib/json_schemer/format/hostname.rb#25 JSONSchemer::Format::Hostname::ZERO_WIDTH_NON_JOINER_JOINING_TYPE = T.let(T.unsafe(nil), String) + +# https://datatracker.ietf.org/doc/html/rfc5892#appendix-A.1 +# https://datatracker.ietf.org/doc/html/rfc5892#appendix-A.2 +# +# source://json_schemer//lib/json_schemer/format/hostname.rb#24 JSONSchemer::Format::Hostname::ZERO_WIDTH_VIRAMA = T.let(T.unsafe(nil), String) + +# source://json_schemer//lib/json_schemer/format.rb#21 JSONSchemer::Format::IDN_EMAIL = T.let(T.unsafe(nil), Proc) + +# source://json_schemer//lib/json_schemer/format.rb#28 JSONSchemer::Format::IDN_HOSTNAME = T.let(T.unsafe(nil), Proc) + +# source://json_schemer//lib/json_schemer/format.rb#75 JSONSchemer::Format::INVALID_QUERY_REGEX = T.let(T.unsafe(nil), Regexp) + +# https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-01#section-7.3.4 +# +# source://json_schemer//lib/json_schemer/format.rb#32 JSONSchemer::Format::IPV4 = T.let(T.unsafe(nil), Proc) + +# source://json_schemer//lib/json_schemer/format.rb#35 JSONSchemer::Format::IPV6 = T.let(T.unsafe(nil), Proc) + +# source://json_schemer//lib/json_schemer/format.rb#74 JSONSchemer::Format::IP_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://json_schemer//lib/json_schemer/format.rb#45 JSONSchemer::Format::IRI = T.let(T.unsafe(nil), Proc) + +# source://json_schemer//lib/json_schemer/format.rb#76 JSONSchemer::Format::IRI_ESCAPE_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://json_schemer//lib/json_schemer/format.rb#48 JSONSchemer::Format::IRI_REFERENCE = T.let(T.unsafe(nil), Proc) +# source://json_schemer//lib/json_schemer/format/json_pointer.rb#4 module JSONSchemer::Format::JSONPointer + # @return [Boolean] + # + # source://json_schemer//lib/json_schemer/format/json_pointer.rb#9 def valid_json_pointer?(data); end + + # @return [Boolean] + # + # source://json_schemer//lib/json_schemer/format/json_pointer.rb#13 def valid_relative_json_pointer?(data); end end +# source://json_schemer//lib/json_schemer/format/json_pointer.rb#6 JSONSchemer::Format::JSONPointer::JSON_POINTER_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://json_schemer//lib/json_schemer/format/json_pointer.rb#5 JSONSchemer::Format::JSONPointer::JSON_POINTER_REGEX_STRING = T.let(T.unsafe(nil), String) + +# source://json_schemer//lib/json_schemer/format/json_pointer.rb#7 JSONSchemer::Format::JSONPointer::RELATIVE_JSON_POINTER_REGEX = T.let(T.unsafe(nil), Regexp) + +# https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-01#section-7.3.7 +# +# source://json_schemer//lib/json_schemer/format.rb#59 JSONSchemer::Format::JSON_POINTER = T.let(T.unsafe(nil), Proc) + +# source://json_schemer//lib/json_schemer/format.rb#73 JSONSchemer::Format::LEAP_SECOND_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://json_schemer//lib/json_schemer/format.rb#78 JSONSchemer::Format::NIL_UUID = T.let(T.unsafe(nil), String) + +# https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-01#section-7.3.8 +# +# source://json_schemer//lib/json_schemer/format.rb#66 JSONSchemer::Format::REGEX = T.let(T.unsafe(nil), Proc) + +# source://json_schemer//lib/json_schemer/format.rb#62 JSONSchemer::Format::RELATIVE_JSON_POINTER = T.let(T.unsafe(nil), Proc) + +# source://json_schemer//lib/json_schemer/format.rb#11 JSONSchemer::Format::TIME = T.let(T.unsafe(nil), Proc) + +# https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-01#section-7.3.5 +# +# source://json_schemer//lib/json_schemer/format.rb#39 JSONSchemer::Format::URI = T.let(T.unsafe(nil), Proc) +# source://json_schemer//lib/json_schemer/format/uri_template.rb#4 module JSONSchemer::Format::URITemplate + # @return [Boolean] + # + # source://json_schemer//lib/json_schemer/format/uri_template.rb#29 def valid_uri_template?(data); end end +# pct-encoded = "%" HEXDIG HEXDIG +# +# source://json_schemer//lib/json_schemer/format/uri_template.rb#7 JSONSchemer::Format::URITemplate::EXPLODE = T.let(T.unsafe(nil), String) + +# operator = op-level2 / op-level3 / op-reserve +# op-level2 = "+" / "#" +# op-level3 = "." / "/" / ";" / "?" / "&" +# op-reserve = "=" / "," / "!" / "@" / "|" +# +# source://json_schemer//lib/json_schemer/format/uri_template.rb#19 JSONSchemer::Format::URITemplate::EXPRESSION = T.let(T.unsafe(nil), String) + +# source://json_schemer//lib/json_schemer/format/uri_template.rb#20 JSONSchemer::Format::URITemplate::LITERALS = T.let(T.unsafe(nil), String) + +# explode = "*" +# +# source://json_schemer//lib/json_schemer/format/uri_template.rb#8 JSONSchemer::Format::URITemplate::MAX_LENGTH = T.let(T.unsafe(nil), String) + +# modifier-level4 = prefix / explode +# +# source://json_schemer//lib/json_schemer/format/uri_template.rb#10 JSONSchemer::Format::URITemplate::MODIFIER_LEVEL4 = T.let(T.unsafe(nil), String) + +# source://json_schemer//lib/json_schemer/format/uri_template.rb#15 JSONSchemer::Format::URITemplate::OPERATOR = T.let(T.unsafe(nil), String) + +# https://datatracker.ietf.org/doc/html/rfc6570 +# +# source://json_schemer//lib/json_schemer/format/uri_template.rb#6 JSONSchemer::Format::URITemplate::PCT_ENCODED = T.let(T.unsafe(nil), String) + +# max-length = %x31-39 0*3DIGIT ; positive integer < 10000 +# +# source://json_schemer//lib/json_schemer/format/uri_template.rb#9 JSONSchemer::Format::URITemplate::PREFIX = T.let(T.unsafe(nil), String) + +# literals = %x21 / %x23-24 / %x26 / %x28-3B / %x3D / %x3F-5B +# / %x5D / %x5F / %x61-7A / %x7E / ucschar / iprivate +# / pct-encoded +# ; any Unicode character except: CTL, SP, +# ; DQUOTE, "'", "%" (aside from pct-encoded), +# ; "<", ">", "\", "^", "`", "{", "|", "}" +# +# source://json_schemer//lib/json_schemer/format/uri_template.rb#26 JSONSchemer::Format::URITemplate::URI_TEMPLATE = T.let(T.unsafe(nil), String) + +# source://json_schemer//lib/json_schemer/format/uri_template.rb#27 JSONSchemer::Format::URITemplate::URI_TEMPLATE_REGEX = T.let(T.unsafe(nil), Regexp) + +# varchar = ALPHA / DIGIT / "_" / pct-encoded +# +# source://json_schemer//lib/json_schemer/format/uri_template.rb#11 JSONSchemer::Format::URITemplate::VARCHAR = T.let(T.unsafe(nil), String) + +# variable-list = varspec *( "," varspec ) +# +# source://json_schemer//lib/json_schemer/format/uri_template.rb#14 JSONSchemer::Format::URITemplate::VARIABLE_LIST = T.let(T.unsafe(nil), String) + +# varname = varchar *( ["."] varchar ) +# +# source://json_schemer//lib/json_schemer/format/uri_template.rb#12 JSONSchemer::Format::URITemplate::VARNAME = T.let(T.unsafe(nil), String) + +# varspec = varname [ modifier-level4 ] +# +# source://json_schemer//lib/json_schemer/format/uri_template.rb#13 JSONSchemer::Format::URITemplate::VARSPEC = T.let(T.unsafe(nil), String) + +# source://json_schemer//lib/json_schemer/format.rb#42 JSONSchemer::Format::URI_REFERENCE = T.let(T.unsafe(nil), Proc) + +# https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-01#section-7.3.6 +# +# source://json_schemer//lib/json_schemer/format.rb#55 JSONSchemer::Format::URI_TEMPLATE = T.let(T.unsafe(nil), Proc) + +# source://json_schemer//lib/json_schemer/format.rb#51 JSONSchemer::Format::UUID = T.let(T.unsafe(nil), Proc) + +# source://json_schemer//lib/json_schemer/format.rb#77 JSONSchemer::Format::UUID_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://json_schemer//lib/json_schemer/result.rb#6 JSONSchemer::I18N_ERRORS_SCOPE = T.let(T.unsafe(nil), String) + +# source://json_schemer//lib/json_schemer/result.rb#5 JSONSchemer::I18N_SCOPE = T.let(T.unsafe(nil), String) + +# unit separator +# +# source://json_schemer//lib/json_schemer/result.rb#4 JSONSchemer::I18N_SEPARATOR = T.let(T.unsafe(nil), String) + +# source://json_schemer//lib/json_schemer.rb#77 class JSONSchemer::InvalidEcmaRegexp < ::StandardError; end + +# source://json_schemer//lib/json_schemer.rb#76 class JSONSchemer::InvalidFileURI < ::StandardError; end + +# source://json_schemer//lib/json_schemer.rb#74 class JSONSchemer::InvalidRefPointer < ::StandardError; end + +# source://json_schemer//lib/json_schemer.rb#73 class JSONSchemer::InvalidRefResolution < ::StandardError; end + +# source://json_schemer//lib/json_schemer.rb#75 class JSONSchemer::InvalidRegexpResolution < ::StandardError; end +# source://json_schemer//lib/json_schemer/keyword.rb#3 class JSONSchemer::Keyword include ::JSONSchemer::Output + # @return [Keyword] a new instance of Keyword + # + # source://json_schemer//lib/json_schemer/keyword.rb#8 def initialize(value, parent, keyword, schema = T.unsafe(nil)); end + # source://json_schemer//lib/json_schemer/keyword.rb#21 def absolute_keyword_location; end + + # source://json_schemer//lib/json_schemer/keyword.rb#29 def error_key; end + + # source://json_schemer//lib/json_schemer/keyword.rb#33 def fetch(key); end + + # Returns the value of attribute parent. + # + # source://json_schemer//lib/json_schemer/keyword.rb#6 def parent; end + + # Returns the value of attribute parsed. + # + # source://json_schemer//lib/json_schemer/keyword.rb#6 def parsed; end + + # source://json_schemer//lib/json_schemer/keyword.rb#37 def parsed_schema; end + + # Returns the value of attribute root. + # + # source://json_schemer//lib/json_schemer/keyword.rb#6 def root; end + + # source://json_schemer//lib/json_schemer/keyword.rb#25 def schema_pointer; end + + # source://json_schemer//lib/json_schemer/keyword.rb#17 def validate(_instance, _instance_location, _keyword_location, _context); end + + # Returns the value of attribute value. + # + # source://json_schemer//lib/json_schemer/keyword.rb#6 def value; end private + # source://json_schemer//lib/json_schemer/keyword.rb#43 def parse; end + + # source://json_schemer//lib/json_schemer/keyword.rb#47 def subschema(value, keyword = T.unsafe(nil), **options); end end +# source://json_schemer//lib/json_schemer/location.rb#3 module JSONSchemer::Location class << self + # source://json_schemer//lib/json_schemer/location.rb#20 def escape_json_pointer_token(token); end + + # source://json_schemer//lib/json_schemer/location.rb#12 def join(location, name); end + + # source://json_schemer//lib/json_schemer/location.rb#16 def resolve(location); end + + # source://json_schemer//lib/json_schemer/location.rb#8 def root; end end end +# source://json_schemer//lib/json_schemer/location.rb#4 JSONSchemer::Location::JSON_POINTER_TOKEN_ESCAPE_CHARS = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/location.rb#5 JSONSchemer::Location::JSON_POINTER_TOKEN_ESCAPE_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://json_schemer//lib/json_schemer.rb#262 JSONSchemer::META_SCHEMAS_BY_BASE_URI_STR = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer.rb#250 JSONSchemer::META_SCHEMA_CALLABLES_BY_BASE_URI_STR = T.let(T.unsafe(nil), Hash) +# source://json_schemer//lib/json_schemer/openapi.rb#3 class JSONSchemer::OpenAPI + # @return [OpenAPI] a new instance of OpenAPI + # + # source://json_schemer//lib/json_schemer/openapi.rb#4 def initialize(document, **options); end + # source://json_schemer//lib/json_schemer/openapi.rb#32 def ref(value); end + + # source://json_schemer//lib/json_schemer/openapi.rb#36 def schema(name); end + + # @return [Boolean] + # + # source://json_schemer//lib/json_schemer/openapi.rb#24 def valid?; end + + # source://json_schemer//lib/json_schemer/openapi.rb#28 def validate(**options); end end +# source://json_schemer//lib/json_schemer/openapi30/document.rb#3 module JSONSchemer::OpenAPI30; end + +# source://json_schemer//lib/json_schemer/openapi30/meta.rb#4 JSONSchemer::OpenAPI30::BASE_URI = T.let(T.unsafe(nil), URI::Generic) + +# source://json_schemer//lib/json_schemer/openapi30/document.rb#4 module JSONSchemer::OpenAPI30::Document; end + +# source://json_schemer//lib/json_schemer/openapi30/document.rb#5 JSONSchemer::OpenAPI30::Document::SCHEMA = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/openapi30/document.rb#1667 JSONSchemer::OpenAPI30::Document::SCHEMAS = T.let(T.unsafe(nil), Hash) + +# https://spec.openapis.org/oas/v3.0.3#data-types +# +# source://json_schemer//lib/json_schemer/openapi30/meta.rb#6 JSONSchemer::OpenAPI30::FORMATS = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/openapi30/meta.rb#25 module JSONSchemer::OpenAPI30::Meta; end + +# source://json_schemer//lib/json_schemer/openapi30/meta.rb#26 JSONSchemer::OpenAPI30::Meta::SCHEMAS = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/openapi30/meta.rb#11 JSONSchemer::OpenAPI30::SCHEMA = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/openapi30/vocab/base.rb#4 module JSONSchemer::OpenAPI30::Vocab; end + +# https://spec.openapis.org/oas/v3.0.3#schema-object +# +# source://json_schemer//lib/json_schemer/openapi30/vocab.rb#6 JSONSchemer::OpenAPI30::Vocab::BASE = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/openapi30/vocab/base.rb#5 module JSONSchemer::OpenAPI30::Vocab::Base; end +# source://json_schemer//lib/json_schemer/openapi30/vocab/base.rb#6 class JSONSchemer::OpenAPI30::Vocab::Base::Type < ::JSONSchemer::Draft4::Vocab::Validation::Type + # source://json_schemer//lib/json_schemer/openapi30/vocab/base.rb#7 def parse; end end +# source://json_schemer//lib/json_schemer/openapi31/meta.rb#3 module JSONSchemer::OpenAPI31; end + +# source://json_schemer//lib/json_schemer/openapi31/meta.rb#4 JSONSchemer::OpenAPI31::BASE_URI = T.let(T.unsafe(nil), URI::HTTPS) +# source://json_schemer//lib/json_schemer/openapi31/document.rb#4 module JSONSchemer::OpenAPI31::Document class << self + # source://json_schemer//lib/json_schemer/openapi31/document.rb#16 def dialect_schema(dialect); end end end +# source://json_schemer//lib/json_schemer/openapi31/document.rb#14 JSONSchemer::OpenAPI31::Document::DEFAULT_DIALECT = T.let(T.unsafe(nil), String) + +# http://json-schema.org/blog/posts/validating-openapi-and-json-schema +# +# source://json_schemer//lib/json_schemer/openapi31/document.rb#6 JSONSchemer::OpenAPI31::Document::DIALECTS = T.let(T.unsafe(nil), Array) + +# source://json_schemer//lib/json_schemer/openapi31/document.rb#14 JSONSchemer::OpenAPI31::Document::OTHER_DIALECTS = T.let(T.unsafe(nil), Array) + +# source://json_schemer//lib/json_schemer/openapi31/document.rb#104 JSONSchemer::OpenAPI31::Document::SCHEMA = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/openapi31/document.rb#1543 JSONSchemer::OpenAPI31::Document::SCHEMAS = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/openapi31/document.rb#63 JSONSchemer::OpenAPI31::Document::SCHEMA_BASE = T.let(T.unsafe(nil), Hash) + +# https://spec.openapis.org/oas/v3.1.0#data-types +# +# source://json_schemer//lib/json_schemer/openapi31/meta.rb#6 JSONSchemer::OpenAPI31::FORMATS = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/openapi31/meta.rb#40 module JSONSchemer::OpenAPI31::Meta; end + +# source://json_schemer//lib/json_schemer/openapi31/meta.rb#41 JSONSchemer::OpenAPI31::Meta::BASE = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/openapi31/meta.rb#130 JSONSchemer::OpenAPI31::Meta::SCHEMAS = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/openapi31/meta.rb#13 JSONSchemer::OpenAPI31::SCHEMA = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/openapi31/vocab/base.rb#4 module JSONSchemer::OpenAPI31::Vocab; end + +# https://spec.openapis.org/oas/latest.html#schema-object +# +# source://json_schemer//lib/json_schemer/openapi31/vocab.rb#6 JSONSchemer::OpenAPI31::Vocab::BASE = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/openapi31/vocab/base.rb#5 module JSONSchemer::OpenAPI31::Vocab::Base; end +# source://json_schemer//lib/json_schemer/openapi31/vocab/base.rb#6 class JSONSchemer::OpenAPI31::Vocab::Base::AllOf < ::JSONSchemer::Draft202012::Vocab::Applicator::AllOf + # Returns the value of attribute skip_ref_once. + # + # source://json_schemer//lib/json_schemer/openapi31/vocab/base.rb#7 def skip_ref_once; end + + # Sets the attribute skip_ref_once + # + # @param value the value to set the attribute skip_ref_once to. + # + # source://json_schemer//lib/json_schemer/openapi31/vocab/base.rb#7 def skip_ref_once=(_arg0); end + + # source://json_schemer//lib/json_schemer/openapi31/vocab/base.rb#9 def validate(instance, instance_location, keyword_location, context); end end +# source://json_schemer//lib/json_schemer/openapi31/vocab/base.rb#24 class JSONSchemer::OpenAPI31::Vocab::Base::AnyOf < ::JSONSchemer::Draft202012::Vocab::Applicator::AnyOf + # source://json_schemer//lib/json_schemer/openapi31/vocab/base.rb#25 def validate(*_arg0); end end +# source://json_schemer//lib/json_schemer/openapi31/vocab/base.rb#37 class JSONSchemer::OpenAPI31::Vocab::Base::Discriminator < ::JSONSchemer::Keyword + # source://json_schemer//lib/json_schemer/openapi31/vocab/base.rb#42 def error(formatted_instance_location:, **_arg1); end + + # source://json_schemer//lib/json_schemer/openapi31/vocab/base.rb#46 def mapping; end + + # Returns the value of attribute skip_ref_once. + # + # source://json_schemer//lib/json_schemer/openapi31/vocab/base.rb#40 def skip_ref_once; end + + # Sets the attribute skip_ref_once + # + # @param value the value to set the attribute skip_ref_once to. + # + # source://json_schemer//lib/json_schemer/openapi31/vocab/base.rb#40 def skip_ref_once=(_arg0); end + + # source://json_schemer//lib/json_schemer/openapi31/vocab/base.rb#50 def subschemas_by_property_value; end + + # source://json_schemer//lib/json_schemer/openapi31/vocab/base.rb#102 def validate(instance, instance_location, keyword_location, context); end end +# https://spec.openapis.org/oas/v3.1.0#components-object +# +# source://json_schemer//lib/json_schemer/openapi31/vocab/base.rb#38 JSONSchemer::OpenAPI31::Vocab::Base::Discriminator::FIXED_FIELD_REGEX = T.let(T.unsafe(nil), Regexp) +# source://json_schemer//lib/json_schemer/openapi31/vocab/base.rb#30 class JSONSchemer::OpenAPI31::Vocab::Base::OneOf < ::JSONSchemer::Draft202012::Vocab::Applicator::OneOf + # source://json_schemer//lib/json_schemer/openapi31/vocab/base.rb#31 def validate(*_arg0); end end +# source://json_schemer//lib/json_schemer/output.rb#3 module JSONSchemer::Output + # Returns the value of attribute keyword. + # + # source://json_schemer//lib/json_schemer/output.rb#6 def keyword; end + + # Returns the value of attribute schema. + # + # source://json_schemer//lib/json_schemer/output.rb#6 def schema; end + + # source://json_schemer//lib/json_schemer/output.rb#8 def x_error; end private + # :nocov: + # + # source://json_schemer//lib/json_schemer/output.rb#43 def deep_stringify_keys(obj); end + + # source://json_schemer//lib/json_schemer/output.rb#19 def escaped_keyword; end + + # source://json_schemer//lib/json_schemer/output.rb#27 def fragment_encode(location); end + + # source://json_schemer//lib/json_schemer/output.rb#23 def join_location(location, keyword); end + + # source://json_schemer//lib/json_schemer/output.rb#15 def result(instance, instance_location, keyword_location, valid, nested = T.unsafe(nil), type: T.unsafe(nil), annotation: T.unsafe(nil), details: T.unsafe(nil), ignore_nested: T.unsafe(nil)); end + + # source://json_schemer//lib/json_schemer/output.rb#33 def stringify(key); end end +# source://json_schemer//lib/json_schemer/output.rb#4 JSONSchemer::Output::FRAGMENT_ENCODE_REGEX = T.let(T.unsafe(nil), Regexp) +# source://json_schemer//lib/json_schemer/result.rb#12 class JSONSchemer::Result < ::Struct + # Returns the value of attribute annotation + # + # @return [Object] the current value of annotation def annotation; end + + # Sets the attribute annotation + # + # @param value [Object] the value to set the attribute annotation to. + # @return [Object] the newly set value def annotation=(_); end + + # source://json_schemer//lib/json_schemer/result.rb#126 def basic; end + + # source://json_schemer//lib/json_schemer/result.rb#173 def classic; end + + # source://json_schemer//lib/json_schemer/result.rb#147 def detailed; end + + # Returns the value of attribute details + # + # @return [Object] the current value of details def details; end + + # Sets the attribute details + # + # @param value [Object] the value to set the attribute details to. + # @return [Object] the newly set value def details=(_); end + + # source://json_schemer//lib/json_schemer/result.rb#30 def error; end + + # source://json_schemer//lib/json_schemer/result.rb#122 def flag; end + + # source://json_schemer//lib/json_schemer/result.rb#62 def i18n!; end + + # @return [Boolean] + # + # source://json_schemer//lib/json_schemer/result.rb#57 def i18n?; end + + # Returns the value of attribute ignore_nested + # + # @return [Object] the current value of ignore_nested def ignore_nested; end + + # Sets the attribute ignore_nested + # + # @param value [Object] the value to set the attribute ignore_nested to. + # @return [Object] the newly set value def ignore_nested=(_); end + + # source://json_schemer//lib/json_schemer/result.rb#192 def insert_property_defaults(context); end + + # Returns the value of attribute instance + # + # @return [Object] the current value of instance def instance; end + + # Sets the attribute instance + # + # @param value [Object] the value to set the attribute instance to. + # @return [Object] the newly set value def instance=(_); end + + # Returns the value of attribute instance_location + # + # @return [Object] the current value of instance_location def instance_location; end + + # Sets the attribute instance_location + # + # @param value [Object] the value to set the attribute instance_location to. + # @return [Object] the newly set value def instance_location=(_); end + + # Returns the value of attribute keyword_location + # + # @return [Object] the current value of keyword_location def keyword_location; end + + # Sets the attribute keyword_location + # + # @param value [Object] the value to set the attribute keyword_location to. + # @return [Object] the newly set value def keyword_location=(_); end + + # Returns the value of attribute nested + # + # @return [Object] the current value of nested def nested; end + + # Sets the attribute nested + # + # @param value [Object] the value to set the attribute nested to. + # @return [Object] the newly set value def nested=(_); end + + # Returns the value of attribute nested_key + # + # @return [Object] the current value of nested_key def nested_key; end + + # Sets the attribute nested_key + # + # @param value [Object] the value to set the attribute nested_key to. + # @return [Object] the newly set value def nested_key=(_); end + + # source://json_schemer//lib/json_schemer/result.rb#13 def output(output_format); end + + # Returns the value of attribute source + # + # @return [Object] the current value of source def source; end + + # Sets the attribute source + # + # @param value [Object] the value to set the attribute source to. + # @return [Object] the newly set value def source=(_); end + + # source://json_schemer//lib/json_schemer/result.rb#105 def to_classic; end + + # source://json_schemer//lib/json_schemer/result.rb#88 def to_output_unit; end + + # Returns the value of attribute type + # + # @return [Object] the current value of type def type; end + + # Sets the attribute type + # + # @param value [Object] the value to set the attribute type to. + # @return [Object] the newly set value def type=(_); end + + # Returns the value of attribute valid + # + # @return [Object] the current value of valid def valid; end + + # Sets the attribute valid + # + # @param value [Object] the value to set the attribute valid to. + # @return [Object] the newly set value def valid=(_); end + + # source://json_schemer//lib/json_schemer/result.rb#163 def verbose; end class << self def [](*_arg0); end def inspect; end + def keyword_init?; end def members; end def new(*_arg0); end end end +# source://json_schemer//lib/json_schemer/schema.rb#3 class JSONSchemer::Schema include ::JSONSchemer::Output + # @return [Schema] a new instance of Schema + # + # source://json_schemer//lib/json_schemer/schema.rb#48 def initialize(value, parent = T.unsafe(nil), root = T.unsafe(nil), keyword = T.unsafe(nil), base_uri: T.unsafe(nil), meta_schema: T.unsafe(nil), vocabulary: T.unsafe(nil), format: T.unsafe(nil), formats: T.unsafe(nil), content_encodings: T.unsafe(nil), content_media_types: T.unsafe(nil), keywords: T.unsafe(nil), before_property_validation: T.unsafe(nil), after_property_validation: T.unsafe(nil), insert_property_defaults: T.unsafe(nil), property_default_resolver: T.unsafe(nil), ref_resolver: T.unsafe(nil), regexp_resolver: T.unsafe(nil), output_format: T.unsafe(nil), resolve_enumerators: T.unsafe(nil), access_mode: T.unsafe(nil)); end + # source://json_schemer//lib/json_schemer/schema.rb#270 def absolute_keyword_location; end + + # Returns the value of attribute after_property_validation. + # + # source://json_schemer//lib/json_schemer/schema.rb#46 def after_property_validation; end + + # Returns the value of attribute base_uri. + # + # source://json_schemer//lib/json_schemer/schema.rb#44 def base_uri; end + + # Sets the attribute base_uri + # + # @param value the value to set the attribute base_uri to. + # + # source://json_schemer//lib/json_schemer/schema.rb#44 def base_uri=(_arg0); end + + # Returns the value of attribute before_property_validation. + # + # source://json_schemer//lib/json_schemer/schema.rb#46 def before_property_validation; end + + # source://json_schemer//lib/json_schemer/schema.rb#221 def bundle; end + + # Returns the value of attribute content_encodings. + # + # source://json_schemer//lib/json_schemer/schema.rb#46 def content_encodings; end + + # Returns the value of attribute content_media_types. + # + # source://json_schemer//lib/json_schemer/schema.rb#46 def content_media_types; end + + # Returns the value of attribute custom_keywords. + # + # source://json_schemer//lib/json_schemer/schema.rb#46 def custom_keywords; end + + # source://json_schemer//lib/json_schemer/schema.rb#329 def defs_keyword; end + + # source://json_schemer//lib/json_schemer/schema.rb#337 def error(formatted_instance_location:, **options); end + + # source://json_schemer//lib/json_schemer/schema.rb#293 def error_key; end + + # source://json_schemer//lib/json_schemer/schema.rb#297 def fetch(key); end + + # source://json_schemer//lib/json_schemer/schema.rb#309 def fetch_content_encoding(content_encoding, *args, &block); end + + # source://json_schemer//lib/json_schemer/schema.rb#317 def fetch_content_media_type(content_media_type, *args, &block); end + + # source://json_schemer//lib/json_schemer/schema.rb#301 def fetch_format(format, *args, &block); end + + # Returns the value of attribute format. + # + # source://json_schemer//lib/json_schemer/schema.rb#46 def format; end + + # Returns the value of attribute formats. + # + # source://json_schemer//lib/json_schemer/schema.rb#46 def formats; end + + # source://json_schemer//lib/json_schemer/schema.rb#325 def id_keyword; end + + # Returns the value of attribute insert_property_defaults. + # + # source://json_schemer//lib/json_schemer/schema.rb#46 def insert_property_defaults; end + + # source://json_schemer//lib/json_schemer/schema.rb#345 def inspect; end + + # Returns the value of attribute keyword_order. + # + # source://json_schemer//lib/json_schemer/schema.rb#44 def keyword_order; end + + # Sets the attribute keyword_order + # + # @param value the value to set the attribute keyword_order to. + # + # source://json_schemer//lib/json_schemer/schema.rb#44 def keyword_order=(_arg0); end + + # Returns the value of attribute keywords. + # + # source://json_schemer//lib/json_schemer/schema.rb#44 def keywords; end + + # Sets the attribute keywords + # + # @param value the value to set the attribute keywords to. + # + # source://json_schemer//lib/json_schemer/schema.rb#44 def keywords=(_arg0); end + + # Returns the value of attribute meta_schema. + # + # source://json_schemer//lib/json_schemer/schema.rb#44 def meta_schema; end + + # Sets the attribute meta_schema + # + # @param value the value to set the attribute meta_schema to. + # + # source://json_schemer//lib/json_schemer/schema.rb#44 def meta_schema=(_arg0); end + + # Returns the value of attribute parent. + # + # source://json_schemer//lib/json_schemer/schema.rb#45 def parent; end + + # Returns the value of attribute parsed. + # + # source://json_schemer//lib/json_schemer/schema.rb#45 def parsed; end + + # Returns the value of attribute property_default_resolver. + # + # source://json_schemer//lib/json_schemer/schema.rb#46 def property_default_resolver; end + + # source://json_schemer//lib/json_schemer/schema.rb#120 def ref(value); end + + # @raise [InvalidRefPointer] + # + # source://json_schemer//lib/json_schemer/schema.rb#166 def resolve_ref(uri); end + + # source://json_schemer//lib/json_schemer/schema.rb#217 def resolve_regexp(pattern); end + + # source://json_schemer//lib/json_schemer/schema.rb#333 def resources; end + + # Returns the value of attribute root. + # + # source://json_schemer//lib/json_schemer/schema.rb#45 def root; end + + # source://json_schemer//lib/json_schemer/schema.rb#283 def schema_pointer; end + + # @return [Boolean] + # + # source://json_schemer//lib/json_schemer/schema.rb#96 def valid?(instance, **options); end + + # @return [Boolean] + # + # source://json_schemer//lib/json_schemer/schema.rb#112 def valid_schema?; end + + # source://json_schemer//lib/json_schemer/schema.rb#100 def validate(instance, output_format: T.unsafe(nil), resolve_enumerators: T.unsafe(nil), access_mode: T.unsafe(nil)); end + + # source://json_schemer//lib/json_schemer/schema.rb#124 def validate_instance(instance, instance_location, keyword_location, context); end + + # source://json_schemer//lib/json_schemer/schema.rb#116 def validate_schema; end + + # Returns the value of attribute value. + # + # source://json_schemer//lib/json_schemer/schema.rb#45 def value; end + + # Returns the value of attribute vocabulary. + # + # source://json_schemer//lib/json_schemer/schema.rb#46 def vocabulary; end private + # source://json_schemer//lib/json_schemer/schema.rb#351 def parse; end + + # source://json_schemer//lib/json_schemer/schema.rb#397 def ref_resolver; end + + # source://json_schemer//lib/json_schemer/schema.rb#401 def regexp_resolver; end + + # source://json_schemer//lib/json_schemer/schema.rb#412 def resolve_enumerators!(output); end + + # source://json_schemer//lib/json_schemer/schema.rb#393 def root_keyword_location; end end +# source://json_schemer//lib/json_schemer/schema.rb#4 class JSONSchemer::Schema::Context < ::Struct + # Returns the value of attribute access_mode + # + # @return [Object] the current value of access_mode def access_mode; end + + # Sets the attribute access_mode + # + # @param value [Object] the value to set the attribute access_mode to. + # @return [Object] the newly set value def access_mode=(_); end + + # Returns the value of attribute adjacent_results + # + # @return [Object] the current value of adjacent_results def adjacent_results; end + + # Sets the attribute adjacent_results + # + # @param value [Object] the value to set the attribute adjacent_results to. + # @return [Object] the newly set value def adjacent_results=(_); end + + # Returns the value of attribute dynamic_scope + # + # @return [Object] the current value of dynamic_scope def dynamic_scope; end + + # Sets the attribute dynamic_scope + # + # @param value [Object] the value to set the attribute dynamic_scope to. + # @return [Object] the newly set value def dynamic_scope=(_); end + + # Returns the value of attribute instance + # + # @return [Object] the current value of instance def instance; end + + # Sets the attribute instance + # + # @param value [Object] the value to set the attribute instance to. + # @return [Object] the newly set value def instance=(_); end + + # source://json_schemer//lib/json_schemer/schema.rb#5 def original_instance(instance_location); end + + # Returns the value of attribute short_circuit + # + # @return [Object] the current value of short_circuit def short_circuit; end + + # Sets the attribute short_circuit + # + # @param value [Object] the value to set the attribute short_circuit to. + # @return [Object] the newly set value def short_circuit=(_); end class << self def [](*_arg0); end def inspect; end + def keyword_init?; end def members; end def new(*_arg0); end end end +# source://json_schemer//lib/json_schemer/schema.rb#27 JSONSchemer::Schema::DEFAULT_AFTER_PROPERTY_VALIDATION = T.let(T.unsafe(nil), Array) + +# source://json_schemer//lib/json_schemer/schema.rb#21 JSONSchemer::Schema::DEFAULT_BASE_URI = T.let(T.unsafe(nil), URI::Generic) + +# source://json_schemer//lib/json_schemer/schema.rb#26 JSONSchemer::Schema::DEFAULT_BEFORE_PROPERTY_VALIDATION = T.let(T.unsafe(nil), Array) + +# source://json_schemer//lib/json_schemer/schema.rb#23 JSONSchemer::Schema::DEFAULT_CONTENT_ENCODINGS = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/schema.rb#24 JSONSchemer::Schema::DEFAULT_CONTENT_MEDIA_TYPES = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/schema.rb#22 JSONSchemer::Schema::DEFAULT_FORMATS = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/schema.rb#25 JSONSchemer::Schema::DEFAULT_KEYWORDS = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer/schema.rb#33 JSONSchemer::Schema::DEFAULT_PROPERTY_DEFAULT_RESOLVER = T.let(T.unsafe(nil), Proc) + +# source://json_schemer//lib/json_schemer/schema.rb#28 JSONSchemer::Schema::DEFAULT_REF_RESOLVER = T.let(T.unsafe(nil), Proc) + +# source://json_schemer//lib/json_schemer/schema.rb#14 JSONSchemer::Schema::DEFAULT_SCHEMA = T.let(T.unsafe(nil), String) + +# source://json_schemer//lib/json_schemer/schema.rb#31 JSONSchemer::Schema::ECMA_REGEXP_RESOLVER = T.let(T.unsafe(nil), Proc) + +# source://json_schemer//lib/json_schemer/schema.rb#17 JSONSchemer::Schema::ID_KEYWORD_CLASS = JSONSchemer::Draft202012::Vocab::Core::Id + +# source://json_schemer//lib/json_schemer/schema.rb#29 JSONSchemer::Schema::NET_HTTP_REF_RESOLVER = T.let(T.unsafe(nil), Proc) + +# source://json_schemer//lib/json_schemer/schema.rb#19 JSONSchemer::Schema::NOT_KEYWORD_CLASS = JSONSchemer::Draft202012::Vocab::Applicator::Not + +# source://json_schemer//lib/json_schemer/schema.rb#20 JSONSchemer::Schema::PROPERTIES_KEYWORD_CLASS = JSONSchemer::Draft202012::Vocab::Applicator::Properties + +# source://json_schemer//lib/json_schemer/schema.rb#30 JSONSchemer::Schema::RUBY_REGEXP_RESOLVER = T.let(T.unsafe(nil), Proc) + +# source://json_schemer//lib/json_schemer/schema.rb#15 JSONSchemer::Schema::SCHEMA_KEYWORD_CLASS = JSONSchemer::Draft202012::Vocab::Core::Schema + +# source://json_schemer//lib/json_schemer/schema.rb#18 JSONSchemer::Schema::UNKNOWN_KEYWORD_CLASS = JSONSchemer::Draft202012::Vocab::Core::UnknownKeyword + +# source://json_schemer//lib/json_schemer/schema.rb#16 JSONSchemer::Schema::VOCABULARY_KEYWORD_CLASS = JSONSchemer::Draft202012::Vocab::Core::Vocabulary + +# source://json_schemer//lib/json_schemer.rb#70 class JSONSchemer::UnknownContentEncoding < ::StandardError; end + +# source://json_schemer//lib/json_schemer.rb#71 class JSONSchemer::UnknownContentMediaType < ::StandardError; end + +# source://json_schemer//lib/json_schemer.rb#68 class JSONSchemer::UnknownFormat < ::StandardError; end + +# source://json_schemer//lib/json_schemer.rb#72 class JSONSchemer::UnknownOutputFormat < ::StandardError; end + +# source://json_schemer//lib/json_schemer.rb#67 class JSONSchemer::UnknownRef < ::StandardError; end + +# source://json_schemer//lib/json_schemer.rb#69 class JSONSchemer::UnknownVocabulary < ::StandardError; end + +# source://json_schemer//lib/json_schemer.rb#65 class JSONSchemer::UnsupportedMetaSchema < ::StandardError; end + +# source://json_schemer//lib/json_schemer.rb#66 class JSONSchemer::UnsupportedOpenAPIVersion < ::StandardError; end + +# source://json_schemer//lib/json_schemer/version.rb#3 JSONSchemer::VERSION = T.let(T.unsafe(nil), String) + +# source://json_schemer//lib/json_schemer.rb#79 JSONSchemer::VOCABULARIES = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer.rb#103 JSONSchemer::VOCABULARY_ORDER = T.let(T.unsafe(nil), Hash) + +# source://json_schemer//lib/json_schemer.rb#105 JSONSchemer::WINDOWS_URI_PATH_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://json_schemer//lib/json_schemer/result.rb#7 JSONSchemer::X_ERROR_REGEX = T.let(T.unsafe(nil), Regexp) diff --git a/Library/Homebrew/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi b/Library/Homebrew/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi new file mode 100644 index 00000000000000..f6b1d8ed67eba9 --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi @@ -0,0 +1,14237 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `language_server-protocol` gem. +# Please instead update this file by running `bin/tapioca gem language_server-protocol`. + +# source://language_server-protocol//lib/language_server/protocol/version.rb#1 +module LanguageServer; end + +# source://language_server-protocol//lib/language_server/protocol/version.rb#2 +module LanguageServer::Protocol; end + +# source://language_server-protocol//lib/language_server/protocol/constant.rb#3 +module LanguageServer::Protocol::Constant; end + +# The kind of a code action. +# +# Kinds are a hierarchical list of identifiers separated by `.`, +# e.g. `"refactor.extract.function"`. +# +# The set of kinds is open and client needs to announce the kinds it supports +# to the server during initialization. +# A set of predefined code action kinds. +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#14 +module LanguageServer::Protocol::Constant::CodeActionKind; end + +# Empty kind. +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#18 +LanguageServer::Protocol::Constant::CodeActionKind::EMPTY = T.let(T.unsafe(nil), String) + +# Base kind for quickfix actions: 'quickfix'. +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#22 +LanguageServer::Protocol::Constant::CodeActionKind::QUICK_FIX = T.let(T.unsafe(nil), String) + +# Base kind for refactoring actions: 'refactor'. +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#26 +LanguageServer::Protocol::Constant::CodeActionKind::REFACTOR = T.let(T.unsafe(nil), String) + +# Base kind for refactoring extraction actions: 'refactor.extract'. +# +# Example extract actions: +# +# - Extract method +# - Extract function +# - Extract variable +# - Extract interface from class +# - ... +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#38 +LanguageServer::Protocol::Constant::CodeActionKind::REFACTOR_EXTRACT = T.let(T.unsafe(nil), String) + +# Base kind for refactoring inline actions: 'refactor.inline'. +# +# Example inline actions: +# +# - Inline function +# - Inline variable +# - Inline constant +# - ... +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#49 +LanguageServer::Protocol::Constant::CodeActionKind::REFACTOR_INLINE = T.let(T.unsafe(nil), String) + +# Base kind for refactoring rewrite actions: 'refactor.rewrite'. +# +# Example rewrite actions: +# +# - Convert JavaScript function to class +# - Add or remove parameter +# - Encapsulate field +# - Make method static +# - Move method to base class +# - ... +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#62 +LanguageServer::Protocol::Constant::CodeActionKind::REFACTOR_REWRITE = T.let(T.unsafe(nil), String) + +# Base kind for source actions: `source`. +# +# Source code actions apply to the entire file. +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#68 +LanguageServer::Protocol::Constant::CodeActionKind::SOURCE = T.let(T.unsafe(nil), String) + +# Base kind for a 'fix all' source action: `source.fixAll`. +# +# 'Fix all' actions automatically fix errors that have a clear fix that +# do not require user input. They should not suppress errors or perform +# unsafe fixes such as generating new types or classes. +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#81 +LanguageServer::Protocol::Constant::CodeActionKind::SOURCE_FIX_ALL = T.let(T.unsafe(nil), String) + +# Base kind for an organize imports source action: +# `source.organizeImports`. +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#73 +LanguageServer::Protocol::Constant::CodeActionKind::SOURCE_ORGANIZE_IMPORTS = T.let(T.unsafe(nil), String) + +# The reason why code actions were requested. +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_trigger_kind.rb#7 +module LanguageServer::Protocol::Constant::CodeActionTriggerKind; end + +# Code actions were requested automatically. +# +# This typically happens when current selection in a file changes, but can +# also be triggered when file content changes. +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_trigger_kind.rb#18 +LanguageServer::Protocol::Constant::CodeActionTriggerKind::AUTOMATIC = T.let(T.unsafe(nil), Integer) + +# Code actions were explicitly requested by the user or by an extension. +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_trigger_kind.rb#11 +LanguageServer::Protocol::Constant::CodeActionTriggerKind::INVOKED = T.let(T.unsafe(nil), Integer) + +# The kind of a completion entry. +# +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#7 +module LanguageServer::Protocol::Constant::CompletionItemKind; end + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#14 +LanguageServer::Protocol::Constant::CompletionItemKind::CLASS = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#23 +LanguageServer::Protocol::Constant::CompletionItemKind::COLOR = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#28 +LanguageServer::Protocol::Constant::CompletionItemKind::CONSTANT = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#11 +LanguageServer::Protocol::Constant::CompletionItemKind::CONSTRUCTOR = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#20 +LanguageServer::Protocol::Constant::CompletionItemKind::ENUM = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#27 +LanguageServer::Protocol::Constant::CompletionItemKind::ENUM_MEMBER = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#30 +LanguageServer::Protocol::Constant::CompletionItemKind::EVENT = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#12 +LanguageServer::Protocol::Constant::CompletionItemKind::FIELD = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#24 +LanguageServer::Protocol::Constant::CompletionItemKind::FILE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#26 +LanguageServer::Protocol::Constant::CompletionItemKind::FOLDER = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#10 +LanguageServer::Protocol::Constant::CompletionItemKind::FUNCTION = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#15 +LanguageServer::Protocol::Constant::CompletionItemKind::INTERFACE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#21 +LanguageServer::Protocol::Constant::CompletionItemKind::KEYWORD = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#9 +LanguageServer::Protocol::Constant::CompletionItemKind::METHOD = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#16 +LanguageServer::Protocol::Constant::CompletionItemKind::MODULE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#31 +LanguageServer::Protocol::Constant::CompletionItemKind::OPERATOR = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#17 +LanguageServer::Protocol::Constant::CompletionItemKind::PROPERTY = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#25 +LanguageServer::Protocol::Constant::CompletionItemKind::REFERENCE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#22 +LanguageServer::Protocol::Constant::CompletionItemKind::SNIPPET = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#29 +LanguageServer::Protocol::Constant::CompletionItemKind::STRUCT = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#8 +LanguageServer::Protocol::Constant::CompletionItemKind::TEXT = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#32 +LanguageServer::Protocol::Constant::CompletionItemKind::TYPE_PARAMETER = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#18 +LanguageServer::Protocol::Constant::CompletionItemKind::UNIT = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#19 +LanguageServer::Protocol::Constant::CompletionItemKind::VALUE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#13 +LanguageServer::Protocol::Constant::CompletionItemKind::VARIABLE = T.let(T.unsafe(nil), Integer) + +# Completion item tags are extra annotations that tweak the rendering of a +# completion item. +# +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_tag.rb#8 +module LanguageServer::Protocol::Constant::CompletionItemTag; end + +# Render a completion as obsolete, usually using a strike-out. +# +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_tag.rb#12 +LanguageServer::Protocol::Constant::CompletionItemTag::DEPRECATED = T.let(T.unsafe(nil), Integer) + +# How a completion was triggered +# +# source://language_server-protocol//lib/language_server/protocol/constant/completion_trigger_kind.rb#7 +module LanguageServer::Protocol::Constant::CompletionTriggerKind; end + +# Completion was triggered by typing an identifier (24x7 code +# complete), manual invocation (e.g Ctrl+Space) or via API. +# +# source://language_server-protocol//lib/language_server/protocol/constant/completion_trigger_kind.rb#12 +LanguageServer::Protocol::Constant::CompletionTriggerKind::INVOKED = T.let(T.unsafe(nil), Integer) + +# Completion was triggered by a trigger character specified by +# the `triggerCharacters` properties of the +# `CompletionRegistrationOptions`. +# +# source://language_server-protocol//lib/language_server/protocol/constant/completion_trigger_kind.rb#18 +LanguageServer::Protocol::Constant::CompletionTriggerKind::TRIGGER_CHARACTER = T.let(T.unsafe(nil), Integer) + +# Completion was re-triggered as the current completion list is incomplete. +# +# source://language_server-protocol//lib/language_server/protocol/constant/completion_trigger_kind.rb#22 +LanguageServer::Protocol::Constant::CompletionTriggerKind::TRIGGER_FOR_INCOMPLETE_COMPLETIONS = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_severity.rb#4 +module LanguageServer::Protocol::Constant::DiagnosticSeverity; end + +# Reports an error. +# +# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_severity.rb#8 +LanguageServer::Protocol::Constant::DiagnosticSeverity::ERROR = T.let(T.unsafe(nil), Integer) + +# Reports a hint. +# +# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_severity.rb#20 +LanguageServer::Protocol::Constant::DiagnosticSeverity::HINT = T.let(T.unsafe(nil), Integer) + +# Reports an information. +# +# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_severity.rb#16 +LanguageServer::Protocol::Constant::DiagnosticSeverity::INFORMATION = T.let(T.unsafe(nil), Integer) + +# Reports a warning. +# +# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_severity.rb#12 +LanguageServer::Protocol::Constant::DiagnosticSeverity::WARNING = T.let(T.unsafe(nil), Integer) + +# The diagnostic tags. +# +# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_tag.rb#7 +module LanguageServer::Protocol::Constant::DiagnosticTag; end + +# Deprecated or obsolete code. +# +# Clients are allowed to rendered diagnostics with this tag strike through. +# +# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_tag.rb#20 +LanguageServer::Protocol::Constant::DiagnosticTag::DEPRECATED = T.let(T.unsafe(nil), Integer) + +# Unused or unnecessary code. +# +# Clients are allowed to render diagnostics with this tag faded out +# instead of having an error squiggle. +# +# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_tag.rb#14 +LanguageServer::Protocol::Constant::DiagnosticTag::UNNECESSARY = T.let(T.unsafe(nil), Integer) + +# The document diagnostic report kinds. +# +# source://language_server-protocol//lib/language_server/protocol/constant/document_diagnostic_report_kind.rb#7 +module LanguageServer::Protocol::Constant::DocumentDiagnosticReportKind; end + +# A diagnostic report with a full +# set of problems. +# +# source://language_server-protocol//lib/language_server/protocol/constant/document_diagnostic_report_kind.rb#12 +LanguageServer::Protocol::Constant::DocumentDiagnosticReportKind::FULL = T.let(T.unsafe(nil), String) + +# A report indicating that the last +# returned report is still accurate. +# +# source://language_server-protocol//lib/language_server/protocol/constant/document_diagnostic_report_kind.rb#17 +LanguageServer::Protocol::Constant::DocumentDiagnosticReportKind::UNCHANGED = T.let(T.unsafe(nil), String) + +# A document highlight kind. +# +# source://language_server-protocol//lib/language_server/protocol/constant/document_highlight_kind.rb#7 +module LanguageServer::Protocol::Constant::DocumentHighlightKind; end + +# Read-access of a symbol, like reading a variable. +# +# source://language_server-protocol//lib/language_server/protocol/constant/document_highlight_kind.rb#15 +LanguageServer::Protocol::Constant::DocumentHighlightKind::READ = T.let(T.unsafe(nil), Integer) + +# A textual occurrence. +# +# source://language_server-protocol//lib/language_server/protocol/constant/document_highlight_kind.rb#11 +LanguageServer::Protocol::Constant::DocumentHighlightKind::TEXT = T.let(T.unsafe(nil), Integer) + +# Write-access of a symbol, like writing to a variable. +# +# source://language_server-protocol//lib/language_server/protocol/constant/document_highlight_kind.rb#19 +LanguageServer::Protocol::Constant::DocumentHighlightKind::WRITE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#4 +module LanguageServer::Protocol::Constant::ErrorCodes; end + +# The server detected that the content of a document got +# modified outside normal conditions. A server should +# NOT send this error code if it detects a content change +# in it unprocessed messages. The result even computed +# on an older state might still be useful for the client. +# +# If a client decides that a result is not of any use anymore +# the client should cancel the request. +# +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#59 +LanguageServer::Protocol::Constant::ErrorCodes::CONTENT_MODIFIED = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#9 +LanguageServer::Protocol::Constant::ErrorCodes::INTERNAL_ERROR = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#8 +LanguageServer::Protocol::Constant::ErrorCodes::INVALID_PARAMS = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#6 +LanguageServer::Protocol::Constant::ErrorCodes::INVALID_REQUEST = T.let(T.unsafe(nil), Integer) + +# This is the end range of JSON-RPC reserved error codes. +# It doesn't denote a real error code. +# +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#29 +LanguageServer::Protocol::Constant::ErrorCodes::JSONRPC_RESERVED_ERROR_RANGE_END = T.let(T.unsafe(nil), Integer) + +# This is the start range of JSON-RPC reserved error codes. +# It doesn't denote a real error code. No LSP error codes should +# be defined between the start and end range. For backwards +# compatibility the `ServerNotInitialized` and the `UnknownErrorCode` +# are left in the range. +# +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#17 +LanguageServer::Protocol::Constant::ErrorCodes::JSONRPC_RESERVED_ERROR_RANGE_START = T.let(T.unsafe(nil), Integer) + +# This is the end range of LSP reserved error codes. +# It doesn't denote a real error code. +# +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#69 +LanguageServer::Protocol::Constant::ErrorCodes::LSP_RESERVED_ERROR_RANGE_END = T.let(T.unsafe(nil), Integer) + +# This is the start range of LSP reserved error codes. +# It doesn't denote a real error code. +# +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#35 +LanguageServer::Protocol::Constant::ErrorCodes::LSP_RESERVED_ERROR_RANGE_START = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#7 +LanguageServer::Protocol::Constant::ErrorCodes::METHOD_NOT_FOUND = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#5 +LanguageServer::Protocol::Constant::ErrorCodes::PARSE_ERROR = T.let(T.unsafe(nil), Integer) + +# The client has canceled a request and a server as detected +# the cancel. +# +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#64 +LanguageServer::Protocol::Constant::ErrorCodes::REQUEST_CANCELLED = T.let(T.unsafe(nil), Integer) + +# A request failed but it was syntactically correct, e.g the +# method name was known and the parameters were valid. The error +# message should contain human readable information about why +# the request failed. +# +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#42 +LanguageServer::Protocol::Constant::ErrorCodes::REQUEST_FAILED = T.let(T.unsafe(nil), Integer) + +# The server cancelled the request. This error code should +# only be used for requests that explicitly support being +# server cancellable. +# +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#48 +LanguageServer::Protocol::Constant::ErrorCodes::SERVER_CANCELLED = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#30 +LanguageServer::Protocol::Constant::ErrorCodes::SERVER_ERROR_END = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#18 +LanguageServer::Protocol::Constant::ErrorCodes::SERVER_ERROR_START = T.let(T.unsafe(nil), Integer) + +# Error code indicating that a server received a notification or +# request before the server has received the `initialize` request. +# +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#23 +LanguageServer::Protocol::Constant::ErrorCodes::SERVER_NOT_INITIALIZED = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#24 +LanguageServer::Protocol::Constant::ErrorCodes::UNKNOWN_ERROR_CODE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/failure_handling_kind.rb#4 +module LanguageServer::Protocol::Constant::FailureHandlingKind; end + +# Applying the workspace change is simply aborted if one of the changes +# provided fails. All operations executed before the failing operation +# stay executed. +# +# source://language_server-protocol//lib/language_server/protocol/constant/failure_handling_kind.rb#10 +LanguageServer::Protocol::Constant::FailureHandlingKind::ABORT = T.let(T.unsafe(nil), String) + +# If the workspace edit contains only textual file changes they are +# executed transactional. If resource changes (create, rename or delete +# file) are part of the change the failure handling strategy is abort. +# +# source://language_server-protocol//lib/language_server/protocol/constant/failure_handling_kind.rb#21 +LanguageServer::Protocol::Constant::FailureHandlingKind::TEXT_ONLY_TRANSACTIONAL = T.let(T.unsafe(nil), String) + +# All operations are executed transactional. That means they either all +# succeed or no changes at all are applied to the workspace. +# +# source://language_server-protocol//lib/language_server/protocol/constant/failure_handling_kind.rb#15 +LanguageServer::Protocol::Constant::FailureHandlingKind::TRANSACTIONAL = T.let(T.unsafe(nil), String) + +# The client tries to undo the operations already executed. But there is no +# guarantee that this is succeeding. +# +# source://language_server-protocol//lib/language_server/protocol/constant/failure_handling_kind.rb#26 +LanguageServer::Protocol::Constant::FailureHandlingKind::UNDO = T.let(T.unsafe(nil), String) + +# The file event type. +# +# source://language_server-protocol//lib/language_server/protocol/constant/file_change_type.rb#7 +module LanguageServer::Protocol::Constant::FileChangeType; end + +# The file got changed. +# +# source://language_server-protocol//lib/language_server/protocol/constant/file_change_type.rb#15 +LanguageServer::Protocol::Constant::FileChangeType::CHANGED = T.let(T.unsafe(nil), Integer) + +# The file got created. +# +# source://language_server-protocol//lib/language_server/protocol/constant/file_change_type.rb#11 +LanguageServer::Protocol::Constant::FileChangeType::CREATED = T.let(T.unsafe(nil), Integer) + +# The file got deleted. +# +# source://language_server-protocol//lib/language_server/protocol/constant/file_change_type.rb#19 +LanguageServer::Protocol::Constant::FileChangeType::DELETED = T.let(T.unsafe(nil), Integer) + +# A pattern kind describing if a glob pattern matches a file a folder or +# both. +# +# source://language_server-protocol//lib/language_server/protocol/constant/file_operation_pattern_kind.rb#8 +module LanguageServer::Protocol::Constant::FileOperationPatternKind; end + +# The pattern matches a file only. +# +# source://language_server-protocol//lib/language_server/protocol/constant/file_operation_pattern_kind.rb#12 +LanguageServer::Protocol::Constant::FileOperationPatternKind::FILE = T.let(T.unsafe(nil), String) + +# The pattern matches a folder only. +# +# source://language_server-protocol//lib/language_server/protocol/constant/file_operation_pattern_kind.rb#16 +LanguageServer::Protocol::Constant::FileOperationPatternKind::FOLDER = T.let(T.unsafe(nil), String) + +# A set of predefined range kinds. +# The type is a string since the value set is extensible +# +# source://language_server-protocol//lib/language_server/protocol/constant/folding_range_kind.rb#8 +module LanguageServer::Protocol::Constant::FoldingRangeKind; end + +# Folding range for a comment +# +# source://language_server-protocol//lib/language_server/protocol/constant/folding_range_kind.rb#12 +LanguageServer::Protocol::Constant::FoldingRangeKind::COMMENT = T.let(T.unsafe(nil), String) + +# Folding range for imports or includes +# +# source://language_server-protocol//lib/language_server/protocol/constant/folding_range_kind.rb#16 +LanguageServer::Protocol::Constant::FoldingRangeKind::IMPORTS = T.let(T.unsafe(nil), String) + +# Folding range for a region (e.g. `#region`) +# +# source://language_server-protocol//lib/language_server/protocol/constant/folding_range_kind.rb#20 +LanguageServer::Protocol::Constant::FoldingRangeKind::REGION = T.let(T.unsafe(nil), String) + +# Known error codes for an `InitializeErrorCodes`; +# +# source://language_server-protocol//lib/language_server/protocol/constant/initialize_error_codes.rb#7 +module LanguageServer::Protocol::Constant::InitializeErrorCodes; end + +# If the protocol version provided by the client can't be handled by +# the server. +# +# source://language_server-protocol//lib/language_server/protocol/constant/initialize_error_codes.rb#12 +LanguageServer::Protocol::Constant::InitializeErrorCodes::UNKNOWN_PROTOCOL_VERSION = T.let(T.unsafe(nil), Integer) + +# Inlay hint kinds. +# +# source://language_server-protocol//lib/language_server/protocol/constant/inlay_hint_kind.rb#7 +module LanguageServer::Protocol::Constant::InlayHintKind; end + +# An inlay hint that is for a parameter. +# +# source://language_server-protocol//lib/language_server/protocol/constant/inlay_hint_kind.rb#15 +LanguageServer::Protocol::Constant::InlayHintKind::PARAMETER = T.let(T.unsafe(nil), Integer) + +# An inlay hint that for a type annotation. +# +# source://language_server-protocol//lib/language_server/protocol/constant/inlay_hint_kind.rb#11 +LanguageServer::Protocol::Constant::InlayHintKind::TYPE = T.let(T.unsafe(nil), Integer) + +# Defines whether the insert text in a completion item should be interpreted as +# plain text or a snippet. +# +# source://language_server-protocol//lib/language_server/protocol/constant/insert_text_format.rb#8 +module LanguageServer::Protocol::Constant::InsertTextFormat; end + +# The primary text to be inserted is treated as a plain string. +# +# source://language_server-protocol//lib/language_server/protocol/constant/insert_text_format.rb#12 +LanguageServer::Protocol::Constant::InsertTextFormat::PLAIN_TEXT = T.let(T.unsafe(nil), Integer) + +# The primary text to be inserted is treated as a snippet. +# +# A snippet can define tab stops and placeholders with `$1`, `$2` +# and `${3:foo}`. `$0` defines the final tab stop, it defaults to +# the end of the snippet. Placeholders with equal identifiers are linked, +# that is typing in one will update others too. +# +# source://language_server-protocol//lib/language_server/protocol/constant/insert_text_format.rb#21 +LanguageServer::Protocol::Constant::InsertTextFormat::SNIPPET = T.let(T.unsafe(nil), Integer) + +# How whitespace and indentation is handled during completion +# item insertion. +# +# source://language_server-protocol//lib/language_server/protocol/constant/insert_text_mode.rb#8 +module LanguageServer::Protocol::Constant::InsertTextMode; end + +# The editor adjusts leading whitespace of new lines so that +# they match the indentation up to the cursor of the line for +# which the item is accepted. +# +# Consider a line like this: <2tabs><3tabs>foo. Accepting a +# multi line completion item is indented using 2 tabs and all +# following lines inserted will be indented using 2 tabs as well. +# +# source://language_server-protocol//lib/language_server/protocol/constant/insert_text_mode.rb#26 +LanguageServer::Protocol::Constant::InsertTextMode::ADJUST_INDENTATION = T.let(T.unsafe(nil), Integer) + +# The insertion or replace strings is taken as it is. If the +# value is multi line the lines below the cursor will be +# inserted using the indentation defined in the string value. +# The client will not apply any kind of adjustments to the +# string. +# +# source://language_server-protocol//lib/language_server/protocol/constant/insert_text_mode.rb#16 +LanguageServer::Protocol::Constant::InsertTextMode::AS_IS = T.let(T.unsafe(nil), Integer) + +# Describes the content type that a client supports in various +# result literals like `Hover`, `ParameterInfo` or `CompletionItem`. +# +# Please note that `MarkupKinds` must not start with a `$`. This kinds +# are reserved for internal usage. +# +# source://language_server-protocol//lib/language_server/protocol/constant/markup_kind.rb#11 +module LanguageServer::Protocol::Constant::MarkupKind; end + +# Markdown is supported as a content format +# +# source://language_server-protocol//lib/language_server/protocol/constant/markup_kind.rb#19 +LanguageServer::Protocol::Constant::MarkupKind::MARKDOWN = T.let(T.unsafe(nil), String) + +# Plain text is supported as a content format +# +# source://language_server-protocol//lib/language_server/protocol/constant/markup_kind.rb#15 +LanguageServer::Protocol::Constant::MarkupKind::PLAIN_TEXT = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/message_type.rb#4 +module LanguageServer::Protocol::Constant::MessageType; end + +# An error message. +# +# source://language_server-protocol//lib/language_server/protocol/constant/message_type.rb#8 +LanguageServer::Protocol::Constant::MessageType::ERROR = T.let(T.unsafe(nil), Integer) + +# An information message. +# +# source://language_server-protocol//lib/language_server/protocol/constant/message_type.rb#16 +LanguageServer::Protocol::Constant::MessageType::INFO = T.let(T.unsafe(nil), Integer) + +# A log message. +# +# source://language_server-protocol//lib/language_server/protocol/constant/message_type.rb#20 +LanguageServer::Protocol::Constant::MessageType::LOG = T.let(T.unsafe(nil), Integer) + +# A warning message. +# +# source://language_server-protocol//lib/language_server/protocol/constant/message_type.rb#12 +LanguageServer::Protocol::Constant::MessageType::WARNING = T.let(T.unsafe(nil), Integer) + +# The moniker kind. +# +# source://language_server-protocol//lib/language_server/protocol/constant/moniker_kind.rb#7 +module LanguageServer::Protocol::Constant::MonikerKind; end + +# The moniker represents a symbol that is exported from a project +# +# source://language_server-protocol//lib/language_server/protocol/constant/moniker_kind.rb#15 +LanguageServer::Protocol::Constant::MonikerKind::EXPORT = T.let(T.unsafe(nil), String) + +# The moniker represent a symbol that is imported into a project +# +# source://language_server-protocol//lib/language_server/protocol/constant/moniker_kind.rb#11 +LanguageServer::Protocol::Constant::MonikerKind::IMPORT = T.let(T.unsafe(nil), String) + +# The moniker represents a symbol that is local to a project (e.g. a local +# variable of a function, a class not visible outside the project, ...) +# +# source://language_server-protocol//lib/language_server/protocol/constant/moniker_kind.rb#20 +LanguageServer::Protocol::Constant::MonikerKind::LOCAL = T.let(T.unsafe(nil), String) + +# A notebook cell kind. +# +# source://language_server-protocol//lib/language_server/protocol/constant/notebook_cell_kind.rb#7 +module LanguageServer::Protocol::Constant::NotebookCellKind; end + +# A code-cell is source code. +# +# source://language_server-protocol//lib/language_server/protocol/constant/notebook_cell_kind.rb#15 +LanguageServer::Protocol::Constant::NotebookCellKind::CODE = T.let(T.unsafe(nil), Integer) + +# A markup-cell is formatted source that is used for display. +# +# source://language_server-protocol//lib/language_server/protocol/constant/notebook_cell_kind.rb#11 +LanguageServer::Protocol::Constant::NotebookCellKind::MARKUP = T.let(T.unsafe(nil), Integer) + +# A type indicating how positions are encoded, +# specifically what column offsets mean. +# A set of predefined position encoding kinds. +# +# source://language_server-protocol//lib/language_server/protocol/constant/position_encoding_kind.rb#9 +module LanguageServer::Protocol::Constant::PositionEncodingKind; end + +# Character offsets count UTF-16 code units. +# +# This is the default and must always be supported +# by servers +# +# source://language_server-protocol//lib/language_server/protocol/constant/position_encoding_kind.rb#20 +LanguageServer::Protocol::Constant::PositionEncodingKind::UTF16 = T.let(T.unsafe(nil), String) + +# Character offsets count UTF-32 code units. +# +# Implementation note: these are the same as Unicode code points, +# so this `PositionEncodingKind` may also be used for an +# encoding-agnostic representation of character offsets. +# +# source://language_server-protocol//lib/language_server/protocol/constant/position_encoding_kind.rb#28 +LanguageServer::Protocol::Constant::PositionEncodingKind::UTF32 = T.let(T.unsafe(nil), String) + +# Character offsets count UTF-8 code units (e.g bytes). +# +# source://language_server-protocol//lib/language_server/protocol/constant/position_encoding_kind.rb#13 +LanguageServer::Protocol::Constant::PositionEncodingKind::UTF8 = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/prepare_support_default_behavior.rb#4 +module LanguageServer::Protocol::Constant::PrepareSupportDefaultBehavior; end + +# The client's default behavior is to select the identifier +# according to the language's syntax rule. +# +# source://language_server-protocol//lib/language_server/protocol/constant/prepare_support_default_behavior.rb#9 +LanguageServer::Protocol::Constant::PrepareSupportDefaultBehavior::IDENTIFIER = T.let(T.unsafe(nil), Integer) + +# The kind of resource operations supported by the client. +# +# source://language_server-protocol//lib/language_server/protocol/constant/resource_operation_kind.rb#7 +module LanguageServer::Protocol::Constant::ResourceOperationKind; end + +# Supports creating new files and folders. +# +# source://language_server-protocol//lib/language_server/protocol/constant/resource_operation_kind.rb#11 +LanguageServer::Protocol::Constant::ResourceOperationKind::CREATE = T.let(T.unsafe(nil), String) + +# Supports deleting existing files and folders. +# +# source://language_server-protocol//lib/language_server/protocol/constant/resource_operation_kind.rb#19 +LanguageServer::Protocol::Constant::ResourceOperationKind::DELETE = T.let(T.unsafe(nil), String) + +# Supports renaming existing files and folders. +# +# source://language_server-protocol//lib/language_server/protocol/constant/resource_operation_kind.rb#15 +LanguageServer::Protocol::Constant::ResourceOperationKind::RENAME = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#4 +module LanguageServer::Protocol::Constant::SemanticTokenModifiers; end + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#10 +LanguageServer::Protocol::Constant::SemanticTokenModifiers::ABSTRACT = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#11 +LanguageServer::Protocol::Constant::SemanticTokenModifiers::ASYNC = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#5 +LanguageServer::Protocol::Constant::SemanticTokenModifiers::DECLARATION = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#14 +LanguageServer::Protocol::Constant::SemanticTokenModifiers::DEFAULT_LIBRARY = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#6 +LanguageServer::Protocol::Constant::SemanticTokenModifiers::DEFINITION = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#9 +LanguageServer::Protocol::Constant::SemanticTokenModifiers::DEPRECATED = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#13 +LanguageServer::Protocol::Constant::SemanticTokenModifiers::DOCUMENTATION = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#12 +LanguageServer::Protocol::Constant::SemanticTokenModifiers::MODIFICATION = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#7 +LanguageServer::Protocol::Constant::SemanticTokenModifiers::READONLY = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#8 +LanguageServer::Protocol::Constant::SemanticTokenModifiers::STATIC = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#4 +module LanguageServer::Protocol::Constant::SemanticTokenTypes; end + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#11 +LanguageServer::Protocol::Constant::SemanticTokenTypes::CLASS = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#26 +LanguageServer::Protocol::Constant::SemanticTokenTypes::COMMENT = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#31 +LanguageServer::Protocol::Constant::SemanticTokenTypes::DECORATOR = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#12 +LanguageServer::Protocol::Constant::SemanticTokenTypes::ENUM = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#19 +LanguageServer::Protocol::Constant::SemanticTokenTypes::ENUM_MEMBER = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#20 +LanguageServer::Protocol::Constant::SemanticTokenTypes::EVENT = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#21 +LanguageServer::Protocol::Constant::SemanticTokenTypes::FUNCTION = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#13 +LanguageServer::Protocol::Constant::SemanticTokenTypes::INTERFACE = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#24 +LanguageServer::Protocol::Constant::SemanticTokenTypes::KEYWORD = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#23 +LanguageServer::Protocol::Constant::SemanticTokenTypes::MACRO = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#22 +LanguageServer::Protocol::Constant::SemanticTokenTypes::METHOD = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#25 +LanguageServer::Protocol::Constant::SemanticTokenTypes::MODIFIER = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#5 +LanguageServer::Protocol::Constant::SemanticTokenTypes::NAMESPACE = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#28 +LanguageServer::Protocol::Constant::SemanticTokenTypes::NUMBER = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#30 +LanguageServer::Protocol::Constant::SemanticTokenTypes::OPERATOR = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#16 +LanguageServer::Protocol::Constant::SemanticTokenTypes::PARAMETER = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#18 +LanguageServer::Protocol::Constant::SemanticTokenTypes::PROPERTY = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#29 +LanguageServer::Protocol::Constant::SemanticTokenTypes::REGEXP = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#27 +LanguageServer::Protocol::Constant::SemanticTokenTypes::STRING = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#14 +LanguageServer::Protocol::Constant::SemanticTokenTypes::STRUCT = T.let(T.unsafe(nil), String) + +# Represents a generic type. Acts as a fallback for types which +# can't be mapped to a specific type like class or enum. +# +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#10 +LanguageServer::Protocol::Constant::SemanticTokenTypes::TYPE = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#15 +LanguageServer::Protocol::Constant::SemanticTokenTypes::TYPE_PARAMETER = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#17 +LanguageServer::Protocol::Constant::SemanticTokenTypes::VARIABLE = T.let(T.unsafe(nil), String) + +# How a signature help was triggered. +# +# source://language_server-protocol//lib/language_server/protocol/constant/signature_help_trigger_kind.rb#7 +module LanguageServer::Protocol::Constant::SignatureHelpTriggerKind; end + +# Signature help was triggered by the cursor moving or by the document +# content changing. +# +# source://language_server-protocol//lib/language_server/protocol/constant/signature_help_trigger_kind.rb#20 +LanguageServer::Protocol::Constant::SignatureHelpTriggerKind::CONTENT_CHANGE = T.let(T.unsafe(nil), Integer) + +# Signature help was invoked manually by the user or by a command. +# +# source://language_server-protocol//lib/language_server/protocol/constant/signature_help_trigger_kind.rb#11 +LanguageServer::Protocol::Constant::SignatureHelpTriggerKind::INVOKED = T.let(T.unsafe(nil), Integer) + +# Signature help was triggered by a trigger character. +# +# source://language_server-protocol//lib/language_server/protocol/constant/signature_help_trigger_kind.rb#15 +LanguageServer::Protocol::Constant::SignatureHelpTriggerKind::TRIGGER_CHARACTER = T.let(T.unsafe(nil), Integer) + +# A symbol kind. +# +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#7 +module LanguageServer::Protocol::Constant::SymbolKind; end + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#25 +LanguageServer::Protocol::Constant::SymbolKind::ARRAY = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#24 +LanguageServer::Protocol::Constant::SymbolKind::BOOLEAN = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#12 +LanguageServer::Protocol::Constant::SymbolKind::CLASS = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#21 +LanguageServer::Protocol::Constant::SymbolKind::CONSTANT = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#16 +LanguageServer::Protocol::Constant::SymbolKind::CONSTRUCTOR = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#17 +LanguageServer::Protocol::Constant::SymbolKind::ENUM = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#29 +LanguageServer::Protocol::Constant::SymbolKind::ENUM_MEMBER = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#31 +LanguageServer::Protocol::Constant::SymbolKind::EVENT = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#15 +LanguageServer::Protocol::Constant::SymbolKind::FIELD = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#8 +LanguageServer::Protocol::Constant::SymbolKind::FILE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#19 +LanguageServer::Protocol::Constant::SymbolKind::FUNCTION = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#18 +LanguageServer::Protocol::Constant::SymbolKind::INTERFACE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#27 +LanguageServer::Protocol::Constant::SymbolKind::KEY = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#13 +LanguageServer::Protocol::Constant::SymbolKind::METHOD = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#9 +LanguageServer::Protocol::Constant::SymbolKind::MODULE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#10 +LanguageServer::Protocol::Constant::SymbolKind::NAMESPACE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#28 +LanguageServer::Protocol::Constant::SymbolKind::NULL = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#23 +LanguageServer::Protocol::Constant::SymbolKind::NUMBER = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#26 +LanguageServer::Protocol::Constant::SymbolKind::OBJECT = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#32 +LanguageServer::Protocol::Constant::SymbolKind::OPERATOR = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#11 +LanguageServer::Protocol::Constant::SymbolKind::PACKAGE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#14 +LanguageServer::Protocol::Constant::SymbolKind::PROPERTY = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#22 +LanguageServer::Protocol::Constant::SymbolKind::STRING = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#30 +LanguageServer::Protocol::Constant::SymbolKind::STRUCT = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#33 +LanguageServer::Protocol::Constant::SymbolKind::TYPE_PARAMETER = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#20 +LanguageServer::Protocol::Constant::SymbolKind::VARIABLE = T.let(T.unsafe(nil), Integer) + +# Symbol tags are extra annotations that tweak the rendering of a symbol. +# +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_tag.rb#7 +module LanguageServer::Protocol::Constant::SymbolTag; end + +# Render a symbol as obsolete, usually using a strike-out. +# +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_tag.rb#11 +LanguageServer::Protocol::Constant::SymbolTag::DEPRECATED = T.let(T.unsafe(nil), Integer) + +# Represents reasons why a text document is saved. +# +# source://language_server-protocol//lib/language_server/protocol/constant/text_document_save_reason.rb#7 +module LanguageServer::Protocol::Constant::TextDocumentSaveReason; end + +# Automatic after a delay. +# +# source://language_server-protocol//lib/language_server/protocol/constant/text_document_save_reason.rb#16 +LanguageServer::Protocol::Constant::TextDocumentSaveReason::AFTER_DELAY = T.let(T.unsafe(nil), Integer) + +# When the editor lost focus. +# +# source://language_server-protocol//lib/language_server/protocol/constant/text_document_save_reason.rb#20 +LanguageServer::Protocol::Constant::TextDocumentSaveReason::FOCUS_OUT = T.let(T.unsafe(nil), Integer) + +# Manually triggered, e.g. by the user pressing save, by starting +# debugging, or by an API call. +# +# source://language_server-protocol//lib/language_server/protocol/constant/text_document_save_reason.rb#12 +LanguageServer::Protocol::Constant::TextDocumentSaveReason::MANUAL = T.let(T.unsafe(nil), Integer) + +# Defines how the host (editor) should sync document changes to the language +# server. +# +# source://language_server-protocol//lib/language_server/protocol/constant/text_document_sync_kind.rb#8 +module LanguageServer::Protocol::Constant::TextDocumentSyncKind; end + +# Documents are synced by always sending the full content +# of the document. +# +# source://language_server-protocol//lib/language_server/protocol/constant/text_document_sync_kind.rb#17 +LanguageServer::Protocol::Constant::TextDocumentSyncKind::FULL = T.let(T.unsafe(nil), Integer) + +# Documents are synced by sending the full content on open. +# After that only incremental updates to the document are +# sent. +# +# source://language_server-protocol//lib/language_server/protocol/constant/text_document_sync_kind.rb#23 +LanguageServer::Protocol::Constant::TextDocumentSyncKind::INCREMENTAL = T.let(T.unsafe(nil), Integer) + +# Documents should not be synced at all. +# +# source://language_server-protocol//lib/language_server/protocol/constant/text_document_sync_kind.rb#12 +LanguageServer::Protocol::Constant::TextDocumentSyncKind::NONE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/token_format.rb#4 +module LanguageServer::Protocol::Constant::TokenFormat; end + +# source://language_server-protocol//lib/language_server/protocol/constant/token_format.rb#5 +LanguageServer::Protocol::Constant::TokenFormat::RELATIVE = T.let(T.unsafe(nil), String) + +# Moniker uniqueness level to define scope of the moniker. +# +# source://language_server-protocol//lib/language_server/protocol/constant/uniqueness_level.rb#7 +module LanguageServer::Protocol::Constant::UniquenessLevel; end + +# The moniker is only unique inside a document +# +# source://language_server-protocol//lib/language_server/protocol/constant/uniqueness_level.rb#11 +LanguageServer::Protocol::Constant::UniquenessLevel::DOCUMENT = T.let(T.unsafe(nil), String) + +# The moniker is globally unique +# +# source://language_server-protocol//lib/language_server/protocol/constant/uniqueness_level.rb#27 +LanguageServer::Protocol::Constant::UniquenessLevel::GLOBAL = T.let(T.unsafe(nil), String) + +# The moniker is unique inside the group to which a project belongs +# +# source://language_server-protocol//lib/language_server/protocol/constant/uniqueness_level.rb#19 +LanguageServer::Protocol::Constant::UniquenessLevel::GROUP = T.let(T.unsafe(nil), String) + +# The moniker is unique inside a project for which a dump got created +# +# source://language_server-protocol//lib/language_server/protocol/constant/uniqueness_level.rb#15 +LanguageServer::Protocol::Constant::UniquenessLevel::PROJECT = T.let(T.unsafe(nil), String) + +# The moniker is unique inside the moniker scheme. +# +# source://language_server-protocol//lib/language_server/protocol/constant/uniqueness_level.rb#23 +LanguageServer::Protocol::Constant::UniquenessLevel::SCHEME = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/watch_kind.rb#4 +module LanguageServer::Protocol::Constant::WatchKind; end + +# Interested in change events +# +# source://language_server-protocol//lib/language_server/protocol/constant/watch_kind.rb#12 +LanguageServer::Protocol::Constant::WatchKind::CHANGE = T.let(T.unsafe(nil), Integer) + +# Interested in create events. +# +# source://language_server-protocol//lib/language_server/protocol/constant/watch_kind.rb#8 +LanguageServer::Protocol::Constant::WatchKind::CREATE = T.let(T.unsafe(nil), Integer) + +# Interested in delete events +# +# source://language_server-protocol//lib/language_server/protocol/constant/watch_kind.rb#16 +LanguageServer::Protocol::Constant::WatchKind::DELETE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/interface.rb#3 +module LanguageServer::Protocol::Interface; end + +# A special text edit with an additional change annotation. +# +# source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#7 +class LanguageServer::Protocol::Interface::AnnotatedTextEdit + # @return [AnnotatedTextEdit] a new instance of AnnotatedTextEdit + # + # source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#8 + def initialize(range:, new_text:, annotation_id:); end + + # The actual annotation identifier. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#40 + def annotation_id; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#44 + def attributes; end + + # The string to be inserted. For delete operations use an + # empty string. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#32 + def new_text; end + + # The range of the text document to be manipulated. To insert + # text into a document create a range where start === end. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#23 + def range; end + + # source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#46 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#50 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_params.rb#4 +class LanguageServer::Protocol::Interface::ApplyWorkspaceEditParams + # @return [ApplyWorkspaceEditParams] a new instance of ApplyWorkspaceEditParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_params.rb#5 + def initialize(edit:, label: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_params.rb#32 + def attributes; end + + # The edits to apply. + # + # @return [WorkspaceEdit] + # + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_params.rb#28 + def edit; end + + # An optional label of the workspace edit. This label is + # presented in the user interface for example on an undo + # stack to undo the workspace edit. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_params.rb#20 + def label; end + + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_params.rb#34 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_params.rb#38 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#4 +class LanguageServer::Protocol::Interface::ApplyWorkspaceEditResult + # @return [ApplyWorkspaceEditResult] a new instance of ApplyWorkspaceEditResult + # + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#5 + def initialize(applied:, failure_reason: T.unsafe(nil), failed_change: T.unsafe(nil)); end + + # Indicates whether the edit was applied or not. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#19 + def applied; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#44 + def attributes; end + + # Depending on the client's failure handling strategy `failedChange` + # might contain the index of the change that failed. This property is + # only available if the client signals a `failureHandling` strategy + # in its client capabilities. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#40 + def failed_change; end + + # An optional textual description for why the edit was not applied. + # This may be used by the server for diagnostic logging or to provide + # a suitable error for a request that triggered the edit. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#29 + def failure_reason; end + + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#46 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#50 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::CallHierarchyClientCapabilities + # @return [CallHierarchyClientCapabilities] a new instance of CallHierarchyClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb#24 + def attributes; end + + # Whether implementation supports dynamic registration. If this is set to + # `true` the client supports the new `(TextDocumentRegistrationOptions & + # StaticRegistrationOptions)` return value for the corresponding server + # capability as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb#20 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb#30 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb#4 +class LanguageServer::Protocol::Interface::CallHierarchyIncomingCall + # @return [CallHierarchyIncomingCall] a new instance of CallHierarchyIncomingCall + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb#5 + def initialize(from:, from_ranges:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb#31 + def attributes; end + + # The item that makes the call. + # + # @return [CallHierarchyItem] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb#18 + def from; end + + # The ranges at which the calls appear. This is relative to the caller + # denoted by [`this.from`](#CallHierarchyIncomingCall.from). + # + # @return [Range[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb#27 + def from_ranges; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb#33 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb#37 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#4 +class LanguageServer::Protocol::Interface::CallHierarchyIncomingCallsParams + # @return [CallHierarchyIncomingCallsParams] a new instance of CallHierarchyIncomingCallsParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#5 + def initialize(item:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#37 + def attributes; end + + # @return [CallHierarchyItem] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#33 + def item; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#28 + def partial_result_token; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#39 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#43 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#19 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#4 +class LanguageServer::Protocol::Interface::CallHierarchyItem + # @return [CallHierarchyItem] a new instance of CallHierarchyItem + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#5 + def initialize(name:, kind:, uri:, range:, selection_range:, tags: T.unsafe(nil), detail: T.unsafe(nil), data: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#88 + def attributes; end + + # A data entry field that is preserved between a call hierarchy prepare and + # incoming calls or outgoing calls requests. + # + # @return [unknown] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#84 + def data; end + + # More detail for this item, e.g. the signature of a function. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#48 + def detail; end + + # The kind of this item. + # + # @return [SymbolKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#32 + def kind; end + + # The name of this item. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#24 + def name; end + + # The range enclosing this symbol not including leading/trailing whitespace + # but everything else, e.g. comments and code. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#65 + def range; end + + # The range that should be selected and revealed when this symbol is being + # picked, e.g. the name of a function. Must be contained by the + # [`range`](#CallHierarchyItem.range). + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#75 + def selection_range; end + + # Tags for this item. + # + # @return [1[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#40 + def tags; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#90 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#94 + def to_json(*args); end + + # The resource identifier of this item. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#56 + def uri; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_options.rb#4 +class LanguageServer::Protocol::Interface::CallHierarchyOptions + # @return [CallHierarchyOptions] a new instance of CallHierarchyOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb#4 +class LanguageServer::Protocol::Interface::CallHierarchyOutgoingCall + # @return [CallHierarchyOutgoingCall] a new instance of CallHierarchyOutgoingCall + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb#5 + def initialize(to:, from_ranges:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb#31 + def attributes; end + + # The range at which this item is called. This is the range relative to + # the caller, e.g the item passed to `callHierarchy/outgoingCalls` request. + # + # @return [Range[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb#27 + def from_ranges; end + + # The item that is called. + # + # @return [CallHierarchyItem] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb#18 + def to; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb#33 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb#37 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#4 +class LanguageServer::Protocol::Interface::CallHierarchyOutgoingCallsParams + # @return [CallHierarchyOutgoingCallsParams] a new instance of CallHierarchyOutgoingCallsParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#5 + def initialize(item:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#37 + def attributes; end + + # @return [CallHierarchyItem] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#33 + def item; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#28 + def partial_result_token; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#39 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#43 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#19 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#4 +class LanguageServer::Protocol::Interface::CallHierarchyPrepareParams + # @return [CallHierarchyPrepareParams] a new instance of CallHierarchyPrepareParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#39 + def attributes; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#27 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#19 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#41 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#45 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#35 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#4 +class LanguageServer::Protocol::Interface::CallHierarchyRegistrationOptions + # @return [CallHierarchyRegistrationOptions] a new instance of CallHierarchyRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#38 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#20 + def document_selector; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#34 + def id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#40 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#44 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#25 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/cancel_params.rb#4 +class LanguageServer::Protocol::Interface::CancelParams + # @return [CancelParams] a new instance of CancelParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/cancel_params.rb#5 + def initialize(id:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/cancel_params.rb#21 + def attributes; end + + # The request id to cancel. + # + # @return [string | number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/cancel_params.rb#17 + def id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/cancel_params.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/cancel_params.rb#27 + def to_json(*args); end +end + +# Additional information that describes document changes. +# +# source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#7 +class LanguageServer::Protocol::Interface::ChangeAnnotation + # @return [ChangeAnnotation] a new instance of ChangeAnnotation + # + # source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#8 + def initialize(label:, needs_confirmation: T.unsafe(nil), description: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#45 + def attributes; end + + # A human-readable string which is rendered less prominent in + # the user interface. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#41 + def description; end + + # A human-readable string describing the actual change. The string + # is rendered prominent in the user interface. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#23 + def label; end + + # A flag which indicates that user confirmation is needed + # before applying the change. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#32 + def needs_confirmation; end + + # source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#47 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#51 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::ClientCapabilities + # @return [ClientCapabilities] a new instance of ClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#5 + def initialize(workspace: T.unsafe(nil), text_document: T.unsafe(nil), notebook_document: T.unsafe(nil), window: T.unsafe(nil), general: T.unsafe(nil), experimental: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#66 + def attributes; end + + # Experimental client capabilities. + # + # @return [LSPAny] + # + # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#62 + def experimental; end + + # General client capabilities. + # + # @return [{ staleRequestSupport?: { cancel: boolean; retryOnContentModified: string[]; }; regularExpressions?: RegularExpressionsClientCapabilities; markdown?: any; positionEncodings?: string[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#54 + def general; end + + # Capabilities specific to the notebook document support. + # + # @return [NotebookDocumentClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#38 + def notebook_document; end + + # Text document specific client capabilities. + # + # @return [TextDocumentClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#30 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#68 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#72 + def to_json(*args); end + + # Window specific client capabilities. + # + # @return [{ workDoneProgress?: boolean; showMessage?: ShowMessageRequestClientCapabilities; showDocument?: ShowDocumentClientCapabilities; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#46 + def window; end + + # Workspace specific client capabilities. + # + # @return [{ applyEdit?: boolean; workspaceEdit?: WorkspaceEditClientCapabilities; didChangeConfiguration?: DidChangeConfigurationClientCapabilities; ... 10 more ...; diagnostics?: DiagnosticWorkspaceClientCapabilities; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#22 + def workspace; end +end + +# A code action represents a change that can be performed in code, e.g. to fix +# a problem or to refactor code. +# +# A CodeAction must set either `edit` and/or a `command`. If both are supplied, +# the `edit` is applied first, then the `command` is executed. +# +# source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#11 +class LanguageServer::Protocol::Interface::CodeAction + # @return [CodeAction] a new instance of CodeAction + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#12 + def initialize(title:, kind: T.unsafe(nil), diagnostics: T.unsafe(nil), is_preferred: T.unsafe(nil), disabled: T.unsafe(nil), edit: T.unsafe(nil), command: T.unsafe(nil), data: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#115 + def attributes; end + + # A command this code action executes. If a code action + # provides an edit and a command, first the edit is + # executed and then the command. + # + # @return [Command] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#102 + def command; end + + # A data entry field that is preserved on a code action between + # a `textDocument/codeAction` and a `codeAction/resolve` request. + # + # @return [LSPAny] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#111 + def data; end + + # The diagnostics that this code action resolves. + # + # @return [Diagnostic[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#49 + def diagnostics; end + + # Marks that the code action cannot currently be applied. + # + # Clients should follow the following guidelines regarding disabled code + # actions: + # + # - Disabled code actions are not shown in automatic lightbulbs code + # action menus. + # + # - Disabled actions are shown as faded out in the code action menu when + # the user request a more specific type of code action, such as + # refactorings. + # + # - If the user has a keybinding that auto applies a code action and only + # a disabled code actions are returned, the client should show the user + # an error message with `reason` in the editor. + # + # @return [{ reason: string; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#84 + def disabled; end + + # The workspace edit this code action performs. + # + # @return [WorkspaceEdit] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#92 + def edit; end + + # Marks this as a preferred action. Preferred actions are used by the + # `auto fix` command and can be targeted by keybindings. + # + # A quick fix should be marked preferred if it properly addresses the + # underlying error. A refactoring should be marked preferred if it is the + # most reasonable choice of actions to take. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#62 + def is_preferred; end + + # The kind of the code action. + # + # Used to filter code actions. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#41 + def kind; end + + # A short, human-readable, title for this code action. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#31 + def title; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#117 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#121 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::CodeActionClientCapabilities + # @return [CodeActionClientCapabilities] a new instance of CodeActionClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), code_action_literal_support: T.unsafe(nil), is_preferred_support: T.unsafe(nil), disabled_support: T.unsafe(nil), data_support: T.unsafe(nil), resolve_support: T.unsafe(nil), honors_change_annotations: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#83 + def attributes; end + + # The client supports code action literals as a valid + # response of the `textDocument/codeAction` request. + # + # @return [{ codeActionKind: { valueSet: string[]; }; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#32 + def code_action_literal_support; end + + # Whether code action supports the `data` property which is + # preserved between a `textDocument/codeAction` and a + # `codeAction/resolve` request. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#58 + def data_support; end + + # Whether code action supports the `disabled` property. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#48 + def disabled_support; end + + # Whether code action supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#23 + def dynamic_registration; end + + # Whether the client honors the change annotations in + # text edits and resource operations returned via the + # `CodeAction#edit` property by for example presenting + # the workspace edit in the user interface and asking + # for confirmation. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#79 + def honors_change_annotations; end + + # Whether code action supports the `isPreferred` property. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#40 + def is_preferred_support; end + + # Whether the client supports resolving additional code action + # properties via a separate `codeAction/resolve` request. + # + # @return [{ properties: string[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#67 + def resolve_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#85 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#89 + def to_json(*args); end +end + +# Contains additional diagnostic information about the context in which +# a code action is run. +# +# source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#8 +class LanguageServer::Protocol::Interface::CodeActionContext + # @return [CodeActionContext] a new instance of CodeActionContext + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#9 + def initialize(diagnostics:, only: T.unsafe(nil), trigger_kind: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#51 + def attributes; end + + # An array of diagnostics known on the client side overlapping the range + # provided to the `textDocument/codeAction` request. They are provided so + # that the server knows which errors are currently presented to the user + # for the given range. There is no guarantee that these accurately reflect + # the error state of the resource. The primary parameter + # to compute code actions is the provided range. + # + # @return [Diagnostic[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#28 + def diagnostics; end + + # Requested kind of actions to return. + # + # Actions not of this kind are filtered out by the client before being + # shown. So servers can omit computing them. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#39 + def only; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#53 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#57 + def to_json(*args); end + + # The reason why code actions were requested. + # + # @return [CodeActionTriggerKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#47 + def trigger_kind; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#4 +class LanguageServer::Protocol::Interface::CodeActionOptions + # @return [CodeActionOptions] a new instance of CodeActionOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil), code_action_kinds: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#40 + def attributes; end + + # CodeActionKinds that this server may return. + # + # The list of kinds may be generic, such as `CodeActionKind.Refactor`, + # or the server may list out every specific kind they provide. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#27 + def code_action_kinds; end + + # The server provides support to resolve additional + # information for a code action. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#36 + def resolve_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#46 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#16 + def work_done_progress; end +end + +# Params for the CodeActionRequest +# +# source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#7 +class LanguageServer::Protocol::Interface::CodeActionParams + # @return [CodeActionParams] a new instance of CodeActionParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#8 + def initialize(text_document:, range:, context:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#61 + def attributes; end + + # Context carrying additional information. + # + # @return [CodeActionContext] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#57 + def context; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#33 + def partial_result_token; end + + # The range for which the command was invoked. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#49 + def range; end + + # The document in which the command was invoked. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#41 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#63 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#67 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#24 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#4 +class LanguageServer::Protocol::Interface::CodeActionRegistrationOptions + # @return [CodeActionRegistrationOptions] a new instance of CodeActionRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), code_action_kinds: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#50 + def attributes; end + + # CodeActionKinds that this server may return. + # + # The list of kinds may be generic, such as `CodeActionKind.Refactor`, + # or the server may list out every specific kind they provide. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#37 + def code_action_kinds; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#21 + def document_selector; end + + # The server provides support to resolve additional + # information for a code action. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#46 + def resolve_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#52 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#56 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#26 + def work_done_progress; end +end + +# Structure to capture a description for an error code. +# +# source://language_server-protocol//lib/language_server/protocol/interface/code_description.rb#7 +class LanguageServer::Protocol::Interface::CodeDescription + # @return [CodeDescription] a new instance of CodeDescription + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_description.rb#8 + def initialize(href:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_description.rb#24 + def attributes; end + + # An URI to open with more information about the diagnostic error. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_description.rb#20 + def href; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_description.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_description.rb#30 + def to_json(*args); end +end + +# A code lens represents a command that should be shown along with +# source text, like the number of references, a way to run tests, etc. +# +# A code lens is _unresolved_ when no command is associated to it. For +# performance reasons the creation of a code lens and resolving should be done +# in two stages. +# +# source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#12 +class LanguageServer::Protocol::Interface::CodeLens + # @return [CodeLens] a new instance of CodeLens + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#13 + def initialize(range:, command: T.unsafe(nil), data: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#49 + def attributes; end + + # The command this code lens represents. + # + # @return [Command] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#36 + def command; end + + # A data entry field that is preserved on a code lens item between + # a code lens and a code lens resolve request. + # + # @return [LSPAny] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#45 + def data; end + + # The range in which this code lens is valid. Should only span a single + # line. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#28 + def range; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#51 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#55 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/code_lens_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::CodeLensClientCapabilities + # @return [CodeLensClientCapabilities] a new instance of CodeLensClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_client_capabilities.rb#21 + def attributes; end + + # Whether code lens supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_client_capabilities.rb#17 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_client_capabilities.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_client_capabilities.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/code_lens_options.rb#4 +class LanguageServer::Protocol::Interface::CodeLensOptions + # @return [CodeLensOptions] a new instance of CodeLensOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_options.rb#27 + def attributes; end + + # Code lens has a resolve provider as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_options.rb#23 + def resolve_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_options.rb#29 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_options.rb#33 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_options.rb#15 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#4 +class LanguageServer::Protocol::Interface::CodeLensParams + # @return [CodeLensParams] a new instance of CodeLensParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#5 + def initialize(text_document:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#40 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#28 + def partial_result_token; end + + # The document to request code lens for. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#36 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#46 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#19 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#4 +class LanguageServer::Protocol::Interface::CodeLensRegistrationOptions + # @return [CodeLensRegistrationOptions] a new instance of CodeLensRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#37 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#20 + def document_selector; end + + # Code lens has a resolve provider as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#33 + def resolve_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#39 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#43 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#25 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::CodeLensWorkspaceClientCapabilities + # @return [CodeLensWorkspaceClientCapabilities] a new instance of CodeLensWorkspaceClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb#5 + def initialize(refresh_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb#27 + def attributes; end + + # Whether the client implementation supports a refresh request sent from the + # server to the client. + # + # Note that this event is global and will force the client to refresh all + # code lenses currently shown. It should be used with absolute care and is + # useful for situation where a server for example detect a project wide + # change that requires such a calculation. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb#23 + def refresh_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb#29 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb#33 + def to_json(*args); end +end + +# Represents a color in RGBA space. +# +# source://language_server-protocol//lib/language_server/protocol/interface/color.rb#7 +class LanguageServer::Protocol::Interface::Color + # @return [Color] a new instance of Color + # + # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#8 + def initialize(red:, green:, blue:, alpha:); end + + # The alpha component of this color in the range [0-1]. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#47 + def alpha; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#51 + def attributes; end + + # The blue component of this color in the range [0-1]. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#39 + def blue; end + + # The green component of this color in the range [0-1]. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#31 + def green; end + + # The red component of this color in the range [0-1]. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#23 + def red; end + + # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#53 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#57 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/color_information.rb#4 +class LanguageServer::Protocol::Interface::ColorInformation + # @return [ColorInformation] a new instance of ColorInformation + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_information.rb#5 + def initialize(range:, color:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_information.rb#30 + def attributes; end + + # The actual color value for this color range. + # + # @return [Color] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_information.rb#26 + def color; end + + # The range in the document where this color appears. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_information.rb#18 + def range; end + + # source://language_server-protocol//lib/language_server/protocol/interface/color_information.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/color_information.rb#36 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#4 +class LanguageServer::Protocol::Interface::ColorPresentation + # @return [ColorPresentation] a new instance of ColorPresentation + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#5 + def initialize(label:, text_edit: T.unsafe(nil), additional_text_edits: T.unsafe(nil)); end + + # An optional array of additional [text edits](#TextEdit) that are applied + # when selecting this color presentation. Edits must not overlap with the + # main [edit](#ColorPresentation.textEdit) nor with themselves. + # + # @return [TextEdit[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#41 + def additional_text_edits; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#45 + def attributes; end + + # The label of this color presentation. It will be shown on the color + # picker header. By default this is also the text that is inserted when + # selecting this color presentation. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#21 + def label; end + + # An [edit](#TextEdit) which is applied to a document when selecting + # this presentation for the color. When `falsy` the + # [label](#ColorPresentation.label) is used. + # + # @return [TextEdit] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#31 + def text_edit; end + + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#47 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#51 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#4 +class LanguageServer::Protocol::Interface::ColorPresentationParams + # @return [ColorPresentationParams] a new instance of ColorPresentationParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#5 + def initialize(text_document:, color:, range:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#58 + def attributes; end + + # The color information to request presentations for. + # + # @return [Color] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#46 + def color; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#30 + def partial_result_token; end + + # The range where the color would be inserted. Serves as a context. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#54 + def range; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#38 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#60 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#64 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#21 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/command.rb#4 +class LanguageServer::Protocol::Interface::Command + # @return [Command] a new instance of Command + # + # source://language_server-protocol//lib/language_server/protocol/interface/command.rb#5 + def initialize(title:, command:, arguments: T.unsafe(nil)); end + + # Arguments that the command handler should be + # invoked with. + # + # @return [LSPAny[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/command.rb#36 + def arguments; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/command.rb#40 + def attributes; end + + # The identifier of the actual command handler. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/command.rb#27 + def command; end + + # Title of the command, like `save`. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/command.rb#19 + def title; end + + # source://language_server-protocol//lib/language_server/protocol/interface/command.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/command.rb#46 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::CompletionClientCapabilities + # @return [CompletionClientCapabilities] a new instance of CompletionClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), completion_item: T.unsafe(nil), completion_item_kind: T.unsafe(nil), context_support: T.unsafe(nil), insert_text_mode: T.unsafe(nil), completion_list: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#67 + def attributes; end + + # The client supports the following `CompletionItem` specific + # capabilities. + # + # @return [{ snippetSupport?: boolean; commitCharactersSupport?: boolean; documentationFormat?: MarkupKind[]; deprecatedSupport?: boolean; preselectSupport?: boolean; tagSupport?: { valueSet: 1[]; }; insertReplaceSupport?: boolean; resolveSupport?: { ...; }; insertTextModeSupport?: { ...; }; labelDetailsSupport?: boolean; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#31 + def completion_item; end + + # @return [{ valueSet?: CompletionItemKind[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#36 + def completion_item_kind; end + + # The client supports the following `CompletionList` specific + # capabilities. + # + # @return [{ itemDefaults?: string[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#63 + def completion_list; end + + # The client supports to send additional context information for a + # `textDocument/completion` request. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#45 + def context_support; end + + # Whether completion supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#22 + def dynamic_registration; end + + # The client's default when the completion item doesn't provide a + # `insertTextMode` property. + # + # @return [InsertTextMode] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#54 + def insert_text_mode; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#69 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#73 + def to_json(*args); end +end + +# Contains additional information about the context in which a completion +# request is triggered. +# +# source://language_server-protocol//lib/language_server/protocol/interface/completion_context.rb#8 +class LanguageServer::Protocol::Interface::CompletionContext + # @return [CompletionContext] a new instance of CompletionContext + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_context.rb#9 + def initialize(trigger_kind:, trigger_character: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_context.rb#36 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_context.rb#38 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_context.rb#42 + def to_json(*args); end + + # The trigger character (a single character) that has trigger code + # complete. Is undefined if + # `triggerKind !== CompletionTriggerKind.TriggerCharacter` + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_context.rb#32 + def trigger_character; end + + # How the completion was triggered. + # + # @return [CompletionTriggerKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_context.rb#22 + def trigger_kind; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#4 +class LanguageServer::Protocol::Interface::CompletionItem + # @return [CompletionItem] a new instance of CompletionItem + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#5 + def initialize(label:, label_details: T.unsafe(nil), kind: T.unsafe(nil), tags: T.unsafe(nil), detail: T.unsafe(nil), documentation: T.unsafe(nil), deprecated: T.unsafe(nil), preselect: T.unsafe(nil), sort_text: T.unsafe(nil), filter_text: T.unsafe(nil), insert_text: T.unsafe(nil), insert_text_format: T.unsafe(nil), insert_text_mode: T.unsafe(nil), text_edit: T.unsafe(nil), text_edit_text: T.unsafe(nil), additional_text_edits: T.unsafe(nil), commit_characters: T.unsafe(nil), command: T.unsafe(nil), data: T.unsafe(nil)); end + + # An optional array of additional text edits that are applied when + # selecting this completion. Edits must not overlap (including the same + # insert position) with the main edit nor with themselves. + # + # Additional text edits should be used to change text unrelated to the + # current cursor position (for example adding an import statement at the + # top of the file if the completion item will insert an unqualified type). + # + # @return [TextEdit[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#221 + def additional_text_edits; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#255 + def attributes; end + + # An optional command that is executed *after* inserting this completion. + # *Note* that additional modifications to the current document should be + # described with the additionalTextEdits-property. + # + # @return [Command] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#242 + def command; end + + # An optional set of characters that when pressed while this completion is + # active will accept it first and then type that character. *Note* that all + # commit characters should have `length=1` and that superfluous characters + # will be ignored. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#232 + def commit_characters; end + + # A data entry field that is preserved on a completion item between + # a completion and a completion resolve request. + # + # @return [LSPAny] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#251 + def data; end + + # Indicates if this item is deprecated. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#92 + def deprecated; end + + # A human-readable string with additional information + # about this item, like type or symbol information. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#76 + def detail; end + + # A human-readable string that represents a doc-comment. + # + # @return [string | MarkupContent] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#84 + def documentation; end + + # A string that should be used when filtering a set of + # completion items. When `falsy` the label is used as the + # filter text for this item. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#124 + def filter_text; end + + # A string that should be inserted into a document when selecting + # this completion. When `falsy` the label is used as the insert text + # for this item. + # + # The `insertText` is subject to interpretation by the client side. + # Some tools might not take the string literally. For example + # VS Code when code complete is requested in this example + # `con` and a completion item with an `insertText` of + # `console` is provided it will only insert `sole`. Therefore it is + # recommended to use `textEdit` instead since it avoids additional client + # side interpretation. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#142 + def insert_text; end + + # The format of the insert text. The format applies to both the + # `insertText` property and the `newText` property of a provided + # `textEdit`. If omitted defaults to `InsertTextFormat.PlainText`. + # + # Please note that the insertTextFormat doesn't apply to + # `additionalTextEdits`. + # + # @return [InsertTextFormat] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#155 + def insert_text_format; end + + # How whitespace and indentation is handled during completion + # item insertion. If not provided the client's default value depends on + # the `textDocument.completion.insertTextMode` client capability. + # + # @return [InsertTextMode] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#165 + def insert_text_mode; end + + # The kind of this completion item. Based of the kind + # an icon is chosen by the editor. The standardized set + # of available values is defined in `CompletionItemKind`. + # + # @return [CompletionItemKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#59 + def kind; end + + # The label of this completion item. + # + # The label property is also by default the text that + # is inserted when selecting this completion. + # + # If label details are provided the label itself should + # be an unqualified name of the completion item. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#41 + def label; end + + # Additional details for the label + # + # @return [CompletionItemLabelDetails] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#49 + def label_details; end + + # Select this item when showing. + # + # *Note* that only one completion item can be selected and that the + # tool / client decides which item that is. The rule is that the *first* + # item of those that match best is selected. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#104 + def preselect; end + + # A string that should be used when comparing this item + # with other items. When `falsy` the label is used + # as the sort text for this item. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#114 + def sort_text; end + + # Tags for this completion item. + # + # @return [1[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#67 + def tags; end + + # An edit which is applied to a document when selecting this completion. + # When an edit is provided the value of `insertText` is ignored. + # + # *Note:* The range of the edit must be a single line range and it must + # contain the position at which completion has been requested. + # + # Most editors support two different operations when accepting a completion + # item. One is to insert a completion text and the other is to replace an + # existing text with a completion text. Since this can usually not be + # predetermined by a server it can report both ranges. Clients need to + # signal support for `InsertReplaceEdit`s via the + # `textDocument.completion.completionItem.insertReplaceSupport` client + # capability property. + # + # *Note 1:* The text edit's range as well as both ranges from an insert + # replace edit must be a [single line] and they must contain the position + # at which completion has been requested. + # *Note 2:* If an `InsertReplaceEdit` is returned the edit's insert range + # must be a prefix of the edit's replace range, that means it must be + # contained and starting at the same position. + # + # @return [TextEdit | InsertReplaceEdit] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#192 + def text_edit; end + + # The edit text used if the completion item is part of a CompletionList and + # CompletionList defines an item default for the text edit range. + # + # Clients will only honor this property if they opt into completion list + # item defaults using the capability `completionList.itemDefaults`. + # + # If not provided and a list's default range is provided the label + # property is used as a text. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#207 + def text_edit_text; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#257 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#261 + def to_json(*args); end +end + +# Additional details for a completion item label. +# +# source://language_server-protocol//lib/language_server/protocol/interface/completion_item_label_details.rb#7 +class LanguageServer::Protocol::Interface::CompletionItemLabelDetails + # @return [CompletionItemLabelDetails] a new instance of CompletionItemLabelDetails + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item_label_details.rb#8 + def initialize(detail: T.unsafe(nil), description: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item_label_details.rb#37 + def attributes; end + + # An optional string which is rendered less prominently after + # {@link CompletionItemLabelDetails.detail}. Should be used for fully qualified + # names or file path. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item_label_details.rb#33 + def description; end + + # An optional string which is rendered less prominently directly after + # {@link CompletionItem.label label}, without any spacing. Should be + # used for function signatures or type annotations. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item_label_details.rb#23 + def detail; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item_label_details.rb#39 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item_label_details.rb#43 + def to_json(*args); end +end + +# Represents a collection of [completion items](#CompletionItem) to be +# presented in the editor. +# +# source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#8 +class LanguageServer::Protocol::Interface::CompletionList + # @return [CompletionList] a new instance of CompletionList + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#9 + def initialize(is_incomplete:, items:, item_defaults: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#57 + def attributes; end + + # This list is not complete. Further typing should result in recomputing + # this list. + # + # Recomputed lists have all their items replaced (not appended) in the + # incomplete completion sessions. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#27 + def is_incomplete; end + + # In many cases the items of an actual completion result share the same + # value for properties like `commitCharacters` or the range of a text + # edit. A completion list can therefore define item defaults which will + # be used if a completion item itself doesn't specify the value. + # + # If a completion list specifies a default value and a completion item + # also specifies a corresponding value the one from the item is used. + # + # Servers are only allowed to return default values if the client + # signals support for this via the `completionList.itemDefaults` + # capability. + # + # @return [{ commitCharacters?: string[]; editRange?: Range | { insert: Range; replace: Range; }; insertTextFormat?: InsertTextFormat; insertTextMode?: InsertTextMode; data?: LSPAny; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#45 + def item_defaults; end + + # The completion items. + # + # @return [CompletionItem[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#53 + def items; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#59 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#63 + def to_json(*args); end +end + +# Completion options. +# +# source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#7 +class LanguageServer::Protocol::Interface::CompletionOptions + # @return [CompletionOptions] a new instance of CompletionOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#8 + def initialize(work_done_progress: T.unsafe(nil), trigger_characters: T.unsafe(nil), all_commit_characters: T.unsafe(nil), resolve_provider: T.unsafe(nil), completion_item: T.unsafe(nil)); end + + # The list of all possible characters that commit a completion. This field + # can be used if clients don't support individual commit characters per + # completion item. See client capability + # `completion.completionItem.commitCharactersSupport`. + # + # If a server provides both `allCommitCharacters` and commit characters on + # an individual completion item the ones on the completion item win. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#53 + def all_commit_characters; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#75 + def attributes; end + + # The server supports the following `CompletionItem` specific + # capabilities. + # + # @return [{ labelDetailsSupport?: boolean; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#71 + def completion_item; end + + # The server provides support to resolve additional + # information for a completion item. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#62 + def resolve_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#77 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#81 + def to_json(*args); end + + # The additional characters, beyond the defaults provided by the client (typically + # [a-zA-Z]), that should automatically trigger a completion request. For example + # `.` in JavaScript represents the beginning of an object property or method and is + # thus a good candidate for triggering a completion request. + # + # Most tools trigger a completion request automatically without explicitly + # requesting it using a keyboard shortcut (e.g. Ctrl+Space). Typically they + # do so when the user starts to type an identifier. For example if the user + # types `c` in a JavaScript file code complete will automatically pop up + # present `console` besides others as a completion item. Characters that + # make up identifiers don't need to be listed here. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#39 + def trigger_characters; end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#21 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#4 +class LanguageServer::Protocol::Interface::CompletionParams + # @return [CompletionParams] a new instance of CompletionParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil), context: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#60 + def attributes; end + + # The completion context. This is only available if the client specifies + # to send this using the client capability + # `completion.contextSupport === true` + # + # @return [CompletionContext] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#56 + def context; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#46 + def partial_result_token; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#29 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#21 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#62 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#66 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#37 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#4 +class LanguageServer::Protocol::Interface::CompletionRegistrationOptions + # @return [CompletionRegistrationOptions] a new instance of CompletionRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), trigger_characters: T.unsafe(nil), all_commit_characters: T.unsafe(nil), resolve_provider: T.unsafe(nil), completion_item: T.unsafe(nil)); end + + # The list of all possible characters that commit a completion. This field + # can be used if clients don't support individual commit characters per + # completion item. See client capability + # `completion.completionItem.commitCharactersSupport`. + # + # If a server provides both `allCommitCharacters` and commit characters on + # an individual completion item the ones on the completion item win. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#60 + def all_commit_characters; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#82 + def attributes; end + + # The server supports the following `CompletionItem` specific + # capabilities. + # + # @return [{ labelDetailsSupport?: boolean; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#78 + def completion_item; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#23 + def document_selector; end + + # The server provides support to resolve additional + # information for a completion item. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#69 + def resolve_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#84 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#88 + def to_json(*args); end + + # The additional characters, beyond the defaults provided by the client (typically + # [a-zA-Z]), that should automatically trigger a completion request. For example + # `.` in JavaScript represents the beginning of an object property or method and is + # thus a good candidate for triggering a completion request. + # + # Most tools trigger a completion request automatically without explicitly + # requesting it using a keyboard shortcut (e.g. Ctrl+Space). Typically they + # do so when the user starts to type an identifier. For example if the user + # types `c` in a JavaScript file code complete will automatically pop up + # present `console` besides others as a completion item. Characters that + # make up identifiers don't need to be listed here. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#46 + def trigger_characters; end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#28 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/configuration_item.rb#4 +class LanguageServer::Protocol::Interface::ConfigurationItem + # @return [ConfigurationItem] a new instance of ConfigurationItem + # + # source://language_server-protocol//lib/language_server/protocol/interface/configuration_item.rb#5 + def initialize(scope_uri: T.unsafe(nil), section: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/configuration_item.rb#30 + def attributes; end + + # The scope to get the configuration section for. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/configuration_item.rb#18 + def scope_uri; end + + # The configuration section asked for. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/configuration_item.rb#26 + def section; end + + # source://language_server-protocol//lib/language_server/protocol/interface/configuration_item.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/configuration_item.rb#36 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/configuration_params.rb#4 +class LanguageServer::Protocol::Interface::ConfigurationParams + # @return [ConfigurationParams] a new instance of ConfigurationParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/configuration_params.rb#5 + def initialize(items:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/configuration_params.rb#18 + def attributes; end + + # @return [ConfigurationItem[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/configuration_params.rb#14 + def items; end + + # source://language_server-protocol//lib/language_server/protocol/interface/configuration_params.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/configuration_params.rb#24 + def to_json(*args); end +end + +# Create file operation +# +# source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#7 +class LanguageServer::Protocol::Interface::CreateFile + # @return [CreateFile] a new instance of CreateFile + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#8 + def initialize(kind:, uri:, options: T.unsafe(nil), annotation_id: T.unsafe(nil)); end + + # An optional annotation identifier describing the operation. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#47 + def annotation_id; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#51 + def attributes; end + + # A create + # + # @return ["create"] + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#23 + def kind; end + + # Additional options + # + # @return [CreateFileOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#39 + def options; end + + # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#53 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#57 + def to_json(*args); end + + # The resource to create. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#31 + def uri; end +end + +# Options to create a file. +# +# source://language_server-protocol//lib/language_server/protocol/interface/create_file_options.rb#7 +class LanguageServer::Protocol::Interface::CreateFileOptions + # @return [CreateFileOptions] a new instance of CreateFileOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_file_options.rb#8 + def initialize(overwrite: T.unsafe(nil), ignore_if_exists: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_file_options.rb#33 + def attributes; end + + # Ignore if exists. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_file_options.rb#29 + def ignore_if_exists; end + + # Overwrite existing file. Overwrite wins over `ignoreIfExists` + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_file_options.rb#21 + def overwrite; end + + # source://language_server-protocol//lib/language_server/protocol/interface/create_file_options.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/create_file_options.rb#39 + def to_json(*args); end +end + +# The parameters sent in notifications/requests for user-initiated creation +# of files. +# +# source://language_server-protocol//lib/language_server/protocol/interface/create_files_params.rb#8 +class LanguageServer::Protocol::Interface::CreateFilesParams + # @return [CreateFilesParams] a new instance of CreateFilesParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_files_params.rb#9 + def initialize(files:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_files_params.rb#25 + def attributes; end + + # An array of all files/folders created in this operation. + # + # @return [FileCreate[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_files_params.rb#21 + def files; end + + # source://language_server-protocol//lib/language_server/protocol/interface/create_files_params.rb#27 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/create_files_params.rb#31 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/declaration_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::DeclarationClientCapabilities + # @return [DeclarationClientCapabilities] a new instance of DeclarationClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), link_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_client_capabilities.rb#32 + def attributes; end + + # Whether declaration supports dynamic registration. If this is set to + # `true` the client supports the new `DeclarationRegistrationOptions` + # return value for the corresponding server capability as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_client_capabilities.rb#20 + def dynamic_registration; end + + # The client supports additional metadata in the form of declaration links. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_client_capabilities.rb#28 + def link_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_client_capabilities.rb#34 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_client_capabilities.rb#38 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/declaration_options.rb#4 +class LanguageServer::Protocol::Interface::DeclarationOptions + # @return [DeclarationOptions] a new instance of DeclarationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#4 +class LanguageServer::Protocol::Interface::DeclarationParams + # @return [DeclarationParams] a new instance of DeclarationParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#49 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#45 + def partial_result_token; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#28 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#20 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#51 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#55 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#36 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#4 +class LanguageServer::Protocol::Interface::DeclarationRegistrationOptions + # @return [DeclarationRegistrationOptions] a new instance of DeclarationRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#38 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#25 + def document_selector; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#34 + def id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#40 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#44 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#16 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/definition_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::DefinitionClientCapabilities + # @return [DefinitionClientCapabilities] a new instance of DefinitionClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), link_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_client_capabilities.rb#30 + def attributes; end + + # Whether definition supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_client_capabilities.rb#18 + def dynamic_registration; end + + # The client supports additional metadata in the form of definition links. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_client_capabilities.rb#26 + def link_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/definition_client_capabilities.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/definition_client_capabilities.rb#36 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/definition_options.rb#4 +class LanguageServer::Protocol::Interface::DefinitionOptions + # @return [DefinitionOptions] a new instance of DefinitionOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/definition_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/definition_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#4 +class LanguageServer::Protocol::Interface::DefinitionParams + # @return [DefinitionParams] a new instance of DefinitionParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#49 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#45 + def partial_result_token; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#28 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#20 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#51 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#55 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#36 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/definition_registration_options.rb#4 +class LanguageServer::Protocol::Interface::DefinitionRegistrationOptions + # @return [DefinitionRegistrationOptions] a new instance of DefinitionRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_registration_options.rb#28 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_registration_options.rb#19 + def document_selector; end + + # source://language_server-protocol//lib/language_server/protocol/interface/definition_registration_options.rb#30 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/definition_registration_options.rb#34 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_registration_options.rb#24 + def work_done_progress; end +end + +# Delete file operation +# +# source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#7 +class LanguageServer::Protocol::Interface::DeleteFile + # @return [DeleteFile] a new instance of DeleteFile + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#8 + def initialize(kind:, uri:, options: T.unsafe(nil), annotation_id: T.unsafe(nil)); end + + # An optional annotation identifier describing the operation. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#47 + def annotation_id; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#51 + def attributes; end + + # A delete + # + # @return ["delete"] + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#23 + def kind; end + + # Delete options. + # + # @return [DeleteFileOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#39 + def options; end + + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#53 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#57 + def to_json(*args); end + + # The file to delete. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#31 + def uri; end +end + +# Delete file options +# +# source://language_server-protocol//lib/language_server/protocol/interface/delete_file_options.rb#7 +class LanguageServer::Protocol::Interface::DeleteFileOptions + # @return [DeleteFileOptions] a new instance of DeleteFileOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file_options.rb#8 + def initialize(recursive: T.unsafe(nil), ignore_if_not_exists: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file_options.rb#33 + def attributes; end + + # Ignore the operation if the file doesn't exist. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file_options.rb#29 + def ignore_if_not_exists; end + + # Delete the content recursively if a folder is denoted. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file_options.rb#21 + def recursive; end + + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file_options.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file_options.rb#39 + def to_json(*args); end +end + +# The parameters sent in notifications/requests for user-initiated deletes +# of files. +# +# source://language_server-protocol//lib/language_server/protocol/interface/delete_files_params.rb#8 +class LanguageServer::Protocol::Interface::DeleteFilesParams + # @return [DeleteFilesParams] a new instance of DeleteFilesParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_files_params.rb#9 + def initialize(files:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_files_params.rb#25 + def attributes; end + + # An array of all files/folders deleted in this operation. + # + # @return [FileDelete[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_files_params.rb#21 + def files; end + + # source://language_server-protocol//lib/language_server/protocol/interface/delete_files_params.rb#27 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/delete_files_params.rb#31 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#4 +class LanguageServer::Protocol::Interface::Diagnostic + # @return [Diagnostic] a new instance of Diagnostic + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#5 + def initialize(range:, message:, severity: T.unsafe(nil), code: T.unsafe(nil), code_description: T.unsafe(nil), source: T.unsafe(nil), tags: T.unsafe(nil), related_information: T.unsafe(nil), data: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#98 + def attributes; end + + # The diagnostic's code, which might appear in the user interface. + # + # @return [string | number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#42 + def code; end + + # An optional property to describe the error code. + # + # @return [CodeDescription] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#50 + def code_description; end + + # A data entry field that is preserved between a + # `textDocument/publishDiagnostics` notification and + # `textDocument/codeAction` request. + # + # @return [unknown] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#94 + def data; end + + # The diagnostic's message. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#67 + def message; end + + # The range at which the message applies. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#25 + def range; end + + # An array of related diagnostic information, e.g. when symbol-names within + # a scope collide all definitions can be marked via this property. + # + # @return [DiagnosticRelatedInformation[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#84 + def related_information; end + + # The diagnostic's severity. Can be omitted. If omitted it is up to the + # client to interpret diagnostics as error, warning, info or hint. + # + # @return [DiagnosticSeverity] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#34 + def severity; end + + # A human-readable string describing the source of this + # diagnostic, e.g. 'typescript' or 'super lint'. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#59 + def source; end + + # Additional metadata about the diagnostic. + # + # @return [DiagnosticTag[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#75 + def tags; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#100 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#104 + def to_json(*args); end +end + +# Client capabilities specific to diagnostic pull requests. +# +# source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_client_capabilities.rb#7 +class LanguageServer::Protocol::Interface::DiagnosticClientCapabilities + # @return [DiagnosticClientCapabilities] a new instance of DiagnosticClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_client_capabilities.rb#8 + def initialize(dynamic_registration: T.unsafe(nil), related_document_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_client_capabilities.rb#37 + def attributes; end + + # Whether implementation supports dynamic registration. If this is set to + # `true` the client supports the new + # `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` + # return value for the corresponding server capability as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_client_capabilities.rb#24 + def dynamic_registration; end + + # Whether the clients supports related documents for document diagnostic + # pulls. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_client_capabilities.rb#33 + def related_document_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_client_capabilities.rb#39 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_client_capabilities.rb#43 + def to_json(*args); end +end + +# Diagnostic options. +# +# source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#7 +class LanguageServer::Protocol::Interface::DiagnosticOptions + # @return [DiagnosticOptions] a new instance of DiagnosticOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#8 + def initialize(inter_file_dependencies:, workspace_diagnostics:, work_done_progress: T.unsafe(nil), identifier: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#52 + def attributes; end + + # An optional identifier under which the diagnostics are + # managed by the client. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#29 + def identifier; end + + # Whether the language has inter file dependencies meaning that + # editing code in one file can result in a different diagnostic + # set in another file. Inter file dependencies are common for + # most programming languages and typically uncommon for linters. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#40 + def inter_file_dependencies; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#54 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#58 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#20 + def work_done_progress; end + + # The server provides support for workspace diagnostics as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#48 + def workspace_diagnostics; end +end + +# Diagnostic registration options. +# +# source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#7 +class LanguageServer::Protocol::Interface::DiagnosticRegistrationOptions + # @return [DiagnosticRegistrationOptions] a new instance of DiagnosticRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#8 + def initialize(document_selector:, inter_file_dependencies:, workspace_diagnostics:, work_done_progress: T.unsafe(nil), identifier: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#72 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#26 + def document_selector; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#68 + def id; end + + # An optional identifier under which the diagnostics are + # managed by the client. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#40 + def identifier; end + + # Whether the language has inter file dependencies meaning that + # editing code in one file can result in a different diagnostic + # set in another file. Inter file dependencies are common for + # most programming languages and typically uncommon for linters. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#51 + def inter_file_dependencies; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#74 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#78 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#31 + def work_done_progress; end + + # The server provides support for workspace diagnostics as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#59 + def workspace_diagnostics; end +end + +# Represents a related message and source code location for a diagnostic. +# This should be used to point to code locations that cause or are related to +# a diagnostics, e.g when duplicating a symbol in a scope. +# +# source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_related_information.rb#9 +class LanguageServer::Protocol::Interface::DiagnosticRelatedInformation + # @return [DiagnosticRelatedInformation] a new instance of DiagnosticRelatedInformation + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_related_information.rb#10 + def initialize(location:, message:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_related_information.rb#35 + def attributes; end + + # The location of this related diagnostic information. + # + # @return [Location] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_related_information.rb#23 + def location; end + + # The message of this related diagnostic information. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_related_information.rb#31 + def message; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_related_information.rb#37 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_related_information.rb#41 + def to_json(*args); end +end + +# Cancellation data returned from a diagnostic request. +# +# source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_server_cancellation_data.rb#7 +class LanguageServer::Protocol::Interface::DiagnosticServerCancellationData + # @return [DiagnosticServerCancellationData] a new instance of DiagnosticServerCancellationData + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_server_cancellation_data.rb#8 + def initialize(retrigger_request:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_server_cancellation_data.rb#21 + def attributes; end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_server_cancellation_data.rb#17 + def retrigger_request; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_server_cancellation_data.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_server_cancellation_data.rb#27 + def to_json(*args); end +end + +# Workspace client capabilities specific to diagnostic pull requests. +# +# source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_workspace_client_capabilities.rb#7 +class LanguageServer::Protocol::Interface::DiagnosticWorkspaceClientCapabilities + # @return [DiagnosticWorkspaceClientCapabilities] a new instance of DiagnosticWorkspaceClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_workspace_client_capabilities.rb#8 + def initialize(refresh_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_workspace_client_capabilities.rb#30 + def attributes; end + + # Whether the client implementation supports a refresh request sent from + # the server to the client. + # + # Note that this event is global and will force the client to refresh all + # pulled diagnostics currently shown. It should be used with absolute care + # and is useful for situation where a server for example detects a project + # wide change that requires such a calculation. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_workspace_client_capabilities.rb#26 + def refresh_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_workspace_client_capabilities.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_workspace_client_capabilities.rb#36 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::DidChangeConfigurationClientCapabilities + # @return [DidChangeConfigurationClientCapabilities] a new instance of DidChangeConfigurationClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_client_capabilities.rb#21 + def attributes; end + + # Did change configuration notification supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_client_capabilities.rb#17 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_client_capabilities.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_client_capabilities.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_params.rb#4 +class LanguageServer::Protocol::Interface::DidChangeConfigurationParams + # @return [DidChangeConfigurationParams] a new instance of DidChangeConfigurationParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_params.rb#5 + def initialize(settings:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_params.rb#21 + def attributes; end + + # The actual changed settings + # + # @return [LSPAny] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_params.rb#17 + def settings; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_params.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_params.rb#27 + def to_json(*args); end +end + +# The params sent in a change notebook document notification. +# +# source://language_server-protocol//lib/language_server/protocol/interface/did_change_notebook_document_params.rb#7 +class LanguageServer::Protocol::Interface::DidChangeNotebookDocumentParams + # @return [DidChangeNotebookDocumentParams] a new instance of DidChangeNotebookDocumentParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_notebook_document_params.rb#8 + def initialize(notebook_document:, change:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_notebook_document_params.rb#44 + def attributes; end + + # The actual changes to the notebook document. + # + # The change describes single state change to the notebook document. + # So it moves a notebook document, its cells and its cell text document + # contents from state S to S'. + # + # To mirror the content of a notebook using change events use the + # following approach: + # - start with the same initial content + # - apply the 'notebookDocument/didChange' notifications in the order + # you receive them. + # + # @return [NotebookDocumentChangeEvent] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_notebook_document_params.rb#40 + def change; end + + # The notebook document that did change. The version number points + # to the version after all provided changes have been applied. + # + # @return [VersionedNotebookDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_notebook_document_params.rb#22 + def notebook_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_notebook_document_params.rb#46 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_notebook_document_params.rb#50 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/did_change_text_document_params.rb#4 +class LanguageServer::Protocol::Interface::DidChangeTextDocumentParams + # @return [DidChangeTextDocumentParams] a new instance of DidChangeTextDocumentParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_text_document_params.rb#5 + def initialize(text_document:, content_changes:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_text_document_params.rb#44 + def attributes; end + + # The actual content changes. The content changes describe single state + # changes to the document. So if there are two content changes c1 (at + # array index 0) and c2 (at array index 1) for a document in state S then + # c1 moves the document from S to S' and c2 from S' to S''. So c1 is + # computed on the state S and c2 is computed on the state S'. + # + # To mirror the content of a document using change events use the following + # approach: + # - start with the same initial content + # - apply the 'textDocument/didChange' notifications in the order you + # receive them. + # - apply the `TextDocumentContentChangeEvent`s in a single notification + # in the order you receive them. + # + # @return [TextDocumentContentChangeEvent[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_text_document_params.rb#40 + def content_changes; end + + # The document that did change. The version number points + # to the version after all provided content changes have + # been applied. + # + # @return [VersionedTextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_text_document_params.rb#20 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_text_document_params.rb#46 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_text_document_params.rb#50 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::DidChangeWatchedFilesClientCapabilities + # @return [DidChangeWatchedFilesClientCapabilities] a new instance of DidChangeWatchedFilesClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), relative_pattern_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb#33 + def attributes; end + + # Did change watched files notification supports dynamic registration. + # Please note that the current protocol doesn't support static + # configuration for file changes from the server side. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb#20 + def dynamic_registration; end + + # Whether the client has support for relative patterns + # or not. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb#29 + def relative_pattern_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb#39 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_params.rb#4 +class LanguageServer::Protocol::Interface::DidChangeWatchedFilesParams + # @return [DidChangeWatchedFilesParams] a new instance of DidChangeWatchedFilesParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_params.rb#5 + def initialize(changes:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_params.rb#21 + def attributes; end + + # The actual file events. + # + # @return [FileEvent[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_params.rb#17 + def changes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_params.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_params.rb#27 + def to_json(*args); end +end + +# Describe options to be used when registering for file system change events. +# +# source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb#7 +class LanguageServer::Protocol::Interface::DidChangeWatchedFilesRegistrationOptions + # @return [DidChangeWatchedFilesRegistrationOptions] a new instance of DidChangeWatchedFilesRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb#8 + def initialize(watchers:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb#24 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb#30 + def to_json(*args); end + + # The watchers to register. + # + # @return [FileSystemWatcher[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb#20 + def watchers; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/did_change_workspace_folders_params.rb#4 +class LanguageServer::Protocol::Interface::DidChangeWorkspaceFoldersParams + # @return [DidChangeWorkspaceFoldersParams] a new instance of DidChangeWorkspaceFoldersParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_workspace_folders_params.rb#5 + def initialize(event:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_workspace_folders_params.rb#21 + def attributes; end + + # The actual workspace folder change event. + # + # @return [WorkspaceFoldersChangeEvent] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_workspace_folders_params.rb#17 + def event; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_workspace_folders_params.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_workspace_folders_params.rb#27 + def to_json(*args); end +end + +# The params sent in a close notebook document notification. +# +# source://language_server-protocol//lib/language_server/protocol/interface/did_close_notebook_document_params.rb#7 +class LanguageServer::Protocol::Interface::DidCloseNotebookDocumentParams + # @return [DidCloseNotebookDocumentParams] a new instance of DidCloseNotebookDocumentParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_close_notebook_document_params.rb#8 + def initialize(notebook_document:, cell_text_documents:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_close_notebook_document_params.rb#34 + def attributes; end + + # The text documents that represent the content + # of a notebook cell that got closed. + # + # @return [TextDocumentIdentifier[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_close_notebook_document_params.rb#30 + def cell_text_documents; end + + # The notebook document that got closed. + # + # @return [NotebookDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_close_notebook_document_params.rb#21 + def notebook_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_close_notebook_document_params.rb#36 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_close_notebook_document_params.rb#40 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/did_close_text_document_params.rb#4 +class LanguageServer::Protocol::Interface::DidCloseTextDocumentParams + # @return [DidCloseTextDocumentParams] a new instance of DidCloseTextDocumentParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_close_text_document_params.rb#5 + def initialize(text_document:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_close_text_document_params.rb#21 + def attributes; end + + # The document that was closed. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_close_text_document_params.rb#17 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_close_text_document_params.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_close_text_document_params.rb#27 + def to_json(*args); end +end + +# The params sent in an open notebook document notification. +# +# source://language_server-protocol//lib/language_server/protocol/interface/did_open_notebook_document_params.rb#7 +class LanguageServer::Protocol::Interface::DidOpenNotebookDocumentParams + # @return [DidOpenNotebookDocumentParams] a new instance of DidOpenNotebookDocumentParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_open_notebook_document_params.rb#8 + def initialize(notebook_document:, cell_text_documents:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_open_notebook_document_params.rb#34 + def attributes; end + + # The text documents that represent the content + # of a notebook cell. + # + # @return [TextDocumentItem[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_open_notebook_document_params.rb#30 + def cell_text_documents; end + + # The notebook document that got opened. + # + # @return [NotebookDocument] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_open_notebook_document_params.rb#21 + def notebook_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_open_notebook_document_params.rb#36 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_open_notebook_document_params.rb#40 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/did_open_text_document_params.rb#4 +class LanguageServer::Protocol::Interface::DidOpenTextDocumentParams + # @return [DidOpenTextDocumentParams] a new instance of DidOpenTextDocumentParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_open_text_document_params.rb#5 + def initialize(text_document:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_open_text_document_params.rb#21 + def attributes; end + + # The document that was opened. + # + # @return [TextDocumentItem] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_open_text_document_params.rb#17 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_open_text_document_params.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_open_text_document_params.rb#27 + def to_json(*args); end +end + +# The params sent in a save notebook document notification. +# +# source://language_server-protocol//lib/language_server/protocol/interface/did_save_notebook_document_params.rb#7 +class LanguageServer::Protocol::Interface::DidSaveNotebookDocumentParams + # @return [DidSaveNotebookDocumentParams] a new instance of DidSaveNotebookDocumentParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_save_notebook_document_params.rb#8 + def initialize(notebook_document:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_save_notebook_document_params.rb#24 + def attributes; end + + # The notebook document that got saved. + # + # @return [NotebookDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_save_notebook_document_params.rb#20 + def notebook_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_save_notebook_document_params.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_save_notebook_document_params.rb#30 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/did_save_text_document_params.rb#4 +class LanguageServer::Protocol::Interface::DidSaveTextDocumentParams + # @return [DidSaveTextDocumentParams] a new instance of DidSaveTextDocumentParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_save_text_document_params.rb#5 + def initialize(text_document:, text: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_save_text_document_params.rb#31 + def attributes; end + + # Optional the content when saved. Depends on the includeText value + # when the save notification was requested. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_save_text_document_params.rb#27 + def text; end + + # The document that was saved. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_save_text_document_params.rb#18 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_save_text_document_params.rb#33 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_save_text_document_params.rb#37 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_color_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::DocumentColorClientCapabilities + # @return [DocumentColorClientCapabilities] a new instance of DocumentColorClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_client_capabilities.rb#21 + def attributes; end + + # Whether document color supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_client_capabilities.rb#17 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_client_capabilities.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_client_capabilities.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_color_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentColorOptions + # @return [DocumentColorOptions] a new instance of DocumentColorOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#4 +class LanguageServer::Protocol::Interface::DocumentColorParams + # @return [DocumentColorParams] a new instance of DocumentColorParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#5 + def initialize(text_document:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#40 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#28 + def partial_result_token; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#36 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#46 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#19 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentColorRegistrationOptions + # @return [DocumentColorRegistrationOptions] a new instance of DocumentColorRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#5 + def initialize(document_selector:, id: T.unsafe(nil), work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#38 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#20 + def document_selector; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#29 + def id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#40 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#44 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#34 + def work_done_progress; end +end + +# Parameters of the document diagnostic request. +# +# source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#7 +class LanguageServer::Protocol::Interface::DocumentDiagnosticParams + # @return [DocumentDiagnosticParams] a new instance of DocumentDiagnosticParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#8 + def initialize(text_document:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil), identifier: T.unsafe(nil), previous_result_id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#61 + def attributes; end + + # The additional identifier provided during registration. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#49 + def identifier; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#33 + def partial_result_token; end + + # The result id of a previous response if provided. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#57 + def previous_result_id; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#41 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#63 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#67 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#24 + def work_done_token; end +end + +# A partial result for a document diagnostic report. +# +# source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_report_partial_result.rb#7 +class LanguageServer::Protocol::Interface::DocumentDiagnosticReportPartialResult + # @return [DocumentDiagnosticReportPartialResult] a new instance of DocumentDiagnosticReportPartialResult + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_report_partial_result.rb#8 + def initialize(related_documents:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_report_partial_result.rb#21 + def attributes; end + + # @return [{ [uri: string]: FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_report_partial_result.rb#17 + def related_documents; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_report_partial_result.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_report_partial_result.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#4 +class LanguageServer::Protocol::Interface::DocumentFilter + # @return [DocumentFilter] a new instance of DocumentFilter + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#5 + def initialize(language: T.unsafe(nil), scheme: T.unsafe(nil), pattern: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#51 + def attributes; end + + # A language id, like `typescript`. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#19 + def language; end + + # A glob pattern, like `*.{ts,js}`. + # + # Glob patterns can have the following syntax: + # - `*` to match one or more characters in a path segment + # - `?` to match on one character in a path segment + # - `**` to match any number of path segments, including none + # - `{}` to group sub patterns into an OR expression. (e.g. `**​/*.{ts,js}` + # matches all TypeScript and JavaScript files) + # - `[]` to declare a range of characters to match in a path segment + # (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …) + # - `[!...]` to negate a range of characters to match in a path segment + # (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but + # not `example.0`) + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#47 + def pattern; end + + # A Uri [scheme](#Uri.scheme), like `file` or `untitled`. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#27 + def scheme; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#53 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#57 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::DocumentFormattingClientCapabilities + # @return [DocumentFormattingClientCapabilities] a new instance of DocumentFormattingClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_client_capabilities.rb#21 + def attributes; end + + # Whether formatting supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_client_capabilities.rb#17 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_client_capabilities.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_client_capabilities.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentFormattingOptions + # @return [DocumentFormattingOptions] a new instance of DocumentFormattingOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#4 +class LanguageServer::Protocol::Interface::DocumentFormattingParams + # @return [DocumentFormattingParams] a new instance of DocumentFormattingParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#5 + def initialize(text_document:, options:, work_done_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#39 + def attributes; end + + # The format options. + # + # @return [FormattingOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#35 + def options; end + + # The document to format. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#27 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#41 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#45 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#19 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_registration_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentFormattingRegistrationOptions + # @return [DocumentFormattingRegistrationOptions] a new instance of DocumentFormattingRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_registration_options.rb#28 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_registration_options.rb#19 + def document_selector; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_registration_options.rb#30 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_registration_options.rb#34 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_registration_options.rb#24 + def work_done_progress; end +end + +# A document highlight is a range inside a text document which deserves +# special attention. Usually a document highlight is visualized by changing +# the background color of its range. +# +# source://language_server-protocol//lib/language_server/protocol/interface/document_highlight.rb#9 +class LanguageServer::Protocol::Interface::DocumentHighlight + # @return [DocumentHighlight] a new instance of DocumentHighlight + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight.rb#10 + def initialize(range:, kind: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight.rb#35 + def attributes; end + + # The highlight kind, default is DocumentHighlightKind.Text. + # + # @return [DocumentHighlightKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight.rb#31 + def kind; end + + # The range this highlight applies to. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight.rb#23 + def range; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight.rb#37 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight.rb#41 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::DocumentHighlightClientCapabilities + # @return [DocumentHighlightClientCapabilities] a new instance of DocumentHighlightClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_client_capabilities.rb#21 + def attributes; end + + # Whether document highlight supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_client_capabilities.rb#17 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_client_capabilities.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_client_capabilities.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentHighlightOptions + # @return [DocumentHighlightOptions] a new instance of DocumentHighlightOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#4 +class LanguageServer::Protocol::Interface::DocumentHighlightParams + # @return [DocumentHighlightParams] a new instance of DocumentHighlightParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#49 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#45 + def partial_result_token; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#28 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#20 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#51 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#55 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#36 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_registration_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentHighlightRegistrationOptions + # @return [DocumentHighlightRegistrationOptions] a new instance of DocumentHighlightRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_registration_options.rb#28 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_registration_options.rb#19 + def document_selector; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_registration_options.rb#30 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_registration_options.rb#34 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_registration_options.rb#24 + def work_done_progress; end +end + +# A document link is a range in a text document that links to an internal or +# external resource, like another text document or a web site. +# +# source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#8 +class LanguageServer::Protocol::Interface::DocumentLink + # @return [DocumentLink] a new instance of DocumentLink + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#9 + def initialize(range:, target: T.unsafe(nil), tooltip: T.unsafe(nil), data: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#58 + def attributes; end + + # A data entry field that is preserved on a document link between a + # DocumentLinkRequest and a DocumentLinkResolveRequest. + # + # @return [LSPAny] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#54 + def data; end + + # The range this link applies to. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#24 + def range; end + + # The uri this link points to. If missing a resolve request is sent later. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#32 + def target; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#60 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#64 + def to_json(*args); end + + # The tooltip text when you hover over this link. + # + # If a tooltip is provided, is will be displayed in a string that includes + # instructions on how to trigger the link, such as `{0} (ctrl + click)`. + # The specific instructions vary depending on OS, user settings, and + # localization. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#45 + def tooltip; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_link_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::DocumentLinkClientCapabilities + # @return [DocumentLinkClientCapabilities] a new instance of DocumentLinkClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), tooltip_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_client_capabilities.rb#30 + def attributes; end + + # Whether document link supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_client_capabilities.rb#18 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_client_capabilities.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_client_capabilities.rb#36 + def to_json(*args); end + + # Whether the client supports the `tooltip` property on `DocumentLink`. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_client_capabilities.rb#26 + def tooltip_support; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_link_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentLinkOptions + # @return [DocumentLinkOptions] a new instance of DocumentLinkOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_options.rb#27 + def attributes; end + + # Document links have a resolve provider as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_options.rb#23 + def resolve_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_options.rb#29 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_options.rb#33 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_options.rb#15 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#4 +class LanguageServer::Protocol::Interface::DocumentLinkParams + # @return [DocumentLinkParams] a new instance of DocumentLinkParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#5 + def initialize(text_document:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#40 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#28 + def partial_result_token; end + + # The document to provide document links for. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#36 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#46 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#19 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentLinkRegistrationOptions + # @return [DocumentLinkRegistrationOptions] a new instance of DocumentLinkRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#37 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#20 + def document_selector; end + + # Document links have a resolve provider as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#33 + def resolve_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#39 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#43 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#25 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::DocumentOnTypeFormattingClientCapabilities + # @return [DocumentOnTypeFormattingClientCapabilities] a new instance of DocumentOnTypeFormattingClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_client_capabilities.rb#21 + def attributes; end + + # Whether on type formatting supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_client_capabilities.rb#17 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_client_capabilities.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_client_capabilities.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentOnTypeFormattingOptions + # @return [DocumentOnTypeFormattingOptions] a new instance of DocumentOnTypeFormattingOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_options.rb#5 + def initialize(first_trigger_character:, more_trigger_character: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_options.rb#30 + def attributes; end + + # A character on which formatting should be triggered, like `{`. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_options.rb#18 + def first_trigger_character; end + + # More trigger characters. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_options.rb#26 + def more_trigger_character; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_options.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_options.rb#36 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#4 +class LanguageServer::Protocol::Interface::DocumentOnTypeFormattingParams + # @return [DocumentOnTypeFormattingParams] a new instance of DocumentOnTypeFormattingParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#5 + def initialize(text_document:, position:, ch:, options:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#53 + def attributes; end + + # The character that has been typed that triggered the formatting + # on type request. That is not necessarily the last character that + # got inserted into the document since the client could auto insert + # characters as well (e.g. like automatic brace completion). + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#41 + def ch; end + + # The formatting options. + # + # @return [FormattingOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#49 + def options; end + + # The position around which the on type formatting should happen. + # This is not necessarily the exact position where the character denoted + # by the property `ch` got typed. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#30 + def position; end + + # The document to format. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#20 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#55 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#59 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentOnTypeFormattingRegistrationOptions + # @return [DocumentOnTypeFormattingRegistrationOptions] a new instance of DocumentOnTypeFormattingRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#5 + def initialize(document_selector:, first_trigger_character:, more_trigger_character: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#40 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#20 + def document_selector; end + + # A character on which formatting should be triggered, like `{`. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#28 + def first_trigger_character; end + + # More trigger characters. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#36 + def more_trigger_character; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#46 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::DocumentRangeFormattingClientCapabilities + # @return [DocumentRangeFormattingClientCapabilities] a new instance of DocumentRangeFormattingClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_client_capabilities.rb#21 + def attributes; end + + # Whether formatting supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_client_capabilities.rb#17 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_client_capabilities.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_client_capabilities.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentRangeFormattingOptions + # @return [DocumentRangeFormattingOptions] a new instance of DocumentRangeFormattingOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#4 +class LanguageServer::Protocol::Interface::DocumentRangeFormattingParams + # @return [DocumentRangeFormattingParams] a new instance of DocumentRangeFormattingParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#5 + def initialize(text_document:, range:, options:, work_done_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#48 + def attributes; end + + # The format options + # + # @return [FormattingOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#44 + def options; end + + # The range to format + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#36 + def range; end + + # The document to format. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#28 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#50 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#54 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#20 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_registration_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentRangeFormattingRegistrationOptions + # @return [DocumentRangeFormattingRegistrationOptions] a new instance of DocumentRangeFormattingRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_registration_options.rb#28 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_registration_options.rb#19 + def document_selector; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_registration_options.rb#30 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_registration_options.rb#34 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_registration_options.rb#24 + def work_done_progress; end +end + +# Represents programming constructs like variables, classes, interfaces etc. +# that appear in a document. Document symbols can be hierarchical and they +# have two ranges: one that encloses its definition and one that points to its +# most interesting range, e.g. the range of an identifier. +# +# source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#10 +class LanguageServer::Protocol::Interface::DocumentSymbol + # @return [DocumentSymbol] a new instance of DocumentSymbol + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#11 + def initialize(name:, kind:, range:, selection_range:, detail: T.unsafe(nil), tags: T.unsafe(nil), deprecated: T.unsafe(nil), children: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#96 + def attributes; end + + # Children of this symbol, e.g. properties of a class. + # + # @return [DocumentSymbol[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#92 + def children; end + + # Indicates if this symbol is deprecated. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#64 + def deprecated; end + + # More detail for this symbol, e.g the signature of a function. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#40 + def detail; end + + # The kind of this symbol. + # + # @return [SymbolKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#48 + def kind; end + + # The name of this symbol. Will be displayed in the user interface and + # therefore must not be an empty string or a string only consisting of + # white spaces. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#32 + def name; end + + # The range enclosing this symbol not including leading/trailing whitespace + # but everything else like comments. This information is typically used to + # determine if the clients cursor is inside the symbol to reveal in the + # symbol in the UI. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#75 + def range; end + + # The range that should be selected and revealed when this symbol is being + # picked, e.g. the name of a function. Must be contained by the `range`. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#84 + def selection_range; end + + # Tags for this document symbol. + # + # @return [1[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#56 + def tags; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#98 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#102 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::DocumentSymbolClientCapabilities + # @return [DocumentSymbolClientCapabilities] a new instance of DocumentSymbolClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), symbol_kind: T.unsafe(nil), hierarchical_document_symbol_support: T.unsafe(nil), tag_support: T.unsafe(nil), label_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#61 + def attributes; end + + # Whether document symbol supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#21 + def dynamic_registration; end + + # The client supports hierarchical document symbols. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#38 + def hierarchical_document_symbol_support; end + + # The client supports an additional label presented in the UI when + # registering a document symbol provider. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#57 + def label_support; end + + # Specific capabilities for the `SymbolKind` in the + # `textDocument/documentSymbol` request. + # + # @return [{ valueSet?: SymbolKind[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#30 + def symbol_kind; end + + # The client supports tags on `SymbolInformation`. Tags are supported on + # `DocumentSymbol` if `hierarchicalDocumentSymbolSupport` is set to true. + # Clients supporting tags have to handle unknown tags gracefully. + # + # @return [{ valueSet: 1[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#48 + def tag_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#63 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#67 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentSymbolOptions + # @return [DocumentSymbolOptions] a new instance of DocumentSymbolOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil), label: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_options.rb#28 + def attributes; end + + # A human-readable string that is shown when multiple outlines trees + # are shown for the same document. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_options.rb#24 + def label; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_options.rb#30 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_options.rb#34 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_options.rb#15 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#4 +class LanguageServer::Protocol::Interface::DocumentSymbolParams + # @return [DocumentSymbolParams] a new instance of DocumentSymbolParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#5 + def initialize(text_document:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#40 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#28 + def partial_result_token; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#36 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#46 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#19 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentSymbolRegistrationOptions + # @return [DocumentSymbolRegistrationOptions] a new instance of DocumentSymbolRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), label: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#38 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#20 + def document_selector; end + + # A human-readable string that is shown when multiple outlines trees + # are shown for the same document. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#34 + def label; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#40 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#44 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#25 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/execute_command_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::ExecuteCommandClientCapabilities + # @return [ExecuteCommandClientCapabilities] a new instance of ExecuteCommandClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_client_capabilities.rb#21 + def attributes; end + + # Execute command supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_client_capabilities.rb#17 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_client_capabilities.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_client_capabilities.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/execute_command_options.rb#4 +class LanguageServer::Protocol::Interface::ExecuteCommandOptions + # @return [ExecuteCommandOptions] a new instance of ExecuteCommandOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_options.rb#5 + def initialize(commands:, work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_options.rb#27 + def attributes; end + + # The commands to be executed on the server + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_options.rb#23 + def commands; end + + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_options.rb#29 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_options.rb#33 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_options.rb#15 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#4 +class LanguageServer::Protocol::Interface::ExecuteCommandParams + # @return [ExecuteCommandParams] a new instance of ExecuteCommandParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#5 + def initialize(command:, work_done_token: T.unsafe(nil), arguments: T.unsafe(nil)); end + + # Arguments that the command should be invoked with. + # + # @return [LSPAny[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#35 + def arguments; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#39 + def attributes; end + + # The identifier of the actual command handler. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#27 + def command; end + + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#41 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#45 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#19 + def work_done_token; end +end + +# Execute command registration options. +# +# source://language_server-protocol//lib/language_server/protocol/interface/execute_command_registration_options.rb#7 +class LanguageServer::Protocol::Interface::ExecuteCommandRegistrationOptions + # @return [ExecuteCommandRegistrationOptions] a new instance of ExecuteCommandRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_registration_options.rb#8 + def initialize(commands:, work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_registration_options.rb#30 + def attributes; end + + # The commands to be executed on the server + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_registration_options.rb#26 + def commands; end + + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_registration_options.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_registration_options.rb#36 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_registration_options.rb#18 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/execution_summary.rb#4 +class LanguageServer::Protocol::Interface::ExecutionSummary + # @return [ExecutionSummary] a new instance of ExecutionSummary + # + # source://language_server-protocol//lib/language_server/protocol/interface/execution_summary.rb#5 + def initialize(execution_order:, success: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/execution_summary.rb#33 + def attributes; end + + # A strict monotonically increasing value + # indicating the execution order of a cell + # inside a notebook. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/execution_summary.rb#20 + def execution_order; end + + # Whether the execution was successful or + # not if known by the client. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/execution_summary.rb#29 + def success; end + + # source://language_server-protocol//lib/language_server/protocol/interface/execution_summary.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/execution_summary.rb#39 + def to_json(*args); end +end + +# Represents information on a file/folder create. +# +# source://language_server-protocol//lib/language_server/protocol/interface/file_create.rb#7 +class LanguageServer::Protocol::Interface::FileCreate + # @return [FileCreate] a new instance of FileCreate + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_create.rb#8 + def initialize(uri:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_create.rb#24 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_create.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_create.rb#30 + def to_json(*args); end + + # A file:// URI for the location of the file/folder being created. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_create.rb#20 + def uri; end +end + +# Represents information on a file/folder delete. +# +# source://language_server-protocol//lib/language_server/protocol/interface/file_delete.rb#7 +class LanguageServer::Protocol::Interface::FileDelete + # @return [FileDelete] a new instance of FileDelete + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_delete.rb#8 + def initialize(uri:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_delete.rb#24 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_delete.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_delete.rb#30 + def to_json(*args); end + + # A file:// URI for the location of the file/folder being deleted. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_delete.rb#20 + def uri; end +end + +# An event describing a file change. +# +# source://language_server-protocol//lib/language_server/protocol/interface/file_event.rb#7 +class LanguageServer::Protocol::Interface::FileEvent + # @return [FileEvent] a new instance of FileEvent + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_event.rb#8 + def initialize(uri:, type:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_event.rb#33 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_event.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_event.rb#39 + def to_json(*args); end + + # The change type. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_event.rb#29 + def type; end + + # The file's URI. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_event.rb#21 + def uri; end +end + +# A filter to describe in which file operation requests or notifications +# the server is interested in. +# +# source://language_server-protocol//lib/language_server/protocol/interface/file_operation_filter.rb#8 +class LanguageServer::Protocol::Interface::FileOperationFilter + # @return [FileOperationFilter] a new instance of FileOperationFilter + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_filter.rb#9 + def initialize(pattern:, scheme: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_filter.rb#34 + def attributes; end + + # The actual file operation pattern. + # + # @return [FileOperationPattern] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_filter.rb#30 + def pattern; end + + # A Uri like `file` or `untitled`. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_filter.rb#22 + def scheme; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_filter.rb#36 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_filter.rb#40 + def to_json(*args); end +end + +# A pattern to describe in which file operation requests or notifications +# the server is interested in. +# +# source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#8 +class LanguageServer::Protocol::Interface::FileOperationPattern + # @return [FileOperationPattern] a new instance of FileOperationPattern + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#9 + def initialize(glob:, matches: T.unsafe(nil), options: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#55 + def attributes; end + + # The glob pattern to match. Glob patterns can have the following syntax: + # - `*` to match one or more characters in a path segment + # - `?` to match on one character in a path segment + # - `**` to match any number of path segments, including none + # - `{}` to group sub patterns into an OR expression. (e.g. `**​/*.{ts,js}` + # matches all TypeScript and JavaScript files) + # - `[]` to declare a range of characters to match in a path segment + # (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …) + # - `[!...]` to negate a range of characters to match in a path segment + # (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but + # not `example.0`) + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#33 + def glob; end + + # Whether to match files or folders with this pattern. + # + # Matches both if undefined. + # + # @return [FileOperationPatternKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#43 + def matches; end + + # Additional options used during matching. + # + # @return [FileOperationPatternOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#51 + def options; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#57 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#61 + def to_json(*args); end +end + +# Matching options for the file operation pattern. +# +# source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern_options.rb#7 +class LanguageServer::Protocol::Interface::FileOperationPatternOptions + # @return [FileOperationPatternOptions] a new instance of FileOperationPatternOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern_options.rb#8 + def initialize(ignore_case: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern_options.rb#24 + def attributes; end + + # The pattern should be matched ignoring casing. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern_options.rb#20 + def ignore_case; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern_options.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern_options.rb#30 + def to_json(*args); end +end + +# The options to register for file operations. +# +# source://language_server-protocol//lib/language_server/protocol/interface/file_operation_registration_options.rb#7 +class LanguageServer::Protocol::Interface::FileOperationRegistrationOptions + # @return [FileOperationRegistrationOptions] a new instance of FileOperationRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_registration_options.rb#8 + def initialize(filters:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_registration_options.rb#24 + def attributes; end + + # The actual filters. + # + # @return [FileOperationFilter[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_registration_options.rb#20 + def filters; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_registration_options.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_registration_options.rb#30 + def to_json(*args); end +end + +# Represents information on a file/folder rename. +# +# source://language_server-protocol//lib/language_server/protocol/interface/file_rename.rb#7 +class LanguageServer::Protocol::Interface::FileRename + # @return [FileRename] a new instance of FileRename + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_rename.rb#8 + def initialize(old_uri:, new_uri:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_rename.rb#33 + def attributes; end + + # A file:// URI for the new location of the file/folder being renamed. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_rename.rb#29 + def new_uri; end + + # A file:// URI for the original location of the file/folder being renamed. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_rename.rb#21 + def old_uri; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_rename.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_rename.rb#39 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/file_system_watcher.rb#4 +class LanguageServer::Protocol::Interface::FileSystemWatcher + # @return [FileSystemWatcher] a new instance of FileSystemWatcher + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_system_watcher.rb#5 + def initialize(glob_pattern:, kind: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_system_watcher.rb#33 + def attributes; end + + # The glob pattern to watch. See {@link GlobPattern glob pattern} + # for more detail. + # + # @return [GlobPattern] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_system_watcher.rb#19 + def glob_pattern; end + + # The kind of events of interest. If omitted it defaults + # to WatchKind.Create | WatchKind.Change | WatchKind.Delete + # which is 7. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_system_watcher.rb#29 + def kind; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_system_watcher.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_system_watcher.rb#39 + def to_json(*args); end +end + +# Represents a folding range. To be valid, start and end line must be bigger +# than zero and smaller than the number of lines in the document. Clients +# are free to ignore invalid ranges. +# +# source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#9 +class LanguageServer::Protocol::Interface::FoldingRange + # @return [FoldingRange] a new instance of FoldingRange + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#10 + def initialize(start_line:, end_line:, start_character: T.unsafe(nil), end_character: T.unsafe(nil), kind: T.unsafe(nil), collapsed_text: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#82 + def attributes; end + + # The text that the client should show when the specified range is + # collapsed. If not defined or not supported by the client, a default + # will be chosen by the client. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#78 + def collapsed_text; end + + # The zero-based character offset before the folded range ends. If not + # defined, defaults to the length of the end line. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#57 + def end_character; end + + # The zero-based end line of the range to fold. The folded area ends with + # the line's last character. To be valid, the end must be zero or larger + # and smaller than the number of lines in the document. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#48 + def end_line; end + + # Describes the kind of the folding range such as `comment` or `region`. + # The kind is used to categorize folding ranges and used by commands like + # 'Fold all comments'. See [FoldingRangeKind](#FoldingRangeKind) for an + # enumeration of standardized kinds. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#68 + def kind; end + + # The zero-based character offset from where the folded range starts. If + # not defined, defaults to the length of the start line. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#38 + def start_character; end + + # The zero-based start line of the range to fold. The folded area starts + # after the line's last character. To be valid, the end must be zero or + # larger and smaller than the number of lines in the document. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#29 + def start_line; end + + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#84 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#88 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::FoldingRangeClientCapabilities + # @return [FoldingRangeClientCapabilities] a new instance of FoldingRangeClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), range_limit: T.unsafe(nil), line_folding_only: T.unsafe(nil), folding_range_kind: T.unsafe(nil), folding_range: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#64 + def attributes; end + + # Whether implementation supports dynamic registration for folding range + # providers. If this is set to `true` the client supports the new + # `FoldingRangeRegistrationOptions` return value for the corresponding + # server capability as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#24 + def dynamic_registration; end + + # Specific options for the folding range. + # + # @return [{ collapsedText?: boolean; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#60 + def folding_range; end + + # Specific options for the folding range kind. + # + # @return [{ valueSet?: string[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#52 + def folding_range_kind; end + + # If set, the client signals that it only supports folding complete lines. + # If set, client will ignore specified `startCharacter` and `endCharacter` + # properties in a FoldingRange. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#44 + def line_folding_only; end + + # The maximum number of folding ranges that the client prefers to receive + # per document. The value serves as a hint, servers are free to follow the + # limit. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#34 + def range_limit; end + + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#66 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#70 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/folding_range_options.rb#4 +class LanguageServer::Protocol::Interface::FoldingRangeOptions + # @return [FoldingRangeOptions] a new instance of FoldingRangeOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#4 +class LanguageServer::Protocol::Interface::FoldingRangeParams + # @return [FoldingRangeParams] a new instance of FoldingRangeParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#5 + def initialize(text_document:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#40 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#28 + def partial_result_token; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#36 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#46 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#19 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#4 +class LanguageServer::Protocol::Interface::FoldingRangeRegistrationOptions + # @return [FoldingRangeRegistrationOptions] a new instance of FoldingRangeRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#38 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#20 + def document_selector; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#34 + def id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#40 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#44 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#25 + def work_done_progress; end +end + +# Value-object describing what options formatting should use. +# +# source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#7 +class LanguageServer::Protocol::Interface::FormattingOptions + # @return [FormattingOptions] a new instance of FormattingOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#8 + def initialize(tab_size:, insert_spaces:, trim_trailing_whitespace: T.unsafe(nil), insert_final_newline: T.unsafe(nil), trim_final_newlines: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#60 + def attributes; end + + # Insert a newline character at the end of the file if one does not exist. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#48 + def insert_final_newline; end + + # Prefer spaces over tabs. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#32 + def insert_spaces; end + + # Size of a tab in spaces. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#24 + def tab_size; end + + # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#62 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#66 + def to_json(*args); end + + # Trim all newlines after the final newline at the end of the file. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#56 + def trim_final_newlines; end + + # Trim trailing whitespace on a line. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#40 + def trim_trailing_whitespace; end +end + +# A diagnostic report with a full set of problems. +# +# source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#7 +class LanguageServer::Protocol::Interface::FullDocumentDiagnosticReport + # @return [FullDocumentDiagnosticReport] a new instance of FullDocumentDiagnosticReport + # + # source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#8 + def initialize(kind:, items:, result_id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#44 + def attributes; end + + # The actual items. + # + # @return [Diagnostic[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#40 + def items; end + + # A full document diagnostic report. + # + # @return [any] + # + # source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#22 + def kind; end + + # An optional result id. If provided it will + # be sent on the next diagnostic request for the + # same document. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#32 + def result_id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#46 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#50 + def to_json(*args); end +end + +# The result of a hover request. +# +# source://language_server-protocol//lib/language_server/protocol/interface/hover.rb#7 +class LanguageServer::Protocol::Interface::Hover + # @return [Hover] a new instance of Hover + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover.rb#8 + def initialize(contents:, range: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover.rb#34 + def attributes; end + + # The hover's content + # + # @return [MarkupContent | MarkedString | MarkedString[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover.rb#21 + def contents; end + + # An optional range is a range inside a text document + # that is used to visualize a hover, e.g. by changing the background color. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover.rb#30 + def range; end + + # source://language_server-protocol//lib/language_server/protocol/interface/hover.rb#36 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/hover.rb#40 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/hover_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::HoverClientCapabilities + # @return [HoverClientCapabilities] a new instance of HoverClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), content_format: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_client_capabilities.rb#32 + def attributes; end + + # Client supports the follow content formats if the content + # property refers to a `literal of type MarkupContent`. + # The order describes the preferred format of the client. + # + # @return [MarkupKind[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_client_capabilities.rb#28 + def content_format; end + + # Whether hover supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_client_capabilities.rb#18 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/hover_client_capabilities.rb#34 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/hover_client_capabilities.rb#38 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/hover_options.rb#4 +class LanguageServer::Protocol::Interface::HoverOptions + # @return [HoverOptions] a new instance of HoverOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/hover_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/hover_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#4 +class LanguageServer::Protocol::Interface::HoverParams + # @return [HoverParams] a new instance of HoverParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#39 + def attributes; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#27 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#19 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#41 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#45 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#35 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/hover_registration_options.rb#4 +class LanguageServer::Protocol::Interface::HoverRegistrationOptions + # @return [HoverRegistrationOptions] a new instance of HoverRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_registration_options.rb#28 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_registration_options.rb#19 + def document_selector; end + + # source://language_server-protocol//lib/language_server/protocol/interface/hover_registration_options.rb#30 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/hover_registration_options.rb#34 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_registration_options.rb#24 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/hover_result.rb#4 +class LanguageServer::Protocol::Interface::HoverResult + # @return [HoverResult] a new instance of HoverResult + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_result.rb#5 + def initialize(value:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_result.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/hover_result.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/hover_result.rb#24 + def to_json(*args); end + + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_result.rb#14 + def value; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/implementation_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::ImplementationClientCapabilities + # @return [ImplementationClientCapabilities] a new instance of ImplementationClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), link_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_client_capabilities.rb#32 + def attributes; end + + # Whether implementation supports dynamic registration. If this is set to + # `true` the client supports the new `ImplementationRegistrationOptions` + # return value for the corresponding server capability as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_client_capabilities.rb#20 + def dynamic_registration; end + + # The client supports additional metadata in the form of definition links. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_client_capabilities.rb#28 + def link_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_client_capabilities.rb#34 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_client_capabilities.rb#38 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/implementation_options.rb#4 +class LanguageServer::Protocol::Interface::ImplementationOptions + # @return [ImplementationOptions] a new instance of ImplementationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#4 +class LanguageServer::Protocol::Interface::ImplementationParams + # @return [ImplementationParams] a new instance of ImplementationParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#49 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#45 + def partial_result_token; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#28 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#20 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#51 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#55 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#36 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#4 +class LanguageServer::Protocol::Interface::ImplementationRegistrationOptions + # @return [ImplementationRegistrationOptions] a new instance of ImplementationRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#38 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#20 + def document_selector; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#34 + def id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#40 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#44 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#25 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/initialize_error.rb#4 +class LanguageServer::Protocol::Interface::InitializeError + # @return [InitializeError] a new instance of InitializeError + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_error.rb#5 + def initialize(retry:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_error.rb#24 + def attributes; end + + # Indicates whether the client execute the following retry logic: + # (1) show the message provided by the ResponseError to the user + # (2) user selects retry or cancel + # (3) if user selected retry the initialize method is sent again. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_error.rb#20 + def retry; end + + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_error.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_error.rb#30 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#4 +class LanguageServer::Protocol::Interface::InitializeParams + # @return [InitializeParams] a new instance of InitializeParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#5 + def initialize(process_id:, root_uri:, capabilities:, work_done_token: T.unsafe(nil), client_info: T.unsafe(nil), locale: T.unsafe(nil), root_path: T.unsafe(nil), initialization_options: T.unsafe(nil), trace: T.unsafe(nil), workspace_folders: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#116 + def attributes; end + + # The capabilities provided by the client (editor or tool) + # + # @return [ClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#93 + def capabilities; end + + # Information about the client + # + # @return [{ name: string; version?: string; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#45 + def client_info; end + + # User provided initialization options. + # + # @return [LSPAny] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#85 + def initialization_options; end + + # The locale the client is currently showing the user interface + # in. This must not necessarily be the locale of the operating + # system. + # + # Uses IETF language tags as the value's syntax + # (See https://en.wikipedia.org/wiki/IETF_language_tag) + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#58 + def locale; end + + # The process Id of the parent process that started the server. Is null if + # the process has not been started by another process. If the parent + # process is not alive then the server should exit (see exit notification) + # its process. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#37 + def process_id; end + + # The rootPath of the workspace. Is null + # if no folder is open. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#67 + def root_path; end + + # The rootUri of the workspace. Is null if no + # folder is open. If both `rootPath` and `rootUri` are set + # `rootUri` wins. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#77 + def root_uri; end + + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#118 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#122 + def to_json(*args); end + + # The initial trace setting. If omitted trace is disabled ('off'). + # + # @return [TraceValue] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#101 + def trace; end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#26 + def work_done_token; end + + # The workspace folders configured in the client when the server starts. + # This property is only available if the client supports workspace folders. + # It can be `null` if the client supports workspace folders but none are + # configured. + # + # @return [WorkspaceFolder[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#112 + def workspace_folders; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/initialize_result.rb#4 +class LanguageServer::Protocol::Interface::InitializeResult + # @return [InitializeResult] a new instance of InitializeResult + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_result.rb#5 + def initialize(capabilities:, server_info: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_result.rb#30 + def attributes; end + + # The capabilities the language server provides. + # + # @return [ServerCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_result.rb#18 + def capabilities; end + + # Information about the server. + # + # @return [{ name: string; version?: string; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_result.rb#26 + def server_info; end + + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_result.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_result.rb#36 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/initialized_params.rb#4 +class LanguageServer::Protocol::Interface::InitializedParams + # @return [InitializedParams] a new instance of InitializedParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialized_params.rb#5 + def initialize; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialized_params.rb#12 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/initialized_params.rb#14 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/initialized_params.rb#18 + def to_json(*args); end +end + +# Inlay hint information. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#7 +class LanguageServer::Protocol::Interface::InlayHint + # @return [InlayHint] a new instance of InlayHint + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#8 + def initialize(position:, label:, kind: T.unsafe(nil), text_edits: T.unsafe(nil), tooltip: T.unsafe(nil), padding_left: T.unsafe(nil), padding_right: T.unsafe(nil), data: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#110 + def attributes; end + + # A data entry field that is preserved on an inlay hint between + # a `textDocument/inlayHint` and a `inlayHint/resolve` request. + # + # @return [LSPAny] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#106 + def data; end + + # The kind of this hint. Can be omitted in which case the client + # should fall back to a reasonable default. + # + # @return [InlayHintKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#47 + def kind; end + + # The label of this hint. A human readable string or an array of + # InlayHintLabelPart label parts. + # + # *Note* that neither the string nor the label part can be empty. + # + # @return [string | InlayHintLabelPart[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#38 + def label; end + + # Render padding before the hint. + # + # Note: Padding should use the editor's background color, not the + # background color of the hint itself. That means padding can be used + # to visually align/separate an inlay hint. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#85 + def padding_left; end + + # Render padding after the hint. + # + # Note: Padding should use the editor's background color, not the + # background color of the hint itself. That means padding can be used + # to visually align/separate an inlay hint. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#97 + def padding_right; end + + # The position of this hint. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#27 + def position; end + + # Optional text edits that are performed when accepting this inlay hint. + # + # *Note* that edits are expected to change the document so that the inlay + # hint (or its nearest variant) is now part of the document and the inlay + # hint itself is now obsolete. + # + # Depending on the client capability `inlayHint.resolveSupport` clients + # might resolve this property late using the resolve request. + # + # @return [TextEdit[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#62 + def text_edits; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#112 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#116 + def to_json(*args); end + + # The tooltip text when you hover over this item. + # + # Depending on the client capability `inlayHint.resolveSupport` clients + # might resolve this property late using the resolve request. + # + # @return [string | MarkupContent] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#73 + def tooltip; end +end + +# Inlay hint client capabilities. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb#7 +class LanguageServer::Protocol::Interface::InlayHintClientCapabilities + # @return [InlayHintClientCapabilities] a new instance of InlayHintClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb#8 + def initialize(dynamic_registration: T.unsafe(nil), resolve_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb#34 + def attributes; end + + # Whether inlay hints support dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb#21 + def dynamic_registration; end + + # Indicates which properties a client can resolve lazily on an inlay + # hint. + # + # @return [{ properties: string[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb#30 + def resolve_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb#36 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb#40 + def to_json(*args); end +end + +# An inlay hint label part allows for interactive and composite labels +# of inlay hints. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#8 +class LanguageServer::Protocol::Interface::InlayHintLabelPart + # @return [InlayHintLabelPart] a new instance of InlayHintLabelPart + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#9 + def initialize(value:, tooltip: T.unsafe(nil), location: T.unsafe(nil), command: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#67 + def attributes; end + + # An optional command for this label part. + # + # Depending on the client capability `inlayHint.resolveSupport` clients + # might resolve this property late using the resolve request. + # + # @return [Command] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#63 + def command; end + + # An optional source code location that represents this + # label part. + # + # The editor will use this location for the hover and for code navigation + # features: This part will become a clickable link that resolves to the + # definition of the symbol at the given location (not necessarily the + # location itself), it shows the hover that shows at the given location, + # and it shows a context menu with further code navigation commands. + # + # Depending on the client capability `inlayHint.resolveSupport` clients + # might resolve this property late using the resolve request. + # + # @return [Location] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#52 + def location; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#69 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#73 + def to_json(*args); end + + # The tooltip text when you hover over this label part. Depending on + # the client capability `inlayHint.resolveSupport` clients might resolve + # this property late using the resolve request. + # + # @return [string | MarkupContent] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#34 + def tooltip; end + + # The value of this label part. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#24 + def value; end +end + +# Inlay hint options used during static registration. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_options.rb#7 +class LanguageServer::Protocol::Interface::InlayHintOptions + # @return [InlayHintOptions] a new instance of InlayHintOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_options.rb#8 + def initialize(work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_options.rb#31 + def attributes; end + + # The server provides support to resolve additional + # information for an inlay hint item. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_options.rb#27 + def resolve_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_options.rb#33 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_options.rb#37 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_options.rb#18 + def work_done_progress; end +end + +# A parameter literal used in inlay hint requests. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#7 +class LanguageServer::Protocol::Interface::InlayHintParams + # @return [InlayHintParams] a new instance of InlayHintParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#8 + def initialize(text_document:, range:, work_done_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#42 + def attributes; end + + # The visible document range for which inlay hints should be computed. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#38 + def range; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#30 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#44 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#48 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#22 + def work_done_token; end +end + +# Inlay hint options used during static or dynamic registration. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#7 +class LanguageServer::Protocol::Interface::InlayHintRegistrationOptions + # @return [InlayHintRegistrationOptions] a new instance of InlayHintRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#8 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#51 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#38 + def document_selector; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#47 + def id; end + + # The server provides support to resolve additional + # information for an inlay hint item. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#29 + def resolve_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#53 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#57 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#20 + def work_done_progress; end +end + +# Client workspace capabilities specific to inlay hints. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb#7 +class LanguageServer::Protocol::Interface::InlayHintWorkspaceClientCapabilities + # @return [InlayHintWorkspaceClientCapabilities] a new instance of InlayHintWorkspaceClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb#8 + def initialize(refresh_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb#30 + def attributes; end + + # Whether the client implementation supports a refresh request sent from + # the server to the client. + # + # Note that this event is global and will force the client to refresh all + # inlay hints currently shown. It should be used with absolute care and + # is useful for situation where a server for example detects a project wide + # change that requires such a calculation. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb#26 + def refresh_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb#36 + def to_json(*args); end +end + +# Client capabilities specific to inline values. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_client_capabilities.rb#7 +class LanguageServer::Protocol::Interface::InlineValueClientCapabilities + # @return [InlineValueClientCapabilities] a new instance of InlineValueClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_client_capabilities.rb#8 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_client_capabilities.rb#25 + def attributes; end + + # Whether implementation supports dynamic registration for inline + # value providers. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_client_capabilities.rb#21 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_client_capabilities.rb#27 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_client_capabilities.rb#31 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_context.rb#4 +class LanguageServer::Protocol::Interface::InlineValueContext + # @return [InlineValueContext] a new instance of InlineValueContext + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_context.rb#5 + def initialize(frame_id:, stopped_location:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_context.rb#32 + def attributes; end + + # The stack frame (as a DAP Id) where the execution has stopped. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_context.rb#18 + def frame_id; end + + # The document range where execution has stopped. + # Typically the end position of the range denotes the line where the + # inline values are shown. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_context.rb#28 + def stopped_location; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_context.rb#34 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_context.rb#38 + def to_json(*args); end +end + +# Provide an inline value through an expression evaluation. +# +# If only a range is specified, the expression will be extracted from the +# underlying document. +# +# An optional expression can be used to override the extracted expression. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb#12 +class LanguageServer::Protocol::Interface::InlineValueEvaluatableExpression + # @return [InlineValueEvaluatableExpression] a new instance of InlineValueEvaluatableExpression + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb#13 + def initialize(range:, expression: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb#40 + def attributes; end + + # If specified the expression overrides the extracted expression. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb#36 + def expression; end + + # The document range for which the inline value applies. + # The range is used to extract the evaluatable expression from the + # underlying document. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb#28 + def range; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb#46 + def to_json(*args); end +end + +# Inline value options used during static registration. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_options.rb#7 +class LanguageServer::Protocol::Interface::InlineValueOptions + # @return [InlineValueOptions] a new instance of InlineValueOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_options.rb#8 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_options.rb#21 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_options.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_options.rb#27 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_options.rb#17 + def work_done_progress; end +end + +# A parameter literal used in inline value requests. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#7 +class LanguageServer::Protocol::Interface::InlineValueParams + # @return [InlineValueParams] a new instance of InlineValueParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#8 + def initialize(text_document:, range:, context:, work_done_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#52 + def attributes; end + + # Additional information about the context in which inline values were + # requested. + # + # @return [InlineValueContext] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#48 + def context; end + + # The document range for which inline values should be computed. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#39 + def range; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#31 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#54 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#58 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#23 + def work_done_token; end +end + +# Inline value options used during static or dynamic registration. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#7 +class LanguageServer::Protocol::Interface::InlineValueRegistrationOptions + # @return [InlineValueRegistrationOptions] a new instance of InlineValueRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#8 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#41 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#28 + def document_selector; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#37 + def id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#43 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#47 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#19 + def work_done_progress; end +end + +# Provide inline value as text. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_text.rb#7 +class LanguageServer::Protocol::Interface::InlineValueText + # @return [InlineValueText] a new instance of InlineValueText + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_text.rb#8 + def initialize(range:, text:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_text.rb#33 + def attributes; end + + # The document range for which the inline value applies. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_text.rb#21 + def range; end + + # The text of the inline value. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_text.rb#29 + def text; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_text.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_text.rb#39 + def to_json(*args); end +end + +# Provide inline value through a variable lookup. +# +# If only a range is specified, the variable name will be extracted from +# the underlying document. +# +# An optional variable name can be used to override the extracted name. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#12 +class LanguageServer::Protocol::Interface::InlineValueVariableLookup + # @return [InlineValueVariableLookup] a new instance of InlineValueVariableLookup + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#13 + def initialize(range:, case_sensitive_lookup:, variable_name: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#49 + def attributes; end + + # How to perform the lookup. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#45 + def case_sensitive_lookup; end + + # The document range for which the inline value applies. + # The range is used to extract the variable name from the underlying + # document. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#29 + def range; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#51 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#55 + def to_json(*args); end + + # If specified the name of the variable to look up. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#37 + def variable_name; end +end + +# Client workspace capabilities specific to inline values. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_workspace_client_capabilities.rb#7 +class LanguageServer::Protocol::Interface::InlineValueWorkspaceClientCapabilities + # @return [InlineValueWorkspaceClientCapabilities] a new instance of InlineValueWorkspaceClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_workspace_client_capabilities.rb#8 + def initialize(refresh_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_workspace_client_capabilities.rb#30 + def attributes; end + + # Whether the client implementation supports a refresh request sent from + # the server to the client. + # + # Note that this event is global and will force the client to refresh all + # inline values currently shown. It should be used with absolute care and + # is useful for situation where a server for example detect a project wide + # change that requires such a calculation. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_workspace_client_capabilities.rb#26 + def refresh_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_workspace_client_capabilities.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_workspace_client_capabilities.rb#36 + def to_json(*args); end +end + +# A special text edit to provide an insert and a replace operation. +# +# source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#7 +class LanguageServer::Protocol::Interface::InsertReplaceEdit + # @return [InsertReplaceEdit] a new instance of InsertReplaceEdit + # + # source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#8 + def initialize(new_text:, insert:, replace:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#42 + def attributes; end + + # The range if the insert is requested + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#30 + def insert; end + + # The string to be inserted. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#22 + def new_text; end + + # The range if the replace is requested. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#38 + def replace; end + + # source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#44 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#48 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::LinkedEditingRangeClientCapabilities + # @return [LinkedEditingRangeClientCapabilities] a new instance of LinkedEditingRangeClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb#24 + def attributes; end + + # Whether the implementation supports dynamic registration. + # If this is set to `true` the client supports the new + # `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` + # return value for the corresponding server capability as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb#20 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb#30 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_options.rb#4 +class LanguageServer::Protocol::Interface::LinkedEditingRangeOptions + # @return [LinkedEditingRangeOptions] a new instance of LinkedEditingRangeOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#4 +class LanguageServer::Protocol::Interface::LinkedEditingRangeParams + # @return [LinkedEditingRangeParams] a new instance of LinkedEditingRangeParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#39 + def attributes; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#27 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#19 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#41 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#45 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#35 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#4 +class LanguageServer::Protocol::Interface::LinkedEditingRangeRegistrationOptions + # @return [LinkedEditingRangeRegistrationOptions] a new instance of LinkedEditingRangeRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#38 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#20 + def document_selector; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#34 + def id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#40 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#44 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#25 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_ranges.rb#4 +class LanguageServer::Protocol::Interface::LinkedEditingRanges + # @return [LinkedEditingRanges] a new instance of LinkedEditingRanges + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_ranges.rb#5 + def initialize(ranges:, word_pattern: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_ranges.rb#34 + def attributes; end + + # A list of ranges that can be renamed together. The ranges must have + # identical length and contain identical text content. The ranges cannot + # overlap. + # + # @return [Range[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_ranges.rb#20 + def ranges; end + + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_ranges.rb#36 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_ranges.rb#40 + def to_json(*args); end + + # An optional word pattern (regular expression) that describes valid + # contents for the given ranges. If no pattern is provided, the client + # configuration's word pattern will be used. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_ranges.rb#30 + def word_pattern; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/location.rb#4 +class LanguageServer::Protocol::Interface::Location + # @return [Location] a new instance of Location + # + # source://language_server-protocol//lib/language_server/protocol/interface/location.rb#5 + def initialize(uri:, range:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/location.rb#24 + def attributes; end + + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/location.rb#20 + def range; end + + # source://language_server-protocol//lib/language_server/protocol/interface/location.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/location.rb#30 + def to_json(*args); end + + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/location.rb#15 + def uri; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#4 +class LanguageServer::Protocol::Interface::LocationLink + # @return [LocationLink] a new instance of LocationLink + # + # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#5 + def initialize(target_uri:, target_range:, target_selection_range:, origin_selection_range: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#56 + def attributes; end + + # Span of the origin of this link. + # + # Used as the underlined span for mouse interaction. Defaults to the word + # range at the mouse position. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#23 + def origin_selection_range; end + + # The full target range of this link. If the target for example is a symbol + # then target range is the range enclosing this symbol not including + # leading/trailing whitespace but everything else like comments. This + # information is typically used to highlight the range in the editor. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#42 + def target_range; end + + # The range that should be selected and revealed when this link is being + # followed, e.g the name of a function. Must be contained by the + # `targetRange`. See also `DocumentSymbol#range` + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#52 + def target_selection_range; end + + # The target resource identifier of this link. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#31 + def target_uri; end + + # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#58 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#62 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/log_message_params.rb#4 +class LanguageServer::Protocol::Interface::LogMessageParams + # @return [LogMessageParams] a new instance of LogMessageParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/log_message_params.rb#5 + def initialize(type:, message:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/log_message_params.rb#30 + def attributes; end + + # The actual message + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/log_message_params.rb#26 + def message; end + + # source://language_server-protocol//lib/language_server/protocol/interface/log_message_params.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/log_message_params.rb#36 + def to_json(*args); end + + # The message type. See {@link MessageType} + # + # @return [MessageType] + # + # source://language_server-protocol//lib/language_server/protocol/interface/log_message_params.rb#18 + def type; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/log_trace_params.rb#4 +class LanguageServer::Protocol::Interface::LogTraceParams + # @return [LogTraceParams] a new instance of LogTraceParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/log_trace_params.rb#5 + def initialize(message:, verbose: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/log_trace_params.rb#31 + def attributes; end + + # The message to be logged. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/log_trace_params.rb#18 + def message; end + + # source://language_server-protocol//lib/language_server/protocol/interface/log_trace_params.rb#33 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/log_trace_params.rb#37 + def to_json(*args); end + + # Additional information that can be computed if the `trace` configuration + # is set to `'verbose'` + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/log_trace_params.rb#27 + def verbose; end +end + +# A `MarkupContent` literal represents a string value which content is +# interpreted base on its kind flag. Currently the protocol supports +# `plaintext` and `markdown` as markup kinds. +# +# If the kind is `markdown` then the value can contain fenced code blocks like +# in GitHub issues. +# +# Here is an example how such a string can be constructed using +# JavaScript / TypeScript: +# ```typescript +# let markdown: MarkdownContent = { +# kind: MarkupKind.Markdown, +# value: [ +# '# Header', +# 'Some text', +# '```typescript', +# 'someCode();', +# '```' +# ].join('\n') +# }; +# ``` +# +# *Please Note* that clients might sanitize the return markdown. A client could +# decide to remove HTML from the markdown to avoid script execution. +# +# source://language_server-protocol//lib/language_server/protocol/interface/markup_content.rb#30 +class LanguageServer::Protocol::Interface::MarkupContent + # @return [MarkupContent] a new instance of MarkupContent + # + # source://language_server-protocol//lib/language_server/protocol/interface/markup_content.rb#31 + def initialize(kind:, value:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/markup_content.rb#56 + def attributes; end + + # The type of the Markup + # + # @return [MarkupKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/markup_content.rb#44 + def kind; end + + # source://language_server-protocol//lib/language_server/protocol/interface/markup_content.rb#58 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/markup_content.rb#62 + def to_json(*args); end + + # The content itself + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/markup_content.rb#52 + def value; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/message.rb#4 +class LanguageServer::Protocol::Interface::Message + # @return [Message] a new instance of Message + # + # source://language_server-protocol//lib/language_server/protocol/interface/message.rb#5 + def initialize(jsonrpc:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/message.rb#18 + def attributes; end + + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/message.rb#14 + def jsonrpc; end + + # source://language_server-protocol//lib/language_server/protocol/interface/message.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/message.rb#24 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/message_action_item.rb#4 +class LanguageServer::Protocol::Interface::MessageActionItem + # @return [MessageActionItem] a new instance of MessageActionItem + # + # source://language_server-protocol//lib/language_server/protocol/interface/message_action_item.rb#5 + def initialize(title:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/message_action_item.rb#21 + def attributes; end + + # A short title like 'Retry', 'Open Log' etc. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/message_action_item.rb#17 + def title; end + + # source://language_server-protocol//lib/language_server/protocol/interface/message_action_item.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/message_action_item.rb#27 + def to_json(*args); end +end + +# Moniker definition to match LSIF 0.5 moniker definition. +# +# source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#7 +class LanguageServer::Protocol::Interface::Moniker + # @return [Moniker] a new instance of Moniker + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#8 + def initialize(scheme:, identifier:, unique:, kind: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#52 + def attributes; end + + # The identifier of the moniker. The value is opaque in LSIF however + # schema owners are allowed to define the structure if they want. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#32 + def identifier; end + + # The moniker kind if known. + # + # @return [MonikerKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#48 + def kind; end + + # The scheme of the moniker. For example tsc or .Net + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#23 + def scheme; end + + # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#54 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#58 + def to_json(*args); end + + # The scope in which the moniker is unique + # + # @return [UniquenessLevel] + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#40 + def unique; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/moniker_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::MonikerClientCapabilities + # @return [MonikerClientCapabilities] a new instance of MonikerClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_client_capabilities.rb#24 + def attributes; end + + # Whether implementation supports dynamic registration. If this is set to + # `true` the client supports the new `(TextDocumentRegistrationOptions & + # StaticRegistrationOptions)` return value for the corresponding server + # capability as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_client_capabilities.rb#20 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_client_capabilities.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_client_capabilities.rb#30 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/moniker_options.rb#4 +class LanguageServer::Protocol::Interface::MonikerOptions + # @return [MonikerOptions] a new instance of MonikerOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#4 +class LanguageServer::Protocol::Interface::MonikerParams + # @return [MonikerParams] a new instance of MonikerParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#49 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#45 + def partial_result_token; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#28 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#20 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#51 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#55 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#36 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/moniker_registration_options.rb#4 +class LanguageServer::Protocol::Interface::MonikerRegistrationOptions + # @return [MonikerRegistrationOptions] a new instance of MonikerRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_registration_options.rb#28 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_registration_options.rb#19 + def document_selector; end + + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_registration_options.rb#30 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_registration_options.rb#34 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_registration_options.rb#24 + def work_done_progress; end +end + +# A notebook cell. +# +# A cell's document URI must be unique across ALL notebook +# cells and can therefore be used to uniquely identify a +# notebook cell or the cell's text document. +# +# source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#11 +class LanguageServer::Protocol::Interface::NotebookCell + # @return [NotebookCell] a new instance of NotebookCell + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#12 + def initialize(kind:, document:, metadata: T.unsafe(nil), execution_summary: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#57 + def attributes; end + + # The URI of the cell's text document + # content. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#36 + def document; end + + # Additional execution summary information + # if supported by the client. + # + # @return [ExecutionSummary] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#53 + def execution_summary; end + + # The cell's kind + # + # @return [any] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#27 + def kind; end + + # Additional metadata stored with the cell. + # + # @return [LSPObject] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#44 + def metadata; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#59 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#63 + def to_json(*args); end +end + +# A change describing how to move a `NotebookCell` +# array from state S to S'. +# +# source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#8 +class LanguageServer::Protocol::Interface::NotebookCellArrayChange + # @return [NotebookCellArrayChange] a new instance of NotebookCellArrayChange + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#9 + def initialize(start:, delete_count:, cells: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#43 + def attributes; end + + # The new cells, if any + # + # @return [NotebookCell[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#39 + def cells; end + + # The deleted cells + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#31 + def delete_count; end + + # The start offset of the cell that changed. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#23 + def start; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#45 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#49 + def to_json(*args); end +end + +# A notebook cell text document filter denotes a cell text +# document by different properties. +# +# source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb#8 +class LanguageServer::Protocol::Interface::NotebookCellTextDocumentFilter + # @return [NotebookCellTextDocumentFilter] a new instance of NotebookCellTextDocumentFilter + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb#9 + def initialize(notebook:, language: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb#40 + def attributes; end + + # A language id like `python`. + # + # Will be matched against the language id of the + # notebook cell document. '*' matches every language. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb#36 + def language; end + + # A filter that matches against the notebook + # containing the notebook cell. If a string + # value is provided it matches against the + # notebook type. '*' matches every notebook. + # + # @return [string | NotebookDocumentFilter] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb#25 + def notebook; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb#46 + def to_json(*args); end +end + +# A notebook document. +# +# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#7 +class LanguageServer::Protocol::Interface::NotebookDocument + # @return [NotebookDocument] a new instance of NotebookDocument + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#8 + def initialize(uri:, notebook_type:, version:, cells:, metadata: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#62 + def attributes; end + + # The cells of a notebook. + # + # @return [NotebookCell[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#58 + def cells; end + + # Additional metadata stored with the notebook + # document. + # + # @return [LSPObject] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#50 + def metadata; end + + # The type of the notebook. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#32 + def notebook_type; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#64 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#68 + def to_json(*args); end + + # The notebook document's URI. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#24 + def uri; end + + # The version number of this document (it will increase after each + # change, including undo/redo). + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#41 + def version; end +end + +# A change event for a notebook document. +# +# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_change_event.rb#7 +class LanguageServer::Protocol::Interface::NotebookDocumentChangeEvent + # @return [NotebookDocumentChangeEvent] a new instance of NotebookDocumentChangeEvent + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_change_event.rb#8 + def initialize(metadata: T.unsafe(nil), cells: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_change_event.rb#33 + def attributes; end + + # Changes to cells + # + # @return [{ structure?: { array: NotebookCellArrayChange; didOpen?: TextDocumentItem[]; didClose?: TextDocumentIdentifier[]; }; data?: NotebookCell[]; textContent?: { ...; }[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_change_event.rb#29 + def cells; end + + # The changed meta data if any. + # + # @return [LSPObject] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_change_event.rb#21 + def metadata; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_change_event.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_change_event.rb#39 + def to_json(*args); end +end + +# Capabilities specific to the notebook document support. +# +# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_client_capabilities.rb#7 +class LanguageServer::Protocol::Interface::NotebookDocumentClientCapabilities + # @return [NotebookDocumentClientCapabilities] a new instance of NotebookDocumentClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_client_capabilities.rb#8 + def initialize(synchronization:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_client_capabilities.rb#24 + def attributes; end + + # Capabilities specific to notebook document synchronization + # + # @return [NotebookDocumentSyncClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_client_capabilities.rb#20 + def synchronization; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_client_capabilities.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_client_capabilities.rb#30 + def to_json(*args); end +end + +# A notebook document filter denotes a notebook document by +# different properties. +# +# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#8 +class LanguageServer::Protocol::Interface::NotebookDocumentFilter + # @return [NotebookDocumentFilter] a new instance of NotebookDocumentFilter + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#9 + def initialize(notebook_type: T.unsafe(nil), scheme: T.unsafe(nil), pattern: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#67 + def attributes; end + + # The type of the enclosing notebook. + # + # --- OR --- + # + # The type of the enclosing notebook. + # + # --- OR --- + # + # The type of the enclosing notebook. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#31 + def notebook_type; end + + # A glob pattern. + # + # --- OR --- + # + # A glob pattern. + # + # --- OR --- + # + # A glob pattern. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#63 + def pattern; end + + # A Uri [scheme](#Uri.scheme), like `file` or `untitled`. + # + # --- OR --- + # + # A Uri [scheme](#Uri.scheme), like `file` or `untitled`. + # + # --- OR --- + # + # A Uri [scheme](#Uri.scheme), like `file` or `untitled`. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#47 + def scheme; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#69 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#73 + def to_json(*args); end +end + +# A literal to identify a notebook document in the client. +# +# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_identifier.rb#7 +class LanguageServer::Protocol::Interface::NotebookDocumentIdentifier + # @return [NotebookDocumentIdentifier] a new instance of NotebookDocumentIdentifier + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_identifier.rb#8 + def initialize(uri:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_identifier.rb#24 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_identifier.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_identifier.rb#30 + def to_json(*args); end + + # The notebook document's URI. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_identifier.rb#20 + def uri; end +end + +# Notebook specific client capabilities. +# +# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb#7 +class LanguageServer::Protocol::Interface::NotebookDocumentSyncClientCapabilities + # @return [NotebookDocumentSyncClientCapabilities] a new instance of NotebookDocumentSyncClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb#8 + def initialize(dynamic_registration: T.unsafe(nil), execution_summary_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb#36 + def attributes; end + + # Whether implementation supports dynamic registration. If this is + # set to `true` the client supports the new + # `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` + # return value for the corresponding server capability as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb#24 + def dynamic_registration; end + + # The client supports sending execution summary data per cell. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb#32 + def execution_summary_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb#38 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb#42 + def to_json(*args); end +end + +# Options specific to a notebook plus its cells +# to be synced to the server. +# +# If a selector provides a notebook document +# filter but no cell selector all cells of a +# matching notebook document will be synced. +# +# If a selector provides no notebook document +# filter but only a cell selector all notebook +# documents that contain at least one matching +# cell will be synced. +# +# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_options.rb#17 +class LanguageServer::Protocol::Interface::NotebookDocumentSyncOptions + # @return [NotebookDocumentSyncOptions] a new instance of NotebookDocumentSyncOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_options.rb#18 + def initialize(notebook_selector:, save: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_options.rb#44 + def attributes; end + + # The notebooks to be synced + # + # @return [({ notebook: string | NotebookDocumentFilter; cells?: { language: string; }[]; } | { notebook?: string | NotebookDocumentFilter; cells: { ...; }[]; })[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_options.rb#31 + def notebook_selector; end + + # Whether save notification should be forwarded to + # the server. Will only be honored if mode === `notebook`. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_options.rb#40 + def save; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_options.rb#46 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_options.rb#50 + def to_json(*args); end +end + +# Registration options specific to a notebook. +# +# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#7 +class LanguageServer::Protocol::Interface::NotebookDocumentSyncRegistrationOptions + # @return [NotebookDocumentSyncRegistrationOptions] a new instance of NotebookDocumentSyncRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#8 + def initialize(notebook_selector:, save: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#44 + def attributes; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#40 + def id; end + + # The notebooks to be synced + # + # @return [({ notebook: string | NotebookDocumentFilter; cells?: { language: string; }[]; } | { notebook?: string | NotebookDocumentFilter; cells: { ...; }[]; })[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#22 + def notebook_selector; end + + # Whether save notification should be forwarded to + # the server. Will only be honored if mode === `notebook`. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#31 + def save; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#46 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#50 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#4 +class LanguageServer::Protocol::Interface::NotificationMessage + # @return [NotificationMessage] a new instance of NotificationMessage + # + # source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#5 + def initialize(jsonrpc:, method:, params: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#36 + def attributes; end + + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#16 + def jsonrpc; end + + # The method to be invoked. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#24 + def method; end + + # The notification's params. + # + # @return [any] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#32 + def params; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#38 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#42 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb#4 +class LanguageServer::Protocol::Interface::OptionalVersionedTextDocumentIdentifier + # @return [OptionalVersionedTextDocumentIdentifier] a new instance of OptionalVersionedTextDocumentIdentifier + # + # source://language_server-protocol//lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb#5 + def initialize(uri:, version:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb#38 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb#40 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb#44 + def to_json(*args); end + + # The text document's URI. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb#18 + def uri; end + + # The version number of this document. If an optional versioned text document + # identifier is sent from the server to the client and the file is not + # open in the editor (the server has not received an open notification + # before) the server can send `null` to indicate that the version is + # known and the content on disk is the master (as specified with document + # content ownership). + # + # The version number of a document will increase after each change, + # including undo/redo. The number doesn't need to be consecutive. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb#34 + def version; end +end + +# Represents a parameter of a callable-signature. A parameter can +# have a label and a doc-comment. +# +# source://language_server-protocol//lib/language_server/protocol/interface/parameter_information.rb#8 +class LanguageServer::Protocol::Interface::ParameterInformation + # @return [ParameterInformation] a new instance of ParameterInformation + # + # source://language_server-protocol//lib/language_server/protocol/interface/parameter_information.rb#9 + def initialize(label:, documentation: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/parameter_information.rb#44 + def attributes; end + + # The human-readable doc-comment of this parameter. Will be shown + # in the UI but can be omitted. + # + # @return [string | MarkupContent] + # + # source://language_server-protocol//lib/language_server/protocol/interface/parameter_information.rb#40 + def documentation; end + + # The label of this parameter information. + # + # Either a string or an inclusive start and exclusive end offsets within + # its containing signature label. (see SignatureInformation.label). The + # offsets are based on a UTF-16 string representation as `Position` and + # `Range` does. + # + # *Note*: a label of type string should be a substring of its containing + # signature label. Its intended use case is to highlight the parameter + # label part in the `SignatureInformation.label`. + # + # @return [string | [number, number]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/parameter_information.rb#31 + def label; end + + # source://language_server-protocol//lib/language_server/protocol/interface/parameter_information.rb#46 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/parameter_information.rb#50 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/partial_result_params.rb#4 +class LanguageServer::Protocol::Interface::PartialResultParams + # @return [PartialResultParams] a new instance of PartialResultParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/partial_result_params.rb#5 + def initialize(partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/partial_result_params.rb#22 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/partial_result_params.rb#18 + def partial_result_token; end + + # source://language_server-protocol//lib/language_server/protocol/interface/partial_result_params.rb#24 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/partial_result_params.rb#28 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/position.rb#4 +class LanguageServer::Protocol::Interface::Position + # @return [Position] a new instance of Position + # + # source://language_server-protocol//lib/language_server/protocol/interface/position.rb#5 + def initialize(line:, character:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/position.rb#34 + def attributes; end + + # Character offset on a line in a document (zero-based). The meaning of this + # offset is determined by the negotiated `PositionEncodingKind`. + # + # If the character value is greater than the line length it defaults back + # to the line length. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/position.rb#30 + def character; end + + # Line position in a document (zero-based). + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/position.rb#18 + def line; end + + # source://language_server-protocol//lib/language_server/protocol/interface/position.rb#36 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/position.rb#40 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#4 +class LanguageServer::Protocol::Interface::PrepareRenameParams + # @return [PrepareRenameParams] a new instance of PrepareRenameParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#39 + def attributes; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#27 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#19 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#41 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#45 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#35 + def work_done_token; end +end + +# A previous result id in a workspace pull request. +# +# source://language_server-protocol//lib/language_server/protocol/interface/previous_result_id.rb#7 +class LanguageServer::Protocol::Interface::PreviousResultId + # @return [PreviousResultId] a new instance of PreviousResultId + # + # source://language_server-protocol//lib/language_server/protocol/interface/previous_result_id.rb#8 + def initialize(uri:, value:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/previous_result_id.rb#34 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/previous_result_id.rb#36 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/previous_result_id.rb#40 + def to_json(*args); end + + # The URI for which the client knows a + # result id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/previous_result_id.rb#22 + def uri; end + + # The value of the previous result id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/previous_result_id.rb#30 + def value; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/progress_params.rb#4 +class LanguageServer::Protocol::Interface::ProgressParams + # @return [ProgressParams] a new instance of ProgressParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/progress_params.rb#5 + def initialize(token:, value:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/progress_params.rb#30 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/progress_params.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/progress_params.rb#36 + def to_json(*args); end + + # The progress token provided by the client or server. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/progress_params.rb#18 + def token; end + + # The progress data. + # + # @return [T] + # + # source://language_server-protocol//lib/language_server/protocol/interface/progress_params.rb#26 + def value; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::PublishDiagnosticsClientCapabilities + # @return [PublishDiagnosticsClientCapabilities] a new instance of PublishDiagnosticsClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#5 + def initialize(related_information: T.unsafe(nil), tag_support: T.unsafe(nil), version_support: T.unsafe(nil), code_description_support: T.unsafe(nil), data_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#61 + def attributes; end + + # Client supports a codeDescription property + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#47 + def code_description_support; end + + # Whether code action supports the `data` property which is + # preserved between a `textDocument/publishDiagnostics` and + # `textDocument/codeAction` request. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#57 + def data_support; end + + # Whether the clients accepts diagnostics with related information. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#21 + def related_information; end + + # Client supports the tag property to provide meta data about a diagnostic. + # Clients supporting tags have to handle unknown tags gracefully. + # + # @return [{ valueSet: DiagnosticTag[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#30 + def tag_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#63 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#67 + def to_json(*args); end + + # Whether the client interprets the version property of the + # `textDocument/publishDiagnostics` notification's parameter. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#39 + def version_support; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#4 +class LanguageServer::Protocol::Interface::PublishDiagnosticsParams + # @return [PublishDiagnosticsParams] a new instance of PublishDiagnosticsParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#5 + def initialize(uri:, diagnostics:, version: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#40 + def attributes; end + + # An array of diagnostic information items. + # + # @return [Diagnostic[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#36 + def diagnostics; end + + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#46 + def to_json(*args); end + + # The URI for which diagnostic information is reported. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#19 + def uri; end + + # Optional the version number of the document the diagnostics are published + # for. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#28 + def version; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/range.rb#4 +class LanguageServer::Protocol::Interface::Range + # @return [Range] a new instance of Range + # + # source://language_server-protocol//lib/language_server/protocol/interface/range.rb#5 + def initialize(start:, end:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/range.rb#30 + def attributes; end + + # The range's end position. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/range.rb#26 + def end; end + + # The range's start position. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/range.rb#18 + def start; end + + # source://language_server-protocol//lib/language_server/protocol/interface/range.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/range.rb#36 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/reference_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::ReferenceClientCapabilities + # @return [ReferenceClientCapabilities] a new instance of ReferenceClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_client_capabilities.rb#21 + def attributes; end + + # Whether references supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_client_capabilities.rb#17 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/reference_client_capabilities.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/reference_client_capabilities.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/reference_context.rb#4 +class LanguageServer::Protocol::Interface::ReferenceContext + # @return [ReferenceContext] a new instance of ReferenceContext + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_context.rb#5 + def initialize(include_declaration:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_context.rb#21 + def attributes; end + + # Include the declaration of the current symbol. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_context.rb#17 + def include_declaration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/reference_context.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/reference_context.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/reference_options.rb#4 +class LanguageServer::Protocol::Interface::ReferenceOptions + # @return [ReferenceOptions] a new instance of ReferenceOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/reference_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/reference_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#4 +class LanguageServer::Protocol::Interface::ReferenceParams + # @return [ReferenceParams] a new instance of ReferenceParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#5 + def initialize(text_document:, position:, context:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#55 + def attributes; end + + # @return [ReferenceContext] + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#51 + def context; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#46 + def partial_result_token; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#29 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#21 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#57 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#61 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#37 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/reference_registration_options.rb#4 +class LanguageServer::Protocol::Interface::ReferenceRegistrationOptions + # @return [ReferenceRegistrationOptions] a new instance of ReferenceRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_registration_options.rb#28 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_registration_options.rb#19 + def document_selector; end + + # source://language_server-protocol//lib/language_server/protocol/interface/reference_registration_options.rb#30 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/reference_registration_options.rb#34 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_registration_options.rb#24 + def work_done_progress; end +end + +# General parameters to register for a capability. +# +# source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#7 +class LanguageServer::Protocol::Interface::Registration + # @return [Registration] a new instance of Registration + # + # source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#8 + def initialize(id:, method:, register_options: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#43 + def attributes; end + + # The id used to register the request. The id can be used to deregister + # the request again. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#23 + def id; end + + # The method / capability to register for. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#31 + def method; end + + # Options necessary for the registration. + # + # @return [LSPAny] + # + # source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#39 + def register_options; end + + # source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#45 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#49 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/registration_params.rb#4 +class LanguageServer::Protocol::Interface::RegistrationParams + # @return [RegistrationParams] a new instance of RegistrationParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/registration_params.rb#5 + def initialize(registrations:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/registration_params.rb#18 + def attributes; end + + # @return [Registration[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/registration_params.rb#14 + def registrations; end + + # source://language_server-protocol//lib/language_server/protocol/interface/registration_params.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/registration_params.rb#24 + def to_json(*args); end +end + +# Client capabilities specific to regular expressions. +# +# source://language_server-protocol//lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb#7 +class LanguageServer::Protocol::Interface::RegularExpressionsClientCapabilities + # @return [RegularExpressionsClientCapabilities] a new instance of RegularExpressionsClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb#8 + def initialize(engine:, version: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb#33 + def attributes; end + + # The engine's name. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb#21 + def engine; end + + # source://language_server-protocol//lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb#39 + def to_json(*args); end + + # The engine's version. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb#29 + def version; end +end + +# A full diagnostic report with a set of related documents. +# +# source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#7 +class LanguageServer::Protocol::Interface::RelatedFullDocumentDiagnosticReport + # @return [RelatedFullDocumentDiagnosticReport] a new instance of RelatedFullDocumentDiagnosticReport + # + # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#8 + def initialize(kind:, items:, result_id: T.unsafe(nil), related_documents: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#57 + def attributes; end + + # The actual items. + # + # @return [Diagnostic[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#41 + def items; end + + # A full document diagnostic report. + # + # @return [any] + # + # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#23 + def kind; end + + # Diagnostics of related documents. This information is useful + # in programming languages where code in a file A can generate + # diagnostics in a file B which A depends on. An example of + # such a language is C/C++ where marco definitions in a file + # a.cpp and result in errors in a header file b.hpp. + # + # @return [{ [uri: string]: FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#53 + def related_documents; end + + # An optional result id. If provided it will + # be sent on the next diagnostic request for the + # same document. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#33 + def result_id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#59 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#63 + def to_json(*args); end +end + +# An unchanged diagnostic report with a set of related documents. +# +# source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#7 +class LanguageServer::Protocol::Interface::RelatedUnchangedDocumentDiagnosticReport + # @return [RelatedUnchangedDocumentDiagnosticReport] a new instance of RelatedUnchangedDocumentDiagnosticReport + # + # source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#8 + def initialize(kind:, result_id:, related_documents: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#50 + def attributes; end + + # A document diagnostic report indicating + # no changes to the last result. A server can + # only return `unchanged` if result ids are + # provided. + # + # @return [any] + # + # source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#25 + def kind; end + + # Diagnostics of related documents. This information is useful + # in programming languages where code in a file A can generate + # diagnostics in a file B which A depends on. An example of + # such a language is C/C++ where marco definitions in a file + # a.cpp and result in errors in a header file b.hpp. + # + # @return [{ [uri: string]: FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#46 + def related_documents; end + + # A result id which will be sent on the next + # diagnostic request for the same document. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#34 + def result_id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#52 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#56 + def to_json(*args); end +end + +# A relative pattern is a helper to construct glob patterns that are matched +# relatively to a base URI. The common value for a `baseUri` is a workspace +# folder root, but it can be another absolute URI as well. +# +# source://language_server-protocol//lib/language_server/protocol/interface/relative_pattern.rb#9 +class LanguageServer::Protocol::Interface::RelativePattern + # @return [RelativePattern] a new instance of RelativePattern + # + # source://language_server-protocol//lib/language_server/protocol/interface/relative_pattern.rb#10 + def initialize(base_uri:, pattern:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/relative_pattern.rb#36 + def attributes; end + + # A workspace folder or a base URI to which this pattern will be matched + # against relatively. + # + # @return [string | WorkspaceFolder] + # + # source://language_server-protocol//lib/language_server/protocol/interface/relative_pattern.rb#24 + def base_uri; end + + # The actual glob pattern; + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/relative_pattern.rb#32 + def pattern; end + + # source://language_server-protocol//lib/language_server/protocol/interface/relative_pattern.rb#38 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/relative_pattern.rb#42 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::RenameClientCapabilities + # @return [RenameClientCapabilities] a new instance of RenameClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), prepare_support: T.unsafe(nil), prepare_support_default_behavior: T.unsafe(nil), honors_change_annotations: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#57 + def attributes; end + + # Whether rename supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#20 + def dynamic_registration; end + + # Whether the client honors the change annotations in + # text edits and resource operations returned via the + # rename request's workspace edit by for example presenting + # the workspace edit in the user interface and asking + # for confirmation. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#53 + def honors_change_annotations; end + + # Client supports testing for validity of rename operations + # before execution. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#29 + def prepare_support; end + + # Client supports the default behavior result + # (`{ defaultBehavior: boolean }`). + # + # The value indicates the default behavior used by the + # client. + # + # @return [1] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#41 + def prepare_support_default_behavior; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#59 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#63 + def to_json(*args); end +end + +# Rename file operation +# +# source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#7 +class LanguageServer::Protocol::Interface::RenameFile + # @return [RenameFile] a new instance of RenameFile + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#8 + def initialize(kind:, old_uri:, new_uri:, options: T.unsafe(nil), annotation_id: T.unsafe(nil)); end + + # An optional annotation identifier describing the operation. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#56 + def annotation_id; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#60 + def attributes; end + + # A rename + # + # @return ["rename"] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#24 + def kind; end + + # The new location. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#40 + def new_uri; end + + # The old (existing) location. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#32 + def old_uri; end + + # Rename options. + # + # @return [RenameFileOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#48 + def options; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#62 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#66 + def to_json(*args); end +end + +# Rename file options +# +# source://language_server-protocol//lib/language_server/protocol/interface/rename_file_options.rb#7 +class LanguageServer::Protocol::Interface::RenameFileOptions + # @return [RenameFileOptions] a new instance of RenameFileOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file_options.rb#8 + def initialize(overwrite: T.unsafe(nil), ignore_if_exists: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file_options.rb#33 + def attributes; end + + # Ignores if target exists. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file_options.rb#29 + def ignore_if_exists; end + + # Overwrite target if existing. Overwrite wins over `ignoreIfExists` + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file_options.rb#21 + def overwrite; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file_options.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file_options.rb#39 + def to_json(*args); end +end + +# The parameters sent in notifications/requests for user-initiated renames +# of files. +# +# source://language_server-protocol//lib/language_server/protocol/interface/rename_files_params.rb#8 +class LanguageServer::Protocol::Interface::RenameFilesParams + # @return [RenameFilesParams] a new instance of RenameFilesParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_files_params.rb#9 + def initialize(files:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_files_params.rb#26 + def attributes; end + + # An array of all files/folders renamed in this operation. When a folder + # is renamed, only the folder will be included, and not its children. + # + # @return [FileRename[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_files_params.rb#22 + def files; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_files_params.rb#28 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_files_params.rb#32 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/rename_options.rb#4 +class LanguageServer::Protocol::Interface::RenameOptions + # @return [RenameOptions] a new instance of RenameOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil), prepare_provider: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_options.rb#27 + def attributes; end + + # Renames should be checked and tested before being executed. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_options.rb#23 + def prepare_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_options.rb#29 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_options.rb#33 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_options.rb#15 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#4 +class LanguageServer::Protocol::Interface::RenameParams + # @return [RenameParams] a new instance of RenameParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#5 + def initialize(text_document:, position:, new_name:, work_done_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#50 + def attributes; end + + # The new name of the symbol. If the given name is not valid the + # request must return a [ResponseError](#ResponseError) with an + # appropriate message set. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#46 + def new_name; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#28 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#20 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#52 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#56 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#36 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#4 +class LanguageServer::Protocol::Interface::RenameRegistrationOptions + # @return [RenameRegistrationOptions] a new instance of RenameRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), prepare_provider: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#37 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#20 + def document_selector; end + + # Renames should be checked and tested before being executed. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#33 + def prepare_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#39 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#43 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#25 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#4 +class LanguageServer::Protocol::Interface::RequestMessage + # @return [RequestMessage] a new instance of RequestMessage + # + # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#5 + def initialize(jsonrpc:, id:, method:, params: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#45 + def attributes; end + + # The request id. + # + # @return [string | number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#25 + def id; end + + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#17 + def jsonrpc; end + + # The method to be invoked. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#33 + def method; end + + # The method's params. + # + # @return [any] + # + # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#41 + def params; end + + # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#47 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#51 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#4 +class LanguageServer::Protocol::Interface::ResponseError + # @return [ResponseError] a new instance of ResponseError + # + # source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#5 + def initialize(code:, message:, data: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#40 + def attributes; end + + # A number indicating the error type that occurred. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#19 + def code; end + + # A primitive or structured value that contains additional + # information about the error. Can be omitted. + # + # @return [any] + # + # source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#36 + def data; end + + # A string providing a short description of the error. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#27 + def message; end + + # source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#46 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#4 +class LanguageServer::Protocol::Interface::ResponseMessage + # @return [ResponseMessage] a new instance of ResponseMessage + # + # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#5 + def initialize(jsonrpc:, id:, result: T.unsafe(nil), error: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#46 + def attributes; end + + # The error object in case a request fails. + # + # @return [ResponseError] + # + # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#42 + def error; end + + # The request id. + # + # @return [string | number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#25 + def id; end + + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#17 + def jsonrpc; end + + # The result of a request. This member is REQUIRED on success. + # This member MUST NOT exist if there was an error invoking the method. + # + # @return [string | number | boolean | object] + # + # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#34 + def result; end + + # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#48 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#52 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/save_options.rb#4 +class LanguageServer::Protocol::Interface::SaveOptions + # @return [SaveOptions] a new instance of SaveOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/save_options.rb#5 + def initialize(include_text: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/save_options.rb#21 + def attributes; end + + # The client is supposed to include the content on save. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/save_options.rb#17 + def include_text; end + + # source://language_server-protocol//lib/language_server/protocol/interface/save_options.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/save_options.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/selection_range.rb#4 +class LanguageServer::Protocol::Interface::SelectionRange + # @return [SelectionRange] a new instance of SelectionRange + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range.rb#5 + def initialize(range:, parent: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range.rb#31 + def attributes; end + + # The parent selection range containing this range. Therefore + # `parent.range` must contain `this.range`. + # + # @return [SelectionRange] + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range.rb#27 + def parent; end + + # The [range](#Range) of this selection range. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range.rb#18 + def range; end + + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range.rb#33 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range.rb#37 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/selection_range_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::SelectionRangeClientCapabilities + # @return [SelectionRangeClientCapabilities] a new instance of SelectionRangeClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_client_capabilities.rb#24 + def attributes; end + + # Whether implementation supports dynamic registration for selection range + # providers. If this is set to `true` the client supports the new + # `SelectionRangeRegistrationOptions` return value for the corresponding + # server capability as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_client_capabilities.rb#20 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_client_capabilities.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_client_capabilities.rb#30 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/selection_range_options.rb#4 +class LanguageServer::Protocol::Interface::SelectionRangeOptions + # @return [SelectionRangeOptions] a new instance of SelectionRangeOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#4 +class LanguageServer::Protocol::Interface::SelectionRangeParams + # @return [SelectionRangeParams] a new instance of SelectionRangeParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#5 + def initialize(text_document:, positions:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#49 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#29 + def partial_result_token; end + + # The positions inside the text document. + # + # @return [Position[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#45 + def positions; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#37 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#51 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#55 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#20 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#4 +class LanguageServer::Protocol::Interface::SelectionRangeRegistrationOptions + # @return [SelectionRangeRegistrationOptions] a new instance of SelectionRangeRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#38 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#25 + def document_selector; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#34 + def id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#40 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#44 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#16 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokens + # @return [SemanticTokens] a new instance of SemanticTokens + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens.rb#5 + def initialize(data:, result_id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens.rb#33 + def attributes; end + + # The actual tokens. + # + # @return [number[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens.rb#29 + def data; end + + # An optional result id. If provided and clients support delta updating + # the client will include the result id in the next semantic token request. + # A server can then instead of computing all semantic tokens again simply + # send a delta. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens.rb#21 + def result_id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens.rb#39 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokensClientCapabilities + # @return [SemanticTokensClientCapabilities] a new instance of SemanticTokensClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#5 + def initialize(requests:, token_types:, token_modifiers:, formats:, dynamic_registration: T.unsafe(nil), overlapping_token_support: T.unsafe(nil), multiline_token_support: T.unsafe(nil), server_cancel_support: T.unsafe(nil), augments_syntax_tokens: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#113 + def attributes; end + + # Whether the client uses semantic tokens to augment existing + # syntax tokens. If set to `true` client side created syntax + # tokens and semantic tokens are both used for colorization. If + # set to `false` the client only uses the returned semantic tokens + # for colorization. + # + # If the value is `undefined` then the client behavior is not + # specified. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#109 + def augments_syntax_tokens; end + + # Whether implementation supports dynamic registration. If this is set to + # `true` the client supports the new `(TextDocumentRegistrationOptions & + # StaticRegistrationOptions)` return value for the corresponding server + # capability as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#28 + def dynamic_registration; end + + # The formats the clients supports. + # + # @return ["relative"[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#67 + def formats; end + + # Whether the client supports tokens that can span multiple lines. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#83 + def multiline_token_support; end + + # Whether the client supports tokens that can overlap each other. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#75 + def overlapping_token_support; end + + # Which requests the client supports and might send to the server + # depending on the server's capability. Please note that clients might not + # show semantic tokens or degrade some of the user experience if a range + # or full request is advertised by the client but not provided by the + # server. If for example the client capability `requests.full` and + # `request.range` are both set to true but the server only provides a + # range provider the client might not render a minimap correctly or might + # even decide to not show any semantic tokens at all. + # + # @return [{ range?: boolean | {}; full?: boolean | { delta?: boolean; }; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#43 + def requests; end + + # Whether the client allows the server to actively cancel a + # semantic token request, e.g. supports returning + # ErrorCodes.ServerCancelled. If a server does the client + # needs to retrigger the request. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#94 + def server_cancel_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#115 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#119 + def to_json(*args); end + + # The token modifiers that the client supports. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#59 + def token_modifiers; end + + # The token types that the client supports. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#51 + def token_types; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokensDelta + # @return [SemanticTokensDelta] a new instance of SemanticTokensDelta + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta.rb#5 + def initialize(edits:, result_id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta.rb#28 + def attributes; end + + # The semantic token edits to transform a previous result into a new + # result. + # + # @return [SemanticTokensEdit[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta.rb#24 + def edits; end + + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta.rb#15 + def result_id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta.rb#30 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta.rb#34 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokensDeltaParams + # @return [SemanticTokensDeltaParams] a new instance of SemanticTokensDeltaParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#5 + def initialize(text_document:, previous_result_id:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#50 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#29 + def partial_result_token; end + + # The result id of a previous response. The result Id can either point to + # a full response or a delta response depending on what was received last. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#46 + def previous_result_id; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#37 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#52 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#56 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#20 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokensDeltaPartialResult + # @return [SemanticTokensDeltaPartialResult] a new instance of SemanticTokensDeltaPartialResult + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb#5 + def initialize(edits:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb#18 + def attributes; end + + # @return [SemanticTokensEdit[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb#14 + def edits; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb#24 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokensEdit + # @return [SemanticTokensEdit] a new instance of SemanticTokensEdit + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#5 + def initialize(start:, delete_count:, data: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#39 + def attributes; end + + # The elements to insert. + # + # @return [number[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#35 + def data; end + + # The count of elements to remove. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#27 + def delete_count; end + + # The start offset of the edit. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#19 + def start; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#41 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#45 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_legend.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokensLegend + # @return [SemanticTokensLegend] a new instance of SemanticTokensLegend + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_legend.rb#5 + def initialize(token_types:, token_modifiers:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_legend.rb#30 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_legend.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_legend.rb#36 + def to_json(*args); end + + # The token modifiers a server uses. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_legend.rb#26 + def token_modifiers; end + + # The token types a server uses. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_legend.rb#18 + def token_types; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokensOptions + # @return [SemanticTokensOptions] a new instance of SemanticTokensOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#5 + def initialize(legend:, work_done_progress: T.unsafe(nil), range: T.unsafe(nil), full: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#46 + def attributes; end + + # Server supports providing semantic tokens for a full document. + # + # @return [boolean | { delta?: boolean; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#42 + def full; end + + # The legend used by the server + # + # @return [SemanticTokensLegend] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#25 + def legend; end + + # Server supports providing semantic tokens for a specific range + # of a document. + # + # @return [boolean | {}] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#34 + def range; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#48 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#52 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#17 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokensParams + # @return [SemanticTokensParams] a new instance of SemanticTokensParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#5 + def initialize(text_document:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#40 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#28 + def partial_result_token; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#36 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#46 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#19 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_partial_result.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokensPartialResult + # @return [SemanticTokensPartialResult] a new instance of SemanticTokensPartialResult + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_partial_result.rb#5 + def initialize(data:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_partial_result.rb#18 + def attributes; end + + # @return [number[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_partial_result.rb#14 + def data; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_partial_result.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_partial_result.rb#24 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokensRangeParams + # @return [SemanticTokensRangeParams] a new instance of SemanticTokensRangeParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#5 + def initialize(text_document:, range:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#49 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#29 + def partial_result_token; end + + # The range the semantic tokens are requested for. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#45 + def range; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#37 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#51 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#55 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#20 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokensRegistrationOptions + # @return [SemanticTokensRegistrationOptions] a new instance of SemanticTokensRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#5 + def initialize(document_selector:, legend:, work_done_progress: T.unsafe(nil), range: T.unsafe(nil), full: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#66 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#23 + def document_selector; end + + # Server supports providing semantic tokens for a full document. + # + # @return [boolean | { delta?: boolean; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#53 + def full; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#62 + def id; end + + # The legend used by the server + # + # @return [SemanticTokensLegend] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#36 + def legend; end + + # Server supports providing semantic tokens for a specific range + # of a document. + # + # @return [boolean | {}] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#45 + def range; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#68 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#72 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#28 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokensWorkspaceClientCapabilities + # @return [SemanticTokensWorkspaceClientCapabilities] a new instance of SemanticTokensWorkspaceClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb#5 + def initialize(refresh_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb#27 + def attributes; end + + # Whether the client implementation supports a refresh request sent from + # the server to the client. + # + # Note that this event is global and will force the client to refresh all + # semantic tokens currently shown. It should be used with absolute care + # and is useful for situation where a server for example detect a project + # wide change that requires such a calculation. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb#23 + def refresh_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb#29 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb#33 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#4 +class LanguageServer::Protocol::Interface::ServerCapabilities + # @return [ServerCapabilities] a new instance of ServerCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#5 + def initialize(position_encoding: T.unsafe(nil), text_document_sync: T.unsafe(nil), notebook_document_sync: T.unsafe(nil), completion_provider: T.unsafe(nil), hover_provider: T.unsafe(nil), signature_help_provider: T.unsafe(nil), declaration_provider: T.unsafe(nil), definition_provider: T.unsafe(nil), type_definition_provider: T.unsafe(nil), implementation_provider: T.unsafe(nil), references_provider: T.unsafe(nil), document_highlight_provider: T.unsafe(nil), document_symbol_provider: T.unsafe(nil), code_action_provider: T.unsafe(nil), code_lens_provider: T.unsafe(nil), document_link_provider: T.unsafe(nil), color_provider: T.unsafe(nil), document_formatting_provider: T.unsafe(nil), document_range_formatting_provider: T.unsafe(nil), document_on_type_formatting_provider: T.unsafe(nil), rename_provider: T.unsafe(nil), folding_range_provider: T.unsafe(nil), execute_command_provider: T.unsafe(nil), selection_range_provider: T.unsafe(nil), linked_editing_range_provider: T.unsafe(nil), call_hierarchy_provider: T.unsafe(nil), semantic_tokens_provider: T.unsafe(nil), moniker_provider: T.unsafe(nil), type_hierarchy_provider: T.unsafe(nil), inline_value_provider: T.unsafe(nil), inlay_hint_provider: T.unsafe(nil), diagnostic_provider: T.unsafe(nil), workspace_symbol_provider: T.unsafe(nil), workspace: T.unsafe(nil), experimental: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#340 + def attributes; end + + # The server provides call hierarchy support. + # + # @return [boolean | CallHierarchyOptions | CallHierarchyRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#264 + def call_hierarchy_provider; end + + # The server provides code actions. The `CodeActionOptions` return type is + # only valid if the client signals code action literal support via the + # property `textDocument.codeAction.codeActionLiteralSupport`. + # + # @return [boolean | CodeActionOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#166 + def code_action_provider; end + + # The server provides code lens. + # + # @return [CodeLensOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#174 + def code_lens_provider; end + + # The server provides color provider support. + # + # @return [boolean | DocumentColorOptions | DocumentColorRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#190 + def color_provider; end + + # The server provides completion support. + # + # @return [CompletionOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#84 + def completion_provider; end + + # The server provides go to declaration support. + # + # @return [boolean | DeclarationOptions | DeclarationRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#108 + def declaration_provider; end + + # The server provides goto definition support. + # + # @return [boolean | DefinitionOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#116 + def definition_provider; end + + # The server has support for pull model diagnostics. + # + # @return [DiagnosticOptions | DiagnosticRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#312 + def diagnostic_provider; end + + # The server provides document formatting. + # + # @return [boolean | DocumentFormattingOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#198 + def document_formatting_provider; end + + # The server provides document highlight support. + # + # @return [boolean | DocumentHighlightOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#148 + def document_highlight_provider; end + + # The server provides document link support. + # + # @return [DocumentLinkOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#182 + def document_link_provider; end + + # The server provides document formatting on typing. + # + # @return [DocumentOnTypeFormattingOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#214 + def document_on_type_formatting_provider; end + + # The server provides document range formatting. + # + # @return [boolean | DocumentRangeFormattingOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#206 + def document_range_formatting_provider; end + + # The server provides document symbol support. + # + # @return [boolean | DocumentSymbolOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#156 + def document_symbol_provider; end + + # The server provides execute command support. + # + # @return [ExecuteCommandOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#240 + def execute_command_provider; end + + # Experimental server capabilities. + # + # @return [LSPAny] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#336 + def experimental; end + + # The server provides folding provider support. + # + # @return [boolean | FoldingRangeOptions | FoldingRangeRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#232 + def folding_range_provider; end + + # The server provides hover support. + # + # @return [boolean | HoverOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#92 + def hover_provider; end + + # The server provides goto implementation support. + # + # @return [boolean | ImplementationOptions | ImplementationRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#132 + def implementation_provider; end + + # The server provides inlay hints. + # + # @return [boolean | InlayHintOptions | InlayHintRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#304 + def inlay_hint_provider; end + + # The server provides inline values. + # + # @return [boolean | InlineValueOptions | InlineValueRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#296 + def inline_value_provider; end + + # The server provides linked editing range support. + # + # @return [boolean | LinkedEditingRangeOptions | LinkedEditingRangeRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#256 + def linked_editing_range_provider; end + + # Whether server provides moniker support. + # + # @return [boolean | MonikerOptions | MonikerRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#280 + def moniker_provider; end + + # Defines how notebook documents are synced. + # + # @return [NotebookDocumentSyncOptions | NotebookDocumentSyncRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#76 + def notebook_document_sync; end + + # The position encoding the server picked from the encodings offered + # by the client via the client capability `general.positionEncodings`. + # + # If the client didn't provide any position encodings the only valid + # value that a server can return is 'utf-16'. + # + # If omitted it defaults to 'utf-16'. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#57 + def position_encoding; end + + # The server provides find references support. + # + # @return [boolean | ReferenceOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#140 + def references_provider; end + + # The server provides rename support. RenameOptions may only be + # specified if the client states that it supports + # `prepareSupport` in its initial `initialize` request. + # + # @return [boolean | RenameOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#224 + def rename_provider; end + + # The server provides selection range support. + # + # @return [boolean | SelectionRangeOptions | SelectionRangeRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#248 + def selection_range_provider; end + + # The server provides semantic tokens support. + # + # @return [SemanticTokensOptions | SemanticTokensRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#272 + def semantic_tokens_provider; end + + # The server provides signature help support. + # + # @return [SignatureHelpOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#100 + def signature_help_provider; end + + # Defines how text documents are synced. Is either a detailed structure + # defining each notification or for backwards compatibility the + # TextDocumentSyncKind number. If omitted it defaults to + # `TextDocumentSyncKind.None`. + # + # @return [TextDocumentSyncOptions | TextDocumentSyncKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#68 + def text_document_sync; end + + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#342 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#346 + def to_json(*args); end + + # The server provides goto type definition support. + # + # @return [boolean | TypeDefinitionOptions | TypeDefinitionRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#124 + def type_definition_provider; end + + # The server provides type hierarchy support. + # + # @return [boolean | TypeHierarchyOptions | TypeHierarchyRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#288 + def type_hierarchy_provider; end + + # Workspace specific server capabilities + # + # @return [{ workspaceFolders?: WorkspaceFoldersServerCapabilities; fileOperations?: { didCreate?: FileOperationRegistrationOptions; ... 4 more ...; willDelete?: FileOperationRegistrationOptions; }; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#328 + def workspace; end + + # The server provides workspace symbol support. + # + # @return [boolean | WorkspaceSymbolOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#320 + def workspace_symbol_provider; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/set_trace_params.rb#4 +class LanguageServer::Protocol::Interface::SetTraceParams + # @return [SetTraceParams] a new instance of SetTraceParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/set_trace_params.rb#5 + def initialize(value:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/set_trace_params.rb#21 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/set_trace_params.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/set_trace_params.rb#27 + def to_json(*args); end + + # The new value that should be assigned to the trace setting. + # + # @return [TraceValue] + # + # source://language_server-protocol//lib/language_server/protocol/interface/set_trace_params.rb#17 + def value; end +end + +# Client capabilities for the show document request. +# +# source://language_server-protocol//lib/language_server/protocol/interface/show_document_client_capabilities.rb#7 +class LanguageServer::Protocol::Interface::ShowDocumentClientCapabilities + # @return [ShowDocumentClientCapabilities] a new instance of ShowDocumentClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_client_capabilities.rb#8 + def initialize(support:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_client_capabilities.rb#25 + def attributes; end + + # The client has support for the show document + # request. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_client_capabilities.rb#21 + def support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_client_capabilities.rb#27 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_client_capabilities.rb#31 + def to_json(*args); end +end + +# Params to show a resource. +# +# source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#7 +class LanguageServer::Protocol::Interface::ShowDocumentParams + # @return [ShowDocumentParams] a new instance of ShowDocumentParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#8 + def initialize(uri:, external: T.unsafe(nil), take_focus: T.unsafe(nil), selection: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#59 + def attributes; end + + # Indicates to show the resource in an external program. + # To show, for example, `https://code.visualstudio.com/` + # in the default WEB browser set `external` to `true`. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#33 + def external; end + + # An optional selection range if the document is a text + # document. Clients might ignore the property if an + # external program is started or the file is not a text + # file. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#55 + def selection; end + + # An optional property to indicate whether the editor + # showing the document should take focus or not. + # Clients might ignore this property if an external + # program is started. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#44 + def take_focus; end + + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#61 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#65 + def to_json(*args); end + + # The uri to show. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#23 + def uri; end +end + +# The result of an show document request. +# +# source://language_server-protocol//lib/language_server/protocol/interface/show_document_result.rb#7 +class LanguageServer::Protocol::Interface::ShowDocumentResult + # @return [ShowDocumentResult] a new instance of ShowDocumentResult + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_result.rb#8 + def initialize(success:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_result.rb#24 + def attributes; end + + # A boolean indicating if the show was successful. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_result.rb#20 + def success; end + + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_result.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_result.rb#30 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/show_message_params.rb#4 +class LanguageServer::Protocol::Interface::ShowMessageParams + # @return [ShowMessageParams] a new instance of ShowMessageParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_params.rb#5 + def initialize(type:, message:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_params.rb#30 + def attributes; end + + # The actual message. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_params.rb#26 + def message; end + + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_params.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_params.rb#36 + def to_json(*args); end + + # The message type. See {@link MessageType}. + # + # @return [MessageType] + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_params.rb#18 + def type; end +end + +# Show message request client capabilities +# +# source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_client_capabilities.rb#7 +class LanguageServer::Protocol::Interface::ShowMessageRequestClientCapabilities + # @return [ShowMessageRequestClientCapabilities] a new instance of ShowMessageRequestClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_client_capabilities.rb#8 + def initialize(message_action_item: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_client_capabilities.rb#24 + def attributes; end + + # Capabilities specific to the `MessageActionItem` type. + # + # @return [{ additionalPropertiesSupport?: boolean; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_client_capabilities.rb#20 + def message_action_item; end + + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_client_capabilities.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_client_capabilities.rb#30 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#4 +class LanguageServer::Protocol::Interface::ShowMessageRequestParams + # @return [ShowMessageRequestParams] a new instance of ShowMessageRequestParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#5 + def initialize(type:, message:, actions: T.unsafe(nil)); end + + # The message action items to present. + # + # @return [MessageActionItem[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#35 + def actions; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#39 + def attributes; end + + # The actual message + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#27 + def message; end + + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#41 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#45 + def to_json(*args); end + + # The message type. See {@link MessageType} + # + # @return [MessageType] + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#19 + def type; end +end + +# Signature help represents the signature of something +# callable. There can be multiple signature but only one +# active and only one active parameter. +# +# source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#9 +class LanguageServer::Protocol::Interface::SignatureHelp + # @return [SignatureHelp] a new instance of SignatureHelp + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#10 + def initialize(signatures:, active_signature: T.unsafe(nil), active_parameter: T.unsafe(nil)); end + + # The active parameter of the active signature. If omitted or the value + # lies outside the range of `signatures[activeSignature].parameters` + # defaults to 0 if the active signature has parameters. If + # the active signature has no parameters it is ignored. + # In future version of the protocol this property might become + # mandatory to better express the active parameter if the + # active signature does have any. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#55 + def active_parameter; end + + # The active signature. If omitted or the value lies outside the + # range of `signatures` the value defaults to zero or is ignore if + # the `SignatureHelp` as no signatures. + # + # Whenever possible implementors should make an active decision about + # the active signature and shouldn't rely on a default value. + # + # In future version of the protocol this property might become + # mandatory to better express this. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#41 + def active_signature; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#59 + def attributes; end + + # One or more signatures. If no signatures are available the signature help + # request should return `null`. + # + # @return [SignatureInformation[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#25 + def signatures; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#61 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#65 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::SignatureHelpClientCapabilities + # @return [SignatureHelpClientCapabilities] a new instance of SignatureHelpClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), signature_information: T.unsafe(nil), context_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#43 + def attributes; end + + # The client supports to send additional context information for a + # `textDocument/signatureHelp` request. A client that opts into + # contextSupport will also support the `retriggerCharacters` on + # `SignatureHelpOptions`. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#39 + def context_support; end + + # Whether signature help supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#19 + def dynamic_registration; end + + # The client supports the following `SignatureInformation` + # specific properties. + # + # @return [{ documentationFormat?: MarkupKind[]; parameterInformation?: { labelOffsetSupport?: boolean; }; activeParameterSupport?: boolean; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#28 + def signature_information; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#45 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#49 + def to_json(*args); end +end + +# Additional information about the context in which a signature help request +# was triggered. +# +# source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#8 +class LanguageServer::Protocol::Interface::SignatureHelpContext + # @return [SignatureHelpContext] a new instance of SignatureHelpContext + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#9 + def initialize(trigger_kind:, is_retrigger:, trigger_character: T.unsafe(nil), active_signature_help: T.unsafe(nil)); end + + # The currently active `SignatureHelp`. + # + # The `activeSignatureHelp` has its `SignatureHelp.activeSignature` field + # updated based on the user navigating through available signatures. + # + # @return [SignatureHelp] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#58 + def active_signature_help; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#62 + def attributes; end + + # `true` if signature help was already showing when it was triggered. + # + # Retriggers occur when the signature help is already active and can be + # caused by actions such as typing a trigger character, a cursor move, or + # document content changes. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#47 + def is_retrigger; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#64 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#68 + def to_json(*args); end + + # Character that caused signature help to be triggered. + # + # This is undefined when triggerKind !== + # SignatureHelpTriggerKind.TriggerCharacter + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#35 + def trigger_character; end + + # Action that caused signature help to be triggered. + # + # @return [SignatureHelpTriggerKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#24 + def trigger_kind; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#4 +class LanguageServer::Protocol::Interface::SignatureHelpOptions + # @return [SignatureHelpOptions] a new instance of SignatureHelpOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil), trigger_characters: T.unsafe(nil), retrigger_characters: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#41 + def attributes; end + + # List of characters that re-trigger signature help. + # + # These trigger characters are only active when signature help is already + # showing. All trigger characters are also counted as re-trigger + # characters. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#37 + def retrigger_characters; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#43 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#47 + def to_json(*args); end + + # The characters that trigger signature help + # automatically. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#25 + def trigger_characters; end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#16 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#4 +class LanguageServer::Protocol::Interface::SignatureHelpParams + # @return [SignatureHelpParams] a new instance of SignatureHelpParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil), context: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#50 + def attributes; end + + # The signature help context. This is only available if the client + # specifies to send this using the client capability + # `textDocument.signatureHelp.contextSupport === true` + # + # @return [SignatureHelpContext] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#46 + def context; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#28 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#20 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#52 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#56 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#36 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#4 +class LanguageServer::Protocol::Interface::SignatureHelpRegistrationOptions + # @return [SignatureHelpRegistrationOptions] a new instance of SignatureHelpRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), trigger_characters: T.unsafe(nil), retrigger_characters: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#51 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#21 + def document_selector; end + + # List of characters that re-trigger signature help. + # + # These trigger characters are only active when signature help is already + # showing. All trigger characters are also counted as re-trigger + # characters. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#47 + def retrigger_characters; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#53 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#57 + def to_json(*args); end + + # The characters that trigger signature help + # automatically. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#35 + def trigger_characters; end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#26 + def work_done_progress; end +end + +# Represents the signature of something callable. A signature +# can have a label, like a function-name, a doc-comment, and +# a set of parameters. +# +# source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#9 +class LanguageServer::Protocol::Interface::SignatureInformation + # @return [SignatureInformation] a new instance of SignatureInformation + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#10 + def initialize(label:, documentation: T.unsafe(nil), parameters: T.unsafe(nil), active_parameter: T.unsafe(nil)); end + + # The index of the active parameter. + # + # If provided, this is used in place of `SignatureHelp.activeParameter`. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#53 + def active_parameter; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#57 + def attributes; end + + # The human-readable doc-comment of this signature. Will be shown + # in the UI but can be omitted. + # + # @return [string | MarkupContent] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#35 + def documentation; end + + # The label of this signature. Will be shown in + # the UI. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#26 + def label; end + + # The parameters of this signature. + # + # @return [ParameterInformation[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#43 + def parameters; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#59 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#63 + def to_json(*args); end +end + +# Static registration options to be returned in the initialize request. +# +# source://language_server-protocol//lib/language_server/protocol/interface/static_registration_options.rb#7 +class LanguageServer::Protocol::Interface::StaticRegistrationOptions + # @return [StaticRegistrationOptions] a new instance of StaticRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/static_registration_options.rb#8 + def initialize(id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/static_registration_options.rb#25 + def attributes; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/static_registration_options.rb#21 + def id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/static_registration_options.rb#27 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/static_registration_options.rb#31 + def to_json(*args); end +end + +# Represents information about programming constructs like variables, classes, +# interfaces etc. +# +# source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#8 +class LanguageServer::Protocol::Interface::SymbolInformation + # @return [SymbolInformation] a new instance of SymbolInformation + # + # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#9 + def initialize(name:, kind:, location:, tags: T.unsafe(nil), deprecated: T.unsafe(nil), container_name: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#81 + def attributes; end + + # The name of the symbol containing this symbol. This information is for + # user interface purposes (e.g. to render a qualifier in the user interface + # if necessary). It can't be used to re-infer a hierarchy for the document + # symbols. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#77 + def container_name; end + + # Indicates if this symbol is deprecated. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#50 + def deprecated; end + + # The kind of this symbol. + # + # @return [SymbolKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#34 + def kind; end + + # The location of this symbol. The location's range is used by a tool + # to reveal the location in the editor. If the symbol is selected in the + # tool the range's start information is used to position the cursor. So + # the range usually spans more then the actual symbol's name and does + # normally include things like visibility modifiers. + # + # The range doesn't have to denote a node range in the sense of an abstract + # syntax tree. It can therefore not be used to re-construct a hierarchy of + # the symbols. + # + # @return [Location] + # + # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#66 + def location; end + + # The name of this symbol. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#26 + def name; end + + # Tags for this symbol. + # + # @return [1[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#42 + def tags; end + + # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#83 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#87 + def to_json(*args); end +end + +# Describe options to be used when registering for text document change events. +# +# source://language_server-protocol//lib/language_server/protocol/interface/text_document_change_registration_options.rb#7 +class LanguageServer::Protocol::Interface::TextDocumentChangeRegistrationOptions + # @return [TextDocumentChangeRegistrationOptions] a new instance of TextDocumentChangeRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_change_registration_options.rb#8 + def initialize(document_selector:, sync_kind:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_change_registration_options.rb#35 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_change_registration_options.rb#22 + def document_selector; end + + # How documents are synced to the server. See TextDocumentSyncKind.Full + # and TextDocumentSyncKind.Incremental. + # + # @return [TextDocumentSyncKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_change_registration_options.rb#31 + def sync_kind; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_change_registration_options.rb#37 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_change_registration_options.rb#41 + def to_json(*args); end +end + +# Text document specific client capabilities. +# +# source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#7 +class LanguageServer::Protocol::Interface::TextDocumentClientCapabilities + # @return [TextDocumentClientCapabilities] a new instance of TextDocumentClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#8 + def initialize(synchronization: T.unsafe(nil), completion: T.unsafe(nil), hover: T.unsafe(nil), signature_help: T.unsafe(nil), declaration: T.unsafe(nil), definition: T.unsafe(nil), type_definition: T.unsafe(nil), implementation: T.unsafe(nil), references: T.unsafe(nil), document_highlight: T.unsafe(nil), document_symbol: T.unsafe(nil), code_action: T.unsafe(nil), code_lens: T.unsafe(nil), document_link: T.unsafe(nil), color_provider: T.unsafe(nil), formatting: T.unsafe(nil), range_formatting: T.unsafe(nil), on_type_formatting: T.unsafe(nil), rename: T.unsafe(nil), publish_diagnostics: T.unsafe(nil), folding_range: T.unsafe(nil), selection_range: T.unsafe(nil), linked_editing_range: T.unsafe(nil), call_hierarchy: T.unsafe(nil), semantic_tokens: T.unsafe(nil), moniker: T.unsafe(nil), type_hierarchy: T.unsafe(nil), inline_value: T.unsafe(nil), inlay_hint: T.unsafe(nil), diagnostic: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#285 + def attributes; end + + # Capabilities specific to the various call hierarchy requests. + # + # @return [CallHierarchyClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#233 + def call_hierarchy; end + + # Capabilities specific to the `textDocument/codeAction` request. + # + # @return [CodeActionClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#134 + def code_action; end + + # Capabilities specific to the `textDocument/codeLens` request. + # + # @return [CodeLensClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#142 + def code_lens; end + + # Capabilities specific to the `textDocument/documentColor` and the + # `textDocument/colorPresentation` request. + # + # @return [DocumentColorClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#159 + def color_provider; end + + # Capabilities specific to the `textDocument/completion` request. + # + # @return [CompletionClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#54 + def completion; end + + # Capabilities specific to the `textDocument/declaration` request. + # + # @return [DeclarationClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#78 + def declaration; end + + # Capabilities specific to the `textDocument/definition` request. + # + # @return [DefinitionClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#86 + def definition; end + + # Capabilities specific to the diagnostic pull model. + # + # @return [DiagnosticClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#281 + def diagnostic; end + + # Capabilities specific to the `textDocument/documentHighlight` request. + # + # @return [DocumentHighlightClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#118 + def document_highlight; end + + # Capabilities specific to the `textDocument/documentLink` request. + # + # @return [DocumentLinkClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#150 + def document_link; end + + # Capabilities specific to the `textDocument/documentSymbol` request. + # + # @return [DocumentSymbolClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#126 + def document_symbol; end + + # Capabilities specific to the `textDocument/foldingRange` request. + # + # @return [FoldingRangeClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#209 + def folding_range; end + + # Capabilities specific to the `textDocument/formatting` request. + # + # @return [DocumentFormattingClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#167 + def formatting; end + + # Capabilities specific to the `textDocument/hover` request. + # + # @return [HoverClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#62 + def hover; end + + # Capabilities specific to the `textDocument/implementation` request. + # + # @return [ImplementationClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#102 + def implementation; end + + # Capabilities specific to the `textDocument/inlayHint` request. + # + # @return [InlayHintClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#273 + def inlay_hint; end + + # Capabilities specific to the `textDocument/inlineValue` request. + # + # @return [InlineValueClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#265 + def inline_value; end + + # Capabilities specific to the `textDocument/linkedEditingRange` request. + # + # @return [LinkedEditingRangeClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#225 + def linked_editing_range; end + + # Capabilities specific to the `textDocument/moniker` request. + # + # @return [MonikerClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#249 + def moniker; end + + # request. + # Capabilities specific to the `textDocument/onTypeFormatting` request. + # + # @return [DocumentOnTypeFormattingClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#184 + def on_type_formatting; end + + # Capabilities specific to the `textDocument/publishDiagnostics` + # notification. + # + # @return [PublishDiagnosticsClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#201 + def publish_diagnostics; end + + # Capabilities specific to the `textDocument/rangeFormatting` request. + # + # @return [DocumentRangeFormattingClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#175 + def range_formatting; end + + # Capabilities specific to the `textDocument/references` request. + # + # @return [ReferenceClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#110 + def references; end + + # Capabilities specific to the `textDocument/rename` request. + # + # @return [RenameClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#192 + def rename; end + + # Capabilities specific to the `textDocument/selectionRange` request. + # + # @return [SelectionRangeClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#217 + def selection_range; end + + # Capabilities specific to the various semantic token requests. + # + # @return [SemanticTokensClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#241 + def semantic_tokens; end + + # Capabilities specific to the `textDocument/signatureHelp` request. + # + # @return [SignatureHelpClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#70 + def signature_help; end + + # @return [TextDocumentSyncClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#46 + def synchronization; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#287 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#291 + def to_json(*args); end + + # Capabilities specific to the `textDocument/typeDefinition` request. + # + # @return [TypeDefinitionClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#94 + def type_definition; end + + # Capabilities specific to the various type hierarchy requests. + # + # @return [TypeHierarchyClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#257 + def type_hierarchy; end +end + +# An event describing a change to a text document. If only a text is provided +# it is considered to be the full content of the document. +# +# source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#8 +class LanguageServer::Protocol::Interface::TextDocumentContentChangeEvent + # @return [TextDocumentContentChangeEvent] a new instance of TextDocumentContentChangeEvent + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#9 + def initialize(text:, range: T.unsafe(nil), range_length: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#47 + def attributes; end + + # The range of the document that changed. + # + # @return [Range, nil] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#23 + def range; end + + # The optional length of the range that got replaced. + # + # @return [number, nil] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#31 + def range_length; end + + # The new text for the provided range. + # + # --- OR --- + # + # The new text of the whole document. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#43 + def text; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#49 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#53 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/text_document_edit.rb#4 +class LanguageServer::Protocol::Interface::TextDocumentEdit + # @return [TextDocumentEdit] a new instance of TextDocumentEdit + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_edit.rb#5 + def initialize(text_document:, edits:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_edit.rb#30 + def attributes; end + + # The edits to be applied. + # + # @return [(TextEdit | AnnotatedTextEdit)[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_edit.rb#26 + def edits; end + + # The text document to change. + # + # @return [OptionalVersionedTextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_edit.rb#18 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_edit.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_edit.rb#36 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/text_document_identifier.rb#4 +class LanguageServer::Protocol::Interface::TextDocumentIdentifier + # @return [TextDocumentIdentifier] a new instance of TextDocumentIdentifier + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_identifier.rb#5 + def initialize(uri:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_identifier.rb#21 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_identifier.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_identifier.rb#27 + def to_json(*args); end + + # The text document's URI. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_identifier.rb#17 + def uri; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#4 +class LanguageServer::Protocol::Interface::TextDocumentItem + # @return [TextDocumentItem] a new instance of TextDocumentItem + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#5 + def initialize(uri:, language_id:, version:, text:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#49 + def attributes; end + + # The text document's language identifier. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#28 + def language_id; end + + # The content of the opened text document. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#45 + def text; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#51 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#55 + def to_json(*args); end + + # The text document's URI. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#20 + def uri; end + + # The version number of this document (it will increase after each + # change, including undo/redo). + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#37 + def version; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/text_document_position_params.rb#4 +class LanguageServer::Protocol::Interface::TextDocumentPositionParams + # @return [TextDocumentPositionParams] a new instance of TextDocumentPositionParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_position_params.rb#5 + def initialize(text_document:, position:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_position_params.rb#30 + def attributes; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_position_params.rb#26 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_position_params.rb#18 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_position_params.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_position_params.rb#36 + def to_json(*args); end +end + +# General text document registration options. +# +# source://language_server-protocol//lib/language_server/protocol/interface/text_document_registration_options.rb#7 +class LanguageServer::Protocol::Interface::TextDocumentRegistrationOptions + # @return [TextDocumentRegistrationOptions] a new instance of TextDocumentRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_registration_options.rb#8 + def initialize(document_selector:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_registration_options.rb#25 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_registration_options.rb#21 + def document_selector; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_registration_options.rb#27 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_registration_options.rb#31 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/text_document_save_registration_options.rb#4 +class LanguageServer::Protocol::Interface::TextDocumentSaveRegistrationOptions + # @return [TextDocumentSaveRegistrationOptions] a new instance of TextDocumentSaveRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_save_registration_options.rb#5 + def initialize(document_selector:, include_text: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_save_registration_options.rb#31 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_save_registration_options.rb#19 + def document_selector; end + + # The client is supposed to include the content on save. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_save_registration_options.rb#27 + def include_text; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_save_registration_options.rb#33 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_save_registration_options.rb#37 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::TextDocumentSyncClientCapabilities + # @return [TextDocumentSyncClientCapabilities] a new instance of TextDocumentSyncClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), will_save: T.unsafe(nil), will_save_wait_until: T.unsafe(nil), did_save: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#50 + def attributes; end + + # The client supports did save notifications. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#46 + def did_save; end + + # Whether text document synchronization supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#20 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#52 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#56 + def to_json(*args); end + + # The client supports sending will save notifications. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#28 + def will_save; end + + # The client supports sending a will save request and + # waits for a response providing text edits which will + # be applied to the document before it is saved. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#38 + def will_save_wait_until; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#4 +class LanguageServer::Protocol::Interface::TextDocumentSyncOptions + # @return [TextDocumentSyncOptions] a new instance of TextDocumentSyncOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#5 + def initialize(open_close: T.unsafe(nil), change: T.unsafe(nil), will_save: T.unsafe(nil), will_save_wait_until: T.unsafe(nil), save: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#66 + def attributes; end + + # Change notifications are sent to the server. See + # TextDocumentSyncKind.None, TextDocumentSyncKind.Full and + # TextDocumentSyncKind.Incremental. If omitted it defaults to + # TextDocumentSyncKind.None. + # + # @return [TextDocumentSyncKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#35 + def change; end + + # Open and close notifications are sent to the server. If omitted open + # close notifications should not be sent. + # Open and close notifications are sent to the server. If omitted open + # close notification should not be sent. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#24 + def open_close; end + + # If present save notifications are sent to the server. If omitted the + # notification should not be sent. + # + # @return [boolean | SaveOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#62 + def save; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#68 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#72 + def to_json(*args); end + + # If present will save notifications are sent to the server. If omitted + # the notification should not be sent. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#44 + def will_save; end + + # If present will save wait until requests are sent to the server. If + # omitted the request should not be sent. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#53 + def will_save_wait_until; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/text_edit.rb#4 +class LanguageServer::Protocol::Interface::TextEdit + # @return [TextEdit] a new instance of TextEdit + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_edit.rb#5 + def initialize(range:, new_text:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_edit.rb#32 + def attributes; end + + # The string to be inserted. For delete operations use an + # empty string. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_edit.rb#28 + def new_text; end + + # The range of the text document to be manipulated. To insert + # text into a document create a range where start === end. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_edit.rb#19 + def range; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_edit.rb#34 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_edit.rb#38 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/type_definition_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::TypeDefinitionClientCapabilities + # @return [TypeDefinitionClientCapabilities] a new instance of TypeDefinitionClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), link_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_client_capabilities.rb#32 + def attributes; end + + # Whether implementation supports dynamic registration. If this is set to + # `true` the client supports the new `TypeDefinitionRegistrationOptions` + # return value for the corresponding server capability as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_client_capabilities.rb#20 + def dynamic_registration; end + + # The client supports additional metadata in the form of definition links. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_client_capabilities.rb#28 + def link_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_client_capabilities.rb#34 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_client_capabilities.rb#38 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/type_definition_options.rb#4 +class LanguageServer::Protocol::Interface::TypeDefinitionOptions + # @return [TypeDefinitionOptions] a new instance of TypeDefinitionOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#4 +class LanguageServer::Protocol::Interface::TypeDefinitionParams + # @return [TypeDefinitionParams] a new instance of TypeDefinitionParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#49 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#45 + def partial_result_token; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#28 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#20 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#51 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#55 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#36 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#4 +class LanguageServer::Protocol::Interface::TypeDefinitionRegistrationOptions + # @return [TypeDefinitionRegistrationOptions] a new instance of TypeDefinitionRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#38 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#20 + def document_selector; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#34 + def id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#40 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#44 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#25 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#4 +class LanguageServer::Protocol::Interface::TypeHierarchyItem + # @return [TypeHierarchyItem] a new instance of TypeHierarchyItem + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#5 + def initialize(name:, kind:, uri:, range:, selection_range:, tags: T.unsafe(nil), detail: T.unsafe(nil), data: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#90 + def attributes; end + + # A data entry field that is preserved between a type hierarchy prepare and + # supertypes or subtypes requests. It could also be used to identify the + # type hierarchy in the server, helping improve the performance on + # resolving supertypes and subtypes. + # + # @return [LSPAny] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#86 + def data; end + + # More detail for this item, e.g. the signature of a function. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#48 + def detail; end + + # The kind of this item. + # + # @return [SymbolKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#32 + def kind; end + + # The name of this item. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#24 + def name; end + + # The range enclosing this symbol not including leading/trailing whitespace + # but everything else, e.g. comments and code. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#65 + def range; end + + # The range that should be selected and revealed when this symbol is being + # picked, e.g. the name of a function. Must be contained by the + # [`range`](#TypeHierarchyItem.range). + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#75 + def selection_range; end + + # Tags for this item. + # + # @return [1[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#40 + def tags; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#92 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#96 + def to_json(*args); end + + # The resource identifier of this item. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#56 + def uri; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_options.rb#4 +class LanguageServer::Protocol::Interface::TypeHierarchyOptions + # @return [TypeHierarchyOptions] a new instance of TypeHierarchyOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#4 +class LanguageServer::Protocol::Interface::TypeHierarchyPrepareParams + # @return [TypeHierarchyPrepareParams] a new instance of TypeHierarchyPrepareParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#39 + def attributes; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#27 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#19 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#41 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#45 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#35 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#4 +class LanguageServer::Protocol::Interface::TypeHierarchyRegistrationOptions + # @return [TypeHierarchyRegistrationOptions] a new instance of TypeHierarchyRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#38 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#20 + def document_selector; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#34 + def id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#40 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#44 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#25 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#4 +class LanguageServer::Protocol::Interface::TypeHierarchySubtypesParams + # @return [TypeHierarchySubtypesParams] a new instance of TypeHierarchySubtypesParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#5 + def initialize(item:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#37 + def attributes; end + + # @return [TypeHierarchyItem] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#33 + def item; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#28 + def partial_result_token; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#39 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#43 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#19 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#4 +class LanguageServer::Protocol::Interface::TypeHierarchySupertypesParams + # @return [TypeHierarchySupertypesParams] a new instance of TypeHierarchySupertypesParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#5 + def initialize(item:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#37 + def attributes; end + + # @return [TypeHierarchyItem] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#33 + def item; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#28 + def partial_result_token; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#39 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#43 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#19 + def work_done_token; end +end + +# A diagnostic report indicating that the last returned +# report is still accurate. +# +# source://language_server-protocol//lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb#8 +class LanguageServer::Protocol::Interface::UnchangedDocumentDiagnosticReport + # @return [UnchangedDocumentDiagnosticReport] a new instance of UnchangedDocumentDiagnosticReport + # + # source://language_server-protocol//lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb#9 + def initialize(kind:, result_id:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb#38 + def attributes; end + + # A document diagnostic report indicating + # no changes to the last result. A server can + # only return `unchanged` if result ids are + # provided. + # + # @return [any] + # + # source://language_server-protocol//lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb#25 + def kind; end + + # A result id which will be sent on the next + # diagnostic request for the same document. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb#34 + def result_id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb#40 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb#44 + def to_json(*args); end +end + +# General parameters to unregister a capability. +# +# source://language_server-protocol//lib/language_server/protocol/interface/unregistration.rb#7 +class LanguageServer::Protocol::Interface::Unregistration + # @return [Unregistration] a new instance of Unregistration + # + # source://language_server-protocol//lib/language_server/protocol/interface/unregistration.rb#8 + def initialize(id:, method:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/unregistration.rb#34 + def attributes; end + + # The id used to unregister the request or notification. Usually an id + # provided during the register request. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/unregistration.rb#22 + def id; end + + # The method / capability to unregister for. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/unregistration.rb#30 + def method; end + + # source://language_server-protocol//lib/language_server/protocol/interface/unregistration.rb#36 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/unregistration.rb#40 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/unregistration_params.rb#4 +class LanguageServer::Protocol::Interface::UnregistrationParams + # @return [UnregistrationParams] a new instance of UnregistrationParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/unregistration_params.rb#5 + def initialize(unregisterations:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/unregistration_params.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/unregistration_params.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/unregistration_params.rb#24 + def to_json(*args); end + + # @return [Unregistration[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/unregistration_params.rb#14 + def unregisterations; end +end + +# A versioned notebook document identifier. +# +# source://language_server-protocol//lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb#7 +class LanguageServer::Protocol::Interface::VersionedNotebookDocumentIdentifier + # @return [VersionedNotebookDocumentIdentifier] a new instance of VersionedNotebookDocumentIdentifier + # + # source://language_server-protocol//lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb#8 + def initialize(version:, uri:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb#33 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb#39 + def to_json(*args); end + + # The notebook document's URI. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb#29 + def uri; end + + # The version number of this notebook document. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb#21 + def version; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/versioned_text_document_identifier.rb#4 +class LanguageServer::Protocol::Interface::VersionedTextDocumentIdentifier + # @return [VersionedTextDocumentIdentifier] a new instance of VersionedTextDocumentIdentifier + # + # source://language_server-protocol//lib/language_server/protocol/interface/versioned_text_document_identifier.rb#5 + def initialize(uri:, version:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/versioned_text_document_identifier.rb#33 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/versioned_text_document_identifier.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/versioned_text_document_identifier.rb#39 + def to_json(*args); end + + # The text document's URI. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/versioned_text_document_identifier.rb#18 + def uri; end + + # The version number of this document. + # + # The version number of a document will increase after each change, + # including undo/redo. The number doesn't need to be consecutive. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/versioned_text_document_identifier.rb#29 + def version; end +end + +# The parameters send in a will save text document notification. +# +# source://language_server-protocol//lib/language_server/protocol/interface/will_save_text_document_params.rb#7 +class LanguageServer::Protocol::Interface::WillSaveTextDocumentParams + # @return [WillSaveTextDocumentParams] a new instance of WillSaveTextDocumentParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/will_save_text_document_params.rb#8 + def initialize(text_document:, reason:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/will_save_text_document_params.rb#33 + def attributes; end + + # The 'TextDocumentSaveReason'. + # + # @return [TextDocumentSaveReason] + # + # source://language_server-protocol//lib/language_server/protocol/interface/will_save_text_document_params.rb#29 + def reason; end + + # The document that will be saved. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/will_save_text_document_params.rb#21 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/will_save_text_document_params.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/will_save_text_document_params.rb#39 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#4 +class LanguageServer::Protocol::Interface::WorkDoneProgressBegin + # @return [WorkDoneProgressBegin] a new instance of WorkDoneProgressBegin + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#5 + def initialize(kind:, title:, cancellable: T.unsafe(nil), message: T.unsafe(nil), percentage: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#68 + def attributes; end + + # Controls if a cancel button should show to allow the user to cancel the + # long running operation. Clients that don't support cancellation are + # allowed to ignore the setting. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#39 + def cancellable; end + + # @return ["begin"] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#18 + def kind; end + + # Optional, more detailed associated progress message. Contains + # complementary information to the `title`. + # + # Examples: "3/25 files", "project/src/module2", "node_modules/some_dep". + # If unset, the previous progress message (if any) is still valid. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#51 + def message; end + + # Optional progress percentage to display (value 100 is considered 100%). + # If not provided infinite progress is assumed and clients are allowed + # to ignore the `percentage` value in subsequent in report notifications. + # + # The value should be steadily rising. Clients are free to ignore values + # that are not following this rule. The value range is [0, 100] + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#64 + def percentage; end + + # Mandatory title of the progress operation. Used to briefly inform about + # the kind of operation being performed. + # + # Examples: "Indexing" or "Linking dependencies". + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#29 + def title; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#70 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#74 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_cancel_params.rb#4 +class LanguageServer::Protocol::Interface::WorkDoneProgressCancelParams + # @return [WorkDoneProgressCancelParams] a new instance of WorkDoneProgressCancelParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_cancel_params.rb#5 + def initialize(token:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_cancel_params.rb#21 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_cancel_params.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_cancel_params.rb#27 + def to_json(*args); end + + # The token to be used to report progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_cancel_params.rb#17 + def token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_create_params.rb#4 +class LanguageServer::Protocol::Interface::WorkDoneProgressCreateParams + # @return [WorkDoneProgressCreateParams] a new instance of WorkDoneProgressCreateParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_create_params.rb#5 + def initialize(token:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_create_params.rb#21 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_create_params.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_create_params.rb#27 + def to_json(*args); end + + # The token to be used to report progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_create_params.rb#17 + def token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_end.rb#4 +class LanguageServer::Protocol::Interface::WorkDoneProgressEnd + # @return [WorkDoneProgressEnd] a new instance of WorkDoneProgressEnd + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_end.rb#5 + def initialize(kind:, message: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_end.rb#28 + def attributes; end + + # @return ["end"] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_end.rb#15 + def kind; end + + # Optional, a final message indicating to for example indicate the outcome + # of the operation. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_end.rb#24 + def message; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_end.rb#30 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_end.rb#34 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_options.rb#4 +class LanguageServer::Protocol::Interface::WorkDoneProgressOptions + # @return [WorkDoneProgressOptions] a new instance of WorkDoneProgressOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_params.rb#4 +class LanguageServer::Protocol::Interface::WorkDoneProgressParams + # @return [WorkDoneProgressParams] a new instance of WorkDoneProgressParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_params.rb#5 + def initialize(work_done_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_params.rb#21 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_params.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_params.rb#27 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_params.rb#17 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#4 +class LanguageServer::Protocol::Interface::WorkDoneProgressReport + # @return [WorkDoneProgressReport] a new instance of WorkDoneProgressReport + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#5 + def initialize(kind:, cancellable: T.unsafe(nil), message: T.unsafe(nil), percentage: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#58 + def attributes; end + + # Controls enablement state of a cancel button. This property is only valid + # if a cancel button got requested in the `WorkDoneProgressBegin` payload. + # + # Clients that don't support cancellation or don't support control the + # button's enablement state are allowed to ignore the setting. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#29 + def cancellable; end + + # @return ["report"] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#17 + def kind; end + + # Optional, more detailed associated progress message. Contains + # complementary information to the `title`. + # + # Examples: "3/25 files", "project/src/module2", "node_modules/some_dep". + # If unset, the previous progress message (if any) is still valid. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#41 + def message; end + + # Optional progress percentage to display (value 100 is considered 100%). + # If not provided infinite progress is assumed and clients are allowed + # to ignore the `percentage` value in subsequent in report notifications. + # + # The value should be steadily rising. Clients are free to ignore values + # that are not following this rule. The value range is [0, 100] + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#54 + def percentage; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#60 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#64 + def to_json(*args); end +end + +# Parameters of the workspace diagnostic request. +# +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#7 +class LanguageServer::Protocol::Interface::WorkspaceDiagnosticParams + # @return [WorkspaceDiagnosticParams] a new instance of WorkspaceDiagnosticParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#8 + def initialize(previous_result_ids:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil), identifier: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#53 + def attributes; end + + # The additional identifier provided during registration. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#40 + def identifier; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#32 + def partial_result_token; end + + # The currently known diagnostic reports with their + # previous result ids. + # + # @return [PreviousResultId[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#49 + def previous_result_ids; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#55 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#59 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#23 + def work_done_token; end +end + +# A workspace diagnostic report. +# +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report.rb#7 +class LanguageServer::Protocol::Interface::WorkspaceDiagnosticReport + # @return [WorkspaceDiagnosticReport] a new instance of WorkspaceDiagnosticReport + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report.rb#8 + def initialize(items:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report.rb#21 + def attributes; end + + # @return [WorkspaceDocumentDiagnosticReport[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report.rb#17 + def items; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report.rb#27 + def to_json(*args); end +end + +# A partial result for a workspace diagnostic report. +# +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report_partial_result.rb#7 +class LanguageServer::Protocol::Interface::WorkspaceDiagnosticReportPartialResult + # @return [WorkspaceDiagnosticReportPartialResult] a new instance of WorkspaceDiagnosticReportPartialResult + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report_partial_result.rb#8 + def initialize(items:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report_partial_result.rb#21 + def attributes; end + + # @return [WorkspaceDocumentDiagnosticReport[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report_partial_result.rb#17 + def items; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report_partial_result.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report_partial_result.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#4 +class LanguageServer::Protocol::Interface::WorkspaceEdit + # @return [WorkspaceEdit] a new instance of WorkspaceEdit + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#5 + def initialize(changes: T.unsafe(nil), document_changes: T.unsafe(nil), change_annotations: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#56 + def attributes; end + + # A map of change annotations that can be referenced in + # `AnnotatedTextEdit`s or create, rename and delete file / folder + # operations. + # + # Whether clients honor this property depends on the client capability + # `workspace.changeAnnotationSupport`. + # + # @return [{ [id: string]: ChangeAnnotation; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#52 + def change_annotations; end + + # Holds changes to existing resources. + # + # @return [{}] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#19 + def changes; end + + # Depending on the client capability + # `workspace.workspaceEdit.resourceOperations` document changes are either + # an array of `TextDocumentEdit`s to express changes to n different text + # documents where each text document edit addresses a specific version of + # a text document. Or it can contain above `TextDocumentEdit`s mixed with + # create, rename and delete file / folder operations. + # + # Whether a client supports versioned document edits is expressed via + # `workspace.workspaceEdit.documentChanges` client capability. + # + # If a client neither supports `documentChanges` nor + # `workspace.workspaceEdit.resourceOperations` then only plain `TextEdit`s + # using the `changes` property are supported. + # + # @return [TextDocumentEdit[] | (TextDocumentEdit | CreateFile | RenameFile | DeleteFile)[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#39 + def document_changes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#58 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#62 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::WorkspaceEditClientCapabilities + # @return [WorkspaceEditClientCapabilities] a new instance of WorkspaceEditClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#5 + def initialize(document_changes: T.unsafe(nil), resource_operations: T.unsafe(nil), failure_handling: T.unsafe(nil), normalizes_line_endings: T.unsafe(nil), change_annotation_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#63 + def attributes; end + + # Whether the client in general supports change annotations on text edits, + # create file, rename file and delete file changes. + # + # @return [{ groupsOnLabel?: boolean; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#59 + def change_annotation_support; end + + # The client supports versioned document changes in `WorkspaceEdit`s + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#21 + def document_changes; end + + # The failure handling strategy of a client if applying the workspace edit + # fails. + # + # @return [FailureHandlingKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#39 + def failure_handling; end + + # Whether the client normalizes line endings to the client specific + # setting. + # If set to `true` the client will normalize line ending characters + # in a workspace edit to the client specific new line character(s). + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#50 + def normalizes_line_endings; end + + # The resource operations the client supports. Clients should at least + # support 'create', 'rename' and 'delete' files and folders. + # + # @return [ResourceOperationKind[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#30 + def resource_operations; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#65 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#69 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_folder.rb#4 +class LanguageServer::Protocol::Interface::WorkspaceFolder + # @return [WorkspaceFolder] a new instance of WorkspaceFolder + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folder.rb#5 + def initialize(uri:, name:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folder.rb#31 + def attributes; end + + # The name of the workspace folder. Used to refer to this + # workspace folder in the user interface. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folder.rb#27 + def name; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folder.rb#33 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folder.rb#37 + def to_json(*args); end + + # The associated URI for this workspace folder. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folder.rb#18 + def uri; end +end + +# The workspace folder change event. +# +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_change_event.rb#7 +class LanguageServer::Protocol::Interface::WorkspaceFoldersChangeEvent + # @return [WorkspaceFoldersChangeEvent] a new instance of WorkspaceFoldersChangeEvent + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_change_event.rb#8 + def initialize(added:, removed:); end + + # The array of added workspace folders + # + # @return [WorkspaceFolder[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_change_event.rb#21 + def added; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_change_event.rb#33 + def attributes; end + + # The array of the removed workspace folders + # + # @return [WorkspaceFolder[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_change_event.rb#29 + def removed; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_change_event.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_change_event.rb#39 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb#4 +class LanguageServer::Protocol::Interface::WorkspaceFoldersServerCapabilities + # @return [WorkspaceFoldersServerCapabilities] a new instance of WorkspaceFoldersServerCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb#5 + def initialize(supported: T.unsafe(nil), change_notifications: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb#36 + def attributes; end + + # Whether the server wants to receive workspace folder + # change notifications. + # + # If a string is provided, the string is treated as an ID + # under which the notification is registered on the client + # side. The ID can be used to unregister for these events + # using the `client/unregisterCapability` request. + # + # @return [string | boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb#32 + def change_notifications; end + + # The server has support for workspace folders + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb#18 + def supported; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb#38 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb#42 + def to_json(*args); end +end + +# A full document diagnostic report for a workspace diagnostic result. +# +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#7 +class LanguageServer::Protocol::Interface::WorkspaceFullDocumentDiagnosticReport + # @return [WorkspaceFullDocumentDiagnosticReport] a new instance of WorkspaceFullDocumentDiagnosticReport + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#8 + def initialize(kind:, items:, uri:, version:, result_id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#63 + def attributes; end + + # The actual items. + # + # @return [Diagnostic[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#42 + def items; end + + # A full document diagnostic report. + # + # @return [any] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#24 + def kind; end + + # An optional result id. If provided it will + # be sent on the next diagnostic request for the + # same document. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#34 + def result_id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#65 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#69 + def to_json(*args); end + + # The URI for which diagnostic information is reported. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#50 + def uri; end + + # The version number for which the diagnostics are reported. + # If the document is not marked as open `null` can be provided. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#59 + def version; end +end + +# A special workspace symbol that supports locations without a range +# +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#7 +class LanguageServer::Protocol::Interface::WorkspaceSymbol + # @return [WorkspaceSymbol] a new instance of WorkspaceSymbol + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#8 + def initialize(name:, kind:, location:, tags: T.unsafe(nil), container_name: T.unsafe(nil), data: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#77 + def attributes; end + + # The name of the symbol containing this symbol. This information is for + # user interface purposes (e.g. to render a qualifier in the user interface + # if necessary). It can't be used to re-infer a hierarchy for the document + # symbols. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#52 + def container_name; end + + # A data entry field that is preserved on a workspace symbol between a + # workspace symbol request and a workspace symbol resolve request. + # + # @return [LSPAny] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#73 + def data; end + + # The kind of this symbol. + # + # @return [SymbolKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#33 + def kind; end + + # The location of this symbol. Whether a server is allowed to + # return a location without a range depends on the client + # capability `workspace.symbol.resolveSupport`. + # + # See also `SymbolInformation.location`. + # + # @return [Location | { uri: string; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#64 + def location; end + + # The name of this symbol. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#25 + def name; end + + # Tags for this completion item. + # + # @return [1[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#41 + def tags; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#79 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#83 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::WorkspaceSymbolClientCapabilities + # @return [WorkspaceSymbolClientCapabilities] a new instance of WorkspaceSymbolClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), symbol_kind: T.unsafe(nil), tag_support: T.unsafe(nil), resolve_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#52 + def attributes; end + + # Symbol request supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#20 + def dynamic_registration; end + + # The client support partial workspace symbols. The client will send the + # request `workspaceSymbol/resolve` to the server to resolve additional + # properties. + # + # @return [{ properties: string[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#48 + def resolve_support; end + + # Specific capabilities for the `SymbolKind` in the `workspace/symbol` + # request. + # + # @return [{ valueSet?: SymbolKind[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#29 + def symbol_kind; end + + # The client supports tags on `SymbolInformation` and `WorkspaceSymbol`. + # Clients supporting tags have to handle unknown tags gracefully. + # + # @return [{ valueSet: 1[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#38 + def tag_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#54 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#58 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_options.rb#4 +class LanguageServer::Protocol::Interface::WorkspaceSymbolOptions + # @return [WorkspaceSymbolOptions] a new instance of WorkspaceSymbolOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_options.rb#28 + def attributes; end + + # The server provides support to resolve additional + # information for a workspace symbol. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_options.rb#24 + def resolve_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_options.rb#30 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_options.rb#34 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_options.rb#15 + def work_done_progress; end +end + +# The parameters of a Workspace Symbol Request. +# +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#7 +class LanguageServer::Protocol::Interface::WorkspaceSymbolParams + # @return [WorkspaceSymbolParams] a new instance of WorkspaceSymbolParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#8 + def initialize(query:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#44 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#31 + def partial_result_token; end + + # A query string to filter symbols by. Clients may send an empty + # string here to request all symbols. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#40 + def query; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#46 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#50 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#22 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_registration_options.rb#4 +class LanguageServer::Protocol::Interface::WorkspaceSymbolRegistrationOptions + # @return [WorkspaceSymbolRegistrationOptions] a new instance of WorkspaceSymbolRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_registration_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_registration_options.rb#28 + def attributes; end + + # The server provides support to resolve additional + # information for a workspace symbol. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_registration_options.rb#24 + def resolve_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_registration_options.rb#30 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_registration_options.rb#34 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_registration_options.rb#15 + def work_done_progress; end +end + +# An unchanged document diagnostic report for a workspace diagnostic result. +# +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#7 +class LanguageServer::Protocol::Interface::WorkspaceUnchangedDocumentDiagnosticReport + # @return [WorkspaceUnchangedDocumentDiagnosticReport] a new instance of WorkspaceUnchangedDocumentDiagnosticReport + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#8 + def initialize(kind:, result_id:, uri:, version:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#56 + def attributes; end + + # A document diagnostic report indicating + # no changes to the last result. A server can + # only return `unchanged` if result ids are + # provided. + # + # @return [any] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#26 + def kind; end + + # A result id which will be sent on the next + # diagnostic request for the same document. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#35 + def result_id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#58 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#62 + def to_json(*args); end + + # The URI for which diagnostic information is reported. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#43 + def uri; end + + # The version number for which the diagnostics are reported. + # If the document is not marked as open `null` can be provided. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#52 + def version; end +end + +# source://language_server-protocol//lib/language_server/protocol/transport/io/reader.rb#7 +module LanguageServer::Protocol::Transport; end + +# source://language_server-protocol//lib/language_server/protocol/transport/io/reader.rb#8 +module LanguageServer::Protocol::Transport::Io; end + +# source://language_server-protocol//lib/language_server/protocol/transport/io/reader.rb#9 +class LanguageServer::Protocol::Transport::Io::Reader + # @return [Reader] a new instance of Reader + # + # source://language_server-protocol//lib/language_server/protocol/transport/io/reader.rb#10 + def initialize(io); end + + # source://language_server-protocol//lib/language_server/protocol/transport/io/reader.rb#15 + def read(&block); end + + private + + # Returns the value of attribute io. + # + # source://language_server-protocol//lib/language_server/protocol/transport/io/reader.rb#26 + def io; end +end + +# source://language_server-protocol//lib/language_server/protocol/transport/io/writer.rb#5 +class LanguageServer::Protocol::Transport::Io::Writer + # @return [Writer] a new instance of Writer + # + # source://language_server-protocol//lib/language_server/protocol/transport/io/writer.rb#8 + def initialize(io); end + + # Returns the value of attribute io. + # + # source://language_server-protocol//lib/language_server/protocol/transport/io/writer.rb#6 + def io; end + + # source://language_server-protocol//lib/language_server/protocol/transport/io/writer.rb#13 + def write(response); end +end + +# source://language_server-protocol//lib/language_server/protocol/transport/stdio/reader.rb#4 +module LanguageServer::Protocol::Transport::Stdio; end + +# source://language_server-protocol//lib/language_server/protocol/transport/stdio/reader.rb#5 +class LanguageServer::Protocol::Transport::Stdio::Reader < ::LanguageServer::Protocol::Transport::Io::Reader + # @return [Reader] a new instance of Reader + # + # source://language_server-protocol//lib/language_server/protocol/transport/stdio/reader.rb#6 + def initialize; end +end + +# source://language_server-protocol//lib/language_server/protocol/transport/stdio/writer.rb#5 +class LanguageServer::Protocol::Transport::Stdio::Writer < ::LanguageServer::Protocol::Transport::Io::Writer + # @return [Writer] a new instance of Writer + # + # source://language_server-protocol//lib/language_server/protocol/transport/stdio/writer.rb#6 + def initialize; end +end + +# source://language_server-protocol//lib/language_server/protocol/version.rb#3 +LanguageServer::Protocol::VERSION = T.let(T.unsafe(nil), String) diff --git a/Library/Homebrew/sorbet/rbi/gems/method_source@1.0.0.rbi b/Library/Homebrew/sorbet/rbi/gems/method_source@1.0.0.rbi index b7ecbb694710c4..039ac9d5d050f9 100644 --- a/Library/Homebrew/sorbet/rbi/gems/method_source@1.0.0.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/method_source@1.0.0.rbi @@ -4,69 +4,269 @@ # This is an autogenerated file for types exported from the `method_source` gem. # Please instead update this file by running `bin/tapioca gem method_source`. +# source://method_source//lib/method_source.rb#127 +class Method + include ::MethodSource::SourceLocation::MethodExtensions + include ::MethodSource::MethodExtensions +end + +# source://method_source//lib/method_source/version.rb#1 module MethodSource extend ::MethodSource::CodeHelpers class << self + # Helper method responsible for opening source file and buffering up + # the comments for a specified method. Defined here to avoid polluting + # `Method` class. + # + # @param source_location [Array] The array returned by Method#source_location + # @param method_name [String] + # @raise [SourceNotFoundError] + # @return [String] The comments up to the point of the method. + # + # source://method_source//lib/method_source.rb#38 def comment_helper(source_location, name = T.unsafe(nil)); end + + # @deprecated — use MethodSource::CodeHelpers#expression_at + # + # source://method_source//lib/method_source.rb#66 def extract_code(source_location); end + + # Load a memoized copy of the lines in a file. + # + # @param file_name [String] + # @param method_name [String] + # @raise [SourceNotFoundError] + # @return [Array] the contents of the file + # + # source://method_source//lib/method_source.rb#51 def lines_for(file_name, name = T.unsafe(nil)); end + + # Helper method responsible for extracting method body. + # Defined here to avoid polluting `Method` class. + # + # @param source_location [Array] The array returned by Method#source_location + # @param method_name [String] + # @return [String] The method body + # + # source://method_source//lib/method_source.rb#23 def source_helper(source_location, name = T.unsafe(nil)); end + + # @deprecated — use MethodSource::CodeHelpers#complete_expression? + # @return [Boolean] + # + # source://method_source//lib/method_source.rb#59 def valid_expression?(str); end end end +# source://method_source//lib/method_source/code_helpers.rb#3 module MethodSource::CodeHelpers + # Retrieve the comment describing the expression on the given line of the given file. + # + # This is useful to get module or method documentation. + # + # @param file [Array, File, String] The file to parse, either as a File or as + # a String or an Array of lines. + # @param line_number [Integer] The line number at which to look. + # NOTE: The first line in a file is line 1! + # @return [String] The comment + # + # source://method_source//lib/method_source/code_helpers.rb#52 def comment_describing(file, line_number); end + + # Determine if a string of code is a complete Ruby expression. + # + # @example + # complete_expression?("class Hello") #=> false + # complete_expression?("class Hello; end") #=> true + # complete_expression?("class 123") #=> SyntaxError: unexpected tINTEGER + # @param code [String] The code to validate. + # @raise [SyntaxError] Any SyntaxError that does not represent incompleteness. + # @return [Boolean] Whether or not the code is a complete Ruby expression. + # + # source://method_source//lib/method_source/code_helpers.rb#66 def complete_expression?(str); end + + # Retrieve the first expression starting on the given line of the given file. + # + # This is useful to get module or method source code. + # + # line 1! + # + # @option options + # @option options + # @param file [Array, File, String] The file to parse, either as a File or as + # @param line_number [Integer] The line number at which to look. + # NOTE: The first line in a file is + # @param options [Hash] The optional configuration parameters. + # @raise [SyntaxError] If the first complete expression can't be identified + # @return [String] The first complete expression + # + # source://method_source//lib/method_source/code_helpers.rb#20 def expression_at(file, line_number, options = T.unsafe(nil)); end private + # Get the first expression from the input. + # + # @param lines [Array] + # @param consume [Integer] A number of lines to automatically + # consume (add to the expression buffer) without checking for validity. + # @raise [SyntaxError] + # @return [String] a valid ruby expression + # @yield a clean-up function to run before checking for complete_expression + # + # source://method_source//lib/method_source/code_helpers.rb#92 def extract_first_expression(lines, consume = T.unsafe(nil), &block); end + + # Get the last comment from the input. + # + # @param lines [Array] + # @return [String] + # + # source://method_source//lib/method_source/code_helpers.rb#106 def extract_last_comment(lines); end end +# An exception matcher that matches only subsets of SyntaxErrors that can be +# fixed by adding more input to the buffer. +# +# source://method_source//lib/method_source/code_helpers.rb#124 module MethodSource::CodeHelpers::IncompleteExpression class << self + # source://method_source//lib/method_source/code_helpers.rb#137 def ===(ex); end + + # @return [Boolean] + # + # source://method_source//lib/method_source/code_helpers.rb#149 def rbx?; end end end +# source://method_source//lib/method_source/code_helpers.rb#125 MethodSource::CodeHelpers::IncompleteExpression::GENERIC_REGEXPS = T.let(T.unsafe(nil), Array) + +# source://method_source//lib/method_source/code_helpers.rb#133 MethodSource::CodeHelpers::IncompleteExpression::RBX_ONLY_REGEXPS = T.let(T.unsafe(nil), Array) +# This module is to be included by `Method` and `UnboundMethod` and +# provides the `#source` functionality +# +# source://method_source//lib/method_source.rb#72 module MethodSource::MethodExtensions + # Return the comments associated with the method as a string. + # + # @example + # Set.instance_method(:clear).comment.display + # => + # # Removes all elements and returns self. + # @raise SourceNotFoundException + # @return [String] The method's comments as a string + # + # source://method_source//lib/method_source.rb#121 def comment; end + + # Return the sourcecode for the method as a string + # + # @example + # Set.instance_method(:clear).source.display + # => + # def clear + # @hash.clear + # self + # end + # @raise SourceNotFoundException + # @return [String] The method sourcecode as a string + # + # source://method_source//lib/method_source.rb#109 def source; end class << self + # We use the included hook to patch Method#source on rubinius. + # We need to use the included hook as Rubinius defines a `source` + # on Method so including a module will have no effect (as it's + # higher up the MRO). + # + # @param klass [Class] The class that includes the module. + # + # source://method_source//lib/method_source.rb#79 def included(klass); end end end +# source://method_source//lib/method_source/source_location.rb#2 module MethodSource::ReeSourceLocation + # Ruby enterprise edition provides all the information that's + # needed, in a slightly different way. + # + # source://method_source//lib/method_source/source_location.rb#5 def source_location; end end +# source://method_source//lib/method_source/source_location.rb#10 module MethodSource::SourceLocation; end +# source://method_source//lib/method_source/source_location.rb#11 module MethodSource::SourceLocation::MethodExtensions + # Return the source location of a method for Ruby 1.8. + # + # @return [Array] A two element array. First element is the + # file, second element is the line in the file where the + # method definition is found. + # + # source://method_source//lib/method_source/source_location.rb#40 def source_location; end private + # source://method_source//lib/method_source/source_location.rb#26 def trace_func(event, file, line, id, binding, classname); end end +# source://method_source//lib/method_source/source_location.rb#54 module MethodSource::SourceLocation::ProcExtensions + # Return the source location for a Proc (in implementations + # without Proc#source_location) + # + # @return [Array] A two element array. First element is the + # file, second element is the line in the file where the + # proc definition is found. + # + # source://method_source//lib/method_source/source_location.rb#74 def source_location; end end +# source://method_source//lib/method_source/source_location.rb#81 module MethodSource::SourceLocation::UnboundMethodExtensions + # Return the source location of an instance method for Ruby 1.8. + # + # @return [Array] A two element array. First element is the + # file, second element is the line in the file where the + # method definition is found. + # + # source://method_source//lib/method_source/source_location.rb#101 def source_location; end end +# An Exception to mark errors that were raised trying to find the source from +# a given source_location. +# +# source://method_source//lib/method_source.rb#16 class MethodSource::SourceNotFoundError < ::StandardError; end + +# source://method_source//lib/method_source/version.rb#2 MethodSource::VERSION = T.let(T.unsafe(nil), String) + +# source://method_source//lib/method_source.rb#137 +class Proc + include ::MethodSource::SourceLocation::ProcExtensions + include ::MethodSource::MethodExtensions +end + +# source://method_source//lib/method_source.rb#132 +class UnboundMethod + include ::MethodSource::SourceLocation::UnboundMethodExtensions + include ::MethodSource::MethodExtensions +end diff --git a/Library/Homebrew/sorbet/rbi/gems/minitest@5.20.0.rbi b/Library/Homebrew/sorbet/rbi/gems/minitest@5.20.0.rbi index 9357eb287bb392..44109c3be200aa 100644 --- a/Library/Homebrew/sorbet/rbi/gems/minitest@5.20.0.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/minitest@5.20.0.rbi @@ -4,289 +4,1300 @@ # This is an autogenerated file for types exported from the `minitest` gem. # Please instead update this file by running `bin/tapioca gem minitest`. +# :include: README.rdoc +# +# source://minitest//lib/minitest/parallel.rb#1 module Minitest class << self + # Internal run method. Responsible for telling all Runnable + # sub-classes to run. + # + # source://minitest//lib/minitest.rb#176 def __run(reporter, options); end + + # A simple hook allowing you to run a block of code after everything + # is done running. Eg: + # + # Minitest.after_run { p $debugging_info } + # + # source://minitest//lib/minitest.rb#97 def after_run(&block); end + + # source://minitest//lib/minitest.rb#19 def allow_fork; end + + # source://minitest//lib/minitest.rb#19 def allow_fork=(_arg0); end + + # Registers Minitest to run at process exit + # + # source://minitest//lib/minitest.rb#69 def autorun; end + + # source://minitest//lib/minitest.rb#19 def backtrace_filter; end + + # source://minitest//lib/minitest.rb#19 def backtrace_filter=(_arg0); end + + # source://minitest//lib/minitest.rb#18 def cattr_accessor(name); end + + # source://minitest//lib/minitest.rb#1102 def clock_time; end + + # source://minitest//lib/minitest.rb#19 def extensions; end + + # source://minitest//lib/minitest.rb#19 def extensions=(_arg0); end + + # source://minitest//lib/minitest.rb#267 def filter_backtrace(bt); end + + # source://minitest//lib/minitest.rb#19 def info_signal; end + + # source://minitest//lib/minitest.rb#19 def info_signal=(_arg0); end + + # source://minitest//lib/minitest.rb#101 def init_plugins(options); end + + # source://minitest//lib/minitest.rb#108 def load_plugins; end + + # source://minitest//lib/minitest.rb#19 def parallel_executor; end + + # source://minitest//lib/minitest.rb#19 def parallel_executor=(_arg0); end + + # source://minitest//lib/minitest.rb#189 def process_args(args = T.unsafe(nil)); end + + # source://minitest//lib/minitest.rb#19 def reporter; end + + # source://minitest//lib/minitest.rb#19 def reporter=(_arg0); end + + # This is the top-level run method. Everything starts from here. It + # tells each Runnable sub-class to run, and each of those are + # responsible for doing whatever they do. + # + # The overall structure of a run looks like this: + # + # Minitest.autorun + # Minitest.run(args) + # Minitest.__run(reporter, options) + # Runnable.runnables.each + # runnable.run(reporter, options) + # self.runnable_methods.each + # self.run_one_method(self, runnable_method, reporter) + # Minitest.run_one_method(klass, runnable_method) + # klass.new(runnable_method).run + # + # source://minitest//lib/minitest.rb#143 def run(args = T.unsafe(nil)); end + + # source://minitest//lib/minitest.rb#1093 def run_one_method(klass, method_name); end + + # source://minitest//lib/minitest.rb#19 def seed; end + + # source://minitest//lib/minitest.rb#19 def seed=(_arg0); end end end +# Defines the API for Reporters. Subclass this and override whatever +# you want. Go nuts. +# +# source://minitest//lib/minitest.rb#621 class Minitest::AbstractReporter include ::Mutex_m + # source://mutex_m/0.1.1/mutex_m.rb#93 def lock; end + + # source://mutex_m/0.1.1/mutex_m.rb#83 def locked?; end + + # Did this run pass? + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#655 def passed?; end + + # About to start running a test. This allows a reporter to show + # that it is starting or that we are in the middle of a test run. + # + # source://minitest//lib/minitest.rb#634 def prerecord(klass, name); end + + # Output and record the result of the test. Call + # {result#result_code}[rdoc-ref:Runnable#result_code] to get the + # result character string. Stores the result of the run if the run + # did not pass. + # + # source://minitest//lib/minitest.rb#643 def record(result); end + + # Outputs the summary of the run. + # + # source://minitest//lib/minitest.rb#649 def report; end + + # Starts reporting on the run. + # + # source://minitest//lib/minitest.rb#627 def start; end + + # source://mutex_m/0.1.1/mutex_m.rb#78 def synchronize(&block); end + + # source://mutex_m/0.1.1/mutex_m.rb#88 def try_lock; end + + # source://mutex_m/0.1.1/mutex_m.rb#98 def unlock; end end +# Represents run failures. +# +# source://minitest//lib/minitest.rb#938 class Minitest::Assertion < ::Exception + # source://minitest//lib/minitest.rb#939 def error; end + + # Where was this run before an assertion was raised? + # + # source://minitest//lib/minitest.rb#946 def location; end + + # source://minitest//lib/minitest.rb#955 def result_code; end + + # source://minitest//lib/minitest.rb#959 def result_label; end end +# Minitest Assertions. All assertion methods accept a +msg+ which is +# printed if the assertion fails. +# +# Protocol: Nearly everything here boils up to +assert+, which +# expects to be able to increment an instance accessor named +# +assertions+. This is not provided by Assertions and must be +# provided by the thing including Assertions. See Minitest::Runnable +# for an example. +# +# source://minitest//lib/minitest/assertions.rb#18 module Minitest::Assertions + # source://minitest//lib/minitest/assertions.rb#188 def _synchronize; end + + # Fails unless +test+ is truthy. + # + # source://minitest//lib/minitest/assertions.rb#178 def assert(test, msg = T.unsafe(nil)); end + + # Fails unless +obj+ is empty. + # + # source://minitest//lib/minitest/assertions.rb#195 def assert_empty(obj, msg = T.unsafe(nil)); end + + # Fails unless exp == act printing the difference between + # the two, if possible. + # + # If there is no visible difference but the assertion fails, you + # should suspect that your #== is buggy, or your inspect output is + # missing crucial details. For nicer structural diffing, set + # Minitest::Test.make_my_diffs_pretty! + # + # For floats use assert_in_delta. + # + # See also: Minitest::Assertions.diff + # + # source://minitest//lib/minitest/assertions.rb#216 def assert_equal(exp, act, msg = T.unsafe(nil)); end + + # For comparing Floats. Fails unless +exp+ and +act+ are within +delta+ + # of each other. + # + # assert_in_delta Math::PI, (22.0 / 7.0), 0.01 + # + # source://minitest//lib/minitest/assertions.rb#240 def assert_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end + + # For comparing Floats. Fails unless +exp+ and +act+ have a relative + # error less than +epsilon+. + # + # source://minitest//lib/minitest/assertions.rb#252 def assert_in_epsilon(exp, act, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end + + # Fails unless +collection+ includes +obj+. + # + # source://minitest//lib/minitest/assertions.rb#259 def assert_includes(collection, obj, msg = T.unsafe(nil)); end + + # Fails unless +obj+ is an instance of +cls+. + # + # source://minitest//lib/minitest/assertions.rb#270 def assert_instance_of(cls, obj, msg = T.unsafe(nil)); end + + # Fails unless +obj+ is a kind of +cls+. + # + # source://minitest//lib/minitest/assertions.rb#281 def assert_kind_of(cls, obj, msg = T.unsafe(nil)); end + + # Fails unless +matcher+ =~ +obj+. + # + # source://minitest//lib/minitest/assertions.rb#291 def assert_match(matcher, obj, msg = T.unsafe(nil)); end + + # Fails unless +obj+ is nil + # + # source://minitest//lib/minitest/assertions.rb#303 def assert_nil(obj, msg = T.unsafe(nil)); end + + # For testing with binary operators. Eg: + # + # assert_operator 5, :<=, 4 + # + # source://minitest//lib/minitest/assertions.rb#313 def assert_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end + + # Fails if stdout or stderr do not output the expected results. + # Pass in nil if you don't care about that streams output. Pass in + # "" if you require it to be silent. Pass in a regexp if you want + # to pattern match. + # + # assert_output(/hey/) { method_with_output } + # + # NOTE: this uses #capture_io, not #capture_subprocess_io. + # + # See also: #assert_silent + # + # source://minitest//lib/minitest/assertions.rb#331 def assert_output(stdout = T.unsafe(nil), stderr = T.unsafe(nil)); end + + # Fails unless +path+ exists. + # + # source://minitest//lib/minitest/assertions.rb#355 def assert_path_exists(path, msg = T.unsafe(nil)); end + + # For testing with pattern matching (only supported with Ruby 3.0 and later) + # + # # pass + # assert_pattern { [1,2,3] => [Integer, Integer, Integer] } + # + # # fail "length mismatch (given 3, expected 1)" + # assert_pattern { [1,2,3] => [Integer] } + # + # The bare => pattern will raise a NoMatchingPatternError on failure, which would + # normally be counted as a test error. This assertion rescues NoMatchingPatternError and + # generates a test failure. Any other exception will be raised as normal and generate a test + # error. + # + # @raise [NotImplementedError] + # + # source://minitest//lib/minitest/assertions.rb#374 def assert_pattern; end + + # For testing with predicates. Eg: + # + # assert_predicate str, :empty? + # + # This is really meant for specs and is front-ended by assert_operator: + # + # str.must_be :empty? + # + # source://minitest//lib/minitest/assertions.rb#395 def assert_predicate(o1, op, msg = T.unsafe(nil)); end + + # Fails unless the block raises one of +exp+. Returns the + # exception matched so you can check the message, attributes, etc. + # + # +exp+ takes an optional message on the end to help explain + # failures and defaults to StandardError if no exception class is + # passed. Eg: + # + # assert_raises(CustomError) { method_with_custom_error } + # + # With custom error message: + # + # assert_raises(CustomError, 'This should have raised CustomError') { method_with_custom_error } + # + # Using the returned object: + # + # error = assert_raises(CustomError) do + # raise CustomError, 'This is really bad' + # end + # + # assert_equal 'This is really bad', error.message + # + # source://minitest//lib/minitest/assertions.rb#422 def assert_raises(*exp); end + + # Fails unless +obj+ responds to +meth+. + # + # source://minitest//lib/minitest/assertions.rb#453 def assert_respond_to(obj, meth, msg = T.unsafe(nil)); end + + # Fails unless +exp+ and +act+ are #equal? + # + # source://minitest//lib/minitest/assertions.rb#463 def assert_same(exp, act, msg = T.unsafe(nil)); end + + # +send_ary+ is a receiver, message and arguments. + # + # Fails unless the call returns a true value + # + # source://minitest//lib/minitest/assertions.rb#476 def assert_send(send_ary, m = T.unsafe(nil)); end + + # Fails if the block outputs anything to stderr or stdout. + # + # See also: #assert_output + # + # source://minitest//lib/minitest/assertions.rb#492 def assert_silent; end + + # Fails unless the block throws +sym+ + # + # source://minitest//lib/minitest/assertions.rb#501 def assert_throws(sym, msg = T.unsafe(nil)); end + + # Captures $stdout and $stderr into strings: + # + # out, err = capture_io do + # puts "Some info" + # warn "You did a bad thing" + # end + # + # assert_match %r%info%, out + # assert_match %r%bad%, err + # + # NOTE: For efficiency, this method uses StringIO and does not + # capture IO for subprocesses. Use #capture_subprocess_io for + # that. + # + # source://minitest//lib/minitest/assertions.rb#542 def capture_io; end + + # Captures $stdout and $stderr into strings, using Tempfile to + # ensure that subprocess IO is captured as well. + # + # out, err = capture_subprocess_io do + # system "echo Some info" + # system "echo You did a bad thing 1>&2" + # end + # + # assert_match %r%info%, out + # assert_match %r%bad%, err + # + # NOTE: This method is approximately 10x slower than #capture_io so + # only use it when you need to test the output of a subprocess. + # + # source://minitest//lib/minitest/assertions.rb#575 def capture_subprocess_io; end + + # Returns a diff between +exp+ and +act+. If there is no known + # diff command or if it doesn't make sense to diff the output + # (single line, short output), then it simply returns a basic + # comparison between the two. + # + # See +things_to_diff+ for more info. + # + # source://minitest//lib/minitest/assertions.rb#59 def diff(exp, act); end + + # Returns details for exception +e+ + # + # source://minitest//lib/minitest/assertions.rb#607 def exception_details(e, msg); end + + # Fails after a given date (in the local time zone). This allows + # you to put time-bombs in your tests if you need to keep + # something around until a later date lest you forget about it. + # + # source://minitest//lib/minitest/assertions.rb#623 def fail_after(y, m, d, msg); end + + # Fails with +msg+. + # + # source://minitest//lib/minitest/assertions.rb#630 def flunk(msg = T.unsafe(nil)); end + + # Returns a proc that will output +msg+ along with the default message. + # + # source://minitest//lib/minitest/assertions.rb#638 def message(msg = T.unsafe(nil), ending = T.unsafe(nil), &default); end + + # This returns a human-readable version of +obj+. By default + # #inspect is called. You can override this to use #pretty_inspect + # if you want. + # + # See Minitest::Test.make_my_diffs_pretty! + # + # source://minitest//lib/minitest/assertions.rb#129 def mu_pp(obj); end + + # This returns a diff-able more human-readable version of +obj+. + # This differs from the regular mu_pp because it expands escaped + # newlines and makes hex-values (like object_ids) generic. This + # uses mu_pp to do the first pass and then cleans it up. + # + # source://minitest//lib/minitest/assertions.rb#152 def mu_pp_for_diff(obj); end + + # used for counting assertions + # + # source://minitest//lib/minitest/assertions.rb#649 def pass(_msg = T.unsafe(nil)); end + + # Fails if +test+ is truthy. + # + # source://minitest//lib/minitest/assertions.rb#656 def refute(test, msg = T.unsafe(nil)); end + + # Fails if +obj+ is empty. + # + # source://minitest//lib/minitest/assertions.rb#664 def refute_empty(obj, msg = T.unsafe(nil)); end + + # Fails if exp == act. + # + # For floats use refute_in_delta. + # + # source://minitest//lib/minitest/assertions.rb#675 def refute_equal(exp, act, msg = T.unsafe(nil)); end + + # For comparing Floats. Fails if +exp+ is within +delta+ of +act+. + # + # refute_in_delta Math::PI, (22.0 / 7.0) + # + # source://minitest//lib/minitest/assertions.rb#687 def refute_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end + + # For comparing Floats. Fails if +exp+ and +act+ have a relative error + # less than +epsilon+. + # + # source://minitest//lib/minitest/assertions.rb#699 def refute_in_epsilon(a, b, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end + + # Fails if +collection+ includes +obj+. + # + # source://minitest//lib/minitest/assertions.rb#706 def refute_includes(collection, obj, msg = T.unsafe(nil)); end + + # Fails if +obj+ is an instance of +cls+. + # + # source://minitest//lib/minitest/assertions.rb#717 def refute_instance_of(cls, obj, msg = T.unsafe(nil)); end + + # Fails if +obj+ is a kind of +cls+. + # + # source://minitest//lib/minitest/assertions.rb#727 def refute_kind_of(cls, obj, msg = T.unsafe(nil)); end + + # Fails if +matcher+ =~ +obj+. + # + # source://minitest//lib/minitest/assertions.rb#735 def refute_match(matcher, obj, msg = T.unsafe(nil)); end + + # Fails if +obj+ is nil. + # + # source://minitest//lib/minitest/assertions.rb#745 def refute_nil(obj, msg = T.unsafe(nil)); end + + # Fails if +o1+ is not +op+ +o2+. Eg: + # + # refute_operator 1, :>, 2 #=> pass + # refute_operator 1, :<, 2 #=> fail + # + # source://minitest//lib/minitest/assertions.rb#780 def refute_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end + + # Fails if +path+ exists. + # + # source://minitest//lib/minitest/assertions.rb#789 def refute_path_exists(path, msg = T.unsafe(nil)); end + + # For testing with pattern matching (only supported with Ruby 3.0 and later) + # + # # pass + # refute_pattern { [1,2,3] => [String] } + # + # # fail "NoMatchingPatternError expected, but nothing was raised." + # refute_pattern { [1,2,3] => [Integer, Integer, Integer] } + # + # This assertion expects a NoMatchingPatternError exception, and will fail if none is raised. Any + # other exceptions will be raised as normal and generate a test error. + # + # @raise [NotImplementedError] + # + # source://minitest//lib/minitest/assertions.rb#762 def refute_pattern; end + + # For testing with predicates. + # + # refute_predicate str, :empty? + # + # This is really meant for specs and is front-ended by refute_operator: + # + # str.wont_be :empty? + # + # source://minitest//lib/minitest/assertions.rb#803 def refute_predicate(o1, op, msg = T.unsafe(nil)); end + + # Fails if +obj+ responds to the message +meth+. + # + # source://minitest//lib/minitest/assertions.rb#811 def refute_respond_to(obj, meth, msg = T.unsafe(nil)); end + + # Fails if +exp+ is the same (by object identity) as +act+. + # + # source://minitest//lib/minitest/assertions.rb#820 def refute_same(exp, act, msg = T.unsafe(nil)); end + + # Skips the current run. If run in verbose-mode, the skipped run + # gets listed at the end of the run but doesn't cause a failure + # exit code. + # + # @raise [Minitest::Skip] + # + # source://minitest//lib/minitest/assertions.rb#833 def skip(msg = T.unsafe(nil), bt = T.unsafe(nil)); end + + # Skips the current run until a given date (in the local time + # zone). This allows you to put some fixes on hold until a later + # date, but still holds you accountable and prevents you from + # forgetting it. + # + # source://minitest//lib/minitest/assertions.rb#845 def skip_until(y, m, d, msg); end + + # Was this testcase skipped? Meant for #teardown. + # + # @return [Boolean] + # + # source://minitest//lib/minitest/assertions.rb#854 def skipped?; end + + # Returns things to diff [expect, butwas], or [nil, nil] if nothing to diff. + # + # Criterion: + # + # 1. Strings include newlines or escaped newlines, but not both. + # 2. or: String lengths are > 30 characters. + # 3. or: Strings are equal to each other (but maybe different encodings?). + # 4. and: we found a diff executable. + # + # source://minitest//lib/minitest/assertions.rb#104 def things_to_diff(exp, act); end class << self + # Returns the diff command to use in #diff. Tries to intelligently + # figure out what diff to use. + # + # source://minitest//lib/minitest/assertions.rb#29 def diff; end + + # Set the diff command to use in #diff. + # + # source://minitest//lib/minitest/assertions.rb#47 def diff=(o); end end end +# source://minitest//lib/minitest/assertions.rb#201 Minitest::Assertions::E = T.let(T.unsafe(nil), String) + +# source://minitest//lib/minitest/assertions.rb#19 Minitest::Assertions::UNDEFINED = T.let(T.unsafe(nil), Object) +# The standard backtrace filter for minitest. +# +# See Minitest.backtrace_filter=. +# +# source://minitest//lib/minitest.rb#1070 class Minitest::BacktraceFilter + # Filter +bt+ to something useful. Returns the whole thing if + # $DEBUG (ruby) or $MT_DEBUG (env). + # + # source://minitest//lib/minitest.rb#1078 def filter(bt); end end +# source://minitest//lib/minitest.rb#1072 Minitest::BacktraceFilter::MT_RE = T.let(T.unsafe(nil), Regexp) +# Dispatch to multiple reporters as one. +# +# source://minitest//lib/minitest.rb#889 class Minitest::CompositeReporter < ::Minitest::AbstractReporter + # @return [CompositeReporter] a new instance of CompositeReporter + # + # source://minitest//lib/minitest.rb#893 def initialize(*reporters); end + # Add another reporter to the mix. + # + # source://minitest//lib/minitest.rb#905 def <<(reporter); end + + # source://minitest//lib/minitest.rb#898 def io; end + + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#909 def passed?; end + + # source://minitest//lib/minitest.rb#917 def prerecord(klass, name); end + + # source://minitest//lib/minitest.rb#924 def record(result); end + + # source://minitest//lib/minitest.rb#930 def report; end + + # The list of reporters to dispatch to. + # + # source://minitest//lib/minitest.rb#891 def reporters; end + + # The list of reporters to dispatch to. + # + # source://minitest//lib/minitest.rb#891 def reporters=(_arg0); end + + # source://minitest//lib/minitest.rb#913 def start; end end +# Provides a simple set of guards that you can use in your tests +# to skip execution if it is not applicable. These methods are +# mixed into Test as both instance and class methods so you +# can use them inside or outside of the test methods. +# +# def test_something_for_mri +# skip "bug 1234" if jruby? +# # ... +# end +# +# if windows? then +# # ... lots of test methods ... +# end +# +# source://minitest//lib/minitest.rb#1014 module Minitest::Guard + # Is this running on jruby? + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#1019 def jruby?(platform = T.unsafe(nil)); end + + # Is this running on maglev? + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#1026 def maglev?(platform = T.unsafe(nil)); end + + # Is this running on mri? + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#1036 def mri?(platform = T.unsafe(nil)); end + + # Is this running on macOS? + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#1043 def osx?(platform = T.unsafe(nil)); end + + # Is this running on rubinius? + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#1050 def rubinius?(platform = T.unsafe(nil)); end + + # Is this running on windows? + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#1060 def windows?(platform = T.unsafe(nil)); end end +# source://minitest//lib/minitest/parallel.rb#2 module Minitest::Parallel; end +# The engine used to run multiple tests in parallel. +# +# source://minitest//lib/minitest/parallel.rb#7 class Minitest::Parallel::Executor + # Create a parallel test executor of with +size+ workers. + # + # @return [Executor] a new instance of Executor + # + # source://minitest//lib/minitest/parallel.rb#17 def initialize(size); end + # Add a job to the queue + # + # source://minitest//lib/minitest/parallel.rb#43 def <<(work); end + + # Shuts down the pool of workers by signalling them to quit and + # waiting for them all to finish what they're currently working + # on. + # + # source://minitest//lib/minitest/parallel.rb#50 def shutdown; end + + # The size of the pool of workers. + # + # source://minitest//lib/minitest/parallel.rb#12 def size; end + + # Start the executor + # + # source://minitest//lib/minitest/parallel.rb#26 def start; end end +# source://minitest//lib/minitest/parallel.rb#56 module Minitest::Parallel::Test + # source://minitest//lib/minitest/parallel.rb#57 def _synchronize; end end +# source://minitest//lib/minitest/parallel.rb#59 module Minitest::Parallel::Test::ClassMethods + # source://minitest//lib/minitest/parallel.rb#60 def run_one_method(klass, method_name, reporter); end + + # source://minitest//lib/minitest/parallel.rb#64 def test_order; end end +# A very simple reporter that prints the "dots" during the run. +# +# This is added to the top-level CompositeReporter at the start of +# the run. If you want to change the output of minitest via a +# plugin, pull this out of the composite and replace it with your +# own. +# +# source://minitest//lib/minitest.rb#686 class Minitest::ProgressReporter < ::Minitest::Reporter + # source://minitest//lib/minitest.rb#687 def prerecord(klass, name); end + + # source://minitest//lib/minitest.rb#694 def record(result); end end +# Shared code for anything that can get passed to a Reporter. See +# Minitest::Test & Minitest::Result. +# +# source://minitest//lib/minitest.rb#517 module Minitest::Reportable + # @raise [NotImplementedError] + # + # source://minitest//lib/minitest.rb#537 def class_name; end + + # Did this run error? + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#558 def error?; end + + # The location identifier of this test. Depends on a method + # existing called class_name. + # + # source://minitest//lib/minitest.rb#532 def location; end + + # Did this run pass? + # + # Note: skipped runs are not considered passing, but they don't + # cause the process to exit non-zero. + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#524 def passed?; end + + # Returns ".", "F", or "E" based on the result of the run. + # + # source://minitest//lib/minitest.rb#544 def result_code; end + + # Was this run skipped? + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#551 def skipped?; end end +# source://minitest//lib/minitest.rb#662 class Minitest::Reporter < ::Minitest::AbstractReporter + # @return [Reporter] a new instance of Reporter + # + # source://minitest//lib/minitest.rb#671 def initialize(io = T.unsafe(nil), options = T.unsafe(nil)); end + # The IO used to report. + # + # source://minitest//lib/minitest.rb#664 def io; end + + # The IO used to report. + # + # source://minitest//lib/minitest.rb#664 def io=(_arg0); end + + # Command-line options for this run. + # + # source://minitest//lib/minitest.rb#669 def options; end + + # Command-line options for this run. + # + # source://minitest//lib/minitest.rb#669 def options=(_arg0); end end +# This represents a test result in a clean way that can be +# marshalled over a wire. Tests can do anything they want to the +# test instance and can create conditions that cause Marshal.dump to +# blow up. By using Result.from(a_test) you can be reasonably sure +# that the test result can be marshalled. +# +# source://minitest//lib/minitest.rb#570 class Minitest::Result < ::Minitest::Runnable include ::Minitest::Reportable + # source://minitest//lib/minitest.rb#604 def class_name; end + + # The class name of the test result. + # + # source://minitest//lib/minitest.rb#579 def klass; end + + # The class name of the test result. + # + # source://minitest//lib/minitest.rb#579 def klass=(_arg0); end + + # The location of the test method. + # + # source://minitest//lib/minitest.rb#584 def source_location; end + + # The location of the test method. + # + # source://minitest//lib/minitest.rb#584 def source_location=(_arg0); end + + # source://minitest//lib/minitest.rb#608 def to_s; end class << self + # Create a new test result from a Runnable instance. + # + # source://minitest//lib/minitest.rb#589 def from(runnable); end end end +# re-open +# +# source://minitest//lib/minitest.rb#280 class Minitest::Runnable + # @return [Runnable] a new instance of Runnable + # + # source://minitest//lib/minitest.rb#448 def initialize(name); end + # Number of assertions executed in this run. + # + # source://minitest//lib/minitest.rb#284 def assertions; end + + # Number of assertions executed in this run. + # + # source://minitest//lib/minitest.rb#284 def assertions=(_arg0); end + + # source://minitest//lib/minitest.rb#444 def failure; end + + # An assertion raised during the run, if any. + # + # source://minitest//lib/minitest.rb#289 def failures; end + + # An assertion raised during the run, if any. + # + # source://minitest//lib/minitest.rb#289 def failures=(_arg0); end + + # source://minitest//lib/minitest.rb#430 def marshal_dump; end + + # source://minitest//lib/minitest.rb#440 def marshal_load(ary); end + + # Metadata you attach to the test results that get sent to the reporter. + # + # Lazily initializes to a hash, to keep memory down. + # + # NOTE: this data *must* be plain (read: marshal-able) data! + # Hashes! Arrays! Strings! + # + # source://minitest//lib/minitest.rb#463 def metadata; end + + # Sets metadata, mainly used for +Result.from+. + # + # source://minitest//lib/minitest.rb#470 def metadata=(_arg0); end + + # Returns true if metadata exists. + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#475 def metadata?; end + + # Name of the run. + # + # source://minitest//lib/minitest.rb#307 def name; end + + # Set the name of the run. + # + # source://minitest//lib/minitest.rb#314 def name=(o); end + + # Did this run pass? + # + # Note: skipped runs are not considered passing, but they don't + # cause the process to exit non-zero. + # + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#492 def passed?; end + + # Returns a single character string to print based on the result + # of the run. One of ".", "F", + # "E" or "S". + # + # @raise [NotImplementedError] + # + # source://minitest//lib/minitest.rb#501 def result_code; end + + # Runs a single method. Needs to return self. + # + # @raise [NotImplementedError] + # + # source://minitest//lib/minitest.rb#482 def run; end + + # Was this run skipped? See #passed? for more information. + # + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#508 def skipped?; end + + # The time it took to run. + # + # source://minitest//lib/minitest.rb#294 def time; end + + # The time it took to run. + # + # source://minitest//lib/minitest.rb#294 def time=(_arg0); end + + # source://minitest//lib/minitest.rb#296 def time_it; end class << self + # source://minitest//lib/minitest.rb#1112 def inherited(klass); end + + # Returns all instance methods matching the pattern +re+. + # + # source://minitest//lib/minitest.rb#321 def methods_matching(re); end + + # source://minitest//lib/minitest.rb#400 def on_signal(name, action); end + + # source://minitest//lib/minitest.rb#325 def reset; end + + # Responsible for running all runnable methods in a given class, + # each in its own instance. Each instance is passed to the + # reporter to record. + # + # source://minitest//lib/minitest.rb#336 def run(reporter, options = T.unsafe(nil)); end + + # Runs a single method and has the reporter record the result. + # This was considered internal API but is factored out of run so + # that subclasses can specialize the running of an individual + # test. See Minitest::ParallelTest::ClassMethods for an example. + # + # source://minitest//lib/minitest.rb#372 def run_one_method(klass, method_name, reporter); end + + # Each subclass of Runnable is responsible for overriding this + # method to return all runnable methods. See #methods_matching. + # + # @raise [NotImplementedError] + # + # source://minitest//lib/minitest.rb#417 def runnable_methods; end + + # Returns all subclasses of Runnable. + # + # source://minitest//lib/minitest.rb#424 def runnables; end + + # Defines the order to run tests (:random by default). Override + # this or use a convenience method to change it for your tests. + # + # source://minitest//lib/minitest.rb#381 def test_order; end + + # source://minitest//lib/minitest.rb#385 def with_info_handler(reporter, &block); end end end +# source://minitest//lib/minitest.rb#398 Minitest::Runnable::SIGNALS = T.let(T.unsafe(nil), Hash) +# Assertion raised when skipping a run. +# +# source://minitest//lib/minitest.rb#967 class Minitest::Skip < ::Minitest::Assertion + # source://minitest//lib/minitest.rb#968 def result_label; end end +# A reporter that gathers statistics about a test run. Does not do +# any IO because meant to be used as a parent class for a reporter +# that does. +# +# If you want to create an entirely different type of output (eg, +# CI, HTML, etc), this is the place to start. +# +# Example: +# +# class JenkinsCIReporter < StatisticsReporter +# def report +# super # Needed to calculate some statistics +# +# print "= 2.5 +# +# source://msgpack//lib/msgpack/time.rb#7 MessagePack::Time::TIME_AT_3_AVAILABLE = T.let(T.unsafe(nil), TrueClass) + +# source://msgpack//lib/msgpack/time.rb#13 MessagePack::Time::Unpacker = T.let(T.unsafe(nil), Proc) +# a.k.a. "TimeSpec" +# +# source://msgpack//lib/msgpack/timestamp.rb#4 class MessagePack::Timestamp + # @param sec [Integer] + # @param nsec [Integer] + # @return [Timestamp] a new instance of Timestamp + # + # source://msgpack//lib/msgpack/timestamp.rb#24 def initialize(sec, nsec); end + # source://msgpack//lib/msgpack/timestamp.rb#72 def ==(other); end + + # @return [Integer] + # + # source://msgpack//lib/msgpack/timestamp.rb#20 def nsec; end + + # @return [Integer] + # + # source://msgpack//lib/msgpack/timestamp.rb#17 def sec; end + + # source://msgpack//lib/msgpack/timestamp.rb#68 def to_msgpack_ext; end class << self + # source://msgpack//lib/msgpack/timestamp.rb#29 def from_msgpack_ext(data); end + + # source://msgpack//lib/msgpack/timestamp.rb#50 def to_msgpack_ext(sec, nsec); end end end +# source://msgpack//lib/msgpack/timestamp.rb#13 MessagePack::Timestamp::TIMESTAMP32_MAX_SEC = T.let(T.unsafe(nil), Integer) + +# source://msgpack//lib/msgpack/timestamp.rb#14 MessagePack::Timestamp::TIMESTAMP64_MAX_SEC = T.let(T.unsafe(nil), Integer) + +# The timestamp extension type defined in the MessagePack spec. +# See https://github.com/msgpack/msgpack/blob/master/spec.md#timestamp-extension-type for details. +# +# source://msgpack//lib/msgpack/timestamp.rb#11 MessagePack::Timestamp::TYPE = T.let(T.unsafe(nil), Integer) class MessagePack::UnexpectedTypeError < ::MessagePack::UnpackError include ::MessagePack::TypeError end +# source://msgpack//lib/msgpack/unpacker.rb#2 class MessagePack::Unpacker + # source://msgpack//lib/msgpack/unpacker.rb#9 def register_type(type, klass = T.unsafe(nil), method_name = T.unsafe(nil), &block); end + + # source://msgpack//lib/msgpack/unpacker.rb#18 def registered_types; end + + # @return [Boolean] + # + # source://msgpack//lib/msgpack/unpacker.rb#28 def type_registered?(klass_or_type); end end +# source://msgpack//lib/msgpack/core_ext.rb#17 class NilClass - include ::JSON::Ext::Generator::GeneratorMethods::NilClass include ::MessagePack::CoreExt private + # source://msgpack//lib/msgpack/core_ext.rb#21 def to_msgpack_with_packer(packer); end end +# source://msgpack//lib/msgpack/core_ext.rb#57 class String include ::Comparable - include ::JSON::Ext::Generator::GeneratorMethods::String include ::MessagePack::CoreExt - extend ::JSON::Ext::Generator::GeneratorMethods::String::Extend private + # source://msgpack//lib/msgpack/core_ext.rb#61 def to_msgpack_with_packer(packer); end end -String::BLANK_RE = T.let(T.unsafe(nil), Regexp) -String::ENCODED_BLANKS = T.let(T.unsafe(nil), Concurrent::Map) - +# source://msgpack//lib/msgpack/symbol.rb#1 class Symbol include ::Comparable include ::MessagePack::CoreExt private + # source://msgpack//lib/msgpack/core_ext.rb#91 def to_msgpack_with_packer(packer); end class << self + # source://msgpack//lib/msgpack/symbol.rb#12 def from_msgpack_ext(data); end end end +# source://msgpack//lib/msgpack/core_ext.rb#27 class TrueClass - include ::JSON::Ext::Generator::GeneratorMethods::TrueClass include ::MessagePack::CoreExt private + # source://msgpack//lib/msgpack/core_ext.rb#31 def to_msgpack_with_packer(packer); end end diff --git a/Library/Homebrew/sorbet/rbi/gems/mustache@1.1.1.rbi b/Library/Homebrew/sorbet/rbi/gems/mustache@1.1.1.rbi index 175edbe2b85f6a..4310e3ec636216 100644 --- a/Library/Homebrew/sorbet/rbi/gems/mustache@1.1.1.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/mustache@1.1.1.rbi @@ -4,186 +4,994 @@ # This is an autogenerated file for types exported from the `mustache` gem. # Please instead update this file by running `bin/tapioca gem mustache`. +# Mustache is the base class from which your Mustache subclasses +# should inherit (though it can be used on its own). +# +# The typical Mustache workflow is as follows: +# +# * Create a Mustache subclass: class Stats < Mustache +# * Create a template: stats.mustache +# * Instantiate an instance: view = Stats.new +# * Render that instance: view.render +# +# You can skip the instantiation by calling `Stats.render` directly. +# +# While Mustache will do its best to load and render a template for +# you, this process is completely customizable using a few options. +# +# All settings can be overriden at the class level. +# +# For example, going with the above example, we can use +# `Stats.template_path = "/usr/local/templates"` to specify the path +# Mustache uses to find templates. +# +# Here are the available options: +# +# * template_path +# +# The `template_path` setting determines the path Mustache uses when +# looking for a template. By default it is "." +# Setting it to /usr/local/templates, for example, means (given all +# other settings are default) a Mustache subclass `Stats` will try to +# load /usr/local/templates/stats.mustache +# +# * template_extension +# +# The `template_extension` is the extension Mustache uses when looking +# for template files. By default it is "mustache" +# +# * template_file +# +# You can tell Mustache exactly which template to use with this +# setting. It can be a relative or absolute path. +# +# * template +# +# Sometimes you want Mustache to render a string, not a file. In those +# cases you may set the `template` setting. For example: +# +# >> Mustache.render("Hello {{planet}}", :planet => "World!") +# => "Hello World!" +# +# The `template` setting is also available on instances. +# +# view = Mustache.new +# view.template = "Hi, {{person}}!" +# view[:person] = 'Mom' +# view.render # => Hi, mom! +# +# * view_namespace +# +# To make life easy on those developing Mustache plugins for web frameworks or +# other libraries, Mustache will attempt to load view classes (i.e. Mustache +# subclasses) using the `view_class` class method. The `view_namespace` tells +# Mustache under which constant view classes live. By default it is `Object`. +# +# * view_path +# +# Similar to `template_path`, the `view_path` option tells Mustache where to look +# for files containing view classes when using the `view_class` method. +# +# source://mustache//lib/mustache/enumerable.rb#1 class Mustache + # Initialize a new Mustache instance. + # + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param options [Hash] An options hash + # @return [Mustache] a new instance of Mustache + # + # source://mustache//lib/mustache.rb#86 def initialize(options = T.unsafe(nil)); end + # Context accessors. + # + # @example Context accessors + # view = Mustache.new + # view[:name] = "Jon" + # view.template = "Hi, {{name}}!" + # view.render # => "Hi, Jon!" + # + # source://mustache//lib/mustache.rb#150 def [](key); end + + # source://mustache//lib/mustache.rb#154 def []=(key, value); end + + # Has this instance or its class already compiled a template? + # + # @return [Boolean] + # + # source://mustache//lib/mustache.rb#237 def compiled?; end + + # A helper method which gives access to the context at a given time. + # Kind of a hack for now, but useful when you're in an iterating section + # and want access to the hash currently being iterated over. + # + # source://mustache//lib/mustache.rb#161 def context; end + + # Override this to provide custom escaping. + # By default it uses `CGI.escapeHTML`. + # + # @example Overriding #escape + # class PersonView < Mustache + # def escape(value) + # my_html_escape_method(value.to_s) + # end + # end + # @param value [Object] Value to escape. + # @return [String] Escaped content. + # + # source://mustache//lib/mustache.rb#212 def escape(value); end + + # Override this to provide custom escaping. + # + # @deprecated Use {#escape} instead. + # + # Note that {#escape} can receive any kind of object. + # If your override logic is expecting a string, you will + # have to call to_s on it yourself. + # @example Overriding #escapeHTML + # class PersonView < Mustache + # def escapeHTML(str) + # my_html_escape_method(str) + # end + # end + # @param str [String] String to escape. + # @return [String] Escaped HTML. + # + # source://mustache//lib/mustache.rb#232 def escapeHTML(str); end + + # source://mustache//lib/mustache/settings.rb#5 def initialize_settings; end + + # Override this in your subclass if you want to do fun things like + # reading templates from a database. It will be rendered by the + # context, so all you need to do is return a string. + # + # source://mustache//lib/mustache.rb#189 def partial(name); end + + # source://mustache//lib/mustache/settings.rb#48 def path; end + + # source://mustache//lib/mustache/settings.rb#213 def raise_on_context_miss=(boolean); end + + # Instance level version of `Mustache.raise_on_context_miss?` + # + # @return [Boolean] + # + # source://mustache//lib/mustache/settings.rb#209 def raise_on_context_miss?; end + + # Parses our fancy pants template file and returns normal file with + # all special {{tags}} and {{#sections}}replaced{{/sections}}. + # + # @example Render view + # @view.render("Hi {{thing}}!", :thing => :world) + # @example Set view template and then render + # View.template = "Hi {{thing}}!" + # @view = View.new + # @view.render(:thing => :world) + # @param data [String, Hash] A String template or a Hash context. + # If a Hash is given, we'll try to figure + # out the template from the class. + # @param ctx [Hash] A Hash context if `data` is a String template. + # @return [String] Returns a rendered version of a template. + # + # source://mustache//lib/mustache.rb#116 def render(data = T.unsafe(nil), ctx = T.unsafe(nil)); end + + # Given a file name and an optional context, attempts to load and + # render the file as a template. + # + # source://mustache//lib/mustache.rb#173 def render_file(name, context = T.unsafe(nil)); end + + # The template can be set at the instance level. + # + # source://mustache//lib/mustache/settings.rb#173 def template; end + + # source://mustache//lib/mustache/settings.rb#184 def template=(template); end + + # source://mustache//lib/mustache/settings.rb#84 def template_extension; end + + # source://mustache//lib/mustache/settings.rb#88 def template_extension=(template_extension); end + + # The template file is the absolute path of the file Mustache will + # use as its template. By default it's ./class_name.mustache + # + # source://mustache//lib/mustache/settings.rb#145 def template_file; end + + # source://mustache//lib/mustache/settings.rb#149 def template_file=(template_file); end + + # source://mustache//lib/mustache/settings.rb#117 def template_name; end + + # source://mustache//lib/mustache/settings.rb#121 def template_name=(template_name); end + + # source://mustache//lib/mustache/settings.rb#48 def template_path; end + + # source://mustache//lib/mustache/settings.rb#53 def template_path=(path); end private + # source://mustache//lib/mustache.rb#309 def templateify(obj); end class << self + # template_partial => TemplatePartial + # template/partial => Template::Partial + # + # source://mustache//lib/mustache.rb#290 def classify(underscored); end + + # Has this template already been compiled? Compilation is somewhat + # expensive so it may be useful to check this before attempting it. + # + # @return [Boolean] + # + # source://mustache//lib/mustache.rb#283 def compiled?; end + + # source://mustache//lib/mustache.rb#271 def const_from_file(name); end + + # Return the value of the configuration setting on the superclass, or return + # the default. + # + # @param attr_name [Symbol] Name of the attribute. It should match + # the instance variable. + # @param default [Object] Default value to use if the superclass does + # not respond. + # @return Inherited or default configuration setting. + # + # source://mustache//lib/mustache.rb#324 def inheritable_config_for(attr_name, default); end + + # @private + # + # source://mustache//lib/mustache/settings.rb#25 def inherited(subclass); end + + # source://mustache//lib/mustache/settings.rb#14 def initialize_settings; end + + # Given a name, attempts to read a file and return the contents as a + # string. The file is not rendered, so it might contain + # {{mustaches}}. + # + # Call `render` if you need to process it. + # + # source://mustache//lib/mustache.rb#182 def partial(name); end + + # Alias for `template_path` + # + # source://mustache//lib/mustache/settings.rb#59 def path; end + + # Alias for `template_path` + # + # source://mustache//lib/mustache/settings.rb#64 def path=(path); end + + # source://mustache//lib/mustache/settings.rb#204 def raise_on_context_miss=(boolean); end + + # Should an exception be raised when we cannot find a corresponding method + # or key in the current context? By default this is false to emulate ctemplate's + # behavior, but it may be useful to enable when debugging or developing. + # + # If set to true and there is a context miss, `Mustache::ContextMiss` will + # be raised. + # + # @return [Boolean] + # + # source://mustache//lib/mustache/settings.rb#200 def raise_on_context_miss?; end + + # Instantiates an instance of this class and calls `render` with + # the passed args. + # + # @return A rendered String version of a template. + # + # source://mustache//lib/mustache.rb#96 def render(*args); end + + # Given a file name and an optional context, attempts to load and + # render the file as a template. + # + # source://mustache//lib/mustache.rb#167 def render_file(name, context = T.unsafe(nil)); end + + # source://mustache//lib/mustache.rb#265 def rescued_const_get(name); end + + # The template is the actual string Mustache uses as its template. + # There is a bit of magic here: what we get back is actually a + # Mustache::Template object, but you can still safely use `template=` + # with a string. + # + # source://mustache//lib/mustache/settings.rb#164 def template; end + + # source://mustache//lib/mustache/settings.rb#168 def template=(template); end + + # A Mustache template's default extension is 'mustache', but this can be changed. + # + # source://mustache//lib/mustache/settings.rb#75 def template_extension; end + + # source://mustache//lib/mustache/settings.rb#79 def template_extension=(template_extension); end + + # The template file is the absolute path of the file Mustache will + # use as its template. By default it's ./class_name.mustache + # + # source://mustache//lib/mustache/settings.rb#134 def template_file; end + + # source://mustache//lib/mustache/settings.rb#138 def template_file=(template_file); end + + # The template name is the Mustache template file without any + # extension or other information. Defaults to `class_name`. + # + # You may want to change this if your class is named Stat but you want + # to re-use another template. + # + # class Stat + # self.template_name = "graphs" # use graphs.mustache + # end + # + # source://mustache//lib/mustache/settings.rb#108 def template_name; end + + # source://mustache//lib/mustache/settings.rb#112 def template_name=(template_name); end + + # The template path informs your Mustache view where to look for its + # corresponding template. By default it's the current directory (".") + # + # A class named Stat with a template_path of "app/templates" will look + # for "app/templates/stat.mustache" + # + # source://mustache//lib/mustache/settings.rb#39 def template_path; end + + # source://mustache//lib/mustache/settings.rb#43 def template_path=(path); end + + # @param obj [Template, String] Turns `obj` into a template + # @param options [Hash] Options for template creation + # + # source://mustache//lib/mustache.rb#305 def templateify(obj, options = T.unsafe(nil)); end + + # TemplatePartial => template_partial + # Template::Partial => template/partial + # Takes a string but defaults to using the current class' name. + # + # source://mustache//lib/mustache.rb#297 def underscore(classified = T.unsafe(nil)); end + + # When given a symbol or string representing a class, will try to produce an + # appropriate view class. + # + # @example + # Mustache.view_namespace = Hurl::Views + # Mustache.view_class(:Partial) # => Hurl::Views::Partial + # + # source://mustache//lib/mustache.rb#251 def view_class(name); end + + # The constant under which Mustache will look for views when autoloading. + # By default the view namespace is `Object`, but it might be nice to set + # it to something like `Hurl::Views` if your app's main namespace is `Hurl`. + # + # source://mustache//lib/mustache/settings.rb#226 def view_namespace; end + + # source://mustache//lib/mustache/settings.rb#230 def view_namespace=(namespace); end + + # Mustache searches the view path for .rb files to require when asked to find a + # view class. Defaults to "." + # + # source://mustache//lib/mustache/settings.rb#242 def view_path; end + + # source://mustache//lib/mustache/settings.rb#246 def view_path=(path); end end end +# A Context represents the context which a Mustache template is +# executed within. All Mustache tags reference keys in the Context. +# +# source://mustache//lib/mustache/context.rb#8 class Mustache::Context + # Initializes a Mustache::Context. + # + # @param mustache [Mustache] A Mustache instance. + # @return [Context] a new instance of Context + # + # source://mustache//lib/mustache/context.rb#14 def initialize(mustache); end + # Alias for `fetch`. + # + # source://mustache//lib/mustache/context.rb#93 def [](name); end + + # Can be used to add a value to the context in a hash-like way. + # + # context[:name] = "Chris" + # + # source://mustache//lib/mustache/context.rb#88 def []=(name, value); end + + # source://mustache//lib/mustache/context.rb#151 def current; end + + # Allows customization of how Mustache escapes things. + # + # @param value [Object] Value to escape. + # @return [String] Escaped string. + # + # source://mustache//lib/mustache/context.rb#58 def escape(value); end + + # Similar to Hash#fetch, finds a value by `name` in the context's + # stack. You may specify the default return value by passing a + # second parameter. + # + # If no second parameter is passed (or raise_on_context_miss is + # set to true), will raise a ContextMiss exception on miss. + # + # source://mustache//lib/mustache/context.rb#111 def fetch(name, default = T.unsafe(nil)); end + + # Finds a key in an object, using whatever method is most + # appropriate. If the object is a hash, does a simple hash lookup. + # If it's an object that responds to the key as a method call, + # invokes that method. You get the idea. + # + # @param obj [Object] The object to perform the lookup on. + # @param key [String, Symbol] The key whose value you want + # @param default [Object] An optional default value, to return if the key is not found. + # @return [Object] The value of key in object if it is found, and default otherwise. + # + # source://mustache//lib/mustache/context.rb#138 def find(obj, key, default = T.unsafe(nil)); end + + # Do we know about a particular key? In other words, will calling + # `context[key]` give us a result that was set. Basically. + # + # @return [Boolean] + # + # source://mustache//lib/mustache/context.rb#99 def has_key?(key); end + + # Find the first Mustache in the stack. + # + # If we're being rendered inside a Mustache object as a context, + # we'll use that one. + # + # @return [Mustache] First Mustache in the stack. + # + # source://mustache//lib/mustache/context.rb#48 def mustache_in_stack; end + + # A {{>partial}} tag translates into a call to the context's + # `partial` method, which would be this sucker right here. + # + # If the Mustache view handling the rendering (e.g. the view + # representing your profile page or some other template) responds + # to `partial`, we call it and render the result. + # + # source://mustache//lib/mustache/context.rb#26 def partial(name, indentation = T.unsafe(nil)); end + + # Removes the most recently added object from the context's + # internal stack. + # + # @return [Context] Returns the Context. + # + # source://mustache//lib/mustache/context.rb#79 def pop; end + + # Adds a new object to the context's internal stack. + # + # @param new_obj [Object] Object to be added to the internal stack. + # @return [Context] Returns the Context. + # + # source://mustache//lib/mustache/context.rb#68 def push(new_obj); end + + # source://mustache//lib/mustache/context.rb#37 def template_for_partial(partial); end private + # Fetches a hash key if it exists, or returns the given default. + # + # source://mustache//lib/mustache/context.rb#159 def find_in_hash(obj, key, default); end end +# A ContextMiss is raised whenever a tag's target can not be found +# in the current context if `Mustache#raise_on_context_miss?` is +# set to true. +# +# For example, if your View class does not respond to `music` but +# your template contains a `{{music}}` tag this exception will be raised. +# +# By default it is not raised. See Mustache.raise_on_context_miss. +# +# source://mustache//lib/mustache/context_miss.rb#12 class Mustache::ContextMiss < ::RuntimeError; end + +# source://mustache//lib/mustache/enumerable.rb#2 module Mustache::Enumerable; end +# The Generator is in charge of taking an array of Mustache tokens, +# usually assembled by the Parser, and generating an interpolatable +# Ruby string. This string is considered the "compiled" template +# because at that point we're relying on Ruby to do the parsing and +# run our code. +# +# For example, let's take this template: +# +# Hi {{thing}}! +# +# If we run this through the Parser we'll get these tokens: +# +# [:multi, +# [:static, "Hi "], +# [:mustache, :etag, "thing"], +# [:static, "!\n"]] +# +# Now let's hand that to the Generator: +# +# >> puts Mustache::Generator.new.compile(tokens) +# "Hi #{CGI.escapeHTML(ctx[:thing].to_s)}!\n" +# +# You can see the generated Ruby string for any template with the +# mustache(1) command line tool: +# +# $ mustache --compile test.mustache +# "Hi #{CGI.escapeHTML(ctx[:thing].to_s)}!\n" +# +# source://mustache//lib/mustache/generator.rb#29 class Mustache::Generator + # Options can be used to manipulate the resulting ruby code string behavior. + # + # @return [Generator] a new instance of Generator + # + # source://mustache//lib/mustache/generator.rb#31 def initialize(options = T.unsafe(nil)); end + # Given an array of tokens, returns an interpolatable Ruby string. + # + # source://mustache//lib/mustache/generator.rb#37 def compile(exp); end private + # Given an array of tokens, converts them into Ruby code. In + # particular there are three types of expressions we are concerned + # with: + # + # :multi + # Mixed bag of :static, :mustache, and whatever. + # + # :static + # Normal HTML, the stuff outside of {{mustaches}}. + # + # :mustache + # Any Mustache tag, from sections to partials. + # + # To give you an idea of what you'll be dealing with take this + # template: + # + # Hello {{name}} + # You have just won ${{value}}! + # {{#in_ca}} + # Well, ${{taxed_value}}, after taxes. + # {{/in_ca}} + # + # If we run this through the Parser, we'll get back this array of + # tokens: + # + # [:multi, + # [:static, "Hello "], + # [:mustache, :etag, + # [:mustache, :fetch, ["name"]]], + # [:static, "\nYou have just won $"], + # [:mustache, :etag, + # [:mustache, :fetch, ["value"]]], + # [:static, "!\n"], + # [:mustache, + # :section, + # [:mustache, :fetch, ["in_ca"]], + # [:multi, + # [:static, "Well, $"], + # [:mustache, :etag, + # [:mustache, :fetch, ["taxed_value"]]], + # [:static, ", after taxes.\n"]], + # "Well, ${{taxed_value}}, after taxes.\n", + # ["{{", "}}"]]] + # + # source://mustache//lib/mustache/generator.rb#88 def compile!(exp); end + + # An interpolation-friendly version of a string, for use within a + # Ruby string. + # + # source://mustache//lib/mustache/generator.rb#208 def ev(s); end + + # An escaped tag. + # + # source://mustache//lib/mustache/generator.rb#179 def on_etag(name, offset); end + + # source://mustache//lib/mustache/generator.rb#189 def on_fetch(names); end + + # Fired when we find an inverted section. Just like `on_section`, + # we're passed the inverted section name and the array of tokens. + # + # source://mustache//lib/mustache/generator.rb#145 def on_inverted_section(name, offset, content, raw, delims); end + + # Fired when the compiler finds a partial. We want to return code + # which calls a partial at runtime instead of expanding and + # including the partial's body to allow for recursive partials. + # + # source://mustache//lib/mustache/generator.rb#163 def on_partial(name, offset, indentation); end + + # Callback fired when the compiler finds a section token. We're + # passed the section name and the array of tokens. + # + # source://mustache//lib/mustache/generator.rb#103 def on_section(name, offset, content, raw, delims); end + + # An unescaped tag. + # + # source://mustache//lib/mustache/generator.rb#168 def on_utag(name, offset); end + + # source://mustache//lib/mustache/generator.rb#212 def str(s); end end +# The Parser is responsible for taking a string template and +# converting it into an array of tokens and, really, expressions. It +# raises SyntaxError if there is anything it doesn't understand and +# knows which sigil corresponds to which tag type. +# +# For example, given this template: +# +# Hi {{thing}}! +# +# Run through the Parser we'll get these tokens: +# +# [:multi, +# [:static, "Hi "], +# [:mustache, :etag, "thing"], +# [:static, "!\n"]] +# +# You can see the array of tokens for any template with the +# mustache(1) command line tool: +# +# $ mustache --tokens test.mustache +# [:multi, [:static, "Hi "], [:mustache, :etag, "thing"], [:static, "!\n"]] +# +# source://mustache//lib/mustache/parser.rb#25 class Mustache::Parser + # Accepts an options hash which does nothing but may be used in + # the future. + # + # @return [Parser] a new instance of Parser + # + # source://mustache//lib/mustache/parser.rb#91 def initialize(options = T.unsafe(nil)); end + # Given a string template, returns an array of tokens. + # + # source://mustache//lib/mustache/parser.rb#119 def compile(template); end + + # Returns the value of attribute ctag. + # + # source://mustache//lib/mustache/parser.rb#87 def ctag; end + + # The closing tag delimiter. This too may be changed at runtime. + # + # source://mustache//lib/mustache/parser.rb#113 def ctag=(value); end + + # Returns the value of attribute otag. + # + # source://mustache//lib/mustache/parser.rb#87 def otag; end + + # The opening tag delimiter. This may be changed at runtime. + # + # source://mustache//lib/mustache/parser.rb#105 def otag=(value); end private + # source://mustache//lib/mustache/parser.rb#150 def content_tags(type, current_ctag_regex); end + + # source://mustache//lib/mustache/parser.rb#159 def dispatch_based_on_type(type, content, fetch, padding, pre_match_position); end + + # Raises a SyntaxError. The message should be the name of the + # error - other details such as line number and position are + # handled for you. + # + # @raise [SyntaxError] + # + # source://mustache//lib/mustache/parser.rb#285 def error(message, pos = T.unsafe(nil)); end + + # source://mustache//lib/mustache/parser.rb#163 def find_closing_tag(scanner, current_ctag_regex); end + + # source://mustache//lib/mustache/parser.rb#259 def offset; end + + # Returns [lineno, column, line] + # + # source://mustache//lib/mustache/parser.rb#264 def position; end + + # Used to quickly convert a string into a regular expression + # usable by the string scanner. + # + # source://mustache//lib/mustache/parser.rb#278 def regexp(thing); end + + # This function handles the cases where the scanned tag does not have + # a type. + # + # source://mustache//lib/mustache/parser.rb#301 def scan_tag_(content, fetch, padding, pre_match_position); end + + # source://mustache//lib/mustache/parser.rb#340 def scan_tag_!(content, fetch, padding, pre_match_position); end + + # source://mustache//lib/mustache/parser.rb#345 def scan_tag_=(content, fetch, padding, pre_match_position); end + + # source://mustache//lib/mustache/parser.rb#306 def scan_tag_block(content, fetch, padding, pre_match_position); end + + # source://mustache//lib/mustache/parser.rb#324 def scan_tag_close(content, fetch, padding, pre_match_position); end + + # source://mustache//lib/mustache/parser.rb#340 def scan_tag_comment(content, fetch, padding, pre_match_position); end + + # source://mustache//lib/mustache/parser.rb#345 def scan_tag_delimiter(content, fetch, padding, pre_match_position); end + + # source://mustache//lib/mustache/parser.rb#315 def scan_tag_inverted(content, fetch, padding, pre_match_position); end + + # source://mustache//lib/mustache/parser.rb#351 def scan_tag_open_partial(content, fetch, padding, pre_match_position); end + + # source://mustache//lib/mustache/parser.rb#364 def scan_tag_unescaped(content, fetch, padding, pre_match_position); end + + # Find {{mustaches}} and add them to the @result array. + # + # source://mustache//lib/mustache/parser.rb#168 def scan_tags; end + + # Try to find static text, e.g. raw HTML with no {{mustaches}}. + # + # source://mustache//lib/mustache/parser.rb#233 def scan_text; end + + # Scans the string until the pattern is matched. Returns the substring + # *excluding* the end of the match, advancing the scan pointer to that + # location. If there is no match, nil is returned. + # + # source://mustache//lib/mustache/parser.rb#251 def scan_until_exclusive(regexp); end class << self + # Add a supported sigil type (with optional aliases) to the Parser. + # + # Requires a block, which will be sent the following parameters: + # + # * content - The raw content of the tag + # * fetch- A mustache context fetch expression for the content + # * padding - Indentation whitespace from the currently-parsed line + # * pre_match_position - Location of the scanner before a match was made + # + # The provided block will be evaluated against the current instance of + # Parser, and may append to the Parser's @result as needed. + # + # source://mustache//lib/mustache/parser.rb#65 def add_type(*types, &block); end + + # source://mustache//lib/mustache/parser.rb#50 def valid_types; end end end +# The content allowed in a tag name. +# +# source://mustache//lib/mustache/parser.rb#81 Mustache::Parser::ALLOWED_CONTENT = T.let(T.unsafe(nil), Regexp) + +# These types of tags allow any content, +# the rest only allow ALLOWED_CONTENT. +# +# source://mustache//lib/mustache/parser.rb#85 Mustache::Parser::ANY_CONTENT = T.let(T.unsafe(nil), Array) + +# After these types of tags, all whitespace until the end of the line will +# be skipped if they are the first (and only) non-whitespace content on +# the line. +# +# source://mustache//lib/mustache/parser.rb#78 Mustache::Parser::SKIP_WHITESPACE = T.let(T.unsafe(nil), Array) +# A SyntaxError is raised when the Parser comes across unclosed +# tags, sections, illegal content in tags, or anything of that +# sort. +# +# source://mustache//lib/mustache/parser.rb#29 class Mustache::Parser::SyntaxError < ::StandardError + # @return [SyntaxError] a new instance of SyntaxError + # + # source://mustache//lib/mustache/parser.rb#30 def initialize(message, position); end + # source://mustache//lib/mustache/parser.rb#37 def to_s; end end +# The sigil types which are valid after an opening `{{` +# +# source://mustache//lib/mustache/parser.rb#48 Mustache::Parser::VALID_TYPES = T.let(T.unsafe(nil), Array) +# A Template represents a Mustache template. It compiles and caches +# a raw string template into something usable. +# +# The idea is this: when handed a Mustache template, convert it into +# a Ruby string by transforming Mustache tags into interpolated +# Ruby. +# +# You shouldn't use this class directly, instead: +# +# >> Mustache.render(template, hash) +# +# source://mustache//lib/mustache/template.rb#17 class Mustache::Template + # Expects a Mustache template as a string along with a template + # path, which it uses to find partials. Options may be passed. + # + # @return [Template] a new instance of Template + # + # source://mustache//lib/mustache/template.rb#22 def initialize(source, options = T.unsafe(nil)); end + # Does the dirty work of transforming a Mustache template into an + # interpolation-friendly Ruby string. + # + # source://mustache//lib/mustache/template.rb#49 def compile(src = T.unsafe(nil)); end + + # Returns an array of partials. + # + # Partials that belong to sections are included, but the section name is not preserved + # + # @return [Array] Returns an array of partials. + # + # source://mustache//lib/mustache/template.rb#103 def partials; end + + # Renders the `@source` Mustache template using the given + # `context`, which should be a simple hash keyed with symbols. + # + # The first time a template is rendered, this method is overriden + # and from then on it is "compiled". Subsequent calls will skip + # the compilation step and run the Ruby version of the template + # directly. + # + # source://mustache//lib/mustache/template.rb#34 def render(context); end + + # Returns an array of sections. + # + # Sections that belong to other sections will be of the form `section1.childsection` + # + # @return [Array] Returns an array of section. + # + # source://mustache//lib/mustache/template.rb#86 def sections; end + + # Returns the value of attribute source. + # + # source://mustache//lib/mustache/template.rb#18 def source; end + + # Returns an array of tags. + # + # Tags that belong to sections will be of the form `section1.tag`. + # + # @return [Array] Returns an array of tags. + # + # source://mustache//lib/mustache/template.rb#68 def tags; end + + # Does the dirty work of transforming a Mustache template into an + # interpolation-friendly Ruby string. + # + # source://mustache//lib/mustache/template.rb#49 def to_s(src = T.unsafe(nil)); end + + # Returns an array of tokens for a given template. + # + # @return [Array] Array of tokens. + # + # source://mustache//lib/mustache/template.rb#58 def tokens(src = T.unsafe(nil)); end class << self + # Simple recursive iterator for tokens + # + # source://mustache//lib/mustache/template.rb#115 def recursor(toks, section, &block); end end end +# source://mustache//lib/mustache/utils.rb#2 module Mustache::Utils; end +# source://mustache//lib/mustache/utils.rb#3 class Mustache::Utils::String + # @return [String] a new instance of String + # + # source://mustache//lib/mustache/utils.rb#4 def initialize(string); end + # source://mustache//lib/mustache/utils.rb#8 def classify; end + + # source://mustache//lib/mustache/utils.rb#17 def underscore(view_namespace); end end diff --git a/Library/Homebrew/sorbet/rbi/gems/netrc@0.11.0.rbi b/Library/Homebrew/sorbet/rbi/gems/netrc@0.11.0.rbi new file mode 100644 index 00000000000000..062a5577c9b802 --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/gems/netrc@0.11.0.rbi @@ -0,0 +1,158 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `netrc` gem. +# Please instead update this file by running `bin/tapioca gem netrc`. + +# source://netrc//lib/netrc.rb#3 +class Netrc + # @return [Netrc] a new instance of Netrc + # + # source://netrc//lib/netrc.rb#166 + def initialize(path, data); end + + # source://netrc//lib/netrc.rb#180 + def [](k); end + + # source://netrc//lib/netrc.rb#188 + def []=(k, info); end + + # source://netrc//lib/netrc.rb#200 + def delete(key); end + + # source://netrc//lib/netrc.rb#211 + def each(&block); end + + # source://netrc//lib/netrc.rb#196 + def length; end + + # source://netrc//lib/netrc.rb#215 + def new_item(m, l, p); end + + # Returns the value of attribute new_item_prefix. + # + # source://netrc//lib/netrc.rb#178 + def new_item_prefix; end + + # Sets the attribute new_item_prefix + # + # @param value the value to set the attribute new_item_prefix to. + # + # source://netrc//lib/netrc.rb#178 + def new_item_prefix=(_arg0); end + + # source://netrc//lib/netrc.rb#219 + def save; end + + # source://netrc//lib/netrc.rb#233 + def unparse; end + + class << self + # source://netrc//lib/netrc.rb#42 + def check_permissions(path); end + + # source://netrc//lib/netrc.rb#33 + def config; end + + # @yield [self.config] + # + # source://netrc//lib/netrc.rb#37 + def configure; end + + # source://netrc//lib/netrc.rb#10 + def default_path; end + + # source://netrc//lib/netrc.rb#14 + def home_path; end + + # source://netrc//lib/netrc.rb#85 + def lex(lines); end + + # source://netrc//lib/netrc.rb#29 + def netrc_filename; end + + # Returns two values, a header and a list of items. + # Each item is a tuple, containing some or all of: + # - machine keyword (including trailing whitespace+comments) + # - machine name + # - login keyword (including surrounding whitespace+comments) + # - login + # - password keyword (including surrounding whitespace+comments) + # - password + # - trailing chars + # This lets us change individual fields, then write out the file + # with all its original formatting. + # + # source://netrc//lib/netrc.rb#129 + def parse(ts); end + + # Reads path and parses it as a .netrc file. If path doesn't + # exist, returns an empty object. Decrypt paths ending in .gpg. + # + # source://netrc//lib/netrc.rb#51 + def read(path = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://netrc//lib/netrc.rb#112 + def skip?(s); end + end +end + +# source://netrc//lib/netrc.rb#8 +Netrc::CYGWIN = T.let(T.unsafe(nil), T.untyped) + +# source://netrc//lib/netrc.rb#244 +class Netrc::Entry < ::Struct + # Returns the value of attribute login + # + # @return [Object] the current value of login + def login; end + + # Sets the attribute login + # + # @param value [Object] the value to set the attribute login to. + # @return [Object] the newly set value + def login=(_); end + + # Returns the value of attribute password + # + # @return [Object] the current value of password + def password; end + + # Sets the attribute password + # + # @param value [Object] the value to set the attribute password to. + # @return [Object] the newly set value + def password=(_); end + + def to_ary; end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://netrc//lib/netrc.rb#250 +class Netrc::Error < ::StandardError; end + +# source://netrc//lib/netrc.rb#68 +class Netrc::TokenArray < ::Array + # source://netrc//lib/netrc.rb#76 + def readto; end + + # source://netrc//lib/netrc.rb#69 + def take; end +end + +# source://netrc//lib/netrc.rb#4 +Netrc::VERSION = T.let(T.unsafe(nil), String) + +# see http://stackoverflow.com/questions/4871309/what-is-the-correct-way-to-detect-if-ruby-is-running-on-windows +# +# source://netrc//lib/netrc.rb#7 +Netrc::WINDOWS = T.let(T.unsafe(nil), T.untyped) diff --git a/Library/Homebrew/sorbet/rbi/gems/parallel@1.23.0.rbi b/Library/Homebrew/sorbet/rbi/gems/parallel@1.23.0.rbi index dfd5b4fcb09158..c8b319a36c31f1 100644 --- a/Library/Homebrew/sorbet/rbi/gems/parallel@1.23.0.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/parallel@1.23.0.rbi @@ -4,108 +4,270 @@ # This is an autogenerated file for types exported from the `parallel` gem. # Please instead update this file by running `bin/tapioca gem parallel`. +# source://parallel//lib/parallel/version.rb#2 module Parallel class << self + # @return [Boolean] + # + # source://parallel//lib/parallel.rb#243 def all?(*args, &block); end + + # @return [Boolean] + # + # source://parallel//lib/parallel.rb#238 def any?(*args, &block); end + + # source://parallel//lib/parallel.rb#234 def each(array, options = T.unsafe(nil), &block); end + + # source://parallel//lib/parallel.rb#248 def each_with_index(array, options = T.unsafe(nil), &block); end + + # source://parallel//lib/parallel.rb#307 def filter_map(*args, &block); end + + # source://parallel//lib/parallel.rb#303 def flat_map(*args, &block); end + + # source://parallel//lib/parallel.rb#228 def in_processes(options = T.unsafe(nil), &block); end + + # source://parallel//lib/parallel.rb#212 def in_threads(options = T.unsafe(nil)); end + + # source://parallel//lib/parallel.rb#252 def map(source, options = T.unsafe(nil), &block); end + + # source://parallel//lib/parallel.rb#299 def map_with_index(array, options = T.unsafe(nil), &block); end + + # Number of physical processor cores on the current system. + # + # source://parallel//lib/parallel.rb#312 def physical_processor_count; end + + # Number of processors seen by the OS, used for process scheduling + # + # source://parallel//lib/parallel.rb#345 def processor_count; end + + # source://parallel//lib/parallel.rb#350 def worker_number; end + + # TODO: this does not work when doing threads in forks, so should remove and yield the number instead if needed + # + # source://parallel//lib/parallel.rb#355 def worker_number=(worker_num); end private + # source://parallel//lib/parallel.rb#361 def add_progress_bar!(job_factory, options); end + + # source://parallel//lib/parallel.rb#624 def call_with_index(item, index, options, &block); end + + # source://parallel//lib/parallel.rb#556 def create_workers(job_factory, options, &block); end + + # options is either a Integer or a Hash with :count + # + # source://parallel//lib/parallel.rb#614 def extract_count_from_options(options); end + + # source://parallel//lib/parallel.rb#642 def instrument_finish(item, index, result, options); end + + # source://parallel//lib/parallel.rb#647 def instrument_start(item, index, options); end + + # source://parallel//lib/parallel.rb#590 def process_incoming_jobs(read, write, job_factory, options, &block); end + + # source://parallel//lib/parallel.rb#544 def replace_worker(job_factory, workers, index, options, blk); end + + # source://parallel//lib/parallel.rb#635 def with_instrumentation(item, index, options); end + + # source://parallel//lib/parallel.rb#386 def work_direct(job_factory, options, &block); end + + # source://parallel//lib/parallel.rb#496 def work_in_processes(job_factory, options, &blk); end + + # source://parallel//lib/parallel.rb#430 def work_in_ractors(job_factory, options); end + + # source://parallel//lib/parallel.rb#405 def work_in_threads(job_factory, options, &block); end + + # source://parallel//lib/parallel.rb#564 def worker(job_factory, options, &block); end end end +# source://parallel//lib/parallel.rb#11 class Parallel::Break < ::StandardError + # @return [Break] a new instance of Break + # + # source://parallel//lib/parallel.rb#14 def initialize(value = T.unsafe(nil)); end + # Returns the value of attribute value. + # + # source://parallel//lib/parallel.rb#12 def value; end end +# source://parallel//lib/parallel.rb#8 class Parallel::DeadWorker < ::StandardError; end +# source://parallel//lib/parallel.rb#32 class Parallel::ExceptionWrapper + # @return [ExceptionWrapper] a new instance of ExceptionWrapper + # + # source://parallel//lib/parallel.rb#35 def initialize(exception); end + # Returns the value of attribute exception. + # + # source://parallel//lib/parallel.rb#33 def exception; end end +# source://parallel//lib/parallel.rb#98 class Parallel::JobFactory + # @return [JobFactory] a new instance of JobFactory + # + # source://parallel//lib/parallel.rb#99 def initialize(source, mutex); end + # source://parallel//lib/parallel.rb#107 def next; end + + # generate item that is sent to workers + # just index is faster + less likely to blow up with unserializable errors + # + # source://parallel//lib/parallel.rb#136 def pack(item, index); end + + # source://parallel//lib/parallel.rb#126 def size; end + + # unpack item that is sent to workers + # + # source://parallel//lib/parallel.rb#141 def unpack(data); end private + # @return [Boolean] + # + # source://parallel//lib/parallel.rb#147 def producer?; end + + # source://parallel//lib/parallel.rb#151 def queue_wrapper(array); end end +# source://parallel//lib/parallel.rb#20 class Parallel::Kill < ::Parallel::Break; end + +# source://parallel//lib/parallel.rb#6 Parallel::Stop = T.let(T.unsafe(nil), Object) +# source://parallel//lib/parallel.rb#23 class Parallel::UndumpableException < ::StandardError + # @return [UndumpableException] a new instance of UndumpableException + # + # source://parallel//lib/parallel.rb#26 def initialize(original); end + # Returns the value of attribute backtrace. + # + # source://parallel//lib/parallel.rb#24 def backtrace; end end +# source://parallel//lib/parallel.rb#156 class Parallel::UserInterruptHandler class << self + # source://parallel//lib/parallel.rb#181 def kill(thing); end + + # kill all these pids or threads if user presses Ctrl+c + # + # source://parallel//lib/parallel.rb#161 def kill_on_ctrl_c(pids, options); end private + # source://parallel//lib/parallel.rb#205 def restore_interrupt(old, signal); end + + # source://parallel//lib/parallel.rb#190 def trap_interrupt(signal); end end end +# source://parallel//lib/parallel.rb#157 Parallel::UserInterruptHandler::INTERRUPT_SIGNAL = T.let(T.unsafe(nil), Symbol) + +# source://parallel//lib/parallel/version.rb#3 Parallel::VERSION = T.let(T.unsafe(nil), String) + +# source://parallel//lib/parallel/version.rb#3 Parallel::Version = T.let(T.unsafe(nil), String) +# source://parallel//lib/parallel.rb#51 class Parallel::Worker + # @return [Worker] a new instance of Worker + # + # source://parallel//lib/parallel.rb#55 def initialize(read, write, pid); end + # might be passed to started_processes and simultaneously closed by another thread + # when running in isolation mode, so we have to check if it is closed before closing + # + # source://parallel//lib/parallel.rb#68 def close_pipes; end + + # Returns the value of attribute pid. + # + # source://parallel//lib/parallel.rb#52 def pid; end + + # Returns the value of attribute read. + # + # source://parallel//lib/parallel.rb#52 def read; end + + # source://parallel//lib/parallel.rb#61 def stop; end + + # Returns the value of attribute thread. + # + # source://parallel//lib/parallel.rb#53 def thread; end + + # Sets the attribute thread + # + # @param value the value to set the attribute thread to. + # + # source://parallel//lib/parallel.rb#53 def thread=(_arg0); end + + # source://parallel//lib/parallel.rb#73 def work(data); end + + # Returns the value of attribute write. + # + # source://parallel//lib/parallel.rb#52 def write; end private + # source://parallel//lib/parallel.rb#91 def wait; end end diff --git a/Library/Homebrew/sorbet/rbi/gems/parallel_tests@3.13.0.rbi b/Library/Homebrew/sorbet/rbi/gems/parallel_tests@3.13.0.rbi deleted file mode 100644 index a84e6edc6be4e3..00000000000000 --- a/Library/Homebrew/sorbet/rbi/gems/parallel_tests@3.13.0.rbi +++ /dev/null @@ -1,95 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `parallel_tests` gem. -# Please instead update this file by running `bin/tapioca gem parallel_tests`. - -module ParallelTests - class << self - def bundler_enabled?; end - def delta; end - def determine_number_of_processes(count); end - def first_process?; end - def last_process?; end - def now; end - def number_of_running_processes; end - def pid_file_path; end - def pids; end - def stop_all_processes; end - def wait_for_other_processes_to_finish; end - def with_pid_file; end - def with_ruby_binary(command); end - end -end - -class ParallelTests::CLI - def run(argv); end - - private - - def any_test_failed?(test_results); end - def append_test_options(options, argv); end - def detailed_duration(seconds); end - def execute_command_in_parallel(command, num_processes, options); end - def execute_in_parallel(items, num_processes, options); end - def extract_file_paths(argv); end - def extract_test_options(argv); end - def final_fail_message; end - def first_is_1?; end - def handle_interrupt; end - def load_runner(type); end - def lock(lockfile); end - def parse_options!(argv); end - def pluralize(n, singular); end - def report_failure_rerun_commmand(test_results, options); end - def report_number_of_tests(groups); end - def report_results(test_results, options); end - def report_time_taken(&block); end - def reprint_output(result, lockfile); end - def run_tests(group, process_number, num_processes, options); end - def run_tests_in_parallel(num_processes, options); end - def simulate_output_for_ci(simulate); end - def use_colors?; end -end - -class ParallelTests::Grouper - class << self - def by_scenarios(tests, num_groups, options = T.unsafe(nil)); end - def by_steps(tests, num_groups, options); end - def in_even_groups_by_size(items, num_groups, options = T.unsafe(nil)); end - - private - - def add_to_group(group, item, size); end - def group_by_features_with_steps(tests, options); end - def group_by_scenarios(tests, options = T.unsafe(nil)); end - def group_features_by_size(items, groups_to_fill); end - def isolate_count(options); end - def items_to_group(items); end - def largest_first(files); end - def smallest_group(groups); end - def specify_groups(items, num_groups, options, groups); end - end -end - -class ParallelTests::Pids - def initialize(file_path); end - - def add(pid); end - def all; end - def count; end - def delete(pid); end - def file_path; end - def mutex; end - - private - - def clear; end - def pids; end - def read; end - def save; end - def sync(&block); end -end - -ParallelTests::RUBY_BINARY = T.let(T.unsafe(nil), String) -ParallelTests::VERSION = T.let(T.unsafe(nil), String) diff --git a/Library/Homebrew/sorbet/rbi/gems/parallel_tests@4.3.0.rbi b/Library/Homebrew/sorbet/rbi/gems/parallel_tests@4.3.0.rbi new file mode 100644 index 00000000000000..4fee77dca8850b --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/gems/parallel_tests@4.3.0.rbi @@ -0,0 +1,245 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `parallel_tests` gem. +# Please instead update this file by running `bin/tapioca gem parallel_tests`. + +# rake tasks for Rails 3+ +# +# source://parallel_tests//lib/parallel_tests.rb#6 +module ParallelTests + class << self + # copied from http://github.com/carlhuda/bundler Bundler::SharedHelpers#find_gemfile + # + # @return [Boolean] + # + # source://parallel_tests//lib/parallel_tests.rb#50 + def bundler_enabled?; end + + # source://parallel_tests//lib/parallel_tests.rb#95 + def delta; end + + # source://parallel_tests//lib/parallel_tests.rb#16 + def determine_number_of_processes(count); end + + # @return [Boolean] + # + # source://parallel_tests//lib/parallel_tests.rb#66 + def first_process?; end + + # @return [Boolean] + # + # source://parallel_tests//lib/parallel_tests.rb#70 + def last_process?; end + + # source://parallel_tests//lib/parallel_tests.rb#91 + def now; end + + # source://parallel_tests//lib/parallel_tests.rb#87 + def number_of_running_processes; end + + # source://parallel_tests//lib/parallel_tests.rb#41 + def pid_file_path; end + + # source://parallel_tests//lib/parallel_tests.rb#37 + def pids; end + + # source://parallel_tests//lib/parallel_tests.rb#45 + def stop_all_processes; end + + # source://parallel_tests//lib/parallel_tests.rb#82 + def wait_for_other_processes_to_finish; end + + # source://parallel_tests//lib/parallel_tests.rb#24 + def with_pid_file; end + + # source://parallel_tests//lib/parallel_tests.rb#78 + def with_ruby_binary(command); end + end +end + +# source://parallel_tests//lib/parallel_tests/cli.rb#9 +class ParallelTests::CLI + # source://parallel_tests//lib/parallel_tests/cli.rb#10 + def run(argv); end + + private + + # exit with correct status code so rake parallel:test && echo 123 works + # + # @return [Boolean] + # + # source://parallel_tests//lib/parallel_tests/cli.rb#177 + def any_test_failed?(test_results); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#347 + def append_test_options(options, argv); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#388 + def detailed_duration(seconds); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#362 + def execute_command_in_parallel(command, num_processes, options); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#56 + def execute_in_parallel(items, num_processes, options); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#336 + def extract_file_paths(argv); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#342 + def extract_test_options(argv); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#395 + def final_fail_message; end + + # @return [Boolean] + # + # source://parallel_tests//lib/parallel_tests/cli.rb#405 + def first_is_1?; end + + # source://parallel_tests//lib/parallel_tests/cli.rb#31 + def handle_interrupt; end + + # source://parallel_tests//lib/parallel_tests/cli.rb#355 + def load_runner(type); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#126 + def lock(lockfile); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#181 + def parse_options!(argv); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#166 + def pluralize(n, singular); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#144 + def report_failure_rerun_commmand(test_results, options); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#158 + def report_number_of_tests(groups); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#136 + def report_results(test_results, options); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#383 + def report_time_taken(&block); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#118 + def reprint_output(result, lockfile); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#110 + def run_tests(group, process_number, num_processes, options); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#71 + def run_tests_in_parallel(num_processes, options); end + + # CI systems often fail when there is no output for a long time, so simulate some output + # + # source://parallel_tests//lib/parallel_tests/cli.rb#411 + def simulate_output_for_ci(simulate); end + + # @return [Boolean] + # + # source://parallel_tests//lib/parallel_tests/cli.rb#401 + def use_colors?; end +end + +# source://parallel_tests//lib/parallel_tests/grouper.rb#3 +class ParallelTests::Grouper + class << self + # source://parallel_tests//lib/parallel_tests/grouper.rb#10 + def by_scenarios(tests, num_groups, options = T.unsafe(nil)); end + + # source://parallel_tests//lib/parallel_tests/grouper.rb#5 + def by_steps(tests, num_groups, options); end + + # source://parallel_tests//lib/parallel_tests/grouper.rb#15 + def in_even_groups_by_size(items, num_groups, options = T.unsafe(nil)); end + + private + + # source://parallel_tests//lib/parallel_tests/grouper.rb#113 + def add_to_group(group, item, size); end + + # source://parallel_tests//lib/parallel_tests/grouper.rb#118 + def group_by_features_with_steps(tests, options); end + + # source://parallel_tests//lib/parallel_tests/grouper.rb#123 + def group_by_scenarios(tests, options = T.unsafe(nil)); end + + # source://parallel_tests//lib/parallel_tests/grouper.rb#128 + def group_features_by_size(items, groups_to_fill); end + + # source://parallel_tests//lib/parallel_tests/grouper.rb#95 + def isolate_count(options); end + + # source://parallel_tests//lib/parallel_tests/grouper.rb#136 + def items_to_group(items); end + + # source://parallel_tests//lib/parallel_tests/grouper.rb#105 + def largest_first(files); end + + # source://parallel_tests//lib/parallel_tests/grouper.rb#109 + def smallest_group(groups); end + + # source://parallel_tests//lib/parallel_tests/grouper.rb#51 + def specify_groups(items, num_groups, options, groups); end + end +end + +# source://parallel_tests//lib/parallel_tests/pids.rb#5 +class ParallelTests::Pids + # @return [Pids] a new instance of Pids + # + # source://parallel_tests//lib/parallel_tests/pids.rb#8 + def initialize(file_path); end + + # source://parallel_tests//lib/parallel_tests/pids.rb#13 + def add(pid); end + + # source://parallel_tests//lib/parallel_tests/pids.rb#28 + def all; end + + # source://parallel_tests//lib/parallel_tests/pids.rb#23 + def count; end + + # source://parallel_tests//lib/parallel_tests/pids.rb#18 + def delete(pid); end + + # Returns the value of attribute file_path. + # + # source://parallel_tests//lib/parallel_tests/pids.rb#6 + def file_path; end + + # Returns the value of attribute mutex. + # + # source://parallel_tests//lib/parallel_tests/pids.rb#6 + def mutex; end + + private + + # source://parallel_tests//lib/parallel_tests/pids.rb#39 + def clear; end + + # source://parallel_tests//lib/parallel_tests/pids.rb#35 + def pids; end + + # source://parallel_tests//lib/parallel_tests/pids.rb#44 + def read; end + + # source://parallel_tests//lib/parallel_tests/pids.rb#52 + def save; end + + # source://parallel_tests//lib/parallel_tests/pids.rb#56 + def sync(&block); end +end + +# source://parallel_tests//lib/parallel_tests.rb#8 +ParallelTests::RUBY_BINARY = T.let(T.unsafe(nil), String) + +# source://parallel_tests//lib/parallel_tests/version.rb#3 +ParallelTests::VERSION = T.let(T.unsafe(nil), String) + +# source://parallel_tests//lib/parallel_tests.rb#7 +ParallelTests::WINDOWS = T.let(T.unsafe(nil), T.untyped) diff --git a/Library/Homebrew/sorbet/rbi/gems/parlour@8.1.0.rbi b/Library/Homebrew/sorbet/rbi/gems/parlour@8.1.0.rbi index 04a416f0a83f09..c3982381fcc551 100644 --- a/Library/Homebrew/sorbet/rbi/gems/parlour@8.1.0.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/parlour@8.1.0.rbi @@ -4,11 +4,20 @@ # This is an autogenerated file for types exported from the `parlour` gem. # Please instead update this file by running `bin/tapioca gem parlour`. +# source://parlour//lib/parlour/version.rb#2 module Parlour; end +# Responsible for resolving conflicts (that is, multiple definitions with the +# same name) between objects defined in the same namespace. +# +# source://parlour//lib/parlour/conflict_resolver.rb#7 class Parlour::ConflictResolver + # @return [ConflictResolver] a new instance of ConflictResolver + # + # source://parlour//lib/parlour/conflict_resolver.rb#10 def initialize; end + # source://parlour//lib/parlour/conflict_resolver.rb#47 sig do params( namespace: Parlour::RbiGenerator::Namespace, @@ -19,126 +28,233 @@ class Parlour::ConflictResolver private + # source://parlour//lib/parlour/conflict_resolver.rb#244 sig { params(arr: T::Array[T.untyped]).returns(T::Boolean) } def all_eql?(arr); end + # source://parlour//lib/parlour/conflict_resolver.rb#255 sig { params(namespace: Parlour::RbiGenerator::Namespace, name: T.nilable(::String)).void } def deduplicate_mixins_of_name(namespace, name); end + # source://parlour//lib/parlour/conflict_resolver.rb#217 sig { params(arr: T::Array[T.untyped]).returns(T.nilable(::Symbol)) } def merge_strategy(arr); end end +# source://parlour//lib/parlour/conversion/converter.rb#5 module Parlour::Conversion; end +# An abstract class which converts between the node trees of two type +# systems. +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://parlour//lib/parlour/conversion/converter.rb#8 class Parlour::Conversion::Converter abstract! + # @return [Converter] a new instance of Converter + # + # source://parlour//lib/parlour/conversion/converter.rb#13 def initialize; end + # source://parlour//lib/parlour/conversion/converter.rb#21 sig { params(msg: ::String, node: ::Parlour::RbiGenerator::RbiObject).void } def add_warning(msg, node); end + # source://parlour//lib/parlour/conversion/converter.rb#18 sig { returns(T::Array[[::String, ::Parlour::TypedObject]]) } def warnings; end end +# Converts RBI types to RBS types. +# +# source://parlour//lib/parlour/conversion/rbi_to_rbs.rb#5 class Parlour::Conversion::RbiToRbs < ::Parlour::Conversion::Converter + # source://parlour//lib/parlour/conversion/rbi_to_rbs.rb#9 sig { params(rbs_gen: ::Parlour::RbsGenerator).void } def initialize(rbs_gen); end + # source://parlour//lib/parlour/conversion/rbi_to_rbs.rb#18 sig { params(from: Parlour::RbiGenerator::Namespace, to: Parlour::RbsGenerator::Namespace).void } def convert_all(from, to); end + # source://parlour//lib/parlour/conversion/rbi_to_rbs.rb#30 sig { params(node: ::Parlour::RbiGenerator::RbiObject, new_parent: Parlour::RbsGenerator::Namespace).void } def convert_object(node, new_parent); end + # source://parlour//lib/parlour/conversion/rbi_to_rbs.rb#15 sig { returns(::Parlour::RbsGenerator) } def rbs_gen; end end +# Contains methods to enable debugging facilities for Parlour. +# +# source://parlour//lib/parlour/debugging.rb#6 module Parlour::Debugging class << self + # Set whether debug messages should be printed. + # + # source://parlour//lib/parlour/debugging.rb#16 sig { params(value: T::Boolean).returns(T::Boolean) } def debug_mode=(value); end + # Whether debug messages sent by {.debug_puts} should be printed. + # Defaults to true if the PARLOUR_DEBUG environment variable is set. + # + # source://parlour//lib/parlour/debugging.rb#24 sig { returns(T::Boolean) } def debug_mode?; end + # Prints a message with a debugging prefix to STDOUT if {.debug_mode?} is + # true. + # + # source://parlour//lib/parlour/debugging.rb#36 sig { params(object: T.untyped, message: ::String).void } def debug_puts(object, message); end + # Converts the given object into a human-readable prefix to a debug message. + # For example, passing an instance of {ConflictResolver} returns + # "conflict resolver". If the object type is unknown, this returns its class + # name. + # + # source://parlour//lib/parlour/debugging.rb#50 sig { params(object: T.untyped).returns(::String) } def name_for_debug_caller(object); end end end +# A module for generating a globally-consistent, nicely-formatted tree of +# output using Unicode block characters. +# +# source://parlour//lib/parlour/debugging.rb#66 class Parlour::Debugging::Tree + # source://parlour//lib/parlour/debugging.rb#78 sig { params(colour: T::Boolean).void } def initialize(colour: T.unsafe(nil)); end + # Returns a new heading, and then decents the tree one level into it. + # (That is, future output will go under the new heading.) + # + # source://parlour//lib/parlour/debugging.rb#88 sig { params(message: ::String).returns(::String) } def begin(message); end + # Whether to colour output or not. + # + # source://parlour//lib/parlour/debugging.rb#75 sig { returns(T::Boolean) } def colour; end + # Prints the final tree element at the current level, then ascends one + # level. + # + # source://parlour//lib/parlour/debugging.rb#108 sig { params(message: ::String).returns(::String) } def end(message); end + # Prints a new tree element at the current level. + # + # source://parlour//lib/parlour/debugging.rb#99 sig { params(message: ::String).returns(::String) } def here(message); end + # Modifies the current indent level by the given offset. + # + # source://parlour//lib/parlour/debugging.rb#130 def indent!(offset); end + + # The prefix which should be printed before anything else on this line of + # the tree, based on the current indent level. + # + # @return [String] + # + # source://parlour//lib/parlour/debugging.rb#117 def line_prefix; end + + # The horizontal lines which should be printed between the beginning of + # the current element and its text, based on the specified number of + # spaces to use for indents. + # + # @return [String] + # + # source://parlour//lib/parlour/debugging.rb#125 def text_prefix; end end +# The number of spaces to indent each layer of the tree by. Should be at +# least 1. +# +# source://parlour//lib/parlour/debugging.rb#71 Parlour::Debugging::Tree::INDENT_SPACES = T.let(T.unsafe(nil), Integer) +# source://parlour//lib/parlour/detached_rbi_generator.rb#4 class Parlour::DetachedRbiGenerator < ::Parlour::RbiGenerator + # source://parlour//lib/parlour/detached_rbi_generator.rb#16 sig { override.returns(T.nilable(::Parlour::Plugin)) } def current_plugin; end + # source://parlour//lib/parlour/detached_rbi_generator.rb#6 sig { returns(T.untyped) } def detached!; end + # source://parlour//lib/parlour/detached_rbi_generator.rb#11 sig { override.returns(::Parlour::Options) } def options; end + # source://parlour//lib/parlour/detached_rbi_generator.rb#21 sig { override.params(strictness: ::String).returns(::String) } def rbi(strictness = T.unsafe(nil)); end end +# source://parlour//lib/parlour/detached_rbs_generator.rb#4 class Parlour::DetachedRbsGenerator < ::Parlour::RbsGenerator + # source://parlour//lib/parlour/detached_rbs_generator.rb#16 sig { override.returns(T.nilable(::Parlour::Plugin)) } def current_plugin; end + # source://parlour//lib/parlour/detached_rbs_generator.rb#6 sig { returns(T.untyped) } def detached!; end + # source://parlour//lib/parlour/detached_rbs_generator.rb#11 sig { override.returns(::Parlour::Options) } def options; end + # source://parlour//lib/parlour/detached_rbs_generator.rb#21 sig { override.returns(::String) } def rbs; end end +# source://parlour//lib/parlour/generator.rb#3 class Parlour::Generator + # source://parlour//lib/parlour/generator.rb#15 sig { params(break_params: ::Integer, tab_size: ::Integer, sort_namespaces: T::Boolean).void } def initialize(break_params: T.unsafe(nil), tab_size: T.unsafe(nil), sort_namespaces: T.unsafe(nil)); end + # source://parlour//lib/parlour/generator.rb#32 sig { overridable.returns(T.nilable(::Parlour::Plugin)) } def current_plugin; end + # @return [Plugin, nil] + # + # source://parlour//lib/parlour/generator.rb#32 def current_plugin=(_arg0); end + # source://parlour//lib/parlour/generator.rb#26 sig { overridable.returns(::Parlour::Options) } def options; end end +# source://parlour//lib/parlour/mixin/searchable.rb#4 module Parlour::Mixin; end +# Extends a particular type system's Namespace class to provide searchable +# children. +# +# @abstract Subclasses must implement the `abstract` methods below. +# +# source://parlour//lib/parlour/mixin/searchable.rb#7 module Parlour::Mixin::Searchable extend T::Generic @@ -146,69 +262,105 @@ module Parlour::Mixin::Searchable Child = type_member { { upper: Parlour::TypedObject } } + # @abstract + # + # source://parlour//lib/parlour/mixin/searchable.rb#16 sig { abstract.returns(T::Array[Child]) } def children; end + # source://parlour//lib/parlour/mixin/searchable.rb#24 sig { params(name: T.nilable(::String), type: T.nilable(::Class)).returns(Child) } def find(name: T.unsafe(nil), type: T.unsafe(nil)); end + # source://parlour//lib/parlour/mixin/searchable.rb#34 sig { params(name: T.nilable(::String), type: T.nilable(::Class)).returns(T::Array[Child]) } def find_all(name: T.unsafe(nil), type: T.unsafe(nil)); end private + # source://parlour//lib/parlour/mixin/searchable.rb#48 sig { params(child: Child, name: T.nilable(::String), type: T.nilable(::Class)).returns(T::Boolean) } def searchable_child_matches(child, name, type); end end +# A set of immutable formatting options. +# +# source://parlour//lib/parlour/options.rb#4 class Parlour::Options + # source://parlour//lib/parlour/options.rb#19 sig { params(break_params: ::Integer, tab_size: ::Integer, sort_namespaces: T::Boolean).void } def initialize(break_params:, tab_size:, sort_namespaces:); end + # source://parlour//lib/parlour/options.rb#43 sig { returns(::Integer) } def break_params; end + # source://parlour//lib/parlour/options.rb#67 sig { params(level: ::Integer, str: ::String).returns(::String) } def indented(level, str); end + # source://parlour//lib/parlour/options.rb#58 sig { returns(T::Boolean) } def sort_namespaces; end + # source://parlour//lib/parlour/options.rb#48 sig { returns(::Integer) } def tab_size; end end +# source://parlour//lib/parlour/parse_error.rb#4 class Parlour::ParseError < ::StandardError + # @return [ParseError] a new instance of ParseError + # + # source://parlour//lib/parlour/parse_error.rb#13 def initialize(buffer, range); end + # source://parlour//lib/parlour/parse_error.rb#8 sig { returns(::Parser::Source::Buffer) } def buffer; end + # source://parlour//lib/parlour/parse_error.rb#11 sig { returns(::Parser::Source::Range) } def range; end end +# The base class for user-defined RBI generation plugins. +# +# @abstract +# +# source://parlour//lib/parlour/plugin.rb#5 class Parlour::Plugin abstract! + # source://parlour//lib/parlour/plugin.rb#54 sig { params(options: T::Hash[T.untyped, T.untyped]).void } def initialize(options); end + # @abstract + # + # source://parlour//lib/parlour/plugin.rb#63 sig { abstract.params(root: Parlour::RbiGenerator::Namespace).void } def generate(root); end + # source://parlour//lib/parlour/plugin.rb#70 sig { returns(T.nilable(::String)) } def strictness; end + # @return [String, nil] + # + # source://parlour//lib/parlour/plugin.rb#70 def strictness=(_arg0); end class << self + # source://parlour//lib/parlour/plugin.rb#27 sig { params(new_plugin: T.class_of(Parlour::Plugin)).void } def inherited(new_plugin); end + # source://parlour//lib/parlour/plugin.rb#17 sig { returns(T::Hash[::String, T.class_of(Parlour::Plugin)]) } def registered_plugins; end + # source://parlour//lib/parlour/plugin.rb#40 sig do params( plugins: T::Array[::Parlour::Plugin], @@ -220,17 +372,29 @@ class Parlour::Plugin end end +# The RBI generator. +# +# source://parlour//lib/parlour/rbi_generator/parameter.rb#5 class Parlour::RbiGenerator < ::Parlour::Generator + # @return [RbiGenerator] a new instance of RbiGenerator + # + # source://parlour//lib/parlour/rbi_generator.rb#9 def initialize(**hash); end + # source://parlour//lib/parlour/rbi_generator.rb#23 sig { overridable.params(strictness: ::String).returns(::String) } def rbi(strictness = T.unsafe(nil)); end + # source://parlour//lib/parlour/rbi_generator.rb#17 sig { overridable.returns(Parlour::RbiGenerator::Namespace) } def root; end end +# Represents miscellaneous Ruby code. +# +# source://parlour//lib/parlour/rbi_generator/arbitrary.rb#5 class Parlour::RbiGenerator::Arbitrary < ::Parlour::RbiGenerator::RbiObject + # source://parlour//lib/parlour/rbi_generator/arbitrary.rb#17 sig do params( generator: ::Parlour::Generator, @@ -240,31 +404,45 @@ class Parlour::RbiGenerator::Arbitrary < ::Parlour::RbiGenerator::RbiObject end def initialize(generator, code: T.unsafe(nil), &block); end + # source://parlour//lib/parlour/rbi_generator/arbitrary.rb#33 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end + # source://parlour//lib/parlour/rbi_generator/arbitrary.rb#25 sig { returns(::String) } def code; end + # @return [String] + # + # source://parlour//lib/parlour/rbi_generator/arbitrary.rb#25 def code=(_arg0); end + # source://parlour//lib/parlour/rbi_generator/arbitrary.rb#84 sig { override.returns(T::Array[T.any(::Symbol, T::Hash[::Symbol, ::String])]) } def describe_attrs; end + # source://parlour//lib/parlour/rbi_generator/arbitrary.rb#89 sig { override.void } def generalize_from_rbi!; end + # source://parlour//lib/parlour/rbi_generator/arbitrary.rb#48 sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } def generate_rbi(indent_level, options); end + # source://parlour//lib/parlour/rbi_generator/arbitrary.rb#79 sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).void } def merge_into_self(others); end + # source://parlour//lib/parlour/rbi_generator/arbitrary.rb#63 sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) } def mergeable?(others); end end +# Represents an attribute reader, writer or accessor. +# +# source://parlour//lib/parlour/rbi_generator/attribute.rb#5 class Parlour::RbiGenerator::Attribute < ::Parlour::RbiGenerator::Method + # source://parlour//lib/parlour/rbi_generator/attribute.rb#28 sig do params( generator: ::Parlour::Generator, @@ -277,35 +455,46 @@ class Parlour::RbiGenerator::Attribute < ::Parlour::RbiGenerator::Method end def initialize(generator, name, kind, type, class_attribute: T.unsafe(nil), &block); end + # source://parlour//lib/parlour/rbi_generator/attribute.rb#68 sig { override.params(other: ::Object).returns(T::Boolean) } def ==(other); end + # source://parlour//lib/parlour/rbi_generator/attribute.rb#56 sig { returns(T::Boolean) } def class_attribute; end + # source://parlour//lib/parlour/rbi_generator/attribute.rb#82 sig { override.returns(T::Array[T.any(::Symbol, T::Hash[::Symbol, ::String])]) } def describe_attrs; end + # source://parlour//lib/parlour/rbi_generator/attribute.rb#77 sig { override.void } def generalize_from_rbi!; end + # source://parlour//lib/parlour/rbi_generator/attribute.rb#52 sig { returns(::Symbol) } def kind; end + # source://parlour//lib/parlour/rbi_generator/attribute.rb#60 sig { returns(T.any(::Parlour::Types::Type, ::String)) } def type; end private + # source://parlour//lib/parlour/rbi_generator/attribute.rb#103 sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } def generate_definition(indent_level, options); end end +# Represents a class definition. +# +# source://parlour//lib/parlour/rbi_generator/class_namespace.rb#5 class Parlour::RbiGenerator::ClassNamespace < ::Parlour::RbiGenerator::Namespace extend T::Generic Child = type_member { { fixed: Parlour::RbiGenerator::RbiObject } } + # source://parlour//lib/parlour/rbi_generator/class_namespace.rb#33 sig do params( generator: ::Parlour::Generator, @@ -319,29 +508,40 @@ class Parlour::RbiGenerator::ClassNamespace < ::Parlour::RbiGenerator::Namespace end def initialize(generator, name, final, sealed, superclass, abstract, &block); end + # source://parlour//lib/parlour/rbi_generator/class_namespace.rb#70 sig { returns(T::Boolean) } def abstract; end + # source://parlour//lib/parlour/rbi_generator/class_namespace.rb#116 sig { override.returns(T::Array[T.any(::Symbol, T::Hash[::Symbol, ::String])]) } def describe_attrs; end + # source://parlour//lib/parlour/rbi_generator/class_namespace.rb#122 sig { override.void } def generalize_from_rbi!; end + # source://parlour//lib/parlour/rbi_generator/class_namespace.rb#50 sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } def generate_rbi(indent_level, options); end + # source://parlour//lib/parlour/rbi_generator/class_namespace.rb#104 sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).void } def merge_into_self(others); end + # source://parlour//lib/parlour/rbi_generator/class_namespace.rb#84 sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) } def mergeable?(others); end + # source://parlour//lib/parlour/rbi_generator/class_namespace.rb#65 sig { returns(T.nilable(::String)) } def superclass; end end +# Represents a constant definition. +# +# source://parlour//lib/parlour/rbi_generator/constant.rb#5 class Parlour::RbiGenerator::Constant < ::Parlour::RbiGenerator::RbiObject + # source://parlour//lib/parlour/rbi_generator/constant.rb#21 sig do params( generator: ::Parlour::Generator, @@ -353,35 +553,50 @@ class Parlour::RbiGenerator::Constant < ::Parlour::RbiGenerator::RbiObject end def initialize(generator, name: T.unsafe(nil), value: T.unsafe(nil), eigen_constant: T.unsafe(nil), &block); end + # source://parlour//lib/parlour/rbi_generator/constant.rb#42 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end + # source://parlour//lib/parlour/rbi_generator/constant.rb#99 sig { override.returns(T::Array[T.any(::Symbol, T::Hash[::Symbol, ::String])]) } def describe_attrs; end + # @return [Boolean] Whether this constant is defined on the eigenclass + # of the current namespace. + # + # source://parlour//lib/parlour/rbi_generator/constant.rb#34 def eigen_constant; end + # source://parlour//lib/parlour/rbi_generator/constant.rb#104 sig { override.void } def generalize_from_rbi!; end + # source://parlour//lib/parlour/rbi_generator/constant.rb#58 sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } def generate_rbi(indent_level, options); end + # source://parlour//lib/parlour/rbi_generator/constant.rb#94 sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).void } def merge_into_self(others); end + # source://parlour//lib/parlour/rbi_generator/constant.rb#77 sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) } def mergeable?(others); end + # source://parlour//lib/parlour/rbi_generator/constant.rb#30 sig { returns(T.any(::Parlour::Types::Type, ::String)) } def value; end end +# Represents an enum definition; that is, a class with an +enum+ call. +# +# source://parlour//lib/parlour/rbi_generator/enum_class_namespace.rb#5 class Parlour::RbiGenerator::EnumClassNamespace < ::Parlour::RbiGenerator::ClassNamespace extend T::Generic Child = type_member { { fixed: Parlour::RbiGenerator::RbiObject } } + # source://parlour//lib/parlour/rbi_generator/enum_class_namespace.rb#32 sig do params( generator: ::Parlour::Generator, @@ -395,26 +610,36 @@ class Parlour::RbiGenerator::EnumClassNamespace < ::Parlour::RbiGenerator::Class end def initialize(generator, name, final, sealed, enums, abstract, &block); end + # source://parlour//lib/parlour/rbi_generator/enum_class_namespace.rb#121 sig { override.returns(T::Array[T.any(::Symbol, T::Hash[::Symbol, ::String])]) } def describe_attrs; end + # source://parlour//lib/parlour/rbi_generator/enum_class_namespace.rb#40 sig { returns(T::Array[T.any(::String, [::String, ::String])]) } def enums; end + # source://parlour//lib/parlour/rbi_generator/enum_class_namespace.rb#116 sig { override.void } def generalize_from_rbi!; end + # source://parlour//lib/parlour/rbi_generator/enum_class_namespace.rb#54 sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } def generate_body(indent_level, options); end + # source://parlour//lib/parlour/rbi_generator/enum_class_namespace.rb#104 sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).void } def merge_into_self(others); end + # source://parlour//lib/parlour/rbi_generator/enum_class_namespace.rb#86 sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) } def mergeable?(others); end end +# Represents an +extend+ call. +# +# source://parlour//lib/parlour/rbi_generator/extend.rb#5 class Parlour::RbiGenerator::Extend < ::Parlour::RbiGenerator::RbiObject + # source://parlour//lib/parlour/rbi_generator/extend.rb#16 sig do params( generator: ::Parlour::Generator, @@ -424,26 +649,36 @@ class Parlour::RbiGenerator::Extend < ::Parlour::RbiGenerator::RbiObject end def initialize(generator, name: T.unsafe(nil), &block); end + # source://parlour//lib/parlour/rbi_generator/extend.rb#27 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end + # source://parlour//lib/parlour/rbi_generator/extend.rb#82 sig { override.returns(T::Array[T.any(::Symbol, T::Hash[::Symbol, ::String])]) } def describe_attrs; end + # source://parlour//lib/parlour/rbi_generator/extend.rb#79 sig { override.void } def generalize_from_rbi!; end + # source://parlour//lib/parlour/rbi_generator/extend.rb#42 sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } def generate_rbi(indent_level, options); end + # source://parlour//lib/parlour/rbi_generator/extend.rb#74 sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).void } def merge_into_self(others); end + # source://parlour//lib/parlour/rbi_generator/extend.rb#57 sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) } def mergeable?(others); end end +# Represents an +include+ call. +# +# source://parlour//lib/parlour/rbi_generator/include.rb#5 class Parlour::RbiGenerator::Include < ::Parlour::RbiGenerator::RbiObject + # source://parlour//lib/parlour/rbi_generator/include.rb#16 sig do params( generator: ::Parlour::Generator, @@ -453,26 +688,36 @@ class Parlour::RbiGenerator::Include < ::Parlour::RbiGenerator::RbiObject end def initialize(generator, name: T.unsafe(nil), &block); end + # source://parlour//lib/parlour/rbi_generator/include.rb#27 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end + # source://parlour//lib/parlour/rbi_generator/include.rb#82 sig { override.returns(T::Array[T.any(::Symbol, T::Hash[::Symbol, ::String])]) } def describe_attrs; end + # source://parlour//lib/parlour/rbi_generator/include.rb#79 sig { override.void } def generalize_from_rbi!; end + # source://parlour//lib/parlour/rbi_generator/include.rb#42 sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } def generate_rbi(indent_level, options); end + # source://parlour//lib/parlour/rbi_generator/include.rb#74 sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).void } def merge_into_self(others); end + # source://parlour//lib/parlour/rbi_generator/include.rb#57 sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) } def mergeable?(others); end end +# Represents a method definition. +# +# source://parlour//lib/parlour/rbi_generator/method.rb#5 class Parlour::RbiGenerator::Method < ::Parlour::RbiGenerator::RbiObject + # source://parlour//lib/parlour/rbi_generator/method.rb#45 sig do params( generator: ::Parlour::Generator, @@ -491,65 +736,86 @@ class Parlour::RbiGenerator::Method < ::Parlour::RbiGenerator::RbiObject end def initialize(generator, name, parameters, return_type = T.unsafe(nil), abstract: T.unsafe(nil), implementation: T.unsafe(nil), override: T.unsafe(nil), overridable: T.unsafe(nil), class_method: T.unsafe(nil), final: T.unsafe(nil), type_parameters: T.unsafe(nil), &block); end + # source://parlour//lib/parlour/rbi_generator/method.rb#65 sig { overridable.params(other: ::Object).returns(T::Boolean) } def ==(other); end + # source://parlour//lib/parlour/rbi_generator/method.rb#92 sig { returns(T::Boolean) } def abstract; end + # source://parlour//lib/parlour/rbi_generator/method.rb#117 sig { returns(T::Boolean) } def class_method; end + # source://parlour//lib/parlour/rbi_generator/method.rb#217 sig { override.returns(T::Array[T.any(::Symbol, T::Hash[::Symbol, ::String])]) } def describe_attrs; end + # source://parlour//lib/parlour/rbi_generator/method.rb#122 sig { returns(T::Boolean) } def final; end + # source://parlour//lib/parlour/rbi_generator/method.rb#210 sig { override.void } def generalize_from_rbi!; end + # source://parlour//lib/parlour/rbi_generator/method.rb#140 sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } def generate_rbi(indent_level, options); end + # source://parlour//lib/parlour/rbi_generator/method.rb#100 sig { returns(T::Boolean) } def implementation; end + # source://parlour//lib/parlour/rbi_generator/method.rb#205 sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).void } def merge_into_self(others); end + # source://parlour//lib/parlour/rbi_generator/method.rb#188 sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) } def mergeable?(others); end + # source://parlour//lib/parlour/rbi_generator/method.rb#111 sig { returns(T::Boolean) } def overridable; end + # source://parlour//lib/parlour/rbi_generator/method.rb#106 sig { returns(T::Boolean) } def override; end + # source://parlour//lib/parlour/rbi_generator/method.rb#82 sig { returns(T::Array[::Parlour::RbiGenerator::Parameter]) } def parameters; end + # source://parlour//lib/parlour/rbi_generator/method.rb#87 sig { returns(T.nilable(T.any(::Parlour::Types::Type, ::String))) } def return_type; end + # source://parlour//lib/parlour/rbi_generator/method.rb#127 sig { returns(T::Array[::Symbol]) } def type_parameters; end private + # source://parlour//lib/parlour/rbi_generator/method.rb#244 sig { overridable.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } def generate_definition(indent_level, options); end + # source://parlour//lib/parlour/rbi_generator/method.rb#261 sig { returns(::String) } def qualifiers; end end +# Represents a module definition. +# +# source://parlour//lib/parlour/rbi_generator/module_namespace.rb#5 class Parlour::RbiGenerator::ModuleNamespace < ::Parlour::RbiGenerator::Namespace extend T::Generic Child = type_member { { fixed: Parlour::RbiGenerator::RbiObject } } + # source://parlour//lib/parlour/rbi_generator/module_namespace.rb#33 sig do params( generator: ::Parlour::Generator, @@ -563,34 +829,46 @@ class Parlour::RbiGenerator::ModuleNamespace < ::Parlour::RbiGenerator::Namespac end def initialize(generator, name, final, sealed, interface, abstract, &block); end + # source://parlour//lib/parlour/rbi_generator/module_namespace.rb#68 sig { returns(T::Boolean) } def abstract; end + # source://parlour//lib/parlour/rbi_generator/module_namespace.rb#111 sig { override.returns(T::Array[T.any(::Symbol, T::Hash[::Symbol, ::String])]) } def describe_attrs; end + # source://parlour//lib/parlour/rbi_generator/module_namespace.rb#106 sig { override.void } def generalize_from_rbi!; end + # source://parlour//lib/parlour/rbi_generator/module_namespace.rb#51 sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } def generate_rbi(indent_level, options); end + # source://parlour//lib/parlour/rbi_generator/module_namespace.rb#63 sig { returns(T::Boolean) } def interface; end + # source://parlour//lib/parlour/rbi_generator/module_namespace.rb#101 sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).void } def merge_into_self(others); end + # source://parlour//lib/parlour/rbi_generator/module_namespace.rb#82 sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) } def mergeable?(others); end end +# A generic namespace. This shouldn't be used, except as the type of +# {RbiGenerator#root}. +# +# source://parlour//lib/parlour/rbi_generator/namespace.rb#6 class Parlour::RbiGenerator::Namespace < ::Parlour::RbiGenerator::RbiObject extend T::Generic include ::Parlour::Mixin::Searchable Child = type_member { { fixed: Parlour::RbiGenerator::RbiObject } } + # source://parlour//lib/parlour/rbi_generator/namespace.rb#45 sig do params( generator: ::Parlour::Generator, @@ -602,21 +880,43 @@ class Parlour::RbiGenerator::Namespace < ::Parlour::RbiGenerator::RbiObject end def initialize(generator, name = T.unsafe(nil), final = T.unsafe(nil), sealed = T.unsafe(nil), &block); end + # source://parlour//lib/parlour/rbi_generator/namespace.rb#157 sig { params(comment: T.any(::String, T::Array[::String])).void } def add_comment_to_next_child(comment); end + # source://parlour//lib/parlour/rbi_generator/namespace.rb#95 sig { returns(T::Array[::Parlour::RbiGenerator::TypeAlias]) } def aliases; end + # source://parlour//lib/parlour/rbi_generator/namespace.rb#67 sig { override.returns(T::Array[::Parlour::RbiGenerator::RbiObject]) } def children; end + # source://parlour//lib/parlour/rbi_generator/namespace.rb#106 sig { returns(T::Array[::Parlour::RbiGenerator::Constant]) } def constants; end + # Creates a new arbitrary code section. + # You should rarely have to use this! + # + # @param code [String] The code to insert. + # @param block A block which the new instance yields itself to. + # @return [RbiGenerator::Arbitrary] + # + # source://parlour//lib/parlour/rbi_generator/namespace.rb#482 def create_arbitrary(code:, &block); end - def create_attr(*args, &blk); end + # @param name [String] + # @param kind [Symbol] + # @param type [Types::TypeLike] + # @param class_attribute [Boolean] + # @param block [T.proc.params(x: Attribute).void, nil] + # @return [Attribute] + # + # source://sorbet-runtime/0.5.11150/lib/types/private/methods/_methods.rb#255 + def create_attr(*args, **_arg1, &blk); end + + # source://parlour//lib/parlour/rbi_generator/namespace.rb#472 sig do params( name: ::String, @@ -627,6 +927,7 @@ class Parlour::RbiGenerator::Namespace < ::Parlour::RbiGenerator::RbiObject end def create_attr_accessor(name, type:, class_attribute: T.unsafe(nil), &block); end + # source://parlour//lib/parlour/rbi_generator/namespace.rb#430 sig do params( name: ::String, @@ -637,6 +938,7 @@ class Parlour::RbiGenerator::Namespace < ::Parlour::RbiGenerator::RbiObject end def create_attr_reader(name, type:, class_attribute: T.unsafe(nil), &block); end + # source://parlour//lib/parlour/rbi_generator/namespace.rb#451 sig do params( name: ::String, @@ -647,6 +949,7 @@ class Parlour::RbiGenerator::Namespace < ::Parlour::RbiGenerator::RbiObject end def create_attr_writer(name, type:, class_attribute: T.unsafe(nil), &block); end + # source://parlour//lib/parlour/rbi_generator/namespace.rb#398 sig do params( name: ::String, @@ -658,6 +961,7 @@ class Parlour::RbiGenerator::Namespace < ::Parlour::RbiGenerator::RbiObject end def create_attribute(name, kind:, type:, class_attribute: T.unsafe(nil), &block); end + # source://parlour//lib/parlour/rbi_generator/namespace.rb#193 sig do params( name: ::String, @@ -670,6 +974,7 @@ class Parlour::RbiGenerator::Namespace < ::Parlour::RbiGenerator::RbiObject end def create_class(name, final: T.unsafe(nil), sealed: T.unsafe(nil), superclass: T.unsafe(nil), abstract: T.unsafe(nil), &block); end + # source://parlour//lib/parlour/rbi_generator/namespace.rb#579 sig do params( name: ::String, @@ -680,6 +985,7 @@ class Parlour::RbiGenerator::Namespace < ::Parlour::RbiGenerator::RbiObject end def create_constant(name, value:, eigen_constant: T.unsafe(nil), &block); end + # source://parlour//lib/parlour/rbi_generator/namespace.rb#222 sig do params( name: ::String, @@ -692,6 +998,7 @@ class Parlour::RbiGenerator::Namespace < ::Parlour::RbiGenerator::RbiObject end def create_enum_class(name, final: T.unsafe(nil), sealed: T.unsafe(nil), enums: T.unsafe(nil), abstract: T.unsafe(nil), &block); end + # source://parlour//lib/parlour/rbi_generator/namespace.rb#503 sig do params( name: ::String, @@ -700,9 +1007,11 @@ class Parlour::RbiGenerator::Namespace < ::Parlour::RbiGenerator::RbiObject end def create_extend(name, &block); end + # source://parlour//lib/parlour/rbi_generator/namespace.rb#522 sig { params(extendables: T::Array[::String]).returns(T::Array[::Parlour::RbiGenerator::Extend]) } def create_extends(extendables); end + # source://parlour//lib/parlour/rbi_generator/namespace.rb#540 sig do params( name: ::String, @@ -711,9 +1020,11 @@ class Parlour::RbiGenerator::Namespace < ::Parlour::RbiGenerator::RbiObject end def create_include(name, &block); end + # source://parlour//lib/parlour/rbi_generator/namespace.rb#559 sig { params(includables: T::Array[::String]).returns(T::Array[::Parlour::RbiGenerator::Include]) } def create_includes(includables); end + # source://parlour//lib/parlour/rbi_generator/namespace.rb#333 sig do params( name: ::String, @@ -732,6 +1043,7 @@ class Parlour::RbiGenerator::Namespace < ::Parlour::RbiGenerator::RbiObject end def create_method(name, parameters: T.unsafe(nil), return_type: T.unsafe(nil), returns: T.unsafe(nil), abstract: T.unsafe(nil), implementation: T.unsafe(nil), override: T.unsafe(nil), overridable: T.unsafe(nil), class_method: T.unsafe(nil), final: T.unsafe(nil), type_parameters: T.unsafe(nil), &block); end + # source://parlour//lib/parlour/rbi_generator/namespace.rb#289 sig do params( name: ::String, @@ -744,6 +1056,7 @@ class Parlour::RbiGenerator::Namespace < ::Parlour::RbiGenerator::RbiObject end def create_module(name, final: T.unsafe(nil), sealed: T.unsafe(nil), interface: T.unsafe(nil), abstract: T.unsafe(nil), &block); end + # source://parlour//lib/parlour/rbi_generator/namespace.rb#253 sig do params( name: ::String, @@ -756,6 +1069,7 @@ class Parlour::RbiGenerator::Namespace < ::Parlour::RbiGenerator::RbiObject end def create_struct_class(name, final: T.unsafe(nil), sealed: T.unsafe(nil), props: T.unsafe(nil), abstract: T.unsafe(nil), &block); end + # source://parlour//lib/parlour/rbi_generator/namespace.rb#602 sig do params( name: ::String, @@ -765,50 +1079,73 @@ class Parlour::RbiGenerator::Namespace < ::Parlour::RbiGenerator::RbiObject end def create_type_alias(name, type:, &block); end + # source://parlour//lib/parlour/rbi_generator/namespace.rb#660 sig { override.returns(T::Array[T.any(::Symbol, T::Hash[::Symbol, ::String])]) } def describe_attrs; end + # source://parlour//lib/parlour/rbi_generator/namespace.rb#75 sig { returns(T::Array[::Parlour::RbiGenerator::Extend]) } def extends; end + # source://parlour//lib/parlour/rbi_generator/namespace.rb#57 sig { returns(T::Boolean) } def final; end + # source://parlour//lib/parlour/rbi_generator/namespace.rb#655 sig { override.void } def generalize_from_rbi!; end + # source://parlour//lib/parlour/rbi_generator/namespace.rb#21 sig { override.overridable.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } def generate_rbi(indent_level, options); end + # source://parlour//lib/parlour/rbi_generator/namespace.rb#85 sig { returns(T::Array[::Parlour::RbiGenerator::Include]) } def includes; end + # source://parlour//lib/parlour/rbi_generator/namespace.rb#645 sig { override.overridable.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).void } def merge_into_self(others); end + # source://parlour//lib/parlour/rbi_generator/namespace.rb#627 sig { override.overridable.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) } def mergeable?(others); end + # source://parlour//lib/parlour/rbi_generator/namespace.rb#120 sig { params(constant: ::Module, block: T.proc.params(x: Parlour::RbiGenerator::Namespace).void).void } def path(constant, &block); end + # source://parlour//lib/parlour/rbi_generator/namespace.rb#62 sig { returns(T::Boolean) } def sealed; end - def type_aliases(*args, &blk); end + # @return [Array] + # + # source://sorbet-runtime/0.5.11150/lib/types/private/methods/_methods.rb#255 + def type_aliases(*args, **_arg1, &blk); end private + # source://parlour//lib/parlour/rbi_generator/namespace.rb#678 sig { overridable.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } def generate_body(indent_level, options); end + # source://parlour//lib/parlour/rbi_generator/namespace.rb#769 sig { params(object: ::Parlour::RbiGenerator::RbiObject).void } def move_next_comments(object); end end +# For backwards compatibility. +# Before Parlour 5.0, Parlour::Options was Parlour::RbiGenerator::Options. +# +# source://parlour//lib/parlour/rbi_generator.rb#7 Parlour::RbiGenerator::Options = Parlour::Options +# Represents a method parameter with a Sorbet type signature. +# +# source://parlour//lib/parlour/rbi_generator/parameter.rb#6 class Parlour::RbiGenerator::Parameter + # source://parlour//lib/parlour/rbi_generator/parameter.rb#37 sig do params( name: ::String, @@ -818,66 +1155,106 @@ class Parlour::RbiGenerator::Parameter end def initialize(name, type: T.unsafe(nil), default: T.unsafe(nil)); end + # source://parlour//lib/parlour/rbi_generator/parameter.rb#56 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end + # source://parlour//lib/parlour/rbi_generator/parameter.rb#95 sig { returns(T.nilable(::String)) } def default; end + # source://parlour//lib/parlour/rbi_generator/parameter.rb#139 sig { returns(::String) } def describe_in_method; end + # source://parlour//lib/parlour/rbi_generator/parameter.rb#134 sig { void } def generalize_from_rbi!; end + # source://parlour//lib/parlour/rbi_generator/parameter.rb#101 sig { returns(::Symbol) } def kind; end + # source://parlour//lib/parlour/rbi_generator/parameter.rb#68 sig { returns(::String) } def name; end + # source://parlour//lib/parlour/rbi_generator/parameter.rb#75 sig { returns(::String) } def name_without_kind; end + # source://parlour//lib/parlour/rbi_generator/parameter.rb#107 sig { returns(::String) } def to_def_param; end + # source://parlour//lib/parlour/rbi_generator/parameter.rb#121 sig { returns(::String) } def to_sig_param; end + # source://parlour//lib/parlour/rbi_generator/parameter.rb#88 sig { returns(T.any(::Parlour::Types::Type, ::String)) } def type; end end +# A mapping of {kind} values to the characteristic prefixes each kind has. +# +# source://parlour//lib/parlour/rbi_generator/parameter.rb#126 Parlour::RbiGenerator::Parameter::PREFIXES = T.let(T.unsafe(nil), Hash) +# An abstract class which is subclassed by any classes which can generate +# entire lines of an RBI, such as {Namespace} and {Method}. (As an example, +# {Parameter} is _not_ a subclass because it does not generate lines, only +# segments of definition and signature lines.) +# +# @abstract +# +# source://parlour//lib/parlour/rbi_generator/rbi_object.rb#9 class Parlour::RbiGenerator::RbiObject < ::Parlour::TypedObject abstract! + # source://parlour//lib/parlour/rbi_generator/rbi_object.rb#19 sig { params(generator: ::Parlour::Generator, name: ::String).void } def initialize(generator, name); end + # @abstract + # + # source://parlour//lib/parlour/rbi_generator/rbi_object.rb#79 sig { abstract.void } def generalize_from_rbi!; end + # @abstract + # + # source://parlour//lib/parlour/rbi_generator/rbi_object.rb#42 sig { abstract.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } def generate_rbi(indent_level, options); end + # source://parlour//lib/parlour/rbi_generator/rbi_object.rb#28 sig { returns(::Parlour::Generator) } def generator; end + # @abstract + # + # source://parlour//lib/parlour/rbi_generator/rbi_object.rb#70 sig { abstract.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).void } def merge_into_self(others); end + # @abstract + # + # source://parlour//lib/parlour/rbi_generator/rbi_object.rb#56 sig { abstract.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) } def mergeable?(others); end end +# Represents an struct definition; that is, a class which subclasses +# +T::Struct+ and declares `prop` members. +# +# source://parlour//lib/parlour/rbi_generator/struct_class_namespace.rb#6 class Parlour::RbiGenerator::StructClassNamespace < ::Parlour::RbiGenerator::ClassNamespace extend T::Generic Child = type_member { { fixed: Parlour::RbiGenerator::RbiObject } } + # source://parlour//lib/parlour/rbi_generator/struct_class_namespace.rb#33 sig do params( generator: ::Parlour::Generator, @@ -891,26 +1268,36 @@ class Parlour::RbiGenerator::StructClassNamespace < ::Parlour::RbiGenerator::Cla end def initialize(generator, name, final, sealed, props, abstract, &block); end + # source://parlour//lib/parlour/rbi_generator/struct_class_namespace.rb#114 sig { override.returns(T::Array[T.any(::Symbol, T::Hash[::Symbol, ::String])]) } def describe_attrs; end + # source://parlour//lib/parlour/rbi_generator/struct_class_namespace.rb#107 sig { override.void } def generalize_from_rbi!; end + # source://parlour//lib/parlour/rbi_generator/struct_class_namespace.rb#55 sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } def generate_body(indent_level, options); end + # source://parlour//lib/parlour/rbi_generator/struct_class_namespace.rb#95 sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).void } def merge_into_self(others); end + # source://parlour//lib/parlour/rbi_generator/struct_class_namespace.rb#77 sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) } def mergeable?(others); end + # source://parlour//lib/parlour/rbi_generator/struct_class_namespace.rb#41 sig { returns(T::Array[::Parlour::RbiGenerator::StructProp]) } def props; end end +# Represents a +T::Struct+ property. +# +# source://parlour//lib/parlour/rbi_generator/struct_prop.rb#5 class Parlour::RbiGenerator::StructProp + # source://parlour//lib/parlour/rbi_generator/struct_prop.rb#33 sig do params( name: ::String, @@ -929,55 +1316,77 @@ class Parlour::RbiGenerator::StructProp end def initialize(name, type, optional: T.unsafe(nil), enum: T.unsafe(nil), dont_store: T.unsafe(nil), foreign: T.unsafe(nil), default: T.unsafe(nil), factory: T.unsafe(nil), immutable: T.unsafe(nil), array: T.unsafe(nil), override: T.unsafe(nil), redaction: T.unsafe(nil)); end + # source://parlour//lib/parlour/rbi_generator/struct_prop.rb#57 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end + # source://parlour//lib/parlour/rbi_generator/struct_prop.rb#106 sig { returns(T.nilable(::String)) } def array; end + # source://parlour//lib/parlour/rbi_generator/struct_prop.rb#97 sig { returns(T.nilable(::String)) } def default; end + # source://parlour//lib/parlour/rbi_generator/struct_prop.rb#91 sig { returns(T.nilable(T::Boolean)) } def dont_store; end + # source://parlour//lib/parlour/rbi_generator/struct_prop.rb#88 sig { returns(T.nilable(::String)) } def enum; end + # source://parlour//lib/parlour/rbi_generator/struct_prop.rb#100 sig { returns(T.nilable(::String)) } def factory; end + # source://parlour//lib/parlour/rbi_generator/struct_prop.rb#94 sig { returns(T.nilable(::String)) } def foreign; end + # source://parlour//lib/parlour/rbi_generator/struct_prop.rb#134 sig { void } def generalize_from_rbi!; end + # source://parlour//lib/parlour/rbi_generator/struct_prop.rb#103 sig { returns(T.nilable(T::Boolean)) } def immutable; end + # source://parlour//lib/parlour/rbi_generator/struct_prop.rb#77 sig { returns(::String) } def name; end + # source://parlour//lib/parlour/rbi_generator/struct_prop.rb#85 sig { returns(T.nilable(T.any(::Symbol, T::Boolean))) } def optional; end + # source://parlour//lib/parlour/rbi_generator/struct_prop.rb#109 sig { returns(T.nilable(T::Boolean)) } def override; end + # source://parlour//lib/parlour/rbi_generator/struct_prop.rb#112 sig { returns(T.nilable(::String)) } def redaction; end + # source://parlour//lib/parlour/rbi_generator/struct_prop.rb#122 sig { returns(::String) } def to_prop_call; end + # source://parlour//lib/parlour/rbi_generator/struct_prop.rb#82 sig { returns(T.any(::Parlour::Types::Type, ::String)) } def type; end end +# The optional properties available on instances of this class. +# +# source://parlour//lib/parlour/rbi_generator/struct_prop.rb#115 Parlour::RbiGenerator::StructProp::EXTRA_PROPERTIES = T.let(T.unsafe(nil), Array) +# Represents a type alias. +# +# source://parlour//lib/parlour/rbi_generator/type_alias.rb#5 class Parlour::RbiGenerator::TypeAlias < ::Parlour::RbiGenerator::RbiObject + # source://parlour//lib/parlour/rbi_generator/type_alias.rb#18 sig do params( generator: ::Parlour::Generator, @@ -988,39 +1397,58 @@ class Parlour::RbiGenerator::TypeAlias < ::Parlour::RbiGenerator::RbiObject end def initialize(generator, name:, type:, &block); end + # source://parlour//lib/parlour/rbi_generator/type_alias.rb#34 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end + # source://parlour//lib/parlour/rbi_generator/type_alias.rb#93 sig { override.returns(T::Array[T.any(::Symbol, T::Hash[::Symbol, ::String])]) } def describe_attrs; end + # source://parlour//lib/parlour/rbi_generator/type_alias.rb#88 sig { override.void } def generalize_from_rbi!; end + # source://parlour//lib/parlour/rbi_generator/type_alias.rb#49 sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } def generate_rbi(indent_level, options); end + # source://parlour//lib/parlour/rbi_generator/type_alias.rb#83 sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).void } def merge_into_self(others); end + # source://parlour//lib/parlour/rbi_generator/type_alias.rb#66 sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) } def mergeable?(others); end + # source://parlour//lib/parlour/rbi_generator/type_alias.rb#26 sig { returns(T.any(::Parlour::Types::Type, ::String)) } def type; end end +# The RBS generator. +# +# source://parlour//lib/parlour/rbs_generator/rbs_object.rb#8 class Parlour::RbsGenerator < ::Parlour::Generator + # @return [RbsGenerator] a new instance of RbsGenerator + # + # source://parlour//lib/parlour/rbs_generator.rb#5 def initialize(**hash); end + # source://parlour//lib/parlour/rbs_generator.rb#19 sig { overridable.returns(::String) } def rbs; end + # source://parlour//lib/parlour/rbs_generator.rb#13 sig { overridable.returns(Parlour::RbsGenerator::Namespace) } def root; end end +# Represents miscellaneous Ruby code. +# +# source://parlour//lib/parlour/rbs_generator/arbitrary.rb#5 class Parlour::RbsGenerator::Arbitrary < ::Parlour::RbsGenerator::RbsObject + # source://parlour//lib/parlour/rbs_generator/arbitrary.rb#17 sig do params( generator: ::Parlour::Generator, @@ -1030,28 +1458,41 @@ class Parlour::RbsGenerator::Arbitrary < ::Parlour::RbsGenerator::RbsObject end def initialize(generator, code: T.unsafe(nil), &block); end + # source://parlour//lib/parlour/rbs_generator/arbitrary.rb#33 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end + # source://parlour//lib/parlour/rbs_generator/arbitrary.rb#25 sig { returns(::String) } def code; end + # @return [String] + # + # source://parlour//lib/parlour/rbs_generator/arbitrary.rb#25 def code=(_arg0); end + # source://parlour//lib/parlour/rbs_generator/arbitrary.rb#84 sig { override.returns(T::Array[T.any(::Symbol, T::Hash[::Symbol, ::String])]) } def describe_attrs; end + # source://parlour//lib/parlour/rbs_generator/arbitrary.rb#48 sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } def generate_rbs(indent_level, options); end + # source://parlour//lib/parlour/rbs_generator/arbitrary.rb#79 sig { override.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).void } def merge_into_self(others); end + # source://parlour//lib/parlour/rbs_generator/arbitrary.rb#63 sig { override.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).returns(T::Boolean) } def mergeable?(others); end end +# Represents an attribute reader, writer or accessor. +# +# source://parlour//lib/parlour/rbs_generator/attribute.rb#5 class Parlour::RbsGenerator::Attribute < ::Parlour::RbsGenerator::Method + # source://parlour//lib/parlour/rbs_generator/attribute.rb#27 sig do params( generator: ::Parlour::Generator, @@ -1063,44 +1504,62 @@ class Parlour::RbsGenerator::Attribute < ::Parlour::RbsGenerator::Method end def initialize(generator, name, kind, type, &block); end + # source://parlour//lib/parlour/rbs_generator/attribute.rb#75 sig { override.params(other: ::Object).returns(T::Boolean) } def ==(other); end + # source://parlour//lib/parlour/rbs_generator/attribute.rb#82 sig { override.returns(T::Array[T.any(::Symbol, T::Hash[::Symbol, ::String])]) } def describe_attrs; end + # source://parlour//lib/parlour/rbs_generator/attribute.rb#62 sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } def generate_rbs(indent_level, options); end + # source://parlour//lib/parlour/rbs_generator/attribute.rb#45 sig { returns(::Symbol) } def kind; end + # source://parlour//lib/parlour/rbs_generator/attribute.rb#49 sig { returns(T.any(::Parlour::Types::Type, ::String)) } def type; end end +# Represents a block in a method signature. +# (This is not an RbsObject because it doesn't generate a full line.) +# +# source://parlour//lib/parlour/rbs_generator/block.rb#6 class Parlour::RbsGenerator::Block + # source://parlour//lib/parlour/rbs_generator/block.rb#14 sig { params(type: ::Parlour::Types::Proc, required: T::Boolean).void } def initialize(type, required); end + # source://parlour//lib/parlour/rbs_generator/block.rb#25 sig { overridable.params(other: ::Object).returns(T::Boolean) } def ==(other); end + # source://parlour//lib/parlour/rbs_generator/block.rb#44 sig { params(options: ::Parlour::Options).returns(T::Array[::String]) } def generate_rbs(options); end + # source://parlour//lib/parlour/rbs_generator/block.rb#37 sig { returns(T::Boolean) } def required; end + # source://parlour//lib/parlour/rbs_generator/block.rb#32 sig { returns(::Parlour::Types::Proc) } def type; end end +# Represents a class definition. +# +# source://parlour//lib/parlour/rbs_generator/class_namespace.rb#5 class Parlour::RbsGenerator::ClassNamespace < ::Parlour::RbsGenerator::Namespace extend T::Generic Child = type_member { { fixed: Parlour::RbsGenerator::RbsObject } } + # source://parlour//lib/parlour/rbs_generator/class_namespace.rb#27 sig do params( generator: ::Parlour::Generator, @@ -1111,23 +1570,32 @@ class Parlour::RbsGenerator::ClassNamespace < ::Parlour::RbsGenerator::Namespace end def initialize(generator, name, superclass, &block); end + # source://parlour//lib/parlour/rbs_generator/class_namespace.rb#97 sig { override.returns(T::Array[T.any(::Symbol, T::Hash[::Symbol, ::String])]) } def describe_attrs; end + # source://parlour//lib/parlour/rbs_generator/class_namespace.rb#38 sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } def generate_rbs(indent_level, options); end + # source://parlour//lib/parlour/rbs_generator/class_namespace.rb#85 sig { override.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).void } def merge_into_self(others); end + # source://parlour//lib/parlour/rbs_generator/class_namespace.rb#66 sig { override.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).returns(T::Boolean) } def mergeable?(others); end + # source://parlour//lib/parlour/rbs_generator/class_namespace.rb#52 sig { returns(T.nilable(T.any(::Parlour::Types::Type, ::String))) } def superclass; end end +# Represents a constant definition. +# +# source://parlour//lib/parlour/rbs_generator/constant.rb#5 class Parlour::RbsGenerator::Constant < ::Parlour::RbsGenerator::RbsObject + # source://parlour//lib/parlour/rbs_generator/constant.rb#19 sig do params( generator: ::Parlour::Generator, @@ -1138,26 +1606,36 @@ class Parlour::RbsGenerator::Constant < ::Parlour::RbsGenerator::RbsObject end def initialize(generator, name, type:, &block); end + # source://parlour//lib/parlour/rbs_generator/constant.rb#35 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end + # source://parlour//lib/parlour/rbs_generator/constant.rb#87 sig { override.returns(T::Array[T.any(::Symbol, T::Hash[::Symbol, ::String])]) } def describe_attrs; end + # source://parlour//lib/parlour/rbs_generator/constant.rb#50 sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } def generate_rbs(indent_level, options); end + # source://parlour//lib/parlour/rbs_generator/constant.rb#82 sig { override.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).void } def merge_into_self(others); end + # source://parlour//lib/parlour/rbs_generator/constant.rb#65 sig { override.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).returns(T::Boolean) } def mergeable?(others); end + # source://parlour//lib/parlour/rbs_generator/constant.rb#27 sig { returns(T.any(::Parlour::Types::Type, ::String)) } def type; end end +# Represents an +extend+ call. +# +# source://parlour//lib/parlour/rbs_generator/extend.rb#5 class Parlour::RbsGenerator::Extend < ::Parlour::RbsGenerator::RbsObject + # source://parlour//lib/parlour/rbs_generator/extend.rb#16 sig do params( generator: ::Parlour::Generator, @@ -1167,26 +1645,36 @@ class Parlour::RbsGenerator::Extend < ::Parlour::RbsGenerator::RbsObject end def initialize(generator, type:, &block); end + # source://parlour//lib/parlour/rbs_generator/extend.rb#28 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end + # source://parlour//lib/parlour/rbs_generator/extend.rb#84 sig { override.returns(T::Array[T.any(::Symbol, T::Hash[::Symbol, ::String])]) } def describe_attrs; end + # source://parlour//lib/parlour/rbs_generator/extend.rb#47 sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } def generate_rbs(indent_level, options); end + # source://parlour//lib/parlour/rbs_generator/extend.rb#79 sig { override.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).void } def merge_into_self(others); end + # source://parlour//lib/parlour/rbs_generator/extend.rb#62 sig { override.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).returns(T::Boolean) } def mergeable?(others); end + # source://parlour//lib/parlour/rbs_generator/extend.rb#34 sig { returns(T.any(::Parlour::Types::Type, ::String)) } def type; end end +# Represents an +include+ call. +# +# source://parlour//lib/parlour/rbs_generator/include.rb#5 class Parlour::RbsGenerator::Include < ::Parlour::RbsGenerator::RbsObject + # source://parlour//lib/parlour/rbs_generator/include.rb#16 sig do params( generator: ::Parlour::Generator, @@ -1196,38 +1684,53 @@ class Parlour::RbsGenerator::Include < ::Parlour::RbsGenerator::RbsObject end def initialize(generator, type:, &block); end + # source://parlour//lib/parlour/rbs_generator/include.rb#28 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end + # source://parlour//lib/parlour/rbs_generator/include.rb#84 sig { override.returns(T::Array[T.any(::Symbol, T::Hash[::Symbol, ::String])]) } def describe_attrs; end + # source://parlour//lib/parlour/rbs_generator/include.rb#47 sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } def generate_rbs(indent_level, options); end + # source://parlour//lib/parlour/rbs_generator/include.rb#79 sig { override.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).void } def merge_into_self(others); end + # source://parlour//lib/parlour/rbs_generator/include.rb#62 sig { override.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).returns(T::Boolean) } def mergeable?(others); end + # source://parlour//lib/parlour/rbs_generator/include.rb#34 sig { returns(T.any(::Parlour::Types::Type, ::String)) } def type; end end +# Represents an interface definition. +# +# source://parlour//lib/parlour/rbs_generator/interface_namespace.rb#5 class Parlour::RbsGenerator::InterfaceNamespace < ::Parlour::RbsGenerator::Namespace extend T::Generic Child = type_member { { fixed: Parlour::RbsGenerator::RbsObject } } + # source://parlour//lib/parlour/rbs_generator/interface_namespace.rb#29 sig { override.returns(T::Array[T.any(::Symbol, T::Hash[::Symbol, ::String])]) } def describe_attrs; end + # source://parlour//lib/parlour/rbs_generator/interface_namespace.rb#21 sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } def generate_rbs(indent_level, options); end end +# Represents a method definition. +# +# source://parlour//lib/parlour/rbs_generator/method.rb#5 class Parlour::RbsGenerator::Method < ::Parlour::RbsGenerator::RbsObject + # source://parlour//lib/parlour/rbs_generator/method.rb#29 sig do params( generator: ::Parlour::Generator, @@ -1239,29 +1742,41 @@ class Parlour::RbsGenerator::Method < ::Parlour::RbsGenerator::RbsObject end def initialize(generator, name, signatures, class_method: T.unsafe(nil), &block); end + # source://parlour//lib/parlour/rbs_generator/method.rb#42 sig { overridable.params(other: ::Object).returns(T::Boolean) } def ==(other); end + # source://parlour//lib/parlour/rbs_generator/method.rb#58 sig { returns(T::Boolean) } def class_method; end + # source://parlour//lib/parlour/rbs_generator/method.rb#137 sig { override.returns(T::Array[T.any(::Symbol, T::Hash[::Symbol, ::String])]) } def describe_attrs; end + # source://parlour//lib/parlour/rbs_generator/method.rb#71 sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } def generate_rbs(indent_level, options); end + # source://parlour//lib/parlour/rbs_generator/method.rb#132 sig { override.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).void } def merge_into_self(others); end + # source://parlour//lib/parlour/rbs_generator/method.rb#115 sig { override.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).returns(T::Boolean) } def mergeable?(others); end + # source://parlour//lib/parlour/rbs_generator/method.rb#52 sig { returns(T::Array[::Parlour::RbsGenerator::MethodSignature]) } def signatures; end end +# Represents one signature in a method definition. +# (This is not an RbsObject because it doesn't generate a full line.) +# +# source://parlour//lib/parlour/rbs_generator/method_signature.rb#6 class Parlour::RbsGenerator::MethodSignature + # source://parlour//lib/parlour/rbs_generator/method_signature.rb#25 sig do params( parameters: T::Array[::Parlour::RbsGenerator::Parameter], @@ -1272,46 +1787,63 @@ class Parlour::RbsGenerator::MethodSignature end def initialize(parameters, return_type = T.unsafe(nil), block: T.unsafe(nil), type_parameters: T.unsafe(nil)); end + # source://parlour//lib/parlour/rbs_generator/method_signature.rb#38 sig { overridable.params(other: ::Object).returns(T::Boolean) } def ==(other); end + # source://parlour//lib/parlour/rbs_generator/method_signature.rb#59 sig { returns(T.nilable(::Parlour::RbsGenerator::Block)) } def block; end + # source://parlour//lib/parlour/rbs_generator/method_signature.rb#104 sig { returns(::String) } def describe_in_method; end + # source://parlour//lib/parlour/rbs_generator/method_signature.rb#71 sig { params(options: ::Parlour::Options).returns(T::Array[::String]) } def generate_rbs(options); end + # source://parlour//lib/parlour/rbs_generator/method_signature.rb#49 sig { returns(T::Array[::Parlour::RbsGenerator::Parameter]) } def parameters; end + # source://parlour//lib/parlour/rbs_generator/method_signature.rb#54 sig { returns(T.nilable(T.any(::Parlour::Types::Type, ::String))) } def return_type; end + # source://parlour//lib/parlour/rbs_generator/method_signature.rb#64 sig { returns(T::Array[::Symbol]) } def type_parameters; end end +# Represents a module definition. +# +# source://parlour//lib/parlour/rbs_generator/module_namespace.rb#5 class Parlour::RbsGenerator::ModuleNamespace < ::Parlour::RbsGenerator::Namespace extend T::Generic Child = type_member { { fixed: Parlour::RbsGenerator::RbsObject } } + # source://parlour//lib/parlour/rbs_generator/module_namespace.rb#29 sig { override.returns(T::Array[T.any(::Symbol, T::Hash[::Symbol, ::String])]) } def describe_attrs; end + # source://parlour//lib/parlour/rbs_generator/module_namespace.rb#21 sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } def generate_rbs(indent_level, options); end end +# A generic namespace. This shouldn't be used, except as the type of +# {RbsGenerator#root}. +# +# source://parlour//lib/parlour/rbs_generator/namespace.rb#6 class Parlour::RbsGenerator::Namespace < ::Parlour::RbsGenerator::RbsObject extend T::Generic include ::Parlour::Mixin::Searchable Child = type_member { { fixed: Parlour::RbsGenerator::RbsObject } } + # source://parlour//lib/parlour/rbs_generator/namespace.rb#42 sig do params( generator: ::Parlour::Generator, @@ -1321,21 +1853,42 @@ class Parlour::RbsGenerator::Namespace < ::Parlour::RbsGenerator::RbsObject end def initialize(generator, name = T.unsafe(nil), &block); end + # source://parlour//lib/parlour/rbs_generator/namespace.rb#139 sig { params(comment: T.any(::String, T::Array[::String])).void } def add_comment_to_next_child(comment); end + # source://parlour//lib/parlour/rbs_generator/namespace.rb#80 sig { returns(T::Array[::Parlour::RbsGenerator::TypeAlias]) } def aliases; end + # source://parlour//lib/parlour/rbs_generator/namespace.rb#52 sig { override.returns(T::Array[::Parlour::RbsGenerator::RbsObject]) } def children; end + # source://parlour//lib/parlour/rbs_generator/namespace.rb#91 sig { returns(T::Array[::Parlour::RbsGenerator::Constant]) } def constants; end + # Creates a new arbitrary code section. + # You should rarely have to use this! + # + # @param code [String] The code to insert. + # @param block A block which the new instance yields itself to. + # @return [RbsGenerator::Arbitrary] + # + # source://parlour//lib/parlour/rbs_generator/namespace.rb#357 def create_arbitrary(code:, &block); end - def create_attr(*args, &blk); end + # @param name [String] + # @param kind [Symbol] + # @param type [Types::TypeLike] + # @param block [T.proc.params(x: Attribute).void, nil] + # @return [Attribute] + # + # source://sorbet-runtime/0.5.11150/lib/types/private/methods/_methods.rb#255 + def create_attr(*args, **_arg1, &blk); end + + # source://parlour//lib/parlour/rbs_generator/namespace.rb#347 sig do params( name: ::String, @@ -1345,6 +1898,7 @@ class Parlour::RbsGenerator::Namespace < ::Parlour::RbsGenerator::RbsObject end def create_attr_accessor(name, type:, &block); end + # source://parlour//lib/parlour/rbs_generator/namespace.rb#309 sig do params( name: ::String, @@ -1354,6 +1908,7 @@ class Parlour::RbsGenerator::Namespace < ::Parlour::RbsGenerator::RbsObject end def create_attr_reader(name, type:, &block); end + # source://parlour//lib/parlour/rbs_generator/namespace.rb#328 sig do params( name: ::String, @@ -1363,6 +1918,7 @@ class Parlour::RbsGenerator::Namespace < ::Parlour::RbsGenerator::RbsObject end def create_attr_writer(name, type:, &block); end + # source://parlour//lib/parlour/rbs_generator/namespace.rb#280 sig do params( name: ::String, @@ -1373,6 +1929,7 @@ class Parlour::RbsGenerator::Namespace < ::Parlour::RbsGenerator::RbsObject end def create_attribute(name, kind:, type:, &block); end + # source://parlour//lib/parlour/rbs_generator/namespace.rb#169 sig do params( name: ::String, @@ -1382,6 +1939,7 @@ class Parlour::RbsGenerator::Namespace < ::Parlour::RbsGenerator::RbsObject end def create_class(name, superclass: T.unsafe(nil), &block); end + # source://parlour//lib/parlour/rbs_generator/namespace.rb#450 sig do params( name: ::String, @@ -1391,6 +1949,7 @@ class Parlour::RbsGenerator::Namespace < ::Parlour::RbsGenerator::RbsObject end def create_constant(name, type:, &block); end + # source://parlour//lib/parlour/rbs_generator/namespace.rb#377 sig do params( type: T.any(::Parlour::Types::Type, ::String), @@ -1399,6 +1958,7 @@ class Parlour::RbsGenerator::Namespace < ::Parlour::RbsGenerator::RbsObject end def create_extend(type, &block); end + # source://parlour//lib/parlour/rbs_generator/namespace.rb#396 sig do params( extendables: T::Array[T.any(::Parlour::Types::Type, ::String)] @@ -1406,6 +1966,7 @@ class Parlour::RbsGenerator::Namespace < ::Parlour::RbsGenerator::RbsObject end def create_extends(extendables); end + # source://parlour//lib/parlour/rbs_generator/namespace.rb#413 sig do params( type: T.any(::Parlour::Types::Type, ::String), @@ -1414,6 +1975,7 @@ class Parlour::RbsGenerator::Namespace < ::Parlour::RbsGenerator::RbsObject end def create_include(type, &block); end + # source://parlour//lib/parlour/rbs_generator/namespace.rb#432 sig do params( includables: T::Array[T.any(::Parlour::Types::Type, ::String)] @@ -1421,6 +1983,7 @@ class Parlour::RbsGenerator::Namespace < ::Parlour::RbsGenerator::RbsObject end def create_includes(includables); end + # source://parlour//lib/parlour/rbs_generator/namespace.rb#211 sig do params( name: ::String, @@ -1429,6 +1992,7 @@ class Parlour::RbsGenerator::Namespace < ::Parlour::RbsGenerator::RbsObject end def create_interface(name, &block); end + # source://parlour//lib/parlour/rbs_generator/namespace.rb#236 sig do params( name: ::String, @@ -1439,6 +2003,7 @@ class Parlour::RbsGenerator::Namespace < ::Parlour::RbsGenerator::RbsObject end def create_method(name, signatures = T.unsafe(nil), class_method: T.unsafe(nil), &block); end + # source://parlour//lib/parlour/rbs_generator/namespace.rb#190 sig do params( name: ::String, @@ -1447,6 +2012,7 @@ class Parlour::RbsGenerator::Namespace < ::Parlour::RbsGenerator::RbsObject end def create_module(name, &block); end + # source://parlour//lib/parlour/rbs_generator/namespace.rb#472 sig do params( name: ::String, @@ -1456,87 +2022,142 @@ class Parlour::RbsGenerator::Namespace < ::Parlour::RbsGenerator::RbsObject end def create_type_alias(name, type:, &block); end + # source://parlour//lib/parlour/rbs_generator/namespace.rb#525 sig { override.returns(T::Array[T.any(::Symbol, T::Hash[::Symbol, ::String])]) } def describe_attrs; end + # source://parlour//lib/parlour/rbs_generator/namespace.rb#60 sig { returns(T::Array[::Parlour::RbsGenerator::Extend]) } def extends; end + # source://parlour//lib/parlour/rbs_generator/namespace.rb#21 sig { override.overridable.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } def generate_rbs(indent_level, options); end + # source://parlour//lib/parlour/rbs_generator/namespace.rb#70 sig { returns(T::Array[::Parlour::RbsGenerator::Include]) } def includes; end + # source://parlour//lib/parlour/rbs_generator/namespace.rb#515 sig { override.overridable.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).void } def merge_into_self(others); end + # source://parlour//lib/parlour/rbs_generator/namespace.rb#497 sig { override.overridable.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).returns(T::Boolean) } def mergeable?(others); end + # source://parlour//lib/parlour/rbs_generator/namespace.rb#104 sig { params(object: T.untyped, block: T.proc.params(x: Parlour::RbsGenerator::Namespace).void).void } def path(object, &block); end - def type_aliases(*args, &blk); end + # @return [Array] + # + # source://sorbet-runtime/0.5.11150/lib/types/private/methods/_methods.rb#255 + def type_aliases(*args, **_arg1, &blk); end private + # source://parlour//lib/parlour/rbs_generator/namespace.rb#545 sig { overridable.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } def generate_body(indent_level, options); end + # source://parlour//lib/parlour/rbs_generator/namespace.rb#621 sig { params(object: ::Parlour::RbsGenerator::RbsObject).void } def move_next_comments(object); end end +# Represents a method parameter with a Sorbet type signature. +# +# source://parlour//lib/parlour/rbs_generator/parameter.rb#5 class Parlour::RbsGenerator::Parameter + # source://parlour//lib/parlour/rbs_generator/parameter.rb#37 sig { params(name: ::String, type: T.nilable(T.any(::Parlour::Types::Type, ::String)), required: T::Boolean).void } def initialize(name, type: T.unsafe(nil), required: T.unsafe(nil)); end + # source://parlour//lib/parlour/rbs_generator/parameter.rb#56 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end + # source://parlour//lib/parlour/rbs_generator/parameter.rb#98 sig { returns(::Symbol) } def kind; end + # source://parlour//lib/parlour/rbs_generator/parameter.rb#68 sig { returns(::String) } def name; end + # source://parlour//lib/parlour/rbs_generator/parameter.rb#75 sig { returns(::String) } def name_without_kind; end + # source://parlour//lib/parlour/rbs_generator/parameter.rb#92 sig { returns(T::Boolean) } def required; end + # source://parlour//lib/parlour/rbs_generator/parameter.rb#119 sig { returns(::String) } def to_rbs_param; end + # source://parlour//lib/parlour/rbs_generator/parameter.rb#87 sig { returns(T.any(::Parlour::Types::Type, ::String)) } def type; end end +# A mapping of {kind} values to the characteristic prefixes each kind has. +# +# source://parlour//lib/parlour/rbs_generator/parameter.rb#109 Parlour::RbsGenerator::Parameter::PREFIXES = T.let(T.unsafe(nil), Hash) + +# An array of reserved keywords in RBS which may be used as parameter +# names in standard Ruby. +# TODO: probably incomplete +# +# source://parlour//lib/parlour/rbs_generator/parameter.rb#103 Parlour::RbsGenerator::Parameter::RBS_KEYWORDS = T.let(T.unsafe(nil), Array) +# An abstract class which is subclassed by any classes which can generate +# entire lines of an RBS, such as {Namespace} and {Method}. (As an example, +# {Parameter} is _not_ a subclass because it does not generate lines, only +# segments of definition lines.) +# +# @abstract +# +# source://parlour//lib/parlour/rbs_generator/rbs_object.rb#9 class Parlour::RbsGenerator::RbsObject < ::Parlour::TypedObject abstract! + # source://parlour//lib/parlour/rbs_generator/rbs_object.rb#19 sig { params(generator: ::Parlour::Generator, name: ::String).void } def initialize(generator, name); end + # @abstract + # + # source://parlour//lib/parlour/rbs_generator/rbs_object.rb#42 sig { abstract.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } def generate_rbs(indent_level, options); end + # source://parlour//lib/parlour/rbs_generator/rbs_object.rb#28 sig { returns(::Parlour::Generator) } def generator; end + # @abstract + # + # source://parlour//lib/parlour/rbs_generator/rbs_object.rb#70 sig { abstract.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).void } def merge_into_self(others); end + # @abstract + # + # source://parlour//lib/parlour/rbs_generator/rbs_object.rb#56 sig { abstract.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).returns(T::Boolean) } def mergeable?(others); end end +# Represents a type alias. +# +# source://parlour//lib/parlour/rbs_generator/type_alias.rb#5 class Parlour::RbsGenerator::TypeAlias < ::Parlour::RbsGenerator::RbsObject + # source://parlour//lib/parlour/rbs_generator/type_alias.rb#18 sig do params( generator: ::Parlour::Generator, @@ -1547,27 +2168,35 @@ class Parlour::RbsGenerator::TypeAlias < ::Parlour::RbsGenerator::RbsObject end def initialize(generator, name:, type:, &block); end + # source://parlour//lib/parlour/rbs_generator/type_alias.rb#34 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end + # source://parlour//lib/parlour/rbs_generator/type_alias.rb#88 sig { override.returns(T::Array[T.any(::Symbol, T::Hash[::Symbol, ::String])]) } def describe_attrs; end + # source://parlour//lib/parlour/rbs_generator/type_alias.rb#49 sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } def generate_rbs(indent_level, options); end + # source://parlour//lib/parlour/rbs_generator/type_alias.rb#83 sig { override.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).void } def merge_into_self(others); end + # source://parlour//lib/parlour/rbs_generator/type_alias.rb#66 sig { override.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).returns(T::Boolean) } def mergeable?(others); end + # source://parlour//lib/parlour/rbs_generator/type_alias.rb#26 sig { returns(T.any(::Parlour::Types::Type, ::String)) } def type; end end +# source://parlour//lib/parlour/type_loader.rb#7 module Parlour::TypeLoader class << self + # source://parlour//lib/parlour/type_loader.rb#29 sig do params( filename: ::String, @@ -1576,6 +2205,7 @@ module Parlour::TypeLoader end def load_file(filename, generator: T.unsafe(nil)); end + # source://parlour//lib/parlour/type_loader.rb#54 sig do params( root: ::String, @@ -1586,6 +2216,10 @@ module Parlour::TypeLoader end def load_project(root, inclusions: T.unsafe(nil), exclusions: T.unsafe(nil), generator: T.unsafe(nil)); end + # TODO: make this into a class which stores configuration and passes it to + # all typeparsers + # + # source://parlour//lib/parlour/type_loader.rb#20 sig do params( source: ::String, @@ -1597,7 +2231,11 @@ module Parlour::TypeLoader end end +# Parses Ruby source to find Sorbet type signatures. +# +# source://parlour//lib/parlour/type_parser.rb#17 class Parlour::TypeParser + # source://parlour//lib/parlour/type_parser.rb#95 sig do params( ast: ::Parser::AST::Node, @@ -1607,19 +2245,31 @@ class Parlour::TypeParser end def initialize(ast, unknown_node_errors: T.unsafe(nil), generator: T.unsafe(nil)); end + # source://parlour//lib/parlour/type_parser.rb#119 sig { returns(::Parser::AST::Node) } def ast; end + # @return [Parser::AST::Node] + # + # source://parlour//lib/parlour/type_parser.rb#119 def ast=(_arg0); end + # source://parlour//lib/parlour/type_parser.rb#128 sig { returns(::Parlour::RbiGenerator) } def generator; end + # @return [RbiGenerator] + # + # source://parlour//lib/parlour/type_parser.rb#128 def generator=(_arg0); end + # Parses the entire source file and returns the resulting root namespace. + # + # source://parlour//lib/parlour/type_parser.rb#134 sig { returns(Parlour::RbiGenerator::Namespace) } def parse_all; end + # source://parlour//lib/parlour/type_parser.rb#649 sig do params( path: ::Parlour::TypeParser::NodePath, @@ -1628,9 +2278,18 @@ class Parlour::TypeParser end def parse_method_into_methods(path, is_within_eigenclass: T.unsafe(nil)); end + # source://parlour//lib/parlour/type_parser.rb#754 sig { params(node: ::Parser::AST::Node).returns(::Parlour::Types::Type) } def parse_node_to_type(node); end + # Given a path to a node in the AST, parses the object definitions it + # represents and returns it, recursing to any child namespaces and parsing + # any methods within. + # + # If the node directly represents several nodes, such as being a + # (begin ...) node, they are all returned. + # + # source://parlour//lib/parlour/type_parser.rb#152 sig do params( path: ::Parlour::TypeParser::NodePath, @@ -1639,6 +2298,7 @@ class Parlour::TypeParser end def parse_path_to_object(path, is_within_eigenclass: T.unsafe(nil)); end + # source://parlour//lib/parlour/type_parser.rb#496 sig do params( path: ::Parlour::TypeParser::NodePath, @@ -1647,38 +2307,53 @@ class Parlour::TypeParser end def parse_sig_into_methods(path, is_within_eigenclass: T.unsafe(nil)); end + # source://parlour//lib/parlour/type_parser.rb#418 sig { params(path: ::Parlour::TypeParser::NodePath).returns(::Parlour::TypeParser::IntermediateSig) } def parse_sig_into_sig(path); end + # source://parlour//lib/parlour/type_parser.rb#124 sig { returns(T::Boolean) } def unknown_node_errors; end protected + # source://parlour//lib/parlour/type_parser.rb#971 sig { params(node: T.nilable(::Parser::AST::Node), modifier: ::Symbol).returns(T::Boolean) } def body_has_modifier?(node, modifier); end + # source://parlour//lib/parlour/type_parser.rb#986 sig { params(node: ::Parser::AST::Node).returns([T::Array[::String], T::Array[::String]]) } def body_includes_and_extends(node); end + # source://parlour//lib/parlour/type_parser.rb#911 sig { params(node: T.nilable(::Parser::AST::Node)).returns(T::Array[::Symbol]) } def constant_names(node); end + # source://parlour//lib/parlour/type_parser.rb#953 sig { params(node: T.nilable(::Parser::AST::Node)).returns(T.nilable(::String)) } def node_to_s(node); end + # @raise [ParseError.new(buffer, range)] + # + # source://parlour//lib/parlour/type_parser.rb#1010 sig { params(desc: ::String, node: T.any(::Parlour::TypeParser::NodePath, ::Parser::AST::Node)).returns(T.noreturn) } def parse_err(desc, node); end + # source://parlour//lib/parlour/type_parser.rb#936 sig { params(path: ::Parlour::TypeParser::NodePath).returns(T::Boolean) } def previous_sibling_sig_node?(path); end + # source://parlour//lib/parlour/type_parser.rb#923 sig { params(node: ::Parser::AST::Node).returns(T::Boolean) } def sig_node?(node); end + # source://parlour//lib/parlour/type_parser.rb#893 sig { params(msg: ::String, node: ::Parser::AST::Node).void } def warning(msg, node); end + # @raise [ArgumentError] + # + # source://parlour//lib/parlour/type_parser.rb#1043 sig do type_parameters(:A, :B) .params( @@ -1691,6 +2366,7 @@ class Parlour::TypeParser def zip_by(a, fa, b, fb); end class << self + # source://parlour//lib/parlour/type_parser.rb#108 sig do params( filename: ::String, @@ -1700,145 +2376,229 @@ class Parlour::TypeParser end def from_source(filename, source, generator: T.unsafe(nil)); end + # source://parlour//lib/parlour/type_parser.rb#743 sig { params(str: ::String).returns(::Parlour::Types::Type) } def parse_single_type(str); end end end +# A parsed sig, not associated with a method. +# +# source://parlour//lib/parlour/type_parser.rb#399 class Parlour::TypeParser::IntermediateSig < ::T::Struct - prop :abstract, T::Boolean - prop :final, T::Boolean + prop :type_parameters, T.nilable(T::Array[::Symbol]) prop :overridable, T::Boolean prop :override, T::Boolean - prop :params, T.nilable(T::Array[::Parser::AST::Node]) + prop :abstract, T::Boolean + prop :final, T::Boolean prop :return_type, T.nilable(::String) - prop :type_parameters, T.nilable(T::Array[::Symbol]) + prop :params, T.nilable(T::Array[::Parser::AST::Node]) class << self + # source://sorbet-runtime/0.5.11150/lib/types/struct.rb#13 def inherited(s); end end end +# Represents a path of indices which can be traversed to reach a specific +# node in an AST. +# +# source://parlour//lib/parlour/type_parser.rb#20 class Parlour::TypeParser::NodePath + # source://parlour//lib/parlour/type_parser.rb#31 sig { params(indices: T::Array[::Integer]).void } def initialize(indices); end + # source://parlour//lib/parlour/type_parser.rb#48 sig { params(index: ::Integer).returns(::Parlour::TypeParser::NodePath) } def child(index); end + # source://parlour//lib/parlour/type_parser.rb#25 sig { returns(T::Array[::Integer]) } def indices; end + # source://parlour//lib/parlour/type_parser.rb#37 sig { returns(::Parlour::TypeParser::NodePath) } def parent; end + # source://parlour//lib/parlour/type_parser.rb#57 sig { params(offset: ::Integer).returns(::Parlour::TypeParser::NodePath) } def sibling(offset); end + # source://parlour//lib/parlour/type_parser.rb#74 sig { params(start: ::Parser::AST::Node).returns(::Parser::AST::Node) } def traverse(start); end end +# A generic superclass of all objects which form part of type definitions in, +# specific formats, such as RbiObject and RbsObject. +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://parlour//lib/parlour/typed_object.rb#5 class Parlour::TypedObject abstract! + # source://parlour//lib/parlour/typed_object.rb#12 sig { params(name: ::String).void } def initialize(name); end + # source://parlour//lib/parlour/typed_object.rb#50 sig { params(comment: T.any(::String, T::Array[::String])).void } def add_comment(comment); end - def add_comments(*args, &blk); end + # @param comment [String, Array] + # @return [void] + # + # source://sorbet-runtime/0.5.11150/lib/types/private/methods/_methods.rb#255 + def add_comments(*args, **_arg1, &blk); end + # source://parlour//lib/parlour/typed_object.rb#32 sig { returns(T::Array[::String]) } def comments; end + # source://parlour//lib/parlour/typed_object.rb#65 sig { returns(::String) } def describe; end + # source://parlour//lib/parlour/typed_object.rb#116 sig { params(tree: T.nilable(::Parlour::Debugging::Tree)).returns(::String) } def describe_tree(tree: T.unsafe(nil)); end + # source://parlour//lib/parlour/typed_object.rb#21 sig { returns(T.nilable(::Parlour::Plugin)) } def generated_by; end - def inspect(*args, &blk); end + # @return [String] + # + # source://sorbet-runtime/0.5.11150/lib/types/private/methods/_methods.rb#255 + def inspect(*args, **_arg1, &blk); end + # source://parlour//lib/parlour/typed_object.rb#26 sig { returns(::String) } def name; end - def to_s(*args, &blk); end + # @return [String] + # + # source://sorbet-runtime/0.5.11150/lib/types/private/methods/_methods.rb#255 + def to_s(*args, **_arg1, &blk); end protected + # @abstract + # + # source://parlour//lib/parlour/typed_object.rb#153 sig { abstract.returns(T::Array[T.any(::Symbol, T::Hash[::Symbol, ::String])]) } def describe_attrs; end + # source://parlour//lib/parlour/typed_object.rb#166 sig { params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) } def generate_comments(indent_level, options); end end +# Contains structured types which can be used in type signatures. +# +# source://parlour//lib/parlour/types.rb#5 module Parlour::Types; end +# An array with known element types. +# +# source://parlour//lib/parlour/types.rb#269 class Parlour::Types::Array < ::Parlour::Types::SingleElementCollection + # source://parlour//lib/parlour/types.rb#276 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end + # source://parlour//lib/parlour/types.rb#271 sig { override.returns(::String) } def collection_name; end end +# Type for a boolean. +# +# source://parlour//lib/parlour/types.rb#435 class Parlour::Types::Boolean < ::Parlour::Types::Type + # source://parlour//lib/parlour/types.rb#437 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end + # source://parlour//lib/parlour/types.rb#452 sig { override.returns(::String) } def describe; end + # source://parlour//lib/parlour/types.rb#442 sig { override.returns(::String) } def generate_rbi; end + # source://parlour//lib/parlour/types.rb#447 sig { override.returns(::String) } def generate_rbs; end end +# A type which represents the class of a type, rather than an instance. +# For example, "String" means an instance of String, but "Class(String)" +# means the actual String class. +# +# source://parlour//lib/parlour/types.rb#404 class Parlour::Types::Class < ::Parlour::Types::Type + # source://parlour//lib/parlour/types.rb#406 sig { params(type: T.any(::Parlour::Types::Type, ::String)).void } def initialize(type); end + # source://parlour//lib/parlour/types.rb#411 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end + # source://parlour//lib/parlour/types.rb#429 sig { override.returns(::String) } def describe; end + # source://parlour//lib/parlour/types.rb#419 sig { override.returns(::String) } def generate_rbi; end + # source://parlour//lib/parlour/types.rb#424 sig { override.returns(::String) } def generate_rbs; end + # source://parlour//lib/parlour/types.rb#416 sig { returns(::Parlour::Types::Type) } def type; end end +# An enumerable with known element types. +# +# source://parlour//lib/parlour/types.rb#308 class Parlour::Types::Enumerable < ::Parlour::Types::SingleElementCollection + # source://parlour//lib/parlour/types.rb#315 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end + # source://parlour//lib/parlour/types.rb#310 sig { override.returns(::String) } def collection_name; end end +# An enumerator with known element types. +# +# source://parlour//lib/parlour/types.rb#321 class Parlour::Types::Enumerator < ::Parlour::Types::SingleElementCollection + # source://parlour//lib/parlour/types.rb#328 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end + # source://parlour//lib/parlour/types.rb#323 sig { override.returns(::String) } def collection_name; end end +# A user-defined generic class with an arbitrary number of type +# parameters. This class assumes at least one type_param is +# provided, otherwise output will have empty type param lists. +# +# source://parlour//lib/parlour/types.rb#202 class Parlour::Types::Generic < ::Parlour::Types::Type + # source://parlour//lib/parlour/types.rb#204 sig do params( type: T.any(::Parlour::Types::Type, ::String), @@ -1847,89 +2607,127 @@ class Parlour::Types::Generic < ::Parlour::Types::Type end def initialize(type, type_params); end + # source://parlour//lib/parlour/types.rb#210 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end + # source://parlour//lib/parlour/types.rb#233 sig { override.returns(::String) } def describe; end + # source://parlour//lib/parlour/types.rb#223 sig { override.returns(::String) } def generate_rbi; end + # source://parlour//lib/parlour/types.rb#228 sig { override.returns(::String) } def generate_rbs; end + # source://parlour//lib/parlour/types.rb#217 sig { returns(::Parlour::Types::Type) } def type; end + # source://parlour//lib/parlour/types.rb#220 sig { returns(T::Array[::Parlour::Types::Type]) } def type_params; end end +# A hash with known key and value types. +# +# source://parlour//lib/parlour/types.rb#334 class Parlour::Types::Hash < ::Parlour::Types::Type + # source://parlour//lib/parlour/types.rb#336 sig { params(key: T.any(::Parlour::Types::Type, ::String), value: T.any(::Parlour::Types::Type, ::String)).void } def initialize(key, value); end + # source://parlour//lib/parlour/types.rb#342 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end + # source://parlour//lib/parlour/types.rb#363 sig { override.returns(::String) } def describe; end + # source://parlour//lib/parlour/types.rb#353 sig { override.returns(::String) } def generate_rbi; end + # source://parlour//lib/parlour/types.rb#358 sig { override.returns(::String) } def generate_rbs; end + # source://parlour//lib/parlour/types.rb#347 sig { returns(::Parlour::Types::Type) } def key; end + # source://parlour//lib/parlour/types.rb#350 sig { returns(::Parlour::Types::Type) } def value; end end +# A type which matches all of the wrapped types. +# +# source://parlour//lib/parlour/types.rb#138 class Parlour::Types::Intersection < ::Parlour::Types::Type + # source://parlour//lib/parlour/types.rb#140 sig { params(types: T::Array[T.any(::Parlour::Types::Type, ::String)]).void } def initialize(types); end + # source://parlour//lib/parlour/types.rb#145 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end + # source://parlour//lib/parlour/types.rb#163 sig { override.returns(::String) } def describe; end + # source://parlour//lib/parlour/types.rb#153 sig { override.returns(::String) } def generate_rbi; end + # source://parlour//lib/parlour/types.rb#158 sig { override.returns(::String) } def generate_rbs; end + # source://parlour//lib/parlour/types.rb#150 sig { returns(T::Array[::Parlour::Types::Type]) } def types; end end +# A type which can be either the wrapped type, or nil. +# +# source://parlour//lib/parlour/types.rb#76 class Parlour::Types::Nilable < ::Parlour::Types::Type + # source://parlour//lib/parlour/types.rb#78 sig { params(type: T.any(::Parlour::Types::Type, ::String)).void } def initialize(type); end + # source://parlour//lib/parlour/types.rb#83 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end + # source://parlour//lib/parlour/types.rb#101 sig { override.returns(::String) } def describe; end + # source://parlour//lib/parlour/types.rb#91 sig { override.returns(::String) } def generate_rbi; end + # source://parlour//lib/parlour/types.rb#96 sig { override.returns(::String) } def generate_rbs; end + # source://parlour//lib/parlour/types.rb#88 sig { returns(::Parlour::Types::Type) } def type; end end +# A type which can be called as a function. +# +# source://parlour//lib/parlour/types.rb#505 class Parlour::Types::Proc < ::Parlour::Types::Type + # source://parlour//lib/parlour/types.rb#533 sig do params( parameters: T::Array[::Parlour::Types::Proc::Parameter], @@ -1938,213 +2736,318 @@ class Parlour::Types::Proc < ::Parlour::Types::Type end def initialize(parameters, return_type); end + # source://parlour//lib/parlour/types.rb#539 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end + # source://parlour//lib/parlour/types.rb#568 sig { override.returns(::String) } def describe; end + # source://parlour//lib/parlour/types.rb#550 sig { override.returns(::String) } def generate_rbi; end + # source://parlour//lib/parlour/types.rb#560 sig { override.returns(::String) } def generate_rbs; end + # source://parlour//lib/parlour/types.rb#544 sig { returns(T::Array[::Parlour::Types::Proc::Parameter]) } def parameters; end + # source://parlour//lib/parlour/types.rb#547 sig { returns(T.nilable(::Parlour::Types::Type)) } def return_type; end end +# A parameter to a proc. +# +# source://parlour//lib/parlour/types.rb#506 class Parlour::Types::Proc::Parameter + # source://parlour//lib/parlour/types.rb#510 sig { params(name: ::String, type: T.any(::Parlour::Types::Type, ::String), default: T.nilable(::String)).void } def initialize(name, type, default = T.unsafe(nil)); end + # source://parlour//lib/parlour/types.rb#526 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end + # source://parlour//lib/parlour/types.rb#523 sig { returns(T.nilable(::String)) } def default; end + # source://parlour//lib/parlour/types.rb#517 sig { returns(::String) } def name; end + # source://parlour//lib/parlour/types.rb#520 sig { returns(::Parlour::Types::Type) } def type; end end +# A range with known element types. +# +# source://parlour//lib/parlour/types.rb#295 class Parlour::Types::Range < ::Parlour::Types::SingleElementCollection + # source://parlour//lib/parlour/types.rb#302 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end + # source://parlour//lib/parlour/types.rb#297 sig { override.returns(::String) } def collection_name; end end +# A basic type as a raw string. +# +# source://parlour//lib/parlour/types.rb#45 class Parlour::Types::Raw < ::Parlour::Types::Type + # source://parlour//lib/parlour/types.rb#47 sig { params(str: ::String).void } def initialize(str); end + # source://parlour//lib/parlour/types.rb#55 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end + # source://parlour//lib/parlour/types.rb#70 sig { override.returns(::String) } def describe; end + # source://parlour//lib/parlour/types.rb#60 sig { override.returns(::String) } def generate_rbi; end + # source://parlour//lib/parlour/types.rb#65 sig { override.returns(::String) } def generate_rbs; end + # source://parlour//lib/parlour/types.rb#52 sig { returns(::String) } def str; end end +# A record/shape; a hash with a fixed set of keys with given types. +# +# source://parlour//lib/parlour/types.rb#369 class Parlour::Types::Record < ::Parlour::Types::Type + # source://parlour//lib/parlour/types.rb#371 sig { params(keys_to_types: T::Hash[::Symbol, T.any(::Parlour::Types::Type, ::String)]).void } def initialize(keys_to_types); end + # source://parlour//lib/parlour/types.rb#378 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end + # source://parlour//lib/parlour/types.rb#396 sig { override.returns(::String) } def describe; end + # source://parlour//lib/parlour/types.rb#386 sig { override.returns(::String) } def generate_rbi; end + # source://parlour//lib/parlour/types.rb#391 sig { override.returns(::String) } def generate_rbs; end + # source://parlour//lib/parlour/types.rb#383 sig { returns(T::Hash[::Symbol, ::Parlour::Types::Type]) } def keys_to_types; end end +# Type equivalent to the receiver. +# +# source://parlour//lib/parlour/types.rb#458 class Parlour::Types::Self < ::Parlour::Types::Type + # source://parlour//lib/parlour/types.rb#460 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end + # source://parlour//lib/parlour/types.rb#475 sig { override.returns(::String) } def describe; end + # source://parlour//lib/parlour/types.rb#465 sig { override.returns(::String) } def generate_rbi; end + # source://parlour//lib/parlour/types.rb#470 sig { override.returns(::String) } def generate_rbs; end end +# A set with known element types. +# +# source://parlour//lib/parlour/types.rb#282 class Parlour::Types::Set < ::Parlour::Types::SingleElementCollection + # source://parlour//lib/parlour/types.rb#289 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end + # source://parlour//lib/parlour/types.rb#284 sig { override.returns(::String) } def collection_name; end end +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://parlour//lib/parlour/types.rb#238 class Parlour::Types::SingleElementCollection < ::Parlour::Types::Type abstract! + # source://parlour//lib/parlour/types.rb#242 sig { params(element: T.any(::Parlour::Types::Type, ::String)).void } def initialize(element); end + # @abstract + # + # source://parlour//lib/parlour/types.rb#250 sig { abstract.returns(::String) } def collection_name; end + # source://parlour//lib/parlour/types.rb#263 sig { override.returns(::String) } def describe; end + # source://parlour//lib/parlour/types.rb#247 sig { returns(::Parlour::Types::Type) } def element; end + # source://parlour//lib/parlour/types.rb#253 sig { override.returns(::String) } def generate_rbi; end + # source://parlour//lib/parlour/types.rb#258 sig { override.returns(::String) } def generate_rbs; end end +# A fixed-length array of items, each with a known type. +# +# source://parlour//lib/parlour/types.rb#169 class Parlour::Types::Tuple < ::Parlour::Types::Type + # source://parlour//lib/parlour/types.rb#171 sig { params(types: T::Array[T.any(::Parlour::Types::Type, ::String)]).void } def initialize(types); end + # source://parlour//lib/parlour/types.rb#176 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end + # source://parlour//lib/parlour/types.rb#194 sig { override.returns(::String) } def describe; end + # source://parlour//lib/parlour/types.rb#184 sig { override.returns(::String) } def generate_rbi; end + # source://parlour//lib/parlour/types.rb#189 sig { override.returns(::String) } def generate_rbs; end + # source://parlour//lib/parlour/types.rb#181 sig { returns(T::Array[::Parlour::Types::Type]) } def types; end end +# The top-level, abstract class for a generalised type. All of the other +# types inherit from this. Do not instantiate. +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://parlour//lib/parlour/types.rb#10 class Parlour::Types::Type abstract! - def initialize(*args, &blk); end - + # @abstract + # + # source://parlour//lib/parlour/types.rb#41 sig { abstract.returns(::String) } def describe; end + # @abstract + # + # source://parlour//lib/parlour/types.rb#17 sig { abstract.returns(::String) } def generate_rbi; end + # @abstract + # + # source://parlour//lib/parlour/types.rb#20 sig { abstract.returns(::String) } def generate_rbs; end + # source://parlour//lib/parlour/types.rb#36 def hash; end + # source://parlour//lib/parlour/types.rb#32 sig { params(type_like: T.any(::Parlour::Types::Type, ::String)).returns(::Parlour::Types::Type) } def to_type(type_like); end class << self + # source://parlour//lib/parlour/types.rb#23 sig { params(type_like: T.any(::Parlour::Types::Type, ::String)).returns(::Parlour::Types::Type) } def to_type(type_like); end end end +# source://parlour//lib/parlour/types.rb#6 Parlour::Types::TypeLike = T.type_alias { T.any(::Parlour::Types::Type, ::String) } +# A type which is (at least) one of the wrapped types. +# +# source://parlour//lib/parlour/types.rb#107 class Parlour::Types::Union < ::Parlour::Types::Type + # source://parlour//lib/parlour/types.rb#109 sig { params(types: T::Array[T.any(::Parlour::Types::Type, ::String)]).void } def initialize(types); end + # source://parlour//lib/parlour/types.rb#114 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end + # source://parlour//lib/parlour/types.rb#132 sig { override.returns(::String) } def describe; end + # source://parlour//lib/parlour/types.rb#122 sig { override.returns(::String) } def generate_rbi; end + # source://parlour//lib/parlour/types.rb#127 sig { override.returns(::String) } def generate_rbs; end + # source://parlour//lib/parlour/types.rb#119 sig { returns(T::Array[::Parlour::Types::Type]) } def types; end end +# The explicit lack of a type. +# +# source://parlour//lib/parlour/types.rb#481 class Parlour::Types::Untyped < ::Parlour::Types::Type + # source://parlour//lib/parlour/types.rb#483 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end + # source://parlour//lib/parlour/types.rb#498 sig { override.returns(::String) } def describe; end + # source://parlour//lib/parlour/types.rb#488 sig { override.returns(::String) } def generate_rbi; end + # source://parlour//lib/parlour/types.rb#493 sig { override.returns(::String) } def generate_rbs; end end +# The library version. +# +# source://parlour//lib/parlour/version.rb#4 Parlour::VERSION = T.let(T.unsafe(nil), String) diff --git a/Library/Homebrew/sorbet/rbi/gems/parser@3.2.2.4.rbi b/Library/Homebrew/sorbet/rbi/gems/parser@3.2.2.4.rbi index 813a26cb8a4dd3..1449099a5819cf 100644 --- a/Library/Homebrew/sorbet/rbi/gems/parser@3.2.2.4.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/parser@3.2.2.4.rbi @@ -4,1762 +4,7249 @@ # This is an autogenerated file for types exported from the `parser` gem. # Please instead update this file by running `bin/tapioca gem parser`. +# @api public +# +# source://parser//lib/parser.rb#19 module Parser class << self private + # source://parser//lib/parser/current.rb#5 def warn_syntax_deviation(feature, version); end end end +# @api public +# +# source://parser//lib/parser.rb#24 module Parser::AST; end +# {Parser::AST::Node} contains information about a single AST node and its +# child nodes. It extends the basic [AST::Node](https://www.rubydoc.info/gems/ast/AST/Node) +# class provided by gem [ast](https://www.rubydoc.info/gems/ast). +# +# @api public +# +# source://parser//lib/parser/ast/node.rb#17 class Parser::AST::Node < ::AST::Node + # Assigns various properties to this AST node. Currently only the + # location can be set. + # + # @api public + # @option properties + # @param properties [Hash] + # + # source://parser//lib/parser/ast/node.rb#30 def assign_properties(properties); end + + # Source map for this Node. + # + # @api public + # @return [Parser::Source::Map] + # + # source://parser//lib/parser/ast/node.rb#18 def loc; end + + # Source map for this Node. + # + # @api public + # @return [Parser::Source::Map] + # + # source://parser//lib/parser/ast/node.rb#18 def location; end end +# @api public +# +# source://parser//lib/parser/ast/processor.rb#9 class Parser::AST::Processor < ::AST::Processor + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_alias(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_and(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_and_asgn(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#116 def on_arg(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_arg_expr(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_args(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#103 def on_argument(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_array(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_array_pattern(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_array_pattern_with_tail(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#32 def on_back_ref(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_begin(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_block(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_block_pass(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#116 def on_blockarg(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_blockarg_expr(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_break(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_case(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_case_match(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#87 def on_casgn(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_class(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#79 def on_const(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_const_pattern(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#179 def on_csend(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#32 def on_cvar(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#56 def on_cvasgn(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#158 def on_def(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_defined?(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#167 def on_defs(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_dstr(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_dsym(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_eflipflop(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#286 def on_empty_else(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_ensure(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_erange(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_find_pattern(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_for(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#116 def on_forward_arg(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_forwarded_kwrestarg(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_forwarded_restarg(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#32 def on_gvar(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#56 def on_gvasgn(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_hash(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_hash_pattern(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_if(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_if_guard(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_iflipflop(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_in_match(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_in_pattern(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_index(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_indexasgn(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_irange(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#32 def on_ivar(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#56 def on_ivasgn(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#116 def on_kwarg(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_kwargs(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_kwbegin(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#116 def on_kwoptarg(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#116 def on_kwrestarg(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_kwsplat(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_lambda(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#32 def on_lvar(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#56 def on_lvasgn(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_masgn(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_match_alt(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_match_as(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_match_current_line(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_match_pattern(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_match_pattern_p(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_match_rest(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#32 def on_match_var(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_match_with_lvasgn(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_mlhs(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_module(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_next(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_not(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#32 def on_nth_ref(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#196 def on_numblock(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#68 def on_op_asgn(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#116 def on_optarg(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_or(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_or_asgn(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_pair(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_pin(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_postexe(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_preexe(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#130 def on_procarg0(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_redo(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_regexp(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_resbody(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_rescue(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#116 def on_restarg(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_restarg_expr(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_retry(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_return(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_sclass(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#179 def on_send(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#116 def on_shadowarg(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_splat(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_super(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_undef(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_unless_guard(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_until(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_until_post(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#27 def on_var(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#43 def on_vasgn(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_when(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_while(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_while_post(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_xstr(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def on_yield(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#279 def process_argument_node(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 def process_regular_node(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#271 def process_var_asgn_node(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#263 def process_variable_node(node); end end +# Base class for version-specific parsers. +# +# @api public +# +# source://parser//lib/parser/base.rb#29 class Parser::Base < ::Racc::Parser + # @api public + # @param builder [Parser::Builders::Default] The AST builder to use. + # @return [Base] a new instance of Base + # + # source://parser//lib/parser/base.rb#126 def initialize(builder = T.unsafe(nil)); end + # @api public + # + # source://parser//lib/parser/base.rb#114 def builder; end + + # @api public + # + # source://parser//lib/parser/base.rb#117 def context; end + + # @api public + # + # source://parser//lib/parser/base.rb#119 def current_arg_stack; end + + # @api public + # @return [Parser::Diagnostic::Engine] + # + # source://parser//lib/parser/base.rb#113 def diagnostics; end + + # @api public + # + # source://parser//lib/parser/base.rb#112 def lexer; end + + # @api public + # + # source://parser//lib/parser/base.rb#118 def max_numparam_stack; end + + # Parses a source buffer and returns the AST, or `nil` in case of a non fatal error. + # + # @api public + # @param source_buffer [Parser::Source::Buffer] The source buffer to parse. + # @return [Parser::AST::Node, nil] + # + # source://parser//lib/parser/base.rb#186 def parse(source_buffer); end + + # Parses a source buffer and returns the AST and the source code comments. + # + # @api public + # @return [Array] + # @see #parse + # @see Parser::Source::Comment#associate + # + # source://parser//lib/parser/base.rb#204 def parse_with_comments(source_buffer); end + + # @api public + # + # source://parser//lib/parser/base.rb#121 def pattern_hash_keys; end + + # @api public + # + # source://parser//lib/parser/base.rb#120 def pattern_variables; end + + # Resets the state of the parser. + # + # @api public + # + # source://parser//lib/parser/base.rb#167 def reset; end + + # @api public + # + # source://parser//lib/parser/base.rb#116 def source_buffer; end + + # @api public + # @return [Parser::StaticEnvironment] + # + # source://parser//lib/parser/base.rb#115 def static_env; end + + # Parses a source buffer and returns the AST, the source code comments, + # and the tokens emitted by the lexer. In case of a fatal error, a {SyntaxError} + # is raised, unless `recover` is true. In case of an error + # (non-fatal or recovered), `nil` is returned instead of the AST, and + # comments as well as tokens are only returned up to the location of + # the error. + # + # Currently, token stream format returned by #tokenize is not documented, + # but is considered part of a public API and only changed according + # to Semantic Versioning. + # + # However, note that the exact token composition of various constructs + # might vary. For example, a string `"foo"` is represented equally well + # by `:tSTRING_BEG " :tSTRING_CONTENT foo :tSTRING_END "` and + # `:tSTRING "foo"`; such details must not be relied upon. + # + # @api public + # @param source_buffer [Parser::Source::Buffer] + # @param recover [Boolean] If true, recover from syntax errors. False by default. + # @return [Array] + # + # source://parser//lib/parser/base.rb#233 def tokenize(source_buffer, recover = T.unsafe(nil)); end private + # @api public + # + # source://parser//lib/parser/base.rb#257 def check_kwarg_name(name_t); end + + # @api public + # + # source://parser//lib/parser/base.rb#266 def diagnostic(level, reason, arguments, location_t, highlights_ts = T.unsafe(nil)); end + + # @api public + # + # source://parser//lib/parser/base.rb#251 def next_token; end + + # @api public + # + # source://parser//lib/parser/base.rb#282 def on_error(error_token_id, error_value, value_stack); end class << self + # @api public + # @return [Parser::Base] parser with the default options set. + # + # source://parser//lib/parser/base.rb#84 def default_parser; end + + # Parses a string of Ruby code and returns the AST. If the source + # cannot be parsed, {SyntaxError} is raised and a diagnostic is + # printed to `stderr`. + # + # @api public + # @example + # Parser::Base.parse('puts "hello"') + # @param string [String] The block of code to parse. + # @param file [String] The name of the file the code originated from. + # @param line [Numeric] The initial line number. + # @return [Parser::AST::Node] + # + # source://parser//lib/parser/base.rb#30 def parse(string, file = T.unsafe(nil), line = T.unsafe(nil)); end + + # Parses Ruby source code by reading it from a file. If the source + # cannot be parsed, {SyntaxError} is raised and a diagnostic is + # printed to `stderr`. + # + # @api public + # @param filename [String] Path to the file to parse. + # @return [Parser::AST::Node] + # @see #parse + # + # source://parser//lib/parser/base.rb#64 def parse_file(filename); end + + # Parses Ruby source code by reading it from a file and returns the AST and + # comments. If the source cannot be parsed, {SyntaxError} is raised and a + # diagnostic is printed to `stderr`. + # + # @api public + # @param filename [String] Path to the file to parse. + # @return [Array] + # @see #parse + # + # source://parser//lib/parser/base.rb#77 def parse_file_with_comments(filename); end + + # Parses a string of Ruby code and returns the AST and comments. If the + # source cannot be parsed, {SyntaxError} is raised and a diagnostic is + # printed to `stderr`. + # + # @api public + # @example + # Parser::Base.parse_with_comments('puts "hello"') + # @param string [String] The block of code to parse. + # @param file [String] The name of the file the code originated from. + # @param line [Numeric] The initial line number. + # @return [Array] + # + # source://parser//lib/parser/base.rb#49 def parse_with_comments(string, file = T.unsafe(nil), line = T.unsafe(nil)); end private + # @api public + # + # source://parser//lib/parser/base.rb#97 def setup_source_buffer(file, line, string, encoding); end end end +# @api public +# +# source://parser//lib/parser.rb#77 module Parser::Builders; end +# source://parser//lib/parser/builders/default.rb#8 class Parser::Builders::Default + # source://parser//lib/parser/builders/default.rb#243 def initialize; end + # source://parser//lib/parser/builders/default.rb#690 def __ENCODING__(__ENCODING__t); end + + # source://parser//lib/parser/builders/default.rb#348 def __FILE__(__FILE__t); end + + # source://parser//lib/parser/builders/default.rb#312 def __LINE__(__LINE__t); end + + # source://parser//lib/parser/builders/default.rb#616 def accessible(node); end + + # source://parser//lib/parser/builders/default.rb#865 def alias(alias_t, to, from); end + + # source://parser//lib/parser/builders/default.rb#904 def arg(name_t); end + + # source://parser//lib/parser/builders/default.rb#994 def arg_expr(expr); end + + # source://parser//lib/parser/builders/default.rb#874 def args(begin_t, args, end_t, check_args = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#440 def array(begin_t, elements, end_t); end + + # source://parser//lib/parser/builders/default.rb#1577 def array_pattern(lbrack_t, elements, rbrack_t); end + + # source://parser//lib/parser/builders/default.rb#754 def assign(lhs, eql_t, rhs); end + + # source://parser//lib/parser/builders/default.rb#699 def assignable(node); end + + # source://parser//lib/parser/builders/default.rb#540 def associate(begin_t, pairs, end_t); end + + # source://parser//lib/parser/builders/default.rb#1158 def attr_asgn(receiver, dot_t, selector_t); end + + # source://parser//lib/parser/builders/default.rb#606 def back_ref(token); end + + # source://parser//lib/parser/builders/default.rb#1422 def begin(begin_t, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#1364 def begin_body(compound_stmt, rescue_bodies = T.unsafe(nil), else_t = T.unsafe(nil), else_ = T.unsafe(nil), ensure_t = T.unsafe(nil), ensure_ = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#1440 def begin_keyword(begin_t, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#1192 def binary_op(receiver, operator_t, arg); end + + # source://parser//lib/parser/builders/default.rb#1109 def block(method_call, begin_t, args, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#1144 def block_pass(amper_t, arg); end + + # source://parser//lib/parser/builders/default.rb#969 def blockarg(amper_t, name_t); end + + # source://parser//lib/parser/builders/default.rb#1014 def blockarg_expr(amper_t, expr); end + + # source://parser//lib/parser/builders/default.rb#1100 def call_lambda(lambda_t); end + + # source://parser//lib/parser/builders/default.rb#1083 def call_method(receiver, dot_t, selector_t, lparen_t = T.unsafe(nil), args = T.unsafe(nil), rparen_t = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#1055 def call_type_for_dot(dot_t); end + + # source://parser//lib/parser/builders/default.rb#1297 def case(case_t, expr, when_bodies, else_t, else_body, end_t); end + + # source://parser//lib/parser/builders/default.rb#1460 def case_match(case_t, expr, in_bodies, else_t, else_body, end_t); end + + # source://parser//lib/parser/builders/default.rb#343 def character(char_t); end + + # source://parser//lib/parser/builders/default.rb#284 def complex(complex_t); end + + # source://parser//lib/parser/builders/default.rb#1410 def compstmt(statements); end + + # source://parser//lib/parser/builders/default.rb#1273 def condition(cond_t, cond, then_t, if_true, else_t, if_false, end_t); end + + # source://parser//lib/parser/builders/default.rb#1279 def condition_mod(if_true, if_false, cond_t, cond); end + + # source://parser//lib/parser/builders/default.rb#673 def const(name_t); end + + # source://parser//lib/parser/builders/default.rb#685 def const_fetch(scope, t_colon2, name_t); end + + # source://parser//lib/parser/builders/default.rb#678 def const_global(t_colon3, name_t); end + + # source://parser//lib/parser/builders/default.rb#750 def const_op_assignable(node); end + + # source://parser//lib/parser/builders/default.rb#1607 def const_pattern(const, ldelim_t, pattern, rdelim_t); end + + # source://parser//lib/parser/builders/default.rb#601 def cvar(token); end + + # source://parser//lib/parser/builders/default.rb#388 def dedent_string(node, dedent_level); end + + # source://parser//lib/parser/builders/default.rb#801 def def_class(class_t, name, lt_t, superclass, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#832 def def_endless_method(def_t, name_t, args, assignment_t, body); end + + # source://parser//lib/parser/builders/default.rb#850 def def_endless_singleton(def_t, definee, dot_t, name_t, args, assignment_t, body); end + + # source://parser//lib/parser/builders/default.rb#824 def def_method(def_t, name_t, args, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#814 def def_module(module_t, name, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#808 def def_sclass(class_t, lshft_t, expr, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#840 def def_singleton(def_t, definee, dot_t, name_t, args, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#237 def emit_file_line_as_literals; end + + # source://parser//lib/parser/builders/default.rb#237 def emit_file_line_as_literals=(_arg0); end + + # source://parser//lib/parser/builders/default.rb#265 def false(false_t); end + + # source://parser//lib/parser/builders/default.rb#1598 def find_pattern(lbrack_t, elements, rbrack_t); end + + # source://parser//lib/parser/builders/default.rb#276 def float(float_t); end + + # source://parser//lib/parser/builders/default.rb#1318 def for(for_t, iterator, in_t, iteratee, do_t, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#900 def forward_arg(dots_t); end + + # source://parser//lib/parser/builders/default.rb#890 def forward_only_args(begin_t, dots_t, end_t); end + + # source://parser//lib/parser/builders/default.rb#1071 def forwarded_args(dots_t); end + + # source://parser//lib/parser/builders/default.rb#1079 def forwarded_kwrestarg(dstar_t); end + + # source://parser//lib/parser/builders/default.rb#1075 def forwarded_restarg(star_t); end + + # source://parser//lib/parser/builders/default.rb#596 def gvar(token); end + + # source://parser//lib/parser/builders/default.rb#1571 def hash_pattern(lbrace_t, kwargs, rbrace_t); end + + # source://parser//lib/parser/builders/default.rb#586 def ident(token); end + + # source://parser//lib/parser/builders/default.rb#1487 def if_guard(if_t, if_body); end + + # source://parser//lib/parser/builders/default.rb#1466 def in_match(lhs, in_t, rhs); end + + # source://parser//lib/parser/builders/default.rb#1481 def in_pattern(in_t, pattern, guard, then_t, body); end + + # source://parser//lib/parser/builders/default.rb#1167 def index(receiver, lbrack_t, indexes, rbrack_t); end + + # source://parser//lib/parser/builders/default.rb#1181 def index_asgn(receiver, lbrack_t, indexes, rbrack_t); end + + # source://parser//lib/parser/builders/default.rb#272 def integer(integer_t); end + + # source://parser//lib/parser/builders/default.rb#591 def ivar(token); end + + # source://parser//lib/parser/builders/default.rb#1326 def keyword_cmd(type, keyword_t, lparen_t = T.unsafe(nil), args = T.unsafe(nil), rparen_t = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#931 def kwarg(name_t); end + + # source://parser//lib/parser/builders/default.rb#957 def kwnilarg(dstar_t, nil_t); end + + # source://parser//lib/parser/builders/default.rb#938 def kwoptarg(name_t, value); end + + # source://parser//lib/parser/builders/default.rb#945 def kwrestarg(dstar_t, name_t = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#535 def kwsplat(dstar_t, arg); end + + # source://parser//lib/parser/builders/default.rb#1266 def logical_op(type, lhs, op_t, rhs); end + + # source://parser//lib/parser/builders/default.rb#1304 def loop(type, keyword_t, cond, do_t, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#1309 def loop_mod(type, body, keyword_t, cond); end + + # source://parser//lib/parser/builders/default.rb#1621 def match_alt(left, pipe_t, right); end + + # source://parser//lib/parser/builders/default.rb#1628 def match_as(value, assoc_t, as); end + + # source://parser//lib/parser/builders/default.rb#1507 def match_hash_var(name_t); end + + # source://parser//lib/parser/builders/default.rb#1521 def match_hash_var_from_str(begin_t, strings, end_t); end + + # source://parser//lib/parser/builders/default.rb#1659 def match_label(label_type, label); end + + # source://parser//lib/parser/builders/default.rb#1635 def match_nil_pattern(dstar_t, nil_t); end + + # source://parser//lib/parser/builders/default.rb#1214 def match_op(receiver, match_t, arg); end + + # source://parser//lib/parser/builders/default.rb#1640 def match_pair(label_type, label, value); end + + # source://parser//lib/parser/builders/default.rb#1471 def match_pattern(lhs, match_t, rhs); end + + # source://parser//lib/parser/builders/default.rb#1476 def match_pattern_p(lhs, match_t, rhs); end + + # source://parser//lib/parser/builders/default.rb#1560 def match_rest(star_t, name_t = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#1495 def match_var(name_t); end + + # source://parser//lib/parser/builders/default.rb#1603 def match_with_trailing_comma(match, comma_t); end + + # source://parser//lib/parser/builders/default.rb#792 def multi_assign(lhs, eql_t, rhs); end + + # source://parser//lib/parser/builders/default.rb#787 def multi_lhs(begin_t, items, end_t); end + + # source://parser//lib/parser/builders/default.rb#255 def nil(nil_t); end + + # source://parser//lib/parser/builders/default.rb#1242 def not_op(not_t, begin_t = T.unsafe(nil), receiver = T.unsafe(nil), end_t = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#611 def nth_ref(token); end + + # source://parser//lib/parser/builders/default.rb#886 def numargs(max_numparam); end + + # source://parser//lib/parser/builders/default.rb#1025 def objc_kwarg(kwname_t, assoc_t, name_t); end + + # source://parser//lib/parser/builders/default.rb#1039 def objc_restarg(star_t, name = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#1149 def objc_varargs(pair, rest_of_varargs); end + + # source://parser//lib/parser/builders/default.rb#761 def op_assign(lhs, op_t, rhs); end + + # source://parser//lib/parser/builders/default.rb#911 def optarg(name_t, eql_t, value); end + + # source://parser//lib/parser/builders/default.rb#488 def pair(key, assoc_t, value); end + + # source://parser//lib/parser/builders/default.rb#505 def pair_keyword(key_t, value); end + + # source://parser//lib/parser/builders/default.rb#521 def pair_label(key_t); end + + # source://parser//lib/parser/builders/default.rb#493 def pair_list_18(list); end + + # source://parser//lib/parser/builders/default.rb#513 def pair_quoted(begin_t, parts, end_t, value); end + + # source://parser//lib/parser/builders/default.rb#225 def parser; end + + # source://parser//lib/parser/builders/default.rb#225 def parser=(_arg0); end + + # source://parser//lib/parser/builders/default.rb#1616 def pin(pin_t, var); end + + # source://parser//lib/parser/builders/default.rb#1349 def postexe(postexe_t, lbrace_t, compstmt, rbrace_t); end + + # source://parser//lib/parser/builders/default.rb#1344 def preexe(preexe_t, lbrace_t, compstmt, rbrace_t); end + + # source://parser//lib/parser/builders/default.rb#979 def procarg0(arg); end + + # source://parser//lib/parser/builders/default.rb#572 def range_exclusive(lhs, dot3_t, rhs); end + + # source://parser//lib/parser/builders/default.rb#567 def range_inclusive(lhs, dot2_t, rhs); end + + # source://parser//lib/parser/builders/default.rb#280 def rational(rational_t); end + + # source://parser//lib/parser/builders/default.rb#426 def regexp_compose(begin_t, parts, end_t, options); end + + # source://parser//lib/parser/builders/default.rb#417 def regexp_options(regopt_t); end + + # source://parser//lib/parser/builders/default.rb#1356 def rescue_body(rescue_t, exc_list, assoc_t, exc_var, then_t, compound_stmt); end + + # source://parser//lib/parser/builders/default.rb#920 def restarg(star_t, name_t = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#1003 def restarg_expr(star_t, expr = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#581 def self(token); end + + # source://parser//lib/parser/builders/default.rb#962 def shadowarg(name_t); end + + # source://parser//lib/parser/builders/default.rb#445 def splat(star_t, arg = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#319 def string(string_t); end + + # source://parser//lib/parser/builders/default.rb#329 def string_compose(begin_t, parts, end_t); end + + # source://parser//lib/parser/builders/default.rb#324 def string_internal(string_t); end + + # source://parser//lib/parser/builders/default.rb#355 def symbol(symbol_t); end + + # source://parser//lib/parser/builders/default.rb#365 def symbol_compose(begin_t, parts, end_t); end + + # source://parser//lib/parser/builders/default.rb#360 def symbol_internal(symbol_t); end + + # source://parser//lib/parser/builders/default.rb#469 def symbols_compose(begin_t, parts, end_t); end + + # source://parser//lib/parser/builders/default.rb#1284 def ternary(cond, question_t, if_true, colon_t, if_false); end + + # source://parser//lib/parser/builders/default.rb#260 def true(true_t); end + + # source://parser//lib/parser/builders/default.rb#294 def unary_num(unary_t, numeric); end + + # source://parser//lib/parser/builders/default.rb#1230 def unary_op(op_t, receiver); end + + # source://parser//lib/parser/builders/default.rb#860 def undef_method(undef_t, names); end + + # source://parser//lib/parser/builders/default.rb#1491 def unless_guard(unless_t, unless_body); end + + # source://parser//lib/parser/builders/default.rb#1291 def when(when_t, patterns, then_t, body); end + + # source://parser//lib/parser/builders/default.rb#455 def word(parts); end + + # source://parser//lib/parser/builders/default.rb#464 def words_compose(begin_t, parts, end_t); end + + # source://parser//lib/parser/builders/default.rb#381 def xstring_compose(begin_t, parts, end_t); end private + # source://parser//lib/parser/builders/default.rb#1808 def arg_name_collides?(this_name, that_name); end + + # source://parser//lib/parser/builders/default.rb#2004 def arg_prefix_map(op_t, name_t = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#1978 def binary_op_map(left_e, op_t, right_e); end + + # source://parser//lib/parser/builders/default.rb#2106 def block_map(receiver_l, begin_t, end_t); end + + # source://parser//lib/parser/builders/default.rb#1783 def check_assignment_to_numparam(name, loc); end + + # source://parser//lib/parser/builders/default.rb#1675 def check_condition(cond); end + + # source://parser//lib/parser/builders/default.rb#1754 def check_duplicate_arg(this_arg, map = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#1729 def check_duplicate_args(args, map = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#1841 def check_duplicate_pattern_key(name, loc); end + + # source://parser//lib/parser/builders/default.rb#1831 def check_duplicate_pattern_variable(name, loc); end + + # source://parser//lib/parser/builders/default.rb#1823 def check_lvar_name(name, loc); end + + # source://parser//lib/parser/builders/default.rb#1798 def check_reserved_for_numparam(name, loc); end + + # source://parser//lib/parser/builders/default.rb#2263 def collapse_string_parts?(parts); end + + # source://parser//lib/parser/builders/default.rb#1929 def collection_map(begin_t, parts, end_t); end + + # source://parser//lib/parser/builders/default.rb#2133 def condition_map(keyword_t, cond_e, begin_t, body_e, else_t, else_e, end_t); end + + # source://parser//lib/parser/builders/default.rb#1964 def constant_map(scope, colon2_t, name_t); end + + # source://parser//lib/parser/builders/default.rb#2037 def definition_map(keyword_t, operator_t, name_t, end_t); end + + # source://parser//lib/parser/builders/default.rb#1870 def delimited_string_map(string_t); end + + # source://parser//lib/parser/builders/default.rb#2285 def diagnostic(type, reason, arguments, location, highlights = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#2177 def eh_keyword_map(compstmt_e, keyword_t, body_es, else_t, else_e); end + + # source://parser//lib/parser/builders/default.rb#2043 def endless_definition_map(keyword_t, operator_t, name_t, assignment_t, body_e); end + + # source://parser//lib/parser/builders/default.rb#1925 def expr_map(loc); end + + # source://parser//lib/parser/builders/default.rb#2158 def for_map(keyword_t, in_t, begin_t, end_t); end + + # source://parser//lib/parser/builders/default.rb#2205 def guard_map(keyword_t, guard_body_e); end + + # source://parser//lib/parser/builders/default.rb#2095 def index_map(receiver_e, lbrack_t, rbrack_t); end + + # source://parser//lib/parser/builders/default.rb#1861 def join_exprs(left_expr, right_expr); end + + # source://parser//lib/parser/builders/default.rb#2111 def keyword_map(keyword_t, begin_t, args, end_t); end + + # source://parser//lib/parser/builders/default.rb#2128 def keyword_mod_map(pre_e, keyword_t, post_e); end + + # source://parser//lib/parser/builders/default.rb#2014 def kwarg_map(name_t, value_e = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#2316 def kwargs?(node); end + + # source://parser//lib/parser/builders/default.rb#2280 def loc(token); end + + # source://parser//lib/parser/builders/default.rb#2027 def module_definition_map(keyword_t, name_e, operator_t, end_t); end + + # source://parser//lib/parser/builders/default.rb#1853 def n(type, children, source_map); end + + # source://parser//lib/parser/builders/default.rb#1857 def n0(type, source_map); end + + # source://parser//lib/parser/builders/default.rb#288 def numeric(kind, token); end + + # source://parser//lib/parser/builders/default.rb#1895 def pair_keyword_map(key_t, value_e); end + + # source://parser//lib/parser/builders/default.rb#1910 def pair_quoted_map(begin_t, end_t, value_e); end + + # source://parser//lib/parser/builders/default.rb#1881 def prefix_string_map(symbol); end + + # source://parser//lib/parser/builders/default.rb#1992 def range_map(start_e, op_t, end_e); end + + # source://parser//lib/parser/builders/default.rb#1959 def regexp_map(begin_t, end_t, options_e); end + + # source://parser//lib/parser/builders/default.rb#2164 def rescue_body_map(keyword_t, exc_list_e, assoc_t, exc_var_e, then_t, compstmt_e); end + + # source://parser//lib/parser/builders/default.rb#2306 def rewrite_hash_args_to_kwargs(args); end + + # source://parser//lib/parser/builders/default.rb#2077 def send_binary_op_map(lhs_e, selector_t, rhs_e); end + + # source://parser//lib/parser/builders/default.rb#2100 def send_index_map(receiver_e, lbrack_t, rbrack_t); end + + # source://parser//lib/parser/builders/default.rb#2051 def send_map(receiver_e, dot_t, selector_t, begin_t = T.unsafe(nil), args = T.unsafe(nil), end_t = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#2083 def send_unary_op_map(selector_t, arg_e); end + + # source://parser//lib/parser/builders/default.rb#2236 def static_regexp(parts, options); end + + # source://parser//lib/parser/builders/default.rb#2256 def static_regexp_node(node); end + + # source://parser//lib/parser/builders/default.rb#2219 def static_string(nodes); end + + # source://parser//lib/parser/builders/default.rb#1945 def string_map(begin_t, parts, end_t); end + + # source://parser//lib/parser/builders/default.rb#2272 def string_value(token); end + + # source://parser//lib/parser/builders/default.rb#2153 def ternary_map(begin_e, question_t, mid_e, colon_t, end_e); end + + # source://parser//lib/parser/builders/default.rb#1866 def token_map(token); end + + # source://parser//lib/parser/builders/default.rb#1982 def unary_op_map(op_t, arg_e = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#1890 def unquoted_map(token); end + + # source://parser//lib/parser/builders/default.rb#2294 def validate_definee(definee); end + + # source://parser//lib/parser/builders/default.rb#1768 def validate_no_forward_arg_after_restarg(args); end + + # source://parser//lib/parser/builders/default.rb#2268 def value(token); end + + # source://parser//lib/parser/builders/default.rb#2071 def var_send_map(variable_e); end + + # source://parser//lib/parser/builders/default.rb#1974 def variable_map(name_t); end class << self + # source://parser//lib/parser/builders/default.rb#97 def emit_arg_inside_procarg0; end + + # source://parser//lib/parser/builders/default.rb#97 def emit_arg_inside_procarg0=(_arg0); end + + # source://parser//lib/parser/builders/default.rb#58 def emit_encoding; end + + # source://parser//lib/parser/builders/default.rb#58 def emit_encoding=(_arg0); end + + # source://parser//lib/parser/builders/default.rb#126 def emit_forward_arg; end + + # source://parser//lib/parser/builders/default.rb#126 def emit_forward_arg=(_arg0); end + + # source://parser//lib/parser/builders/default.rb#80 def emit_index; end + + # source://parser//lib/parser/builders/default.rb#80 def emit_index=(_arg0); end + + # source://parser//lib/parser/builders/default.rb#174 def emit_kwargs; end + + # source://parser//lib/parser/builders/default.rb#174 def emit_kwargs=(_arg0); end + + # source://parser//lib/parser/builders/default.rb#22 def emit_lambda; end + + # source://parser//lib/parser/builders/default.rb#22 def emit_lambda=(_arg0); end + + # source://parser//lib/parser/builders/default.rb#203 def emit_match_pattern; end + + # source://parser//lib/parser/builders/default.rb#203 def emit_match_pattern=(_arg0); end + + # source://parser//lib/parser/builders/default.rb#40 def emit_procarg0; end + + # source://parser//lib/parser/builders/default.rb#40 def emit_procarg0=(_arg0); end + + # source://parser//lib/parser/builders/default.rb#211 def modernize; end end end +# {Parser::ClobberingError} is raised when {Parser::Source::Rewriter} +# detects a clobbering rewrite action. This class inherits {RuntimeError} +# rather than {StandardError} for backward compatibility. +# +# @api public +# +# source://parser//lib/parser/clobbering_error.rb#11 class Parser::ClobberingError < ::RuntimeError; end +# Context of parsing that is represented by a stack of scopes. +# +# Supported states: +# + :class - in the class body (class A; end) +# + :module - in the module body (module M; end) +# + :sclass - in the singleton class body (class << obj; end) +# + :def - in the method body (def m; end) +# + :defs - in the singleton method body (def self.m; end) +# + :def_open_args - in the arglist of the method definition +# keep in mind that it's set **only** after reducing the first argument, +# if you need to handle the first argument check `lex_state == expr_fname` +# + :block - in the block body (tap {}) +# + :lambda - in the lambda body (-> {}) +# +# source://parser//lib/parser/context.rb#18 class Parser::Context + # @return [Context] a new instance of Context + # + # source://parser//lib/parser/context.rb#29 def initialize; end + # source://parser//lib/parser/context.rb#43 def in_argdef; end + + # source://parser//lib/parser/context.rb#43 def in_argdef=(_arg0); end + + # source://parser//lib/parser/context.rb#43 def in_block; end + + # source://parser//lib/parser/context.rb#43 def in_block=(_arg0); end + + # source://parser//lib/parser/context.rb#43 def in_class; end + + # source://parser//lib/parser/context.rb#43 def in_class=(_arg0); end + + # source://parser//lib/parser/context.rb#43 def in_def; end + + # source://parser//lib/parser/context.rb#43 def in_def=(_arg0); end + + # source://parser//lib/parser/context.rb#43 def in_defined; end + + # source://parser//lib/parser/context.rb#43 def in_defined=(_arg0); end + + # @return [Boolean] + # + # source://parser//lib/parser/context.rb#45 def in_dynamic_block?; end + + # source://parser//lib/parser/context.rb#43 def in_kwarg; end + + # source://parser//lib/parser/context.rb#43 def in_kwarg=(_arg0); end + + # source://parser//lib/parser/context.rb#43 def in_lambda; end + + # source://parser//lib/parser/context.rb#43 def in_lambda=(_arg0); end + + # source://parser//lib/parser/context.rb#33 def reset; end end +# source://parser//lib/parser/context.rb#19 Parser::Context::FLAGS = T.let(T.unsafe(nil), Array) +# Stack that holds names of current arguments, +# i.e. while parsing +# def m1(a = (def m2(b = def m3(c = 1); end); end)); end +# ^ +# stack is [:a, :b, :c] +# +# Emulates `p->cur_arg` in MRI's parse.y +# +# @api private +# +# source://parser//lib/parser/current_arg_stack.rb#14 class Parser::CurrentArgStack + # @api private + # @return [CurrentArgStack] a new instance of CurrentArgStack + # + # source://parser//lib/parser/current_arg_stack.rb#17 def initialize; end + # @api private + # @return [Boolean] + # + # source://parser//lib/parser/current_arg_stack.rb#22 def empty?; end + + # @api private + # + # source://parser//lib/parser/current_arg_stack.rb#34 def pop; end + + # @api private + # + # source://parser//lib/parser/current_arg_stack.rb#26 def push(value); end + + # @api private + # + # source://parser//lib/parser/current_arg_stack.rb#38 def reset; end + + # @api private + # + # source://parser//lib/parser/current_arg_stack.rb#30 def set(value); end + + # @api private + # + # source://parser//lib/parser/current_arg_stack.rb#15 def stack; end + + # @api private + # + # source://parser//lib/parser/current_arg_stack.rb#42 def top; end end -Parser::CurrentRuby = Parser::Ruby26 +# source://parser//lib/parser/current.rb#102 +Parser::CurrentRuby = Parser::Ruby31 +# @api private +# +# source://parser//lib/parser/deprecation.rb#7 module Parser::Deprecation + # @api private + # + # source://parser//lib/parser/deprecation.rb#9 def warn_of_deprecation; end + + # @api private + # + # source://parser//lib/parser/deprecation.rb#8 def warned_of_deprecation=(_arg0); end end +# @api public +# +# source://parser//lib/parser/diagnostic.rb#31 class Parser::Diagnostic + # @api public + # @param level [Symbol] + # @param reason [Symbol] + # @param arguments [Hash] + # @param location [Parser::Source::Range] + # @param highlights [Array] + # @return [Diagnostic] a new instance of Diagnostic + # + # source://parser//lib/parser/diagnostic.rb#49 def initialize(level, reason, arguments, location, highlights = T.unsafe(nil)); end + # @api public + # @return [Symbol] extended arguments that describe the error + # @see Parser::MESSAGES + # + # source://parser//lib/parser/diagnostic.rb#39 def arguments; end + + # Supplementary error-related source ranges. + # + # @api public + # @return [Array] + # + # source://parser//lib/parser/diagnostic.rb#40 def highlights; end + + # @api public + # @return [Symbol] diagnostic level + # @see LEVELS + # + # source://parser//lib/parser/diagnostic.rb#39 def level; end + + # Main error-related source range. + # + # @api public + # @return [Parser::Source::Range] + # + # source://parser//lib/parser/diagnostic.rb#40 def location; end + + # @api public + # @return [String] the rendered message. + # + # source://parser//lib/parser/diagnostic.rb#69 def message; end + + # @api public + # @return [Symbol] reason for error + # @see Parser::MESSAGES + # + # source://parser//lib/parser/diagnostic.rb#39 def reason; end + + # Renders the diagnostic message as a clang-like diagnostic. + # + # @api public + # @example + # diagnostic.render # => + # # [ + # # "(fragment:0):1:5: error: unexpected token $end", + # # "foo +", + # # " ^" + # # ] + # @return [Array] + # + # source://parser//lib/parser/diagnostic.rb#86 def render; end private + # If necessary, shrink a `Range` so as to include only the first line. + # + # @api public + # @return [Parser::Source::Range] + # + # source://parser//lib/parser/diagnostic.rb#142 def first_line_only(range); end + + # If necessary, shrink a `Range` so as to include only the last line. + # + # @api public + # @return [Parser::Source::Range] + # + # source://parser//lib/parser/diagnostic.rb#155 def last_line_only(range); end + + # Renders one source line in clang diagnostic style, with highlights. + # + # @api public + # @return [Array] + # + # source://parser//lib/parser/diagnostic.rb#110 def render_line(range, ellipsis = T.unsafe(nil), range_end = T.unsafe(nil)); end end +# source://parser//lib/parser/diagnostic/engine.rb#36 class Parser::Diagnostic::Engine + # source://parser//lib/parser/diagnostic/engine.rb#45 def initialize(consumer = T.unsafe(nil)); end + # source://parser//lib/parser/diagnostic/engine.rb#39 def all_errors_are_fatal; end + + # source://parser//lib/parser/diagnostic/engine.rb#39 def all_errors_are_fatal=(_arg0); end + + # source://parser//lib/parser/diagnostic/engine.rb#37 def consumer; end + + # source://parser//lib/parser/diagnostic/engine.rb#37 def consumer=(_arg0); end + + # source://parser//lib/parser/diagnostic/engine.rb#40 def ignore_warnings; end + + # source://parser//lib/parser/diagnostic/engine.rb#40 def ignore_warnings=(_arg0); end + + # source://parser//lib/parser/diagnostic/engine.rb#64 def process(diagnostic); end protected + # source://parser//lib/parser/diagnostic/engine.rb#86 def ignore?(diagnostic); end + + # source://parser//lib/parser/diagnostic/engine.rb#97 def raise?(diagnostic); end end +# Collection of the available diagnostic levels. +# +# @api public +# @return [Array] +# +# source://parser//lib/parser/diagnostic.rb#37 Parser::Diagnostic::LEVELS = T.let(T.unsafe(nil), Array) +# line 3 "lib/parser/lexer.rl" +# +# === BEFORE YOU START === +# +# Read the Ruby Hacking Guide chapter 11, available in English at +# http://whitequark.org/blog/2013/04/01/ruby-hacking-guide-ch-11-finite-state-lexer/ +# +# Remember two things about Ragel scanners: +# +# 1) Longest match wins. +# +# 2) If two matches have the same length, the first +# in source code wins. +# +# General rules of making Ragel and Bison happy: +# +# * `p` (position) and `@te` contain the index of the character +# they're pointing to ("current"), plus one. `@ts` contains the index +# of the corresponding character. The code for extracting matched token is: +# +# @source_buffer.slice(@ts...@te) +# +# * If your input is `foooooooobar` and the rule is: +# +# 'f' 'o'+ +# +# the result will be: +# +# foooooooobar +# ^ ts=0 ^ p=te=9 +# +# * A Ragel lexer action should not emit more than one token, unless +# you know what you are doing. +# +# * All Ragel commands (fnext, fgoto, ...) end with a semicolon. +# +# * If an action emits the token and transitions to another state, use +# these Ragel commands: +# +# emit($whatever) +# fnext $next_state; fbreak; +# +# If you perform `fgoto` in an action which does not emit a token nor +# rewinds the stream pointer, the parser's side-effectful, +# context-sensitive lookahead actions will break in a hard to detect +# and debug way. +# +# * If an action does not emit a token: +# +# fgoto $next_state; +# +# * If an action features lookbehind, i.e. matches characters with the +# intent of passing them to another action: +# +# p = @ts - 1 +# fgoto $next_state; +# +# or, if the lookbehind consists of a single character: +# +# fhold; fgoto $next_state; +# +# * Ragel merges actions. So, if you have `e_lparen = '(' %act` and +# `c_lparen = '('` and a lexer action `e_lparen | c_lparen`, the result +# _will_ invoke the action `act`. +# +# e_something stands for "something with **e**mbedded action". +# +# * EOF is explicit and is matched by `c_eof`. If you want to introspect +# the state of the lexer, add this rule to the state: +# +# c_eof => do_eof; +# +# * If you proceed past EOF, the lexer will complain: +# +# NoMethodError: undefined method `ord' for nil:NilClass +# +# source://parser//lib/parser/lexer-F1.rb#82 class Parser::Lexer + # @return [Lexer] a new instance of Lexer + # + # source://parser//lib/parser/lexer-F1.rb#8250 def initialize(version); end + # Return next token: [type, value]. + # + # source://parser//lib/parser/lexer-F1.rb#8410 def advance; end + + # Returns the value of attribute cmdarg. + # + # source://parser//lib/parser/lexer-F1.rb#8244 def cmdarg; end + + # Sets the attribute cmdarg + # + # @param value the value to set the attribute cmdarg to. + # + # source://parser//lib/parser/lexer-F1.rb#8244 def cmdarg=(_arg0); end + + # Returns the value of attribute cmdarg_stack. + # + # source://parser//lib/parser/lexer-F1.rb#8248 def cmdarg_stack; end + + # Returns the value of attribute command_start. + # + # source://parser//lib/parser/lexer-F1.rb#8244 def command_start; end + + # Sets the attribute command_start + # + # @param value the value to set the attribute command_start to. + # + # source://parser//lib/parser/lexer-F1.rb#8244 def command_start=(_arg0); end + + # Returns the value of attribute comments. + # + # source://parser//lib/parser/lexer-F1.rb#8246 def comments; end + + # Sets the attribute comments + # + # @param value the value to set the attribute comments to. + # + # source://parser//lib/parser/lexer-F1.rb#8246 def comments=(_arg0); end + + # Returns the value of attribute cond. + # + # source://parser//lib/parser/lexer-F1.rb#8244 def cond; end + + # Sets the attribute cond + # + # @param value the value to set the attribute cond to. + # + # source://parser//lib/parser/lexer-F1.rb#8244 def cond=(_arg0); end + + # Returns the value of attribute cond_stack. + # + # source://parser//lib/parser/lexer-F1.rb#8248 def cond_stack; end + + # Returns the value of attribute context. + # + # source://parser//lib/parser/lexer-F1.rb#8244 def context; end + + # Sets the attribute context + # + # @param value the value to set the attribute context to. + # + # source://parser//lib/parser/lexer-F1.rb#8244 def context=(_arg0); end + + # source://parser//lib/parser/lexer-F1.rb#8405 def dedent_level; end + + # Returns the value of attribute diagnostics. + # + # source://parser//lib/parser/lexer-F1.rb#8240 def diagnostics; end + + # Sets the attribute diagnostics + # + # @param value the value to set the attribute diagnostics to. + # + # source://parser//lib/parser/lexer-F1.rb#8240 def diagnostics=(_arg0); end + + # source://parser//lib/parser/lexer-F1.rb#8358 def encoding; end + + # Returns the value of attribute force_utf32. + # + # source://parser//lib/parser/lexer-F1.rb#8242 def force_utf32; end + + # Sets the attribute force_utf32 + # + # @param value the value to set the attribute force_utf32 to. + # + # source://parser//lib/parser/lexer-F1.rb#8242 def force_utf32=(_arg0); end + + # Returns the value of attribute lambda_stack. + # + # source://parser//lib/parser/lexer-F1.rb#8248 def lambda_stack; end + + # Returns the value of attribute paren_nest. + # + # source://parser//lib/parser/lexer-F1.rb#8248 def paren_nest; end + + # source://parser//lib/parser/lexer-F1.rb#8392 def pop_cmdarg; end + + # source://parser//lib/parser/lexer-F1.rb#8401 def pop_cond; end + + # source://parser//lib/parser/lexer-F1.rb#8387 def push_cmdarg; end + + # source://parser//lib/parser/lexer-F1.rb#8396 def push_cond; end + + # source://parser//lib/parser/lexer-F1.rb#8281 def reset(reset_state = T.unsafe(nil)); end + + # % + # + # source://parser//lib/parser/lexer-F1.rb#8238 def source_buffer; end + + # source://parser//lib/parser/lexer-F1.rb#8334 def source_buffer=(source_buffer); end + + # source://parser//lib/parser/lexer-F1.rb#8379 def state; end + + # source://parser//lib/parser/lexer-F1.rb#8383 def state=(state); end + + # Returns the value of attribute static_env. + # + # source://parser//lib/parser/lexer-F1.rb#8241 def static_env; end + + # Sets the attribute static_env + # + # @param value the value to set the attribute static_env to. + # + # source://parser//lib/parser/lexer-F1.rb#8241 def static_env=(_arg0); end + + # Returns the value of attribute tokens. + # + # source://parser//lib/parser/lexer-F1.rb#8246 def tokens; end + + # Sets the attribute tokens + # + # @param value the value to set the attribute tokens to. + # + # source://parser//lib/parser/lexer-F1.rb#8246 def tokens=(_arg0); end + + # Returns the value of attribute version. + # + # source://parser//lib/parser/lexer-F1.rb#8248 def version; end protected + # source://parser//lib/parser/lexer-F1.rb#14631 def arg_or_cmdarg(cmd_state); end + + # source://parser//lib/parser/lexer-F1.rb#14693 def check_ambiguous_slash(tm); end + + # source://parser//lib/parser/lexer-F1.rb#14655 def diagnostic(type, reason, arguments = T.unsafe(nil), location = T.unsafe(nil), highlights = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14661 def e_lbrace; end + + # source://parser//lib/parser/lexer-F1.rb#14605 def emit(type, value = T.unsafe(nil), s = T.unsafe(nil), e = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14714 def emit_class_var(ts = T.unsafe(nil), te = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14742 def emit_colon_with_digits(p, tm, diag_msg); end + + # source://parser//lib/parser/lexer-F1.rb#14639 def emit_comment(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14651 def emit_comment_from_range(p, pe); end + + # source://parser//lib/parser/lexer-F1.rb#14621 def emit_do(do_block = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14704 def emit_global_var(ts = T.unsafe(nil), te = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14722 def emit_instance_var(ts = T.unsafe(nil), te = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14730 def emit_rbrace_rparen_rbrack; end + + # source://parser//lib/parser/lexer-F1.rb#14752 def emit_singleton_class; end + + # source://parser//lib/parser/lexer-F1.rb#14615 def emit_table(table, s = T.unsafe(nil), e = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14670 def numeric_literal_int; end + + # source://parser//lib/parser/lexer-F1.rb#14689 def on_newline(p); end + + # source://parser//lib/parser/lexer-F1.rb#14601 def range(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14592 def stack_pop; end + + # source://parser//lib/parser/lexer-F1.rb#14597 def tok(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://parser//lib/parser/lexer-F1.rb#14588 def version?(*versions); end class << self + # Returns the value of attribute lex_en_expr_arg. + # + # source://parser//lib/parser/lexer-F1.rb#8186 def lex_en_expr_arg; end + + # Sets the attribute lex_en_expr_arg + # + # @param value the value to set the attribute lex_en_expr_arg to. + # + # source://parser//lib/parser/lexer-F1.rb#8186 def lex_en_expr_arg=(_arg0); end + + # Returns the value of attribute lex_en_expr_beg. + # + # source://parser//lib/parser/lexer-F1.rb#8202 def lex_en_expr_beg; end + + # Sets the attribute lex_en_expr_beg + # + # @param value the value to set the attribute lex_en_expr_beg to. + # + # source://parser//lib/parser/lexer-F1.rb#8202 def lex_en_expr_beg=(_arg0); end + + # Returns the value of attribute lex_en_expr_cmdarg. + # + # source://parser//lib/parser/lexer-F1.rb#8190 def lex_en_expr_cmdarg; end + + # Sets the attribute lex_en_expr_cmdarg + # + # @param value the value to set the attribute lex_en_expr_cmdarg to. + # + # source://parser//lib/parser/lexer-F1.rb#8190 def lex_en_expr_cmdarg=(_arg0); end + + # Returns the value of attribute lex_en_expr_dot. + # + # source://parser//lib/parser/lexer-F1.rb#8182 def lex_en_expr_dot; end + + # Sets the attribute lex_en_expr_dot + # + # @param value the value to set the attribute lex_en_expr_dot to. + # + # source://parser//lib/parser/lexer-F1.rb#8182 def lex_en_expr_dot=(_arg0); end + + # Returns the value of attribute lex_en_expr_end. + # + # source://parser//lib/parser/lexer-F1.rb#8214 def lex_en_expr_end; end + + # Sets the attribute lex_en_expr_end + # + # @param value the value to set the attribute lex_en_expr_end to. + # + # source://parser//lib/parser/lexer-F1.rb#8214 def lex_en_expr_end=(_arg0); end + + # Returns the value of attribute lex_en_expr_endarg. + # + # source://parser//lib/parser/lexer-F1.rb#8194 def lex_en_expr_endarg; end + + # Sets the attribute lex_en_expr_endarg + # + # @param value the value to set the attribute lex_en_expr_endarg to. + # + # source://parser//lib/parser/lexer-F1.rb#8194 def lex_en_expr_endarg=(_arg0); end + + # Returns the value of attribute lex_en_expr_endfn. + # + # source://parser//lib/parser/lexer-F1.rb#8178 def lex_en_expr_endfn; end + + # Sets the attribute lex_en_expr_endfn + # + # @param value the value to set the attribute lex_en_expr_endfn to. + # + # source://parser//lib/parser/lexer-F1.rb#8178 def lex_en_expr_endfn=(_arg0); end + + # Returns the value of attribute lex_en_expr_fname. + # + # source://parser//lib/parser/lexer-F1.rb#8174 def lex_en_expr_fname; end + + # Sets the attribute lex_en_expr_fname + # + # @param value the value to set the attribute lex_en_expr_fname to. + # + # source://parser//lib/parser/lexer-F1.rb#8174 def lex_en_expr_fname=(_arg0); end + + # Returns the value of attribute lex_en_expr_labelarg. + # + # source://parser//lib/parser/lexer-F1.rb#8206 def lex_en_expr_labelarg; end + + # Sets the attribute lex_en_expr_labelarg + # + # @param value the value to set the attribute lex_en_expr_labelarg to. + # + # source://parser//lib/parser/lexer-F1.rb#8206 def lex_en_expr_labelarg=(_arg0); end + + # Returns the value of attribute lex_en_expr_mid. + # + # source://parser//lib/parser/lexer-F1.rb#8198 def lex_en_expr_mid; end + + # Sets the attribute lex_en_expr_mid + # + # @param value the value to set the attribute lex_en_expr_mid to. + # + # source://parser//lib/parser/lexer-F1.rb#8198 def lex_en_expr_mid=(_arg0); end + + # Returns the value of attribute lex_en_expr_value. + # + # source://parser//lib/parser/lexer-F1.rb#8210 def lex_en_expr_value; end + + # Sets the attribute lex_en_expr_value + # + # @param value the value to set the attribute lex_en_expr_value to. + # + # source://parser//lib/parser/lexer-F1.rb#8210 def lex_en_expr_value=(_arg0); end + + # Returns the value of attribute lex_en_expr_variable. + # + # source://parser//lib/parser/lexer-F1.rb#8170 def lex_en_expr_variable; end + + # Sets the attribute lex_en_expr_variable + # + # @param value the value to set the attribute lex_en_expr_variable to. + # + # source://parser//lib/parser/lexer-F1.rb#8170 def lex_en_expr_variable=(_arg0); end + + # Returns the value of attribute lex_en_inside_string. + # + # source://parser//lib/parser/lexer-F1.rb#8230 def lex_en_inside_string; end + + # Sets the attribute lex_en_inside_string + # + # @param value the value to set the attribute lex_en_inside_string to. + # + # source://parser//lib/parser/lexer-F1.rb#8230 def lex_en_inside_string=(_arg0); end + + # Returns the value of attribute lex_en_leading_dot. + # + # source://parser//lib/parser/lexer-F1.rb#8218 def lex_en_leading_dot; end + + # Sets the attribute lex_en_leading_dot + # + # @param value the value to set the attribute lex_en_leading_dot to. + # + # source://parser//lib/parser/lexer-F1.rb#8218 def lex_en_leading_dot=(_arg0); end + + # Returns the value of attribute lex_en_line_begin. + # + # source://parser//lib/parser/lexer-F1.rb#8226 def lex_en_line_begin; end + + # Sets the attribute lex_en_line_begin + # + # @param value the value to set the attribute lex_en_line_begin to. + # + # source://parser//lib/parser/lexer-F1.rb#8226 def lex_en_line_begin=(_arg0); end + + # Returns the value of attribute lex_en_line_comment. + # + # source://parser//lib/parser/lexer-F1.rb#8222 def lex_en_line_comment; end + + # Sets the attribute lex_en_line_comment + # + # @param value the value to set the attribute lex_en_line_comment to. + # + # source://parser//lib/parser/lexer-F1.rb#8222 def lex_en_line_comment=(_arg0); end + + # Returns the value of attribute lex_error. + # + # source://parser//lib/parser/lexer-F1.rb#8165 def lex_error; end + + # Sets the attribute lex_error + # + # @param value the value to set the attribute lex_error to. + # + # source://parser//lib/parser/lexer-F1.rb#8165 def lex_error=(_arg0); end + + # Returns the value of attribute lex_start. + # + # source://parser//lib/parser/lexer-F1.rb#8161 def lex_start; end + + # Sets the attribute lex_start + # + # @param value the value to set the attribute lex_start to. + # + # source://parser//lib/parser/lexer-F1.rb#8161 def lex_start=(_arg0); end private + # Returns the value of attribute _lex_eof_trans. + # + # source://parser//lib/parser/lexer-F1.rb#8064 def _lex_eof_trans; end + + # Sets the attribute _lex_eof_trans + # + # @param value the value to set the attribute _lex_eof_trans to. + # + # source://parser//lib/parser/lexer-F1.rb#8064 def _lex_eof_trans=(_arg0); end + + # Returns the value of attribute _lex_from_state_actions. + # + # source://parser//lib/parser/lexer-F1.rb#7967 def _lex_from_state_actions; end + + # Sets the attribute _lex_from_state_actions + # + # @param value the value to set the attribute _lex_from_state_actions to. + # + # source://parser//lib/parser/lexer-F1.rb#7967 def _lex_from_state_actions=(_arg0); end + + # Returns the value of attribute _lex_index_offsets. + # + # source://parser//lib/parser/lexer-F1.rb#461 def _lex_index_offsets; end + + # Sets the attribute _lex_index_offsets + # + # @param value the value to set the attribute _lex_index_offsets to. + # + # source://parser//lib/parser/lexer-F1.rb#461 def _lex_index_offsets=(_arg0); end + + # Returns the value of attribute _lex_indicies. + # + # source://parser//lib/parser/lexer-F1.rb#558 def _lex_indicies; end + + # Sets the attribute _lex_indicies + # + # @param value the value to set the attribute _lex_indicies to. + # + # source://parser//lib/parser/lexer-F1.rb#558 def _lex_indicies=(_arg0); end + + # Returns the value of attribute _lex_key_spans. + # + # source://parser//lib/parser/lexer-F1.rb#364 def _lex_key_spans; end + + # Sets the attribute _lex_key_spans + # + # @param value the value to set the attribute _lex_key_spans to. + # + # source://parser//lib/parser/lexer-F1.rb#364 def _lex_key_spans=(_arg0); end + + # Returns the value of attribute _lex_to_state_actions. + # + # source://parser//lib/parser/lexer-F1.rb#7870 def _lex_to_state_actions; end + + # Sets the attribute _lex_to_state_actions + # + # @param value the value to set the attribute _lex_to_state_actions to. + # + # source://parser//lib/parser/lexer-F1.rb#7870 def _lex_to_state_actions=(_arg0); end + + # Returns the value of attribute _lex_trans_actions. + # + # source://parser//lib/parser/lexer-F1.rb#7722 def _lex_trans_actions; end + + # Sets the attribute _lex_trans_actions + # + # @param value the value to set the attribute _lex_trans_actions to. + # + # source://parser//lib/parser/lexer-F1.rb#7722 def _lex_trans_actions=(_arg0); end + + # Returns the value of attribute _lex_trans_keys. + # + # source://parser//lib/parser/lexer-F1.rb#87 def _lex_trans_keys; end + + # Sets the attribute _lex_trans_keys + # + # @param value the value to set the attribute _lex_trans_keys to. + # + # source://parser//lib/parser/lexer-F1.rb#87 def _lex_trans_keys=(_arg0); end + + # Returns the value of attribute _lex_trans_targs. + # + # source://parser//lib/parser/lexer-F1.rb#7574 def _lex_trans_targs; end + + # Sets the attribute _lex_trans_targs + # + # @param value the value to set the attribute _lex_trans_targs to. + # + # source://parser//lib/parser/lexer-F1.rb#7574 def _lex_trans_targs=(_arg0); end end end +# source://parser//lib/parser/lexer/dedenter.rb#5 class Parser::Lexer::Dedenter + # source://parser//lib/parser/lexer/dedenter.rb#9 def initialize(dedent_level); end + # source://parser//lib/parser/lexer/dedenter.rb#36 def dedent(string); end + + # source://parser//lib/parser/lexer/dedenter.rb#83 def interrupt; end end +# source://parser//lib/parser/lexer/dedenter.rb#7 Parser::Lexer::Dedenter::TAB_WIDTH = T.let(T.unsafe(nil), Integer) + +# source://parser//lib/parser/lexer-F1.rb#14799 Parser::Lexer::ESCAPE_WHITESPACE = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer-F1.rb#14785 Parser::Lexer::KEYWORDS = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer-F1.rb#14792 Parser::Lexer::KEYWORDS_BEGIN = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer-F1.rb#8362 Parser::Lexer::LEX_STATES = T.let(T.unsafe(nil), Hash) +# source://parser//lib/parser/lexer/literal.rb#6 class Parser::Lexer::Literal + # source://parser//lib/parser/lexer/literal.rb#40 def initialize(lexer, str_type, delimiter, str_s, heredoc_e = T.unsafe(nil), indent = T.unsafe(nil), dedent_body = T.unsafe(nil), label_allowed = T.unsafe(nil)); end + # source://parser//lib/parser/lexer/literal.rb#114 def backslash_delimited?; end + + # source://parser//lib/parser/lexer/literal.rb#37 def dedent_level; end + + # source://parser//lib/parser/lexer/literal.rb#189 def end_interp_brace_and_try_closing; end + + # source://parser//lib/parser/lexer/literal.rb#216 def extend_content; end + + # source://parser//lib/parser/lexer/literal.rb#220 def extend_space(ts, te); end + + # source://parser//lib/parser/lexer/literal.rb#195 def extend_string(string, ts, te); end + + # source://parser//lib/parser/lexer/literal.rb#202 def flush_string; end + + # source://parser//lib/parser/lexer/literal.rb#102 def heredoc?; end + + # source://parser//lib/parser/lexer/literal.rb#37 def heredoc_e; end + + # source://parser//lib/parser/lexer/literal.rb#166 def infer_indent_level(line); end + + # source://parser//lib/parser/lexer/literal.rb#89 def interpolate?; end + + # source://parser//lib/parser/lexer/literal.rb#122 def munge_escape?(character); end + + # source://parser//lib/parser/lexer/literal.rb#132 def nest_and_try_closing(delimiter, ts, te, lookahead = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer/literal.rb#106 def plain_heredoc?; end + + # source://parser//lib/parser/lexer/literal.rb#98 def regexp?; end + + # source://parser//lib/parser/lexer/literal.rb#38 def saved_herebody_s; end + + # source://parser//lib/parser/lexer/literal.rb#38 def saved_herebody_s=(_arg0); end + + # source://parser//lib/parser/lexer/literal.rb#110 def squiggly_heredoc?; end + + # source://parser//lib/parser/lexer/literal.rb#185 def start_interp_brace; end + + # source://parser//lib/parser/lexer/literal.rb#37 def str_s; end + + # source://parser//lib/parser/lexer/literal.rb#230 def supports_line_continuation_via_slash?; end + + # source://parser//lib/parser/lexer/literal.rb#118 def type; end + + # source://parser//lib/parser/lexer/literal.rb#93 def words?; end protected + # source://parser//lib/parser/lexer/literal.rb#248 def clear_buffer; end + + # source://parser//lib/parser/lexer/literal.rb#244 def coerce_encoding(string); end + + # source://parser//lib/parser/lexer/literal.rb#236 def delimiter?(delimiter); end + + # source://parser//lib/parser/lexer/literal.rb#264 def emit(token, type, s, e); end + + # source://parser//lib/parser/lexer/literal.rb#259 def emit_start_tok; end end +# source://parser//lib/parser/lexer/literal.rb#7 Parser::Lexer::Literal::DELIMITERS = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer/literal.rb#9 Parser::Lexer::Literal::TYPES = T.let(T.unsafe(nil), Hash) + +# Mapping of strings to parser tokens. +# +# source://parser//lib/parser/lexer-F1.rb#14759 Parser::Lexer::PUNCTUATION = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer-F1.rb#14779 Parser::Lexer::PUNCTUATION_BEGIN = T.let(T.unsafe(nil), Hash) +# source://parser//lib/parser/lexer/stack_state.rb#5 class Parser::Lexer::StackState + # source://parser//lib/parser/lexer/stack_state.rb#6 def initialize(name); end + # source://parser//lib/parser/lexer/stack_state.rb#34 def active?; end + + # source://parser//lib/parser/lexer/stack_state.rb#11 def clear; end + + # source://parser//lib/parser/lexer/stack_state.rb#38 def empty?; end + + # source://parser//lib/parser/lexer/stack_state.rb#42 def inspect; end + + # source://parser//lib/parser/lexer/stack_state.rb#29 def lexpop; end + + # source://parser//lib/parser/lexer/stack_state.rb#22 def pop; end + + # source://parser//lib/parser/lexer/stack_state.rb#15 def push(bit); end + + # source://parser//lib/parser/lexer/stack_state.rb#42 def to_s; end end +# line 3 "lib/parser/lexer-strings.rl" +# +# source://parser//lib/parser/lexer-strings.rb#6 class Parser::LexerStrings + # @return [LexerStrings] a new instance of LexerStrings + # + # source://parser//lib/parser/lexer-strings.rb#3300 def initialize(lexer, version); end + # source://parser//lib/parser/lexer-strings.rb#3339 def advance(p); end + + # source://parser//lib/parser/lexer-strings.rb#5069 def close_interp_on_current_literal(p); end + + # source://parser//lib/parser/lexer-strings.rb#5043 def continue_lexing(current_literal); end + + # source://parser//lib/parser/lexer-strings.rb#5092 def dedent_level; end + + # Returns the value of attribute herebody_s. + # + # source://parser//lib/parser/lexer-strings.rb#3295 def herebody_s; end + + # Sets the attribute herebody_s + # + # @param value the value to set the attribute herebody_s to. + # + # source://parser//lib/parser/lexer-strings.rb#3295 def herebody_s=(_arg0); end + + # source://parser//lib/parser/lexer-strings.rb#5047 def literal; end + + # source://parser//lib/parser/lexer-strings.rb#5015 def next_state_for_literal(literal); end + + # This hook is triggered by "main" lexer on every newline character + # + # source://parser//lib/parser/lexer-strings.rb#5100 def on_newline(p); end + + # source://parser//lib/parser/lexer-strings.rb#5051 def pop_literal; end + + # === LITERAL STACK === + # + # source://parser//lib/parser/lexer-strings.rb#5009 def push_literal(*args); end + + # source://parser//lib/parser/lexer-strings.rb#4999 def read_character_constant(p); end + + # source://parser//lib/parser/lexer-strings.rb#3314 def reset; end + + # Set by "main" lexer + # + # source://parser//lib/parser/lexer-strings.rb#3298 def source_buffer; end + + # Set by "main" lexer + # + # source://parser//lib/parser/lexer-strings.rb#3298 def source_buffer=(_arg0); end + + # Set by "main" lexer + # + # source://parser//lib/parser/lexer-strings.rb#3298 def source_pts; end + + # Set by "main" lexer + # + # source://parser//lib/parser/lexer-strings.rb#3298 def source_pts=(_arg0); end protected + # source://parser//lib/parser/lexer-strings.rb#5397 def check_ambiguous_slash(tm); end + + # source://parser//lib/parser/lexer-strings.rb#5408 def check_invalid_escapes(p); end + + # source://parser//lib/parser/lexer-strings.rb#5136 def cond; end + + # source://parser//lib/parser/lexer-strings.rb#5132 def diagnostic(type, reason, arguments = T.unsafe(nil), location = T.unsafe(nil), highlights = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-strings.rb#5128 def emit(type, value = T.unsafe(nil), s = T.unsafe(nil), e = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-strings.rb#5387 def emit_character_constant; end + + # source://parser//lib/parser/lexer-strings.rb#5364 def emit_interp_var(interp_var_kind); end + + # @return [Boolean] + # + # source://parser//lib/parser/lexer-strings.rb#5140 def emit_invalid_escapes?; end + + # source://parser//lib/parser/lexer-strings.rb#5291 def encode_escape(ord); end + + # source://parser//lib/parser/lexer-strings.rb#5375 def encode_escaped_char(p); end + + # @return [Boolean] + # + # source://parser//lib/parser/lexer-strings.rb#5112 def eof_codepoint?(point); end + + # source://parser//lib/parser/lexer-strings.rb#5210 def extend_interp_code(current_literal); end + + # source://parser//lib/parser/lexer-strings.rb#5225 def extend_interp_digit_var; end + + # source://parser//lib/parser/lexer-strings.rb#5355 def extend_interp_var(current_literal); end + + # source://parser//lib/parser/lexer-strings.rb#5234 def extend_string_eol_check_eof(current_literal, pe); end + + # source://parser//lib/parser/lexer-strings.rb#5251 def extend_string_eol_heredoc_intertwined(p); end + + # source://parser//lib/parser/lexer-strings.rb#5241 def extend_string_eol_heredoc_line; end + + # source://parser//lib/parser/lexer-strings.rb#5267 def extend_string_eol_words(current_literal, p); end + + # String escaping + # + # source://parser//lib/parser/lexer-strings.rb#5154 def extend_string_escaped; end + + # source://parser//lib/parser/lexer-strings.rb#5287 def extend_string_for_token_range(current_literal, string); end + + # source://parser//lib/parser/lexer-strings.rb#5279 def extend_string_slice_end(lookahead); end + + # source://parser//lib/parser/lexer-strings.rb#5124 def range(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-strings.rb#5347 def read_post_meta_or_ctrl_char(p); end + + # source://parser//lib/parser/lexer-strings.rb#5379 def slash_c_char; end + + # source://parser//lib/parser/lexer-strings.rb#5383 def slash_m_char; end + + # source://parser//lib/parser/lexer-strings.rb#5120 def tok(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-strings.rb#5295 def unescape_char(p); end + + # source://parser//lib/parser/lexer-strings.rb#5307 def unicode_points(p); end + + # @return [Boolean] + # + # source://parser//lib/parser/lexer-strings.rb#5116 def version?(*versions); end class << self + # Returns the value of attribute lex_en_character. + # + # source://parser//lib/parser/lexer-strings.rb#3275 def lex_en_character; end + + # Sets the attribute lex_en_character + # + # @param value the value to set the attribute lex_en_character to. + # + # source://parser//lib/parser/lexer-strings.rb#3275 def lex_en_character=(_arg0); end + + # Returns the value of attribute lex_en_interp_backslash_delimited. + # + # source://parser//lib/parser/lexer-strings.rb#3255 def lex_en_interp_backslash_delimited; end + + # Sets the attribute lex_en_interp_backslash_delimited + # + # @param value the value to set the attribute lex_en_interp_backslash_delimited to. + # + # source://parser//lib/parser/lexer-strings.rb#3255 def lex_en_interp_backslash_delimited=(_arg0); end + + # Returns the value of attribute lex_en_interp_backslash_delimited_words. + # + # source://parser//lib/parser/lexer-strings.rb#3263 def lex_en_interp_backslash_delimited_words; end + + # Sets the attribute lex_en_interp_backslash_delimited_words + # + # @param value the value to set the attribute lex_en_interp_backslash_delimited_words to. + # + # source://parser//lib/parser/lexer-strings.rb#3263 def lex_en_interp_backslash_delimited_words=(_arg0); end + + # Returns the value of attribute lex_en_interp_string. + # + # source://parser//lib/parser/lexer-strings.rb#3243 def lex_en_interp_string; end + + # Sets the attribute lex_en_interp_string + # + # @param value the value to set the attribute lex_en_interp_string to. + # + # source://parser//lib/parser/lexer-strings.rb#3243 def lex_en_interp_string=(_arg0); end + + # Returns the value of attribute lex_en_interp_words. + # + # source://parser//lib/parser/lexer-strings.rb#3239 def lex_en_interp_words; end + + # Sets the attribute lex_en_interp_words + # + # @param value the value to set the attribute lex_en_interp_words to. + # + # source://parser//lib/parser/lexer-strings.rb#3239 def lex_en_interp_words=(_arg0); end + + # Returns the value of attribute lex_en_plain_backslash_delimited. + # + # source://parser//lib/parser/lexer-strings.rb#3259 def lex_en_plain_backslash_delimited; end + + # Sets the attribute lex_en_plain_backslash_delimited + # + # @param value the value to set the attribute lex_en_plain_backslash_delimited to. + # + # source://parser//lib/parser/lexer-strings.rb#3259 def lex_en_plain_backslash_delimited=(_arg0); end + + # Returns the value of attribute lex_en_plain_backslash_delimited_words. + # + # source://parser//lib/parser/lexer-strings.rb#3267 def lex_en_plain_backslash_delimited_words; end + + # Sets the attribute lex_en_plain_backslash_delimited_words + # + # @param value the value to set the attribute lex_en_plain_backslash_delimited_words to. + # + # source://parser//lib/parser/lexer-strings.rb#3267 def lex_en_plain_backslash_delimited_words=(_arg0); end + + # Returns the value of attribute lex_en_plain_string. + # + # source://parser//lib/parser/lexer-strings.rb#3251 def lex_en_plain_string; end + + # Sets the attribute lex_en_plain_string + # + # @param value the value to set the attribute lex_en_plain_string to. + # + # source://parser//lib/parser/lexer-strings.rb#3251 def lex_en_plain_string=(_arg0); end + + # Returns the value of attribute lex_en_plain_words. + # + # source://parser//lib/parser/lexer-strings.rb#3247 def lex_en_plain_words; end + + # Sets the attribute lex_en_plain_words + # + # @param value the value to set the attribute lex_en_plain_words to. + # + # source://parser//lib/parser/lexer-strings.rb#3247 def lex_en_plain_words=(_arg0); end + + # Returns the value of attribute lex_en_regexp_modifiers. + # + # source://parser//lib/parser/lexer-strings.rb#3271 def lex_en_regexp_modifiers; end + + # Sets the attribute lex_en_regexp_modifiers + # + # @param value the value to set the attribute lex_en_regexp_modifiers to. + # + # source://parser//lib/parser/lexer-strings.rb#3271 def lex_en_regexp_modifiers=(_arg0); end + + # Returns the value of attribute lex_en_unknown. + # + # source://parser//lib/parser/lexer-strings.rb#3279 def lex_en_unknown; end + + # Sets the attribute lex_en_unknown + # + # @param value the value to set the attribute lex_en_unknown to. + # + # source://parser//lib/parser/lexer-strings.rb#3279 def lex_en_unknown=(_arg0); end + + # Returns the value of attribute lex_error. + # + # source://parser//lib/parser/lexer-strings.rb#3234 def lex_error; end + + # Sets the attribute lex_error + # + # @param value the value to set the attribute lex_error to. + # + # source://parser//lib/parser/lexer-strings.rb#3234 def lex_error=(_arg0); end + + # Returns the value of attribute lex_start. + # + # source://parser//lib/parser/lexer-strings.rb#3230 def lex_start; end + + # Sets the attribute lex_start + # + # @param value the value to set the attribute lex_start to. + # + # source://parser//lib/parser/lexer-strings.rb#3230 def lex_start=(_arg0); end private + # Returns the value of attribute _lex_actions. + # + # source://parser//lib/parser/lexer-strings.rb#11 def _lex_actions; end + + # Sets the attribute _lex_actions + # + # @param value the value to set the attribute _lex_actions to. + # + # source://parser//lib/parser/lexer-strings.rb#11 def _lex_actions=(_arg0); end + + # Returns the value of attribute _lex_eof_trans. + # + # source://parser//lib/parser/lexer-strings.rb#3184 def _lex_eof_trans; end + + # Sets the attribute _lex_eof_trans + # + # @param value the value to set the attribute _lex_eof_trans to. + # + # source://parser//lib/parser/lexer-strings.rb#3184 def _lex_eof_trans=(_arg0); end + + # Returns the value of attribute _lex_from_state_actions. + # + # source://parser//lib/parser/lexer-strings.rb#3138 def _lex_from_state_actions; end + + # Sets the attribute _lex_from_state_actions + # + # @param value the value to set the attribute _lex_from_state_actions to. + # + # source://parser//lib/parser/lexer-strings.rb#3138 def _lex_from_state_actions=(_arg0); end + + # Returns the value of attribute _lex_index_offsets. + # + # source://parser//lib/parser/lexer-strings.rb#244 def _lex_index_offsets; end + + # Sets the attribute _lex_index_offsets + # + # @param value the value to set the attribute _lex_index_offsets to. + # + # source://parser//lib/parser/lexer-strings.rb#244 def _lex_index_offsets=(_arg0); end + + # Returns the value of attribute _lex_indicies. + # + # source://parser//lib/parser/lexer-strings.rb#290 def _lex_indicies; end + + # Sets the attribute _lex_indicies + # + # @param value the value to set the attribute _lex_indicies to. + # + # source://parser//lib/parser/lexer-strings.rb#290 def _lex_indicies=(_arg0); end + + # Returns the value of attribute _lex_key_spans. + # + # source://parser//lib/parser/lexer-strings.rb#198 def _lex_key_spans; end + + # Sets the attribute _lex_key_spans + # + # @param value the value to set the attribute _lex_key_spans to. + # + # source://parser//lib/parser/lexer-strings.rb#198 def _lex_key_spans=(_arg0); end + + # Returns the value of attribute _lex_to_state_actions. + # + # source://parser//lib/parser/lexer-strings.rb#3092 def _lex_to_state_actions; end + + # Sets the attribute _lex_to_state_actions + # + # @param value the value to set the attribute _lex_to_state_actions to. + # + # source://parser//lib/parser/lexer-strings.rb#3092 def _lex_to_state_actions=(_arg0); end + + # Returns the value of attribute _lex_trans_actions. + # + # source://parser//lib/parser/lexer-strings.rb#3029 def _lex_trans_actions; end + + # Sets the attribute _lex_trans_actions + # + # @param value the value to set the attribute _lex_trans_actions to. + # + # source://parser//lib/parser/lexer-strings.rb#3029 def _lex_trans_actions=(_arg0); end + + # Returns the value of attribute _lex_trans_keys. + # + # source://parser//lib/parser/lexer-strings.rb#76 def _lex_trans_keys; end + + # Sets the attribute _lex_trans_keys + # + # @param value the value to set the attribute _lex_trans_keys to. + # + # source://parser//lib/parser/lexer-strings.rb#76 def _lex_trans_keys=(_arg0); end + + # Returns the value of attribute _lex_trans_targs. + # + # source://parser//lib/parser/lexer-strings.rb#2966 def _lex_trans_targs; end + + # Sets the attribute _lex_trans_targs + # + # @param value the value to set the attribute _lex_trans_targs to. + # + # source://parser//lib/parser/lexer-strings.rb#2966 def _lex_trans_targs=(_arg0); end end end +# % +# +# source://parser//lib/parser/lexer-strings.rb#3287 Parser::LexerStrings::ESCAPES = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer-strings.rb#5414 Parser::LexerStrings::ESCAPE_WHITESPACE = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer-strings.rb#3332 Parser::LexerStrings::LEX_STATES = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer-strings.rb#3293 Parser::LexerStrings::REGEXP_META_CHARACTERS = T.let(T.unsafe(nil), Regexp) + +# Diagnostic messages (errors, warnings and notices) that can be generated. +# +# @api public +# @see Diagnostic +# +# source://parser//lib/parser/messages.rb#11 Parser::MESSAGES = T.let(T.unsafe(nil), Hash) +# Holds p->max_numparam from parse.y +# +# @api private +# +# source://parser//lib/parser/max_numparam_stack.rb#8 class Parser::MaxNumparamStack + # @api private + # @return [MaxNumparamStack] a new instance of MaxNumparamStack + # + # source://parser//lib/parser/max_numparam_stack.rb#13 def initialize; end + # @api private + # @return [Boolean] + # + # source://parser//lib/parser/max_numparam_stack.rb#17 def empty?; end + + # @api private + # @return [Boolean] + # + # source://parser//lib/parser/max_numparam_stack.rb#29 def has_numparams?; end + + # @api private + # + # source://parser//lib/parser/max_numparam_stack.rb#21 def has_ordinary_params!; end + + # @api private + # @return [Boolean] + # + # source://parser//lib/parser/max_numparam_stack.rb#25 def has_ordinary_params?; end + + # @api private + # + # source://parser//lib/parser/max_numparam_stack.rb#45 def pop; end + + # @api private + # + # source://parser//lib/parser/max_numparam_stack.rb#41 def push(static:); end + + # @api private + # + # source://parser//lib/parser/max_numparam_stack.rb#33 def register(numparam); end + + # @api private + # + # source://parser//lib/parser/max_numparam_stack.rb#9 def stack; end + + # @api private + # + # source://parser//lib/parser/max_numparam_stack.rb#37 def top; end private + # @api private + # + # source://parser//lib/parser/max_numparam_stack.rb#51 def set(value); end end +# @api private +# +# source://parser//lib/parser/max_numparam_stack.rb#11 Parser::MaxNumparamStack::ORDINARY_PARAMS = T.let(T.unsafe(nil), Integer) +# @api private +# +# source://parser//lib/parser/messages.rb#107 module Parser::Messages class << self + # Formats the message, returns a raw template if there's nothing to interpolate + # + # Code like `format("", {})` gives a warning, and so this method tries interpolating + # only if `arguments` hash is not empty. + # + # @api private + # + # source://parser//lib/parser/messages.rb#114 def compile(reason, arguments); end end end +# Parser metadata +# +# source://parser//lib/parser/meta.rb#5 module Parser::Meta; end + +# All node types that parser can produce. Not all parser versions +# will be able to produce every possible node. +# +# source://parser//lib/parser/meta.rb#9 Parser::Meta::NODE_TYPES = T.let(T.unsafe(nil), Set) +# {Parser::Rewriter} is deprecated. Use {Parser::TreeRewriter} instead. +# It has a backwards compatible API and uses {Parser::Source::TreeRewriter} +# instead of {Parser::Source::Rewriter}. +# Please check the documentation for {Parser::Source::Rewriter} for details. +# +# @api public +# @deprecated Use {Parser::TreeRewriter} +# +# source://parser//lib/parser/rewriter.rb#22 class Parser::Rewriter < ::Parser::AST::Processor extend ::Parser::Deprecation + # @api public + # @return [Rewriter] a new instance of Rewriter + # + # source://parser//lib/parser/rewriter.rb#98 def initialize(*_arg0); end + # Returns `true` if the specified node is an assignment node, returns false + # otherwise. + # + # @api public + # @param node [Parser::AST::Node] + # @return [Boolean] + # + # source://parser//lib/parser/rewriter.rb#38 def assignment?(node); end + + # Inserts new code after the given source range. + # + # @api public + # @param range [Parser::Source::Range] + # @param content [String] + # + # source://parser//lib/parser/rewriter.rb#77 def insert_after(range, content); end + + # Inserts new code before the given source range. + # + # @api public + # @param range [Parser::Source::Range] + # @param content [String] + # + # source://parser//lib/parser/rewriter.rb#67 def insert_before(range, content); end + + # Removes the source range. + # + # @api public + # @param range [Parser::Source::Range] + # + # source://parser//lib/parser/rewriter.rb#47 def remove(range); end + + # Replaces the code of the source range `range` with `content`. + # + # @api public + # @param range [Parser::Source::Range] + # @param content [String] + # + # source://parser//lib/parser/rewriter.rb#87 def replace(range, content); end + + # Rewrites the AST/source buffer and returns a String containing the new + # version. + # + # @api public + # @param source_buffer [Parser::Source::Buffer] + # @param ast [Parser::AST::Node] + # @return [String] + # + # source://parser//lib/parser/rewriter.rb#23 def rewrite(source_buffer, ast); end + + # Wraps the given source range with the given values. + # + # @api public + # @param range [Parser::Source::Range] + # @param content [String] + # + # source://parser//lib/parser/rewriter.rb#57 def wrap(range, before, after); end end +# @api public +# +# source://parser//lib/parser/rewriter.rb#91 Parser::Rewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) -class Parser::Ruby26 < ::Parser::Base +# source://parser//lib/parser/ruby31.rb#14 +class Parser::Ruby31 < ::Parser::Base + # reduce 0 omitted + # + # source://parser//lib/parser/ruby31.rb#8435 + def _reduce_1(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8489 def _reduce_10(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9124 def _reduce_100(val, _values, result); end - def _reduce_101(val, _values, result); end + + # reduce 101 omitted + # + # source://parser//lib/parser/ruby31.rb#9133 def _reduce_102(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9139 def _reduce_103(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9145 def _reduce_104(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9151 def _reduce_105(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9157 def _reduce_106(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9163 def _reduce_107(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9169 def _reduce_108(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9175 def _reduce_109(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8495 def _reduce_11(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9181 def _reduce_110(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9191 def _reduce_111(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9197 + def _reduce_112(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9207 def _reduce_113(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9214 def _reduce_114(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9221 def _reduce_115(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9227 + def _reduce_116(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9233 + def _reduce_117(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9239 + def _reduce_118(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9245 + def _reduce_119(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8512 def _reduce_12(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9251 + def _reduce_120(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9257 def _reduce_121(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9263 + def _reduce_122(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9270 + def _reduce_123(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9277 + def _reduce_124(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9283 def _reduce_125(val, _values, result); end - def _reduce_126(val, _values, result); end + + # reduce 126 omitted + # + # source://parser//lib/parser/ruby31.rb#9291 def _reduce_127(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9297 + def _reduce_128(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9303 + def _reduce_129(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8518 def _reduce_13(val, _values, result); end + + # reduce 134 omitted + # + # source://parser//lib/parser/ruby31.rb#9319 + def _reduce_135(val, _values, result); end + + # reduce 136 omitted + # + # source://parser//lib/parser/ruby31.rb#9327 + def _reduce_137(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9333 + def _reduce_138(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9339 + def _reduce_139(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8524 def _reduce_14(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8530 def _reduce_15(val, _values, result); end - def _reduce_17(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8536 + def _reduce_16(val, _values, result); end + + # reduce 17 omitted + # + # source://parser//lib/parser/ruby31.rb#8544 def _reduce_18(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8550 def _reduce_19(val, _values, result); end - def _reduce_199(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8442 def _reduce_2(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8556 def _reduce_20(val, _values, result); end - def _reduce_200(val, _values, result); end - def _reduce_201(val, _values, result); end - def _reduce_202(val, _values, result); end - def _reduce_203(val, _values, result); end - def _reduce_204(val, _values, result); end - def _reduce_205(val, _values, result); end - def _reduce_206(val, _values, result); end - def _reduce_207(val, _values, result); end - def _reduce_208(val, _values, result); end - def _reduce_209(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8562 def _reduce_21(val, _values, result); end - def _reduce_210(val, _values, result); end + + # reduce 210 omitted + # + # source://parser//lib/parser/ruby31.rb#9487 def _reduce_211(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9493 def _reduce_212(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9499 def _reduce_213(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9508 def _reduce_214(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9517 def _reduce_215(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9526 def _reduce_216(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9535 def _reduce_217(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9543 def _reduce_218(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9551 def _reduce_219(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8570 def _reduce_22(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9557 def _reduce_220(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9563 def _reduce_221(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9569 def _reduce_222(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9575 def _reduce_223(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9581 def _reduce_224(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9587 + def _reduce_225(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9593 def _reduce_226(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9599 def _reduce_227(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9605 def _reduce_228(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9611 def _reduce_229(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8578 def _reduce_23(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9617 def _reduce_230(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9623 def _reduce_231(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9629 def _reduce_232(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9637 def _reduce_233(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9643 def _reduce_234(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9649 def _reduce_235(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9655 def _reduce_236(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9661 def _reduce_237(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9667 def _reduce_238(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8584 def _reduce_24(val, _values, result); end + + # reduce 239 omitted + # + # source://parser//lib/parser/ruby31.rb#9675 + def _reduce_240(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9681 + def _reduce_241(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9687 + def _reduce_242(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9693 + def _reduce_243(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9699 def _reduce_244(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9705 def _reduce_245(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9711 + def _reduce_246(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9717 + def _reduce_247(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9723 + def _reduce_248(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9729 def _reduce_249(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8590 def _reduce_25(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9735 def _reduce_250(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9741 + def _reduce_251(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9747 def _reduce_252(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9754 def _reduce_253(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9761 def _reduce_254(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9775 + def _reduce_255(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9795 def _reduce_256(val, _values, result); end - def _reduce_259(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9809 + def _reduce_257(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8597 def _reduce_26(val, _values, result); end - def _reduce_260(val, _values, result); end - def _reduce_261(val, _values, result); end - def _reduce_262(val, _values, result); end + + # reduce 262 omitted + # + # source://parser//lib/parser/ruby31.rb#9839 def _reduce_263(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9845 def _reduce_264(val, _values, result); end - def _reduce_265(val, _values, result); end - def _reduce_266(val, _values, result); end - def _reduce_267(val, _values, result); end + + # reduce 267 omitted + # + # source://parser//lib/parser/ruby31.rb#9857 def _reduce_268(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9863 def _reduce_269(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8604 def _reduce_27(val, _values, result); end - def _reduce_270(val, _values, result); end + + # reduce 270 omitted + # + # source://parser//lib/parser/ruby31.rb#9871 def _reduce_271(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9881 def _reduce_272(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9887 def _reduce_273(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9897 def _reduce_274(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9907 def _reduce_275(val, _values, result); end + + # reduce 276 omitted + # + # source://parser//lib/parser/ruby31.rb#9915 def _reduce_277(val, _values, result); end - def _reduce_278(val, _values, result); end - def _reduce_279(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8610 def _reduce_28(val, _values, result); end + + # reduce 279 omitted + # + # source://parser//lib/parser/ruby31.rb#9925 + def _reduce_280(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9931 + def _reduce_281(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9937 + def _reduce_282(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9943 + def _reduce_283(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9949 + def _reduce_284(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9956 + def _reduce_285(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9964 + def _reduce_286(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9970 + def _reduce_287(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9997 + def _reduce_288(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10018 + def _reduce_289(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8616 def _reduce_29(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10024 def _reduce_290(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10034 def _reduce_291(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10040 def _reduce_292(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10046 def _reduce_293(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10052 def _reduce_294(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10058 def _reduce_295(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10064 def _reduce_296(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10070 def _reduce_297(val, _values, result); end - def _reduce_298(val, _values, result); end + + # reduce 298 omitted + # + # source://parser//lib/parser/ruby31.rb#10078 def _reduce_299(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8451 def _reduce_3(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8626 + def _reduce_30(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10084 def _reduce_300(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10090 def _reduce_301(val, _values, result); end - def _reduce_302(val, _values, result); end - def _reduce_303(val, _values, result); end - def _reduce_304(val, _values, result); end - def _reduce_305(val, _values, result); end - def _reduce_306(val, _values, result); end - def _reduce_307(val, _values, result); end - def _reduce_308(val, _values, result); end - def _reduce_309(val, _values, result); end - def _reduce_31(val, _values, result); end - def _reduce_311(val, _values, result); end + + # reduce 311 omitted + # + # source://parser//lib/parser/ruby31.rb#10116 def _reduce_312(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10122 def _reduce_313(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10128 def _reduce_314(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10136 def _reduce_315(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10142 def _reduce_316(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10148 def _reduce_317(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10154 def _reduce_318(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10160 def _reduce_319(val, _values, result); end + + # reduce 31 omitted + # + # source://parser//lib/parser/ruby31.rb#8634 def _reduce_32(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10166 def _reduce_320(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10172 def _reduce_321(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10178 def _reduce_322(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10184 def _reduce_323(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10190 def _reduce_324(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10196 def _reduce_325(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10202 def _reduce_326(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10208 def _reduce_327(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10214 def _reduce_328(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10220 def _reduce_329(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8640 def _reduce_33(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10228 def _reduce_330(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10234 def _reduce_331(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10240 def _reduce_332(val, _values, result); end - def _reduce_333(val, _values, result); end + + # reduce 333 omitted + # + # source://parser//lib/parser/ruby31.rb#10252 def _reduce_334(val, _values, result); end - def _reduce_335(val, _values, result); end + + # reduce 335 omitted + # + # source://parser//lib/parser/ruby31.rb#10262 + def _reduce_336(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10271 def _reduce_337(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10280 def _reduce_338(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10286 def _reduce_339(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8647 + def _reduce_34(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10292 def _reduce_340(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10302 + def _reduce_341(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10312 + def _reduce_342(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10322 def _reduce_343(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10328 + def _reduce_344(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10335 + def _reduce_345(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10351 + def _reduce_346(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10359 def _reduce_347(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10371 + def _reduce_348(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10378 def _reduce_349(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8658 def _reduce_35(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10392 + def _reduce_350(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10404 + def _reduce_351(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10416 def _reduce_352(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10422 def _reduce_353(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10428 def _reduce_354(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10434 def _reduce_355(val, _values, result); end + + # reduce 356 omitted + # + # source://parser//lib/parser/ruby31.rb#10442 def _reduce_357(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10448 def _reduce_358(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10454 def _reduce_359(val, _values, result); end - def _reduce_36(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10461 def _reduce_360(val, _values, result); end - def _reduce_361(val, _values, result); end - def _reduce_362(val, _values, result); end + + # reduce 362 omitted + # + # source://parser//lib/parser/ruby31.rb#10473 def _reduce_363(val, _values, result); end - def _reduce_364(val, _values, result); end - def _reduce_365(val, _values, result); end - def _reduce_366(val, _values, result); end + + # reduce 366 omitted + # + # source://parser//lib/parser/ruby31.rb#10485 def _reduce_367(val, _values, result); end - def _reduce_368(val, _values, result); end + + # reduce 368 omitted + # + # source://parser//lib/parser/ruby31.rb#10498 def _reduce_369(val, _values, result); end + + # reduce 36 omitted + # + # source://parser//lib/parser/ruby31.rb#8666 def _reduce_37(val, _values, result); end - def _reduce_370(val, _values, result); end - def _reduce_371(val, _values, result); end + + # reduce 371 omitted + # + # source://parser//lib/parser/ruby31.rb#10508 def _reduce_372(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10514 def _reduce_373(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10520 def _reduce_374(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10526 def _reduce_375(val, _values, result); end + + # reduce 376 omitted + # + # source://parser//lib/parser/ruby31.rb#10534 def _reduce_377(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10541 def _reduce_378(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10549 def _reduce_379(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8672 def _reduce_38(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10555 def _reduce_380(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10561 def _reduce_381(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10567 def _reduce_382(val, _values, result); end - def _reduce_383(val, _values, result); end - def _reduce_384(val, _values, result); end + + # reduce 384 omitted + # + # source://parser//lib/parser/ruby31.rb#10577 + def _reduce_385(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10583 def _reduce_386(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10589 def _reduce_387(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10595 def _reduce_388(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10601 def _reduce_389(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8678 def _reduce_39(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10607 def _reduce_390(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10613 def _reduce_391(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10619 def _reduce_392(val, _values, result); end - def _reduce_393(val, _values, result); end + + # reduce 393 omitted + # + # source://parser//lib/parser/ruby31.rb#10627 def _reduce_394(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10636 def _reduce_395(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10646 + def _reduce_396(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10654 def _reduce_397(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10663 def _reduce_398(val, _values, result); end - def _reduce_399(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8457 def _reduce_4(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8687 def _reduce_40(val, _values, result); end + + # reduce 399 omitted + # + # source://parser//lib/parser/ruby31.rb#10673 def _reduce_400(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10682 def _reduce_401(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10692 def _reduce_402(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10700 def _reduce_403(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10709 def _reduce_404(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10716 def _reduce_405(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10724 def _reduce_406(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10731 def _reduce_407(val, _values, result); end - def _reduce_408(val, _values, result); end + + # reduce 408 omitted + # + # source://parser//lib/parser/ruby31.rb#10741 def _reduce_409(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8696 def _reduce_41(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10747 def _reduce_410(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10753 def _reduce_411(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10762 def _reduce_412(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10771 def _reduce_413(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10777 def _reduce_414(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10783 def _reduce_415(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10789 def _reduce_416(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10795 def _reduce_417(val, _values, result); end - def _reduce_418(val, _values, result); end + + # reduce 418 omitted + # + # source://parser//lib/parser/ruby31.rb#10804 def _reduce_419(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8705 def _reduce_42(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10813 def _reduce_420(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10819 def _reduce_421(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10835 def _reduce_422(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10843 def _reduce_423(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10853 def _reduce_424(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10860 def _reduce_425(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10867 def _reduce_426(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10874 def _reduce_427(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10881 def _reduce_428(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10888 def _reduce_429(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8713 + def _reduce_43(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10895 def _reduce_430(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10903 def _reduce_431(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10911 + def _reduce_432(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10923 def _reduce_433(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10934 def _reduce_434(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10942 def _reduce_435(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10950 + def _reduce_436(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10958 + def _reduce_437(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10964 def _reduce_438(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10972 + def _reduce_439(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8722 def _reduce_44(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10980 def _reduce_440(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10988 + def _reduce_441(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10994 + def _reduce_442(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11000 + def _reduce_443(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11007 + def _reduce_444(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11014 def _reduce_445(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11021 def _reduce_446(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11028 def _reduce_447(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11035 def _reduce_448(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11045 def _reduce_449(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8736 + def _reduce_45(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11052 def _reduce_450(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11058 def _reduce_451(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11069 def _reduce_452(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11076 def _reduce_453(val, _values, result); end - def _reduce_454(val, _values, result); end + + # reduce 454 omitted + # + # source://parser//lib/parser/ruby31.rb#11084 def _reduce_455(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11096 def _reduce_456(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11104 def _reduce_457(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11111 def _reduce_458(val, _values, result); end - def _reduce_459(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8756 + def _reduce_46(val, _values, result); end + + # reduce 459 omitted + # + # source://parser//lib/parser/ruby31.rb#11119 def _reduce_460(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11125 def _reduce_461(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11131 def _reduce_462(val, _values, result); end - def _reduce_463(val, _values, result); end + + # reduce 463 omitted + # + # source://parser//lib/parser/ruby31.rb#11139 def _reduce_464(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11149 def _reduce_465(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11155 def _reduce_466(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11161 def _reduce_467(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11167 def _reduce_468(val, _values, result); end - def _reduce_469(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8770 def _reduce_47(val, _values, result); end + + # reduce 469 omitted + # + # source://parser//lib/parser/ruby31.rb#11175 def _reduce_470(val, _values, result); end - def _reduce_471(val, _values, result); end + + # reduce 471 omitted + # + # source://parser//lib/parser/ruby31.rb#11183 def _reduce_472(val, _values, result); end - def _reduce_473(val, _values, result); end + + # reduce 473 omitted + # + # source://parser//lib/parser/ruby31.rb#11191 def _reduce_474(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11198 def _reduce_475(val, _values, result); end - def _reduce_476(val, _values, result); end - def _reduce_477(val, _values, result); end + + # reduce 477 omitted + # + # source://parser//lib/parser/ruby31.rb#11209 def _reduce_478(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11217 def _reduce_479(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8790 def _reduce_48(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11225 + def _reduce_480(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11233 def _reduce_481(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11240 def _reduce_482(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11248 def _reduce_483(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11256 def _reduce_484(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11264 def _reduce_485(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11271 def _reduce_486(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11277 def _reduce_487(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11283 def _reduce_488(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11289 def _reduce_489(val, _values, result); end - def _reduce_49(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11297 def _reduce_490(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11305 def _reduce_491(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11311 def _reduce_492(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11317 def _reduce_493(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11324 def _reduce_494(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11330 def _reduce_495(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11336 def _reduce_496(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11342 def _reduce_497(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11349 def _reduce_498(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11356 def _reduce_499(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8463 def _reduce_5(val, _values, result); end + + # reduce 49 omitted + # + # source://parser//lib/parser/ruby31.rb#8798 def _reduce_50(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11362 def _reduce_500(val, _values, result); end - def _reduce_501(val, _values, result); end + + # reduce 501 omitted + # + # source://parser//lib/parser/ruby31.rb#11370 def _reduce_502(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11380 def _reduce_503(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11390 def _reduce_504(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11396 def _reduce_505(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11402 def _reduce_506(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11408 def _reduce_507(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11414 def _reduce_508(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11420 def _reduce_509(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11426 def _reduce_510(val, _values, result); end - def _reduce_511(val, _values, result); end + + # reduce 511 omitted + # + # source://parser//lib/parser/ruby31.rb#11434 def _reduce_512(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11440 def _reduce_513(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11446 def _reduce_514(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11452 def _reduce_515(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11458 def _reduce_516(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11464 def _reduce_517(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11470 def _reduce_518(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11476 def _reduce_519(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11482 def _reduce_520(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11488 def _reduce_521(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11494 def _reduce_522(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11500 def _reduce_523(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11506 def _reduce_524(val, _values, result); end - def _reduce_525(val, _values, result); end - def _reduce_526(val, _values, result); end - def _reduce_527(val, _values, result); end + + # reduce 527 omitted + # + # source://parser//lib/parser/ruby31.rb#11518 def _reduce_528(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11524 def _reduce_529(val, _values, result); end + + # reduce 52 omitted + # + # source://parser//lib/parser/ruby31.rb#8812 def _reduce_53(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11530 def _reduce_530(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11536 def _reduce_531(val, _values, result); end - def _reduce_532(val, _values, result); end - def _reduce_533(val, _values, result); end - def _reduce_534(val, _values, result); end + + # reduce 534 omitted + # + # source://parser//lib/parser/ruby31.rb#11548 def _reduce_535(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11554 def _reduce_536(val, _values, result); end - def _reduce_537(val, _values, result); end - def _reduce_539(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8818 def _reduce_54(val, _values, result); end - def _reduce_540(val, _values, result); end - def _reduce_541(val, _values, result); end - def _reduce_542(val, _values, result); end - def _reduce_543(val, _values, result); end - def _reduce_544(val, _values, result); end + + # reduce 544 omitted + # + # source://parser//lib/parser/ruby31.rb#11576 def _reduce_545(val, _values, result); end - def _reduce_546(val, _values, result); end + + # reduce 546 omitted + # + # source://parser//lib/parser/ruby31.rb#11584 def _reduce_547(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11590 def _reduce_548(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11602 def _reduce_549(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8824 + def _reduce_55(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11609 def _reduce_550(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11616 def _reduce_551(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11622 def _reduce_552(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11628 def _reduce_553(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11634 + def _reduce_554(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11649 + def _reduce_555(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11655 def _reduce_556(val, _values, result); end - def _reduce_557(val, _values, result); end - def _reduce_558(val, _values, result); end + + # reduce 558 omitted + # + # source://parser//lib/parser/ruby31.rb#11665 def _reduce_559(val, _values, result); end - def _reduce_560(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8830 + def _reduce_56(val, _values, result); end + + # reduce 560 omitted + # + # source://parser//lib/parser/ruby31.rb#11673 def _reduce_561(val, _values, result); end - def _reduce_562(val, _values, result); end - def _reduce_563(val, _values, result); end + + # reduce 564 omitted + # + # source://parser//lib/parser/ruby31.rb#11685 + def _reduce_565(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11691 def _reduce_566(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11697 def _reduce_567(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11703 + def _reduce_568(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11710 + def _reduce_569(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8836 + def _reduce_57(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11717 def _reduce_570(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11723 def _reduce_571(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11730 def _reduce_572(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11737 + def _reduce_573(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11743 def _reduce_574(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11749 def _reduce_575(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11755 + def _reduce_576(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11761 def _reduce_577(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11767 def _reduce_578(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11773 def _reduce_579(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8848 def _reduce_58(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11779 def _reduce_580(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11785 def _reduce_581(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11791 def _reduce_582(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11797 + def _reduce_583(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11803 + def _reduce_584(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11809 + def _reduce_585(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11815 + def _reduce_586(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11821 + def _reduce_587(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11827 + def _reduce_588(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11833 + def _reduce_589(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8857 def _reduce_59(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11839 + def _reduce_590(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11845 + def _reduce_591(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11851 + def _reduce_592(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11857 + def _reduce_593(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11863 + def _reduce_594(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11869 def _reduce_595(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11876 def _reduce_596(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11885 + def _reduce_597(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11891 + def _reduce_598(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11897 + def _reduce_599(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8469 def _reduce_6(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8869 def _reduce_60(val, _values, result); end - def _reduce_601(val, _values, result); end - def _reduce_602(val, _values, result); end + + # reduce 602 omitted + # + # source://parser//lib/parser/ruby31.rb#11909 + def _reduce_603(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11916 + def _reduce_604(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11923 + def _reduce_605(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11929 def _reduce_606(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11940 + def _reduce_607(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11947 + def _reduce_608(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11954 + def _reduce_609(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11961 def _reduce_610(val, _values, result); end - def _reduce_62(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11968 + def _reduce_611(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11974 + def _reduce_612(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11980 + def _reduce_613(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11986 + def _reduce_614(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11992 + def _reduce_615(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11998 + def _reduce_616(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12004 + def _reduce_617(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12010 + def _reduce_618(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12016 + def _reduce_619(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12022 + def _reduce_620(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12028 + def _reduce_621(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12034 + def _reduce_622(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12040 + def _reduce_623(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12046 + def _reduce_624(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12052 + def _reduce_625(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12058 + def _reduce_626(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12064 + def _reduce_627(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12070 + def _reduce_628(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12076 + def _reduce_629(val, _values, result); end + + # reduce 62 omitted + # + # source://parser//lib/parser/ruby31.rb#8882 def _reduce_63(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12082 + def _reduce_630(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12088 + def _reduce_631(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12094 + def _reduce_632(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12100 + def _reduce_633(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12106 + def _reduce_634(val, _values, result); end + + # reduce 635 omitted + # + # source://parser//lib/parser/ruby31.rb#12114 + def _reduce_636(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12121 + def _reduce_637(val, _values, result); end + + # reduce 638 omitted + # + # source://parser//lib/parser/ruby31.rb#12132 + def _reduce_639(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8888 def _reduce_64(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12140 + def _reduce_640(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12148 + def _reduce_641(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12154 + def _reduce_642(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12160 + def _reduce_643(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12166 + def _reduce_644(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12172 + def _reduce_645(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12179 + def _reduce_646(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12185 + def _reduce_647(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12191 + def _reduce_648(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12200 + def _reduce_649(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8895 def _reduce_65(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12210 + def _reduce_650(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12218 + def _reduce_651(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12227 + def _reduce_652(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12235 + def _reduce_653(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12244 + def _reduce_654(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12251 + def _reduce_655(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12259 + def _reduce_656(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12268 + def _reduce_657(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12275 + def _reduce_658(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12283 + def _reduce_659(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8905 def _reduce_66(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12290 + def _reduce_660(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12298 + def _reduce_661(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12304 + def _reduce_662(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12310 + def _reduce_663(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12316 + def _reduce_664(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12322 + def _reduce_665(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12328 + def _reduce_666(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12334 + def _reduce_667(val, _values, result); end + + # reduce 668 omitted + # + # source://parser//lib/parser/ruby31.rb#12342 + def _reduce_669(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8911 def _reduce_67(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12352 + def _reduce_670(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12359 + def _reduce_671(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12366 + def _reduce_672(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12372 + def _reduce_673(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12378 + def _reduce_674(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12384 + def _reduce_675(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12399 + def _reduce_676(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12407 + def _reduce_677(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12415 + def _reduce_678(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12422 + def _reduce_679(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8918 def _reduce_68(val, _values, result); end - def _reduce_69(val, _values, result); end - def _reduce_70(val, _values, result); end - def _reduce_71(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12429 + def _reduce_680(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12435 + def _reduce_681(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12441 + def _reduce_682(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12447 + def _reduce_683(val, _values, result); end + + # reduce 685 omitted + # + # source://parser//lib/parser/ruby31.rb#12457 + def _reduce_686(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12463 + def _reduce_687(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12471 + def _reduce_688(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12477 + def _reduce_689(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12485 + def _reduce_690(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12493 + def _reduce_691(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12499 + def _reduce_692(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12505 + def _reduce_693(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12511 + def _reduce_694(val, _values, result); end + + # reduce 696 omitted + # + # source://parser//lib/parser/ruby31.rb#12521 + def _reduce_697(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12529 + def _reduce_698(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8475 + def _reduce_7(val, _values, result); end + + # reduce 700 omitted + # + # source://parser//lib/parser/ruby31.rb#12539 + def _reduce_701(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12547 + def _reduce_702(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12555 + def _reduce_703(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12561 + def _reduce_704(val, _values, result); end + + # reduce 705 omitted + # + # source://parser//lib/parser/ruby31.rb#12569 + def _reduce_706(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12575 + def _reduce_707(val, _values, result); end + + # reduce 708 omitted + # + # source://parser//lib/parser/ruby31.rb#12583 + def _reduce_709(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12589 + def _reduce_710(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12595 + def _reduce_711(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12601 + def _reduce_712(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12607 + def _reduce_713(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12613 + def _reduce_714(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12619 + def _reduce_715(val, _values, result); end + + # reduce 71 omitted + # + # source://parser//lib/parser/ruby31.rb#8930 def _reduce_72(val, _values, result); end + + # reduce 727 omitted + # + # source://parser//lib/parser/ruby31.rb#12649 + def _reduce_728(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12655 + def _reduce_729(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8937 def _reduce_73(val, _values, result); end + + # reduce 733 omitted + # + # source://parser//lib/parser/ruby31.rb#12669 + def _reduce_734(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12675 + def _reduce_735(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12681 + def _reduce_736(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8944 def _reduce_74(val, _values, result); end - def _reduce_75(val, _values, result); end + + # reduce 739 omitted + # + # source://parser//lib/parser/ruby31.rb#12693 + def _reduce_740(val, _values, result); end + + # reduce 743 omitted + # + # source://parser//lib/parser/ruby31.rb#12705 + def _reduce_744(val, _values, result); end + + # reduce 75 omitted + # + # source://parser//lib/parser/ruby31.rb#8953 def _reduce_76(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8960 + def _reduce_77(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8971 def _reduce_78(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8978 def _reduce_79(val, _values, result); end - def _reduce_8(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8989 def _reduce_80(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8996 def _reduce_81(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9007 def _reduce_82(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9014 def _reduce_83(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9021 def _reduce_84(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9028 def _reduce_85(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9035 def _reduce_86(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9042 + def _reduce_87(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9048 def _reduce_88(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9054 def _reduce_89(val, _values, result); end + + # reduce 8 omitted + # + # source://parser//lib/parser/ruby31.rb#8483 def _reduce_9(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9060 def _reduce_90(val, _values, result); end - def _reduce_91(val, _values, result); end + + # reduce 91 omitted + # + # source://parser//lib/parser/ruby31.rb#9068 def _reduce_92(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9075 def _reduce_93(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9082 def _reduce_94(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9090 def _reduce_95(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9097 def _reduce_96(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9105 def _reduce_97(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9111 def _reduce_98(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9118 def _reduce_99(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12711 def _reduce_none(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#21 def default_encoding; end + + # source://parser//lib/parser/ruby31.rb#25 + def endless_method_name(name_t); end + + # source://parser//lib/parser/ruby31.rb#38 def local_pop; end + + # source://parser//lib/parser/ruby31.rb#31 def local_push; end + + # source://parser//lib/parser/ruby31.rb#45 + def try_declare_numparam(node); end + + # source://parser//lib/parser/ruby31.rb#17 def version; end end -Parser::Ruby26::Racc_arg = T.let(T.unsafe(nil), Array) -Parser::Ruby26::Racc_token_to_s_table = T.let(T.unsafe(nil), Array) +# source://parser//lib/parser/ruby31.rb#8022 +Parser::Ruby31::Racc_arg = T.let(T.unsafe(nil), Array) + +# source://parser//lib/parser/ruby31.rb#8429 +Parser::Ruby31::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) + +# source://parser//lib/parser/ruby31.rb#8039 +Parser::Ruby31::Racc_token_to_s_table = T.let(T.unsafe(nil), Array) + +# @api public +# +# source://parser//lib/parser.rb#30 module Parser::Source; end +# A buffer with source code. {Buffer} contains the source code itself, +# associated location information (name and first line), and takes care +# of encoding. +# +# A source buffer is immutable once populated. +# +# @api public +# +# source://parser//lib/parser/source/buffer.rb#25 class Parser::Source::Buffer + # @api public + # @return [Buffer] a new instance of Buffer + # + # source://parser//lib/parser/source/buffer.rb#105 def initialize(name, first_line = T.unsafe(nil), source: T.unsafe(nil)); end + # Convert a character index into the source to a column number. + # + # @api private + # @param position [Integer] + # @return [Integer] column + # + # source://parser//lib/parser/source/buffer.rb#242 def column_for_position(position); end + + # Convert a character index into the source to a `[line, column]` tuple. + # + # @api public + # @param position [Integer] + # @return [[Integer, Integer]] `[line, column]` + # + # source://parser//lib/parser/source/buffer.rb#217 def decompose_position(position); end + + # First line of the buffer, 1 by default. + # + # @api public + # @return [Integer] first line + # + # source://parser//lib/parser/source/buffer.rb#26 def first_line; end + + # @api public + # + # source://parser//lib/parser/source/buffer.rb#312 def freeze; end + + # @api public + # + # source://parser//lib/parser/source/buffer.rb#318 def inspect; end + + # Number of last line in the buffer + # + # @api public + # @return [Integer] + # + # source://parser//lib/parser/source/buffer.rb#307 def last_line; end + + # Convert a character index into the source to a line number. + # + # @api private + # @param position [Integer] + # @return [Integer] line + # + # source://parser//lib/parser/source/buffer.rb#231 def line_for_position(position); end + + # Extract line `lineno` as a new `Range`, taking `first_line` into account. + # + # @api public + # @param lineno [Integer] + # @raise [IndexError] if `lineno` is out of bounds + # @return [Range] + # + # source://parser//lib/parser/source/buffer.rb#284 def line_range(lineno); end + + # Buffer name. If the buffer was created from a file, the name corresponds + # to relative path to the file. + # + # @api public + # @return [String] buffer name + # + # source://parser//lib/parser/source/buffer.rb#26 def name; end + + # Populate this buffer from a string without encoding autodetection. + # + # @api public + # @param input [String] + # @raise [ArgumentError] if already populated + # @return [String] + # + # source://parser//lib/parser/source/buffer.rb#180 def raw_source=(input); end + + # Populate this buffer from correspondingly named file. + # + # @api public + # @example + # Parser::Source::Buffer.new('foo/bar.rb').read + # @raise [ArgumentError] if already populated + # @return [Buffer] self + # + # source://parser//lib/parser/source/buffer.rb#131 def read; end + + # @api public + # + # source://parser//lib/parser/source/buffer.rb#194 def slice(start, length = T.unsafe(nil)); end + + # Source code contained in this buffer. + # + # @api public + # @raise [RuntimeError] if buffer is not populated yet + # @return [String] source code + # + # source://parser//lib/parser/source/buffer.rb#145 def source; end + + # Populate this buffer from a string with encoding autodetection. + # `input` is mutated if not frozen. + # + # @api public + # @param input [String] + # @raise [ArgumentError] if already populated + # @raise [EncodingError] if `input` includes invalid byte sequence for the encoding + # @return [String] + # + # source://parser//lib/parser/source/buffer.rb#162 def source=(input); end + + # Extract line `lineno` from source, taking `first_line` into account. + # + # @api public + # @param lineno [Integer] + # @raise [IndexError] if `lineno` is out of bounds + # @return [String] + # + # source://parser//lib/parser/source/buffer.rb#273 def source_line(lineno); end + + # Return an `Array` of source code lines. + # + # @api public + # @return [Array] + # + # source://parser//lib/parser/source/buffer.rb#252 def source_lines; end + + # @api public + # @return [Range] A range covering the whole source + # + # source://parser//lib/parser/source/buffer.rb#298 def source_range; end private + # @api public + # + # source://parser//lib/parser/source/buffer.rb#348 def bsearch(line_begins, position); end + + # @api public + # + # source://parser//lib/parser/source/buffer.rb#325 def line_begins; end + + # @api public + # + # source://parser//lib/parser/source/buffer.rb#339 def line_index_for_position(position); end class << self + # Try to recognize encoding of `string` as Ruby would, i.e. by looking for + # magic encoding comment or UTF-8 BOM. `string` can be in any encoding. + # + # @api public + # @param string [String] + # @return [String, nil] encoding name, if recognized + # + # source://parser//lib/parser/source/buffer.rb#51 def recognize_encoding(string); end + + # Recognize encoding of `input` and process it so it could be lexed. + # + # * If `input` does not contain BOM or magic encoding comment, it is + # kept in the original encoding. + # * If the detected encoding is binary, `input` is kept in binary. + # * Otherwise, `input` is re-encoded into UTF-8 and returned as a + # new string. + # + # This method mutates the encoding of `input`, but not its content. + # + # @api public + # @param input [String] + # @raise [EncodingError] + # @return [String] + # + # source://parser//lib/parser/source/buffer.rb#90 def reencode_string(input); end end end +# @api private +# +# source://parser//lib/parser/source/buffer.rb#31 Parser::Source::Buffer::ENCODING_RE = T.let(T.unsafe(nil), Regexp) +# A comment in the source code. +# +# @api public +# +# source://parser//lib/parser/source/comment.rb#17 class Parser::Source::Comment - include ::RuboCop::Ext::Comment - + # @api public + # @param range [Parser::Source::Range] + # @return [Comment] a new instance of Comment + # + # source://parser//lib/parser/source/comment.rb#67 def initialize(range); end + # Compares comments. Two comments are equal if they + # correspond to the same source range. + # + # @api public + # @param other [Object] + # @return [Boolean] + # + # source://parser//lib/parser/source/comment.rb#120 def ==(other); end + + # @api public + # @return [Boolean] true if this is a block comment. + # @see #type + # + # source://parser//lib/parser/source/comment.rb#109 def document?; end + + # @api public + # @return [Boolean] true if this is an inline comment. + # @see #type + # + # source://parser//lib/parser/source/comment.rb#101 def inline?; end + + # @api public + # @return [String] a human-readable representation of this comment + # + # source://parser//lib/parser/source/comment.rb#128 def inspect; end + + # @api public + # @return [Parser::Source::Range] + # + # source://parser//lib/parser/source/comment.rb#20 def loc; end + + # @api public + # @return [Parser::Source::Range] + # + # source://parser//lib/parser/source/comment.rb#20 def location; end + + # @api public + # @return [String] + # + # source://parser//lib/parser/source/comment.rb#18 def text; end + + # Type of this comment. + # + # * Inline comments correspond to `:inline`: + # + # # whatever + # + # * Block comments correspond to `:document`: + # + # =begin + # hi i am a document + # =end + # + # @api public + # @return [Symbol] + # + # source://parser//lib/parser/source/comment.rb#89 def type; end class << self + # Associate `comments` with `ast` nodes by their corresponding node. + # + # @api public + # @deprecated Use {associate_locations}. + # @param ast [Parser::AST::Node] + # @param comments [Array] + # @return [Hash>] + # @see Parser::Source::Comment::Associator#associate + # + # source://parser//lib/parser/source/comment.rb#32 def associate(ast, comments); end + + # Associate `comments` with `ast` nodes using identity. + # + # @api public + # @param ast [Parser::AST::Node] + # @param comments [Array] + # @return [Hash>] + # @see Parser::Source::Comment::Associator#associate_by_identity + # + # source://parser//lib/parser/source/comment.rb#59 def associate_by_identity(ast, comments); end + + # Associate `comments` with `ast` nodes by their location in the + # source. + # + # @api public + # @param ast [Parser::AST::Node] + # @param comments [Array] + # @return [Hash>] + # @see Parser::Source::Comment::Associator#associate_locations + # + # source://parser//lib/parser/source/comment.rb#46 def associate_locations(ast, comments); end end end +# source://parser//lib/parser/source/comment/associator.rb#45 class Parser::Source::Comment::Associator + # source://parser//lib/parser/source/comment/associator.rb#51 def initialize(ast, comments); end + # source://parser//lib/parser/source/comment/associator.rb#92 def associate; end + + # source://parser//lib/parser/source/comment/associator.rb#115 def associate_by_identity; end + + # source://parser//lib/parser/source/comment/associator.rb#104 def associate_locations; end + + # source://parser//lib/parser/source/comment/associator.rb#46 def skip_directives; end + + # source://parser//lib/parser/source/comment/associator.rb#46 def skip_directives=(_arg0); end private + # source://parser//lib/parser/source/comment/associator.rb#182 def advance_comment; end + + # source://parser//lib/parser/source/comment/associator.rb#214 def advance_through_directives; end + + # source://parser//lib/parser/source/comment/associator.rb#206 def associate_and_advance_comment(node); end + + # source://parser//lib/parser/source/comment/associator.rb#123 def children_in_source_order(node); end + + # source://parser//lib/parser/source/comment/associator.rb#187 def current_comment_before?(node); end + + # source://parser//lib/parser/source/comment/associator.rb#194 def current_comment_before_end?(node); end + + # source://parser//lib/parser/source/comment/associator.rb#201 def current_comment_decorates?(node); end + + # source://parser//lib/parser/source/comment/associator.rb#135 def do_associate; end + + # source://parser//lib/parser/source/comment/associator.rb#166 def process_leading_comments(node); end + + # source://parser//lib/parser/source/comment/associator.rb#173 def process_trailing_comments(node); end + + # source://parser//lib/parser/source/comment/associator.rb#148 def visit(node); end end +# source://parser//lib/parser/source/comment/associator.rb#212 Parser::Source::Comment::Associator::MAGIC_COMMENT_RE = T.let(T.unsafe(nil), Regexp) + +# source://parser//lib/parser/source/comment/associator.rb#122 Parser::Source::Comment::Associator::POSTFIX_TYPES = T.let(T.unsafe(nil), Set) +# {Map} relates AST nodes to the source code they were parsed from. +# More specifically, a {Map} or its subclass contains a set of ranges: +# +# * `expression`: smallest range which includes all source corresponding +# to the node and all `expression` ranges of its children. +# * other ranges (`begin`, `end`, `operator`, ...): node-specific ranges +# pointing to various interesting tokens corresponding to the node. +# +# Note that the {Map::Heredoc} map is the only one whose `expression` does +# not include other ranges. It only covers the heredoc marker (`< 2]').children[0].loc +# # => > +# +# The {file:doc/AST_FORMAT.md} document describes how ranges associated to source +# code tokens. For example, the entry +# +# (array (int 1) (int 2)) +# +# "[1, 2]" +# ^ begin +# ^ end +# ~~~~~~ expression +# +# means that if `node` is an {Parser::AST::Node} `(array (int 1) (int 2))`, +# then `node.loc` responds to `begin`, `end` and `expression`, and +# `node.loc.begin` returns a range pointing at the opening bracket, and so on. +# +# If you want to write code polymorphic by the source map (i.e. accepting +# several subclasses of {Map}), use `respond_to?` instead of `is_a?` to +# check whether the map features the range you need. Concrete {Map} +# subclasses may not be preserved between versions, but their interfaces +# will be kept compatible. +# +# You can visualize the source maps with `ruby-parse -E` command-line tool. +# +# @api public +# @example +# require 'parser/current' +# +# p Parser::CurrentRuby.parse('[1, 2]').loc +# # => #, +# # @begin=#, +# # @expression=#> +# +# source://parser//lib/parser/source/map.rb#70 class Parser::Source::Map + # @api public + # @param expression [Range] + # @return [Map] a new instance of Map + # + # source://parser//lib/parser/source/map.rb#76 def initialize(expression); end + # Compares source maps. + # + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/map.rb#140 def ==(other); end + + # A shortcut for `self.expression.column`. + # + # @api public + # @return [Integer] + # + # source://parser//lib/parser/source/map.rb#109 def column; end + + # @api public + # @return [Range] + # + # source://parser//lib/parser/source/map.rb#72 def expression; end + + # A shortcut for `self.expression.line`. + # + # @api public + # @return [Integer] + # + # source://parser//lib/parser/source/map.rb#99 def first_line; end + + # A shortcut for `self.expression.last_column`. + # + # @api public + # @return [Integer] + # + # source://parser//lib/parser/source/map.rb#125 def last_column; end + + # A shortcut for `self.expression.last_line`. + # + # @api public + # @return [Integer] + # + # source://parser//lib/parser/source/map.rb#117 def last_line; end + + # A shortcut for `self.expression.line`. + # + # @api public + # @return [Integer] + # + # source://parser//lib/parser/source/map.rb#99 def line; end + + # The node that is described by this map. Nodes and maps have 1:1 correspondence. + # + # @api public + # @return [Parser::AST::Node] + # + # source://parser//lib/parser/source/map.rb#71 def node; end + + # @api private + # + # source://parser//lib/parser/source/map.rb#89 def node=(node); end + + # Converts this source map to a hash with keys corresponding to + # ranges. For example, if called on an instance of {Collection}, + # which adds the `begin` and `end` ranges, the resulting hash + # will contain keys `:expression`, `:begin` and `:end`. + # + # @api public + # @example + # require 'parser/current' + # + # p Parser::CurrentRuby.parse('[1, 2]').loc.to_hash + # # => { + # # :begin => #, + # # :end => #, + # # :expression => # + # # } + # @return [Hash] + # + # source://parser//lib/parser/source/map.rb#166 def to_hash; end + + # @api private + # + # source://parser//lib/parser/source/map.rb#132 def with_expression(expression_l); end protected + # @api public + # + # source://parser//lib/parser/source/map.rb#180 def update_expression(expression_l); end + + # @api public + # + # source://parser//lib/parser/source/map.rb#176 def with(&block); end private + # @api private + # + # source://parser//lib/parser/source/map.rb#82 def initialize_copy(other); end end +# source://parser//lib/parser/source/map/collection.rb#6 class Parser::Source::Map::Collection < ::Parser::Source::Map + # source://parser//lib/parser/source/map/collection.rb#10 def initialize(begin_l, end_l, expression_l); end + # source://parser//lib/parser/source/map/collection.rb#7 def begin; end + + # source://parser//lib/parser/source/map/collection.rb#8 def end; end end +# source://parser//lib/parser/source/map/condition.rb#6 class Parser::Source::Map::Condition < ::Parser::Source::Map + # source://parser//lib/parser/source/map/condition.rb#12 def initialize(keyword_l, begin_l, else_l, end_l, expression_l); end + # source://parser//lib/parser/source/map/condition.rb#8 def begin; end + + # source://parser//lib/parser/source/map/condition.rb#9 def else; end + + # source://parser//lib/parser/source/map/condition.rb#10 def end; end + + # source://parser//lib/parser/source/map/condition.rb#7 def keyword; end end +# source://parser//lib/parser/source/map/constant.rb#6 class Parser::Source::Map::Constant < ::Parser::Source::Map + # source://parser//lib/parser/source/map/constant.rb#11 def initialize(double_colon, name, expression); end + # source://parser//lib/parser/source/map/constant.rb#7 def double_colon; end + + # source://parser//lib/parser/source/map/constant.rb#8 def name; end + + # source://parser//lib/parser/source/map/constant.rb#9 def operator; end + + # source://parser//lib/parser/source/map/constant.rb#20 def with_operator(operator_l); end protected + # source://parser//lib/parser/source/map/constant.rb#26 def update_operator(operator_l); end end +# source://parser//lib/parser/source/map/definition.rb#6 class Parser::Source::Map::Definition < ::Parser::Source::Map + # source://parser//lib/parser/source/map/definition.rb#12 def initialize(keyword_l, operator_l, name_l, end_l); end + # source://parser//lib/parser/source/map/definition.rb#10 def end; end + + # source://parser//lib/parser/source/map/definition.rb#7 def keyword; end + + # source://parser//lib/parser/source/map/definition.rb#9 def name; end + + # source://parser//lib/parser/source/map/definition.rb#8 def operator; end end +# source://parser//lib/parser/source/map/for.rb#6 class Parser::Source::Map::For < ::Parser::Source::Map + # source://parser//lib/parser/source/map/for.rb#10 def initialize(keyword_l, in_l, begin_l, end_l, expression_l); end + # source://parser//lib/parser/source/map/for.rb#8 def begin; end + + # source://parser//lib/parser/source/map/for.rb#8 def end; end + + # source://parser//lib/parser/source/map/for.rb#7 def in; end + + # source://parser//lib/parser/source/map/for.rb#7 def keyword; end end +# source://parser//lib/parser/source/map/heredoc.rb#6 class Parser::Source::Map::Heredoc < ::Parser::Source::Map + # source://parser//lib/parser/source/map/heredoc.rb#10 def initialize(begin_l, body_l, end_l); end + # source://parser//lib/parser/source/map/heredoc.rb#7 def heredoc_body; end + + # source://parser//lib/parser/source/map/heredoc.rb#8 def heredoc_end; end end +# source://parser//lib/parser/source/map/index.rb#6 class Parser::Source::Map::Index < ::Parser::Source::Map + # source://parser//lib/parser/source/map/index.rb#11 def initialize(begin_l, end_l, expression_l); end + # source://parser//lib/parser/source/map/index.rb#7 def begin; end + + # source://parser//lib/parser/source/map/index.rb#8 def end; end + + # source://parser//lib/parser/source/map/index.rb#9 def operator; end + + # source://parser//lib/parser/source/map/index.rb#21 def with_operator(operator_l); end protected + # source://parser//lib/parser/source/map/index.rb#27 def update_operator(operator_l); end end +# source://parser//lib/parser/source/map/keyword.rb#6 class Parser::Source::Map::Keyword < ::Parser::Source::Map + # source://parser//lib/parser/source/map/keyword.rb#11 def initialize(keyword_l, begin_l, end_l, expression_l); end + # source://parser//lib/parser/source/map/keyword.rb#8 def begin; end + + # source://parser//lib/parser/source/map/keyword.rb#9 def end; end + + # source://parser//lib/parser/source/map/keyword.rb#7 def keyword; end end +# source://parser//lib/parser/source/map/method_definition.rb#6 class Parser::Source::Map::MethodDefinition < ::Parser::Source::Map + # source://parser//lib/parser/source/map/method_definition.rb#13 def initialize(keyword_l, operator_l, name_l, end_l, assignment_l, body_l); end + # source://parser//lib/parser/source/map/method_definition.rb#11 def assignment; end + + # source://parser//lib/parser/source/map/method_definition.rb#10 def end; end + + # source://parser//lib/parser/source/map/method_definition.rb#7 def keyword; end + + # source://parser//lib/parser/source/map/method_definition.rb#9 def name; end + + # source://parser//lib/parser/source/map/method_definition.rb#8 def operator; end end +# source://parser//lib/parser/source/map/objc_kwarg.rb#6 class Parser::Source::Map::ObjcKwarg < ::Parser::Source::Map + # source://parser//lib/parser/source/map/objc_kwarg.rb#11 def initialize(keyword_l, operator_l, argument_l, expression_l); end + # source://parser//lib/parser/source/map/objc_kwarg.rb#9 def argument; end + + # source://parser//lib/parser/source/map/objc_kwarg.rb#7 def keyword; end + + # source://parser//lib/parser/source/map/objc_kwarg.rb#8 def operator; end end +# source://parser//lib/parser/source/map/operator.rb#6 class Parser::Source::Map::Operator < ::Parser::Source::Map + # source://parser//lib/parser/source/map/operator.rb#9 def initialize(operator, expression); end + # source://parser//lib/parser/source/map/operator.rb#7 def operator; end end +# source://parser//lib/parser/source/map/rescue_body.rb#6 class Parser::Source::Map::RescueBody < ::Parser::Source::Map + # source://parser//lib/parser/source/map/rescue_body.rb#11 def initialize(keyword_l, assoc_l, begin_l, expression_l); end + # source://parser//lib/parser/source/map/rescue_body.rb#8 def assoc; end + + # source://parser//lib/parser/source/map/rescue_body.rb#9 def begin; end + + # source://parser//lib/parser/source/map/rescue_body.rb#7 def keyword; end end +# source://parser//lib/parser/source/map/send.rb#6 class Parser::Source::Map::Send < ::Parser::Source::Map + # source://parser//lib/parser/source/map/send.rb#13 def initialize(dot_l, selector_l, begin_l, end_l, expression_l); end + # source://parser//lib/parser/source/map/send.rb#10 def begin; end + + # source://parser//lib/parser/source/map/send.rb#7 def dot; end + + # source://parser//lib/parser/source/map/send.rb#11 def end; end + + # source://parser//lib/parser/source/map/send.rb#9 def operator; end + + # source://parser//lib/parser/source/map/send.rb#8 def selector; end + + # source://parser//lib/parser/source/map/send.rb#24 def with_operator(operator_l); end protected + # source://parser//lib/parser/source/map/send.rb#30 def update_operator(operator_l); end end +# source://parser//lib/parser/source/map/ternary.rb#6 class Parser::Source::Map::Ternary < ::Parser::Source::Map + # source://parser//lib/parser/source/map/ternary.rb#10 def initialize(question_l, colon_l, expression_l); end + # source://parser//lib/parser/source/map/ternary.rb#8 def colon; end + + # source://parser//lib/parser/source/map/ternary.rb#7 def question; end end +# source://parser//lib/parser/source/map/variable.rb#6 class Parser::Source::Map::Variable < ::Parser::Source::Map + # source://parser//lib/parser/source/map/variable.rb#10 def initialize(name_l, expression_l = T.unsafe(nil)); end + # source://parser//lib/parser/source/map/variable.rb#7 def name; end + + # source://parser//lib/parser/source/map/variable.rb#8 def operator; end + + # source://parser//lib/parser/source/map/variable.rb#19 def with_operator(operator_l); end protected + # source://parser//lib/parser/source/map/variable.rb#25 def update_operator(operator_l); end end +# A range of characters in a particular source buffer. +# +# The range is always exclusive, i.e. a range with `begin_pos` of 3 and +# `end_pos` of 5 will contain the following characters: +# +# example +# ^^ +# +# @api public +# +# source://parser//lib/parser/source/range.rb#26 class Parser::Source::Range include ::Comparable - include ::RuboCop::AST::Ext::Range - include ::RuboCop::Ext::Range + # @api public + # @param source_buffer [Buffer] + # @param begin_pos [Integer] + # @param end_pos [Integer] + # @return [Range] a new instance of Range + # + # source://parser//lib/parser/source/range.rb#37 def initialize(source_buffer, begin_pos, end_pos); end + # Compare ranges, first by begin_pos, then by end_pos. + # + # @api public + # + # source://parser//lib/parser/source/range.rb#301 def <=>(other); end + + # by the given amount(s) + # + # @api public + # @param Endpoint(s) [Hash] to change, any combination of :begin_pos or :end_pos + # @return [Range] the same range as this range but with the given end point(s) adjusted + # + # source://parser//lib/parser/source/range.rb#193 def adjust(begin_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end + + # @api public + # @return [Range] a zero-length range located just before the beginning + # of this range. + # + # source://parser//lib/parser/source/range.rb#55 def begin; end + + # @api public + # @return [Integer] index of the first character in the range + # + # source://parser//lib/parser/source/range.rb#30 def begin_pos; end + + # @api public + # @return [Integer] zero-based column number of the beginning of this range. + # + # source://parser//lib/parser/source/range.rb#92 def column; end + + # @api public + # @raise RangeError + # @return [::Range] a range of columns spanned by this range. + # + # source://parser//lib/parser/source/range.rb#114 def column_range; end + + # Return `other.contains?(self)` + # + # Two ranges must be one and only one of ==, disjoint?, contains?, contained? or crossing? + # + # @api public + # @param other [Range] + # @return [Boolean] + # + # source://parser//lib/parser/source/range.rb#274 def contained?(other); end + + # Returns true iff this range contains (strictly) `other`. + # + # Two ranges must be one and only one of ==, disjoint?, contains?, contained? or crossing? + # + # @api public + # @param other [Range] + # @return [Boolean] + # + # source://parser//lib/parser/source/range.rb#262 def contains?(other); end + + # Returns true iff both ranges intersect and also have different elements from one another. + # + # Two ranges must be one and only one of ==, disjoint?, contains?, contained? or crossing? + # + # @api public + # @param other [Range] + # @return [Boolean] + # + # source://parser//lib/parser/source/range.rb#286 def crossing?(other); end + + # Return `true` iff this range and `other` are disjoint. + # + # Two ranges must be one and only one of ==, disjoint?, contains?, contained? or crossing? + # + # @api public + # @param other [Range] + # @return [Boolean] + # + # source://parser//lib/parser/source/range.rb#236 def disjoint?(other); end + + # Checks if a range is empty; if it contains no characters + # + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/range.rb#294 def empty?; end + + # @api public + # @return [Range] a zero-length range located just after the end + # of this range. + # + # source://parser//lib/parser/source/range.rb#63 def end; end + + # @api public + # @return [Integer] index of the character after the last character in the range + # + # source://parser//lib/parser/source/range.rb#30 def end_pos; end + + # @api public def eql?(_arg0); end + + # Line number of the beginning of this range. By default, the first line + # of a buffer is 1; as such, line numbers are most commonly one-based. + # + # @api public + # @return [Integer] line number of the beginning of this range. + # @see Buffer + # + # source://parser//lib/parser/source/range.rb#83 def first_line; end + + # Support for Ranges be used in as Hash indices and in Sets. + # + # @api public + # + # source://parser//lib/parser/source/range.rb#313 def hash; end + + # @api public + # @return [String] a human-readable representation of this range. + # + # source://parser//lib/parser/source/range.rb#320 def inspect; end + + # @api public + # @param other [Range] + # @return [Range] overlapping region of this range and `other`, or `nil` + # if they do not overlap + # + # source://parser//lib/parser/source/range.rb#220 def intersect(other); end + + # `is?` provides a concise way to compare the source corresponding to this range. + # For example, `r.source == '(' || r.source == 'begin'` is equivalent to + # `r.is?('(', 'begin')`. + # + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/range.rb#141 def is?(*what); end + + # @api public + # @param other [Range] + # @return [Range] smallest possible range spanning both this range and `other`. + # + # source://parser//lib/parser/source/range.rb#209 def join(other); end + + # @api public + # @return [Integer] zero-based column number of the end of this range. + # + # source://parser//lib/parser/source/range.rb#106 def last_column; end + + # @api public + # @return [Integer] line number of the end of this range. + # + # source://parser//lib/parser/source/range.rb#99 def last_line; end + + # @api public + # @return [Integer] amount of characters included in this range. + # + # source://parser//lib/parser/source/range.rb#70 def length; end + + # Line number of the beginning of this range. By default, the first line + # of a buffer is 1; as such, line numbers are most commonly one-based. + # + # @api public + # @return [Integer] line number of the beginning of this range. + # @see Buffer + # + # source://parser//lib/parser/source/range.rb#83 def line; end + + # Return `true` iff this range is not disjoint from `other`. + # + # @api public + # @param other [Range] + # @return [Boolean] `true` if this range and `other` overlap + # + # source://parser//lib/parser/source/range.rb#250 def overlaps?(other); end + + # @api public + # @param new_size [Integer] + # @return [Range] a range beginning at the same point as this range and length `new_size`. + # + # source://parser//lib/parser/source/range.rb#201 def resize(new_size); end + + # @api public + # @return [Integer] amount of characters included in this range. + # + # source://parser//lib/parser/source/range.rb#70 def size; end + + # @api public + # @return [String] all source code covered by this range. + # + # source://parser//lib/parser/source/range.rb#132 def source; end + + # @api public + # @return [Parser::Source::Buffer] + # + # source://parser//lib/parser/source/range.rb#29 def source_buffer; end + + # @api public + # @return [String] a line of source code containing the beginning of this range. + # + # source://parser//lib/parser/source/range.rb#125 def source_line; end + + # @api public + # @return [Array] a set of character indexes contained in this range. + # + # source://parser//lib/parser/source/range.rb#148 def to_a; end + + # @api public + # @return [Range] a Ruby range with the same `begin_pos` and `end_pos` + # + # source://parser//lib/parser/source/range.rb#155 def to_range; end + + # Composes a GNU/Clang-style string representation of the beginning of this + # range. + # + # For example, for the following range in file `foo.rb`, + # + # def foo + # ^^^ + # + # `to_s` will return `foo.rb:1:5`. + # Note that the column index is one-based. + # + # @api public + # @return [String] + # + # source://parser//lib/parser/source/range.rb#173 def to_s; end + + # to the given value(s). + # + # @api public + # @param Endpoint(s) [Hash] to change, any combination of :begin_pos or :end_pos + # @return [Range] the same range as this range but with the given end point(s) changed + # + # source://parser//lib/parser/source/range.rb#184 def with(begin_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end end +# {Rewriter} is deprecated. Use {TreeRewriter} instead. +# +# TreeRewriter has simplified semantics, and customizable policies +# with regards to clobbering. Please read the documentation. +# +# Keep in mind: +# - Rewriter was discarding the `end_pos` of the given range for `insert_before`, +# and the `begin_pos` for `insert_after`. These are meaningful in TreeRewriter. +# - TreeRewriter's wrap/insert_before/insert_after are multiple by default, while +# Rewriter would raise clobbering errors if the non '_multi' version was called. +# - The TreeRewriter policy closest to Rewriter's behavior is: +# different_replacements: :raise, +# swallowed_insertions: :raise, +# crossing_deletions: :accept +# +# @api public +# @deprecated Use {TreeRewriter} +# +# source://parser//lib/parser/source/rewriter.rb#31 class Parser::Source::Rewriter extend ::Parser::Deprecation + # @api public + # @deprecated Use {TreeRewriter} + # @param source_buffer [Source::Buffer] + # @return [Rewriter] a new instance of Rewriter + # + # source://parser//lib/parser/source/rewriter.rb#39 def initialize(source_buffer); end + # @api public + # @return [Diagnostic::Engine] + # + # source://parser//lib/parser/source/rewriter.rb#33 def diagnostics; end + + # Inserts new code after the given source range. + # + # @api public + # @deprecated Use {TreeRewriter#insert_after} + # @param range [Range] + # @param content [String] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/rewriter.rb#131 def insert_after(range, content); end + + # Inserts new code after the given source range by allowing other + # insertions at the same position. + # Note that an insertion with latter invocation comes _after_ earlier + # insertion at the same position in the rewritten source. + # + # @api public + # @deprecated Use {TreeRewriter#insert_after} + # @example Inserting ')]' + # rewriter. + # insert_after_multi(range, ')'). + # insert_after_multi(range, ']'). + # process + # @param range [Range] + # @param content [String] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/rewriter.rb#153 def insert_after_multi(range, content); end + + # Inserts new code before the given source range. + # + # @api public + # @deprecated Use {TreeRewriter#insert_before} + # @param range [Range] + # @param content [String] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/rewriter.rb#80 def insert_before(range, content); end + + # Inserts new code before the given source range by allowing other + # insertions at the same position. + # Note that an insertion with latter invocation comes _before_ earlier + # insertion at the same position in the rewritten source. + # + # @api public + # @deprecated Use {TreeRewriter#insert_before} + # @example Inserting '[(' + # rewriter. + # insert_before_multi(range, '('). + # insert_before_multi(range, '['). + # process + # @param range [Range] + # @param content [String] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/rewriter.rb#117 def insert_before_multi(range, content); end + + # Applies all scheduled changes to the `source_buffer` and returns + # modified source as a new string. + # + # @api public + # @deprecated Use {TreeRewriter#process} + # @return [String] + # + # source://parser//lib/parser/source/rewriter.rb#178 def process; end + + # Removes the source range. + # + # @api public + # @deprecated Use {TreeRewriter#remove} + # @param range [Range] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/rewriter.rb#67 def remove(range); end + + # Replaces the code of the source range `range` with `content`. + # + # @api public + # @deprecated Use {TreeRewriter#replace} + # @param range [Range] + # @param content [String] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/rewriter.rb#167 def replace(range, content); end + + # @api public + # @return [Source::Buffer] + # + # source://parser//lib/parser/source/rewriter.rb#32 def source_buffer; end + + # Provides a protected block where a sequence of multiple rewrite actions + # are handled atomically. If any of the actions failed by clobbering, + # all the actions are rolled back. + # + # @api public + # @deprecated Use {TreeRewriter#transaction} + # @example + # begin + # rewriter.transaction do + # rewriter.insert_before(range_of_something, '(') + # rewriter.insert_after(range_of_something, ')') + # end + # rescue Parser::ClobberingError + # end + # @raise [RuntimeError] when no block is passed + # @raise [RuntimeError] when already in a transaction + # + # source://parser//lib/parser/source/rewriter.rb#216 def transaction; end + + # Inserts new code before and after the given source range. + # + # @api public + # @deprecated Use {TreeRewriter#wrap} + # @param range [Range] + # @param before [String] + # @param after [String] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/rewriter.rb#94 def wrap(range, before, after); end private + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#476 def active_clobber; end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#484 def active_clobber=(value); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#480 def active_insertions; end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#492 def active_insertions=(value); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#472 def active_queue; end + + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/rewriter.rb#500 def adjacent?(range1, range2); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#351 def adjacent_insertion_mask(range); end + + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/rewriter.rb#366 def adjacent_insertions?(range); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#347 def adjacent_position_mask(range); end + + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/rewriter.rb#377 def adjacent_updates?(range); end + + # Schedule a code update. If it overlaps with another update, check + # whether they conflict, and raise a clobbering error if they do. + # (As a special case, zero-length ranges at the same position are + # considered to "overlap".) Otherwise, merge them. + # + # Updates which are adjacent to each other, but do not overlap, are also + # merged. + # + # RULES: + # + # - Insertion ("replacing" a zero-length range): + # - Two insertions at the same point conflict. This is true even + # if the earlier insertion has already been merged with an adjacent + # update, and even if they are both inserting the same text. + # - An insertion never conflicts with a replace or remove operation + # on its right or left side, which does not overlap it (in other + # words, which does not update BOTH its right and left sides). + # - An insertion always conflicts with a remove operation which spans + # both its sides. + # - An insertion conflicts with a replace operation which spans both its + # sides, unless the replacement text is longer than the replaced text + # by the size of the insertion (or more), and the portion of + # replacement text immediately after the insertion position is + # identical to the inserted text. + # + # - Removal operations never conflict with each other. + # + # - Replacement operations: + # - Take the portion of each replacement text which falls within: + # - The other operation's replaced region + # - The other operation's replacement text, if it extends past the + # end of its own replaced region (in other words, if the replacement + # text is longer than the text it replaces) + # - If and only if the taken texts are identical for both operations, + # they do not conflict. + # + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#280 def append(action); end + + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/rewriter.rb#389 def can_merge?(action, existing); end + + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/rewriter.rb#355 def clobbered_insertion?(insertion); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#343 def clobbered_position_mask(range); end + + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/rewriter.rb#468 def in_transaction?; end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#410 def merge_actions(action, existing); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#419 def merge_actions!(action, existing); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#425 def merge_replacements(actions); end + + # @api public + # @raise [ClobberingError] + # + # source://parser//lib/parser/source/rewriter.rb#450 def raise_clobber_error(action, existing); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#335 def record_insertion(range); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#339 def record_replace(range); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#445 def replace_actions(old, updated); end + + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/rewriter.rb#383 def replace_compatible_with_insertion?(replace, insertion); end end +# source://parser//lib/parser/source/rewriter/action.rb#9 class Parser::Source::Rewriter::Action include ::Comparable + # source://parser//lib/parser/source/rewriter/action.rb#15 def initialize(range, replacement = T.unsafe(nil), allow_multiple_insertions = T.unsafe(nil), order = T.unsafe(nil)); end + # source://parser//lib/parser/source/rewriter/action.rb#24 def <=>(other); end + + # source://parser//lib/parser/source/rewriter/action.rb#12 def allow_multiple_insertions; end + + # source://parser//lib/parser/source/rewriter/action.rb#12 def allow_multiple_insertions?; end + + # source://parser//lib/parser/source/rewriter/action.rb#12 def order; end + + # source://parser//lib/parser/source/rewriter/action.rb#12 def range; end + + # source://parser//lib/parser/source/rewriter/action.rb#12 def replacement; end + + # source://parser//lib/parser/source/rewriter/action.rb#30 def to_s; end end +# @api public +# +# source://parser//lib/parser/source/rewriter.rb#504 Parser::Source::Rewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) +# {TreeRewriter} performs the heavy lifting in the source rewriting process. +# It schedules code updates to be performed in the correct order. +# +# For simple cases, the resulting source will be obvious. +# +# Examples for more complex cases follow. Assume these examples are acting on +# the source `'puts(:hello, :world)`. The methods #wrap, #remove, etc. +# receive a Range as first argument; for clarity, examples below use english +# sentences and a string of raw code instead. +# +# ## Overlapping ranges: +# +# Any two rewriting actions on overlapping ranges will fail and raise +# a `ClobberingError`, unless they are both deletions (covered next). +# +# * wrap ':hello, ' with '(' and ')' +# * wrap ', :world' with '(' and ')' +# => CloberringError +# +# ## Overlapping deletions: +# +# * remove ':hello, ' +# * remove ', :world' +# +# The overlapping ranges are merged and `':hello, :world'` will be removed. +# This policy can be changed. `:crossing_deletions` defaults to `:accept` +# but can be set to `:warn` or `:raise`. +# +# ## Multiple actions at the same end points: +# +# Results will always be independent on the order they were given. +# Exception: rewriting actions done on exactly the same range (covered next). +# +# Example: +# * replace ', ' by ' => ' +# * wrap ':hello, :world' with '{' and '}' +# * replace ':world' with ':everybody' +# * wrap ':world' with '[', ']' +# +# The resulting string will be `'puts({:hello => [:everybody]})'` +# and this result is independent on the order the instructions were given in. +# +# Note that if the two "replace" were given as a single replacement of ', :world' +# for ' => :everybody', the result would be a `ClobberingError` because of the wrap +# in square brackets. +# +# ## Multiple wraps on same range: +# * wrap ':hello' with '(' and ')' +# * wrap ':hello' with '[' and ']' +# +# The wraps are combined in order given and results would be `'puts([(:hello)], :world)'`. +# +# ## Multiple replacements on same range: +# * replace ':hello' by ':hi', then +# * replace ':hello' by ':hey' +# +# The replacements are made in the order given, so the latter replacement +# supersedes the former and ':hello' will be replaced by ':hey'. +# +# This policy can be changed. `:different_replacements` defaults to `:accept` +# but can be set to `:warn` or `:raise`. +# +# ## Swallowed insertions: +# wrap 'world' by '__', '__' +# replace ':hello, :world' with ':hi' +# +# A containing replacement will swallow the contained rewriting actions +# and `':hello, :world'` will be replaced by `':hi'`. +# +# This policy can be changed for swallowed insertions. `:swallowed_insertions` +# defaults to `:accept` but can be set to `:warn` or `:raise` +# +# ## Implementation +# The updates are organized in a tree, according to the ranges they act on +# (where children are strictly contained by their parent), hence the name. +# +# @api public +# +# source://parser//lib/parser/source/tree_rewriter.rb#91 class Parser::Source::TreeRewriter extend ::Parser::Deprecation + # @api public + # @param source_buffer [Source::Buffer] + # @return [TreeRewriter] a new instance of TreeRewriter + # + # source://parser//lib/parser/source/tree_rewriter.rb#98 def initialize(source_buffer, crossing_deletions: T.unsafe(nil), different_replacements: T.unsafe(nil), swallowed_insertions: T.unsafe(nil)); end + # Returns a representation of the rewriter as nested insertions (:wrap) and replacements. + # + # rewriter.as_actions # =>[ [:wrap, 1...10, '(', ')'], + # [:wrap, 2...6, '', '!'], # aka "insert_after" + # [:replace, 2...4, 'foo'], + # [:replace, 5...6, ''], # aka "removal" + # ], + # + # Contrary to `as_replacements`, this representation is sufficient to recreate exactly + # the rewriter. + # + # @api public + # @return [Array<(Symbol, Range, String{, String})>] + # + # source://parser//lib/parser/source/tree_rewriter.rb#299 def as_nested_actions; end + + # Returns a representation of the rewriter as an ordered list of replacements. + # + # rewriter.as_replacements # => [ [1...1, '('], + # [2...4, 'foo'], + # [5...6, ''], + # [6...6, '!'], + # [10...10, ')'], + # ] + # + # This representation is sufficient to recreate the result of `process` but it is + # not sufficient to recreate completely the rewriter for further merging/actions. + # See `as_nested_actions` + # + # @api public + # @return [Array] an ordered list of pairs of range & replacement + # + # source://parser//lib/parser/source/tree_rewriter.rb#281 def as_replacements; end + + # @api public + # @return [Diagnostic::Engine] + # + # source://parser//lib/parser/source/tree_rewriter.rb#93 def diagnostics; end + + # Returns true iff no (non trivial) update has been recorded + # + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/tree_rewriter.rb#125 def empty?; end + + # For special cases where one needs to merge a rewriter attached to a different source_buffer + # or that needs to be offset. Policies of the receiver are used. + # + # @api public + # @param rewriter [TreeRewriter] from different source_buffer + # @param offset [Integer] + # @raise [IndexError] if action ranges (once offset) don't fit the current buffer + # @return [Rewriter] self + # + # source://parser//lib/parser/source/tree_rewriter.rb#168 def import!(foreign_rewriter, offset: T.unsafe(nil)); end + + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/tree_rewriter.rb#329 def in_transaction?; end + + # Shortcut for `wrap(range, nil, content)` + # + # @api public + # @param range [Range] + # @param content [String] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/tree_rewriter.rb#242 def insert_after(range, content); end + + # @api private + # @deprecated Use insert_after or wrap + # + # source://parser//lib/parser/source/tree_rewriter.rb#351 def insert_after_multi(range, text); end + + # Shortcut for `wrap(range, content, nil)` + # + # @api public + # @param range [Range] + # @param content [String] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/tree_rewriter.rb#230 def insert_before(range, content); end + + # @api private + # @deprecated Use insert_after or wrap + # + # source://parser//lib/parser/source/tree_rewriter.rb#342 def insert_before_multi(range, text); end + + # @api public + # + # source://parser//lib/parser/source/tree_rewriter.rb#334 def inspect; end + + # Returns a new rewriter that consists of the updates of the received + # and the given argument. Policies of the receiver are used. + # + # @api public + # @param with [Rewriter] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] merge of receiver and argument + # + # source://parser//lib/parser/source/tree_rewriter.rb#155 def merge(with); end + + # Merges the updates of argument with the receiver. + # Policies of the receiver are used. + # This action is atomic in that it won't change the receiver + # unless it succeeds. + # + # @api public + # @param with [Rewriter] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/tree_rewriter.rb#139 def merge!(with); end + + # Applies all scheduled changes to the `source_buffer` and returns + # modified source as a new string. + # + # @api public + # @return [String] + # + # source://parser//lib/parser/source/tree_rewriter.rb#252 def process; end + + # Shortcut for `replace(range, '')` + # + # @api public + # @param range [Range] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/tree_rewriter.rb#217 def remove(range); end + + # Replaces the code of the source range `range` with `content`. + # + # @api public + # @param range [Range] + # @param content [String] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/tree_rewriter.rb#193 def replace(range, content); end + + # @api public + # @return [Source::Buffer] + # + # source://parser//lib/parser/source/tree_rewriter.rb#92 def source_buffer; end + + # Provides a protected block where a sequence of multiple rewrite actions + # are handled atomically. If any of the actions failed by clobbering, + # all the actions are rolled back. Transactions can be nested. + # + # @api public + # @raise [RuntimeError] when no block is passed + # + # source://parser//lib/parser/source/tree_rewriter.rb#310 def transaction; end + + # Inserts the given strings before and after the given range. + # + # @api public + # @param range [Range] + # @param insert_before [String, nil] + # @param insert_after [String, nil] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/tree_rewriter.rb#206 def wrap(range, insert_before, insert_after); end protected + # @api public + # + # source://parser//lib/parser/source/tree_rewriter.rb#365 def action_root; end private + # @api public + # + # source://parser//lib/parser/source/tree_rewriter.rb#369 def action_summary; end + + # @api public + # @raise [ArgumentError] + # + # source://parser//lib/parser/source/tree_rewriter.rb#392 def check_policy_validity; end + + # @api public + # + # source://parser//lib/parser/source/tree_rewriter.rb#404 def check_range_validity(range); end + + # @api public + # + # source://parser//lib/parser/source/tree_rewriter.rb#397 def combine(range, attributes); end + + # @api public + # + # source://parser//lib/parser/source/tree_rewriter.rb#411 def enforce_policy(event); end + + # @api public + # @raise [Parser::ClobberingError] + # + # source://parser//lib/parser/source/tree_rewriter.rb#418 def trigger_policy(event, range: T.unsafe(nil), conflict: T.unsafe(nil), **arguments); end end +# @api public +# +# source://parser//lib/parser/source/tree_rewriter.rb#391 Parser::Source::TreeRewriter::ACTIONS = T.let(T.unsafe(nil), Array) +# source://parser//lib/parser/source/tree_rewriter/action.rb#13 class Parser::Source::TreeRewriter::Action + # source://parser//lib/parser/source/tree_rewriter/action.rb#16 def initialize(range, enforcer, insert_before: T.unsafe(nil), replacement: T.unsafe(nil), insert_after: T.unsafe(nil), children: T.unsafe(nil)); end + # source://parser//lib/parser/source/tree_rewriter/action.rb#28 def combine(action); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#67 def contract; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#33 def empty?; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#14 def insert_after; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#14 def insert_before; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#57 def insertion?; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#80 def moved(source_buffer, offset); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#49 def nested_actions; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#40 def ordered_replacements; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#14 def range; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#14 def replacement; end protected + # source://parser//lib/parser/source/tree_rewriter/action.rb#158 def analyse_hierarchy(action); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#145 def bsearch_child_index(from = T.unsafe(nil)); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#224 def call_enforcer_for_merge(action); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#204 def check_fusible(action, *fusible); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#94 def children; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#129 def combine_children(more_children); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#102 def do_combine(action); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#135 def fuse_deletions(action, fusible, other_sibblings); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#215 def merge(action); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#110 def place_in_hierarchy(action); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#232 def swallow(children); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#96 def with(range: T.unsafe(nil), enforcer: T.unsafe(nil), children: T.unsafe(nil), insert_before: T.unsafe(nil), replacement: T.unsafe(nil), insert_after: T.unsafe(nil)); end end +# @api public +# +# source://parser//lib/parser/source/tree_rewriter.rb#356 Parser::Source::TreeRewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) + +# @api public +# +# source://parser//lib/parser/source/tree_rewriter.rb#417 Parser::Source::TreeRewriter::POLICY_TO_LEVEL = T.let(T.unsafe(nil), Hash) +# source://parser//lib/parser/static_environment.rb#5 class Parser::StaticEnvironment + # @return [StaticEnvironment] a new instance of StaticEnvironment + # + # source://parser//lib/parser/static_environment.rb#11 def initialize; end + # source://parser//lib/parser/static_environment.rb#40 def declare(name); end + + # source://parser//lib/parser/static_environment.rb#58 def declare_anonymous_blockarg; end + + # source://parser//lib/parser/static_environment.rb#74 def declare_anonymous_kwrestarg; end + + # source://parser//lib/parser/static_environment.rb#66 def declare_anonymous_restarg; end + + # source://parser//lib/parser/static_environment.rb#50 def declare_forward_args; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#46 def declared?(name); end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#62 def declared_anonymous_blockarg?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#78 def declared_anonymous_kwrestarg?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#70 def declared_anonymous_restarg?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#54 def declared_forward_args?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#82 def empty?; end + + # source://parser//lib/parser/static_environment.rb#27 def extend_dynamic; end + + # source://parser//lib/parser/static_environment.rb#20 def extend_static; end + + # source://parser//lib/parser/static_environment.rb#15 def reset; end + + # source://parser//lib/parser/static_environment.rb#34 def unextend; end end +# source://parser//lib/parser/static_environment.rb#7 Parser::StaticEnvironment::ANONYMOUS_BLOCKARG = T.let(T.unsafe(nil), Symbol) + +# source://parser//lib/parser/static_environment.rb#9 Parser::StaticEnvironment::ANONYMOUS_KWRESTARG = T.let(T.unsafe(nil), Symbol) + +# source://parser//lib/parser/static_environment.rb#8 Parser::StaticEnvironment::ANONYMOUS_RESTARG = T.let(T.unsafe(nil), Symbol) + +# source://parser//lib/parser/static_environment.rb#6 Parser::StaticEnvironment::FORWARD_ARGS = T.let(T.unsafe(nil), Symbol) +# {Parser::SyntaxError} is raised whenever parser detects a syntax error, +# similar to the standard SyntaxError class. +# +# @api public +# +# source://parser//lib/parser/syntax_error.rb#13 class Parser::SyntaxError < ::StandardError + # @api public + # @return [SyntaxError] a new instance of SyntaxError + # + # source://parser//lib/parser/syntax_error.rb#16 def initialize(diagnostic); end + # @api public + # @return [Parser::Diagnostic] + # + # source://parser//lib/parser/syntax_error.rb#14 def diagnostic; end end +# {Parser::TreeRewriter} offers a basic API that makes it easy to rewrite +# existing ASTs. It's built on top of {Parser::AST::Processor} and +# {Parser::Source::TreeRewriter} +# +# For example, assume you want to remove `do` tokens from a while statement. +# You can do this as following: +# +# require 'parser/current' +# +# class RemoveDo < Parser::TreeRewriter +# def on_while(node) +# # Check if the statement starts with "do" +# if node.location.begin.is?('do') +# remove(node.location.begin) +# end +# end +# end +# +# code = <<-EOF +# while true do +# puts 'hello' +# end +# EOF +# +# ast = Parser::CurrentRuby.parse code +# buffer = Parser::Source::Buffer.new('(example)', source: code) +# rewriter = RemoveDo.new +# +# # Rewrite the AST, returns a String with the new form. +# puts rewriter.rewrite(buffer, ast) +# +# This would result in the following Ruby code: +# +# while true +# puts 'hello' +# end +# +# Keep in mind that {Parser::TreeRewriter} does not take care of indentation when +# inserting/replacing code so you'll have to do this yourself. +# +# See also [a blog entry](http://whitequark.org/blog/2013/04/26/lets-play-with-ruby-code/) +# describing rewriters in greater detail. +# +# @api public +# +# source://parser//lib/parser/tree_rewriter.rb#61 class Parser::TreeRewriter < ::Parser::AST::Processor + # Returns `true` if the specified node is an assignment node, returns false + # otherwise. + # + # @api public + # @param node [Parser::AST::Node] + # @return [Boolean] + # + # source://parser//lib/parser/tree_rewriter.rb#79 def assignment?(node); end + + # Inserts new code after the given source range. + # + # @api public + # @param range [Parser::Source::Range] + # @param content [String] + # + # source://parser//lib/parser/tree_rewriter.rb#118 def insert_after(range, content); end + + # Inserts new code before the given source range. + # + # @api public + # @param range [Parser::Source::Range] + # @param content [String] + # + # source://parser//lib/parser/tree_rewriter.rb#108 def insert_before(range, content); end + + # Removes the source range. + # + # @api public + # @param range [Parser::Source::Range] + # + # source://parser//lib/parser/tree_rewriter.rb#88 def remove(range); end + + # Replaces the code of the source range `range` with `content`. + # + # @api public + # @param range [Parser::Source::Range] + # @param content [String] + # + # source://parser//lib/parser/tree_rewriter.rb#128 def replace(range, content); end + + # Rewrites the AST/source buffer and returns a String containing the new + # version. + # + # @api public + # @param source_buffer [Parser::Source::Buffer] + # @param ast [Parser::AST::Node] + # @param crossing_deletions:, [Symbol] different_replacements:, swallowed_insertions: + # policy arguments for TreeRewriter (optional) + # @return [String] + # + # source://parser//lib/parser/tree_rewriter.rb#62 def rewrite(source_buffer, ast, **policy); end + + # Wraps the given source range with the given values. + # + # @api public + # @param range [Parser::Source::Range] + # @param content [String] + # + # source://parser//lib/parser/tree_rewriter.rb#98 def wrap(range, before, after); end end +# source://parser//lib/parser/version.rb#4 Parser::VERSION = T.let(T.unsafe(nil), String) +# source://parser//lib/parser/variables_stack.rb#5 class Parser::VariablesStack + # @return [VariablesStack] a new instance of VariablesStack + # + # source://parser//lib/parser/variables_stack.rb#6 def initialize; end + # source://parser//lib/parser/variables_stack.rb#27 def declare(name); end + + # @return [Boolean] + # + # source://parser//lib/parser/variables_stack.rb#31 def declared?(name); end + + # @return [Boolean] + # + # source://parser//lib/parser/variables_stack.rb#11 def empty?; end + + # source://parser//lib/parser/variables_stack.rb#19 def pop; end + + # source://parser//lib/parser/variables_stack.rb#15 def push; end + + # source://parser//lib/parser/variables_stack.rb#23 def reset; end end diff --git a/Library/Homebrew/sorbet/rbi/gems/patchelf@1.4.0.rbi b/Library/Homebrew/sorbet/rbi/gems/patchelf@1.4.0.rbi index ee52069dad2f65..d829c17a48a78e 100644 --- a/Library/Homebrew/sorbet/rbi/gems/patchelf@1.4.0.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/patchelf@1.4.0.rbi @@ -4,131 +4,586 @@ # This is an autogenerated file for types exported from the `patchelf` gem. # Please instead update this file by running `bin/tapioca gem patchelf`. +# Main module of patchelf. +# +# @author david942j +# +# source://patchelf//lib/patchelf.rb#6 module PatchELF; end +# Helper methods for internal usage. +# +# source://patchelf//lib/patchelf/helper.rb#5 module PatchELF::Helper private + # @example + # aligndown(0x1234) + # #=> 4096 + # aligndown(0x33, 0x20) + # #=> 32 + # aligndown(0x10, 0x8) + # #=> 16 + # @param val [Integer] + # @param align [Integer] + # @return [Integer] Aligned result. + # + # source://patchelf//lib/patchelf/helper.rb#65 def aligndown(val, align = T.unsafe(nil)); end + + # @example + # alignup(0x1234) + # #=> 8192 + # alignup(0x33, 0x20) + # #=> 64 + # alignup(0x10, 0x8) + # #=> 16 + # @param val [Integer] + # @param align [Integer] + # @return [Integer] Aligned result. + # + # source://patchelf//lib/patchelf/helper.rb#80 def alignup(val, align = T.unsafe(nil)); end + + # For {#colorize} to decide if need add color codes. + # + # @return [Boolean] + # + # source://patchelf//lib/patchelf/helper.rb#50 def color_enabled?; end + + # For wrapping string with color codes for prettier inspect. + # + # @param str [String] Content to colorize. + # @param type [Symbol] Specify which kind of color to use, valid symbols are defined in {.COLOR_CODE}. + # @return [String] String that wrapped with color codes. + # + # source://patchelf//lib/patchelf/helper.rb#40 def colorize(str, type); end + + # The size of one page. + # + # source://patchelf//lib/patchelf/helper.rb#17 def page_size(e_machine = T.unsafe(nil)); end class << self + # @example + # aligndown(0x1234) + # #=> 4096 + # aligndown(0x33, 0x20) + # #=> 32 + # aligndown(0x10, 0x8) + # #=> 16 + # @param val [Integer] + # @param align [Integer] + # @return [Integer] Aligned result. + # + # source://patchelf//lib/patchelf/helper.rb#65 def aligndown(val, align = T.unsafe(nil)); end + + # @example + # alignup(0x1234) + # #=> 8192 + # alignup(0x33, 0x20) + # #=> 64 + # alignup(0x10, 0x8) + # #=> 16 + # @param val [Integer] + # @param align [Integer] + # @return [Integer] Aligned result. + # + # source://patchelf//lib/patchelf/helper.rb#80 def alignup(val, align = T.unsafe(nil)); end + + # For {#colorize} to decide if need add color codes. + # + # @return [Boolean] + # + # source://patchelf//lib/patchelf/helper.rb#50 def color_enabled?; end + + # For wrapping string with color codes for prettier inspect. + # + # @param str [String] Content to colorize. + # @param type [Symbol] Specify which kind of color to use, valid symbols are defined in {.COLOR_CODE}. + # @return [String] String that wrapped with color codes. + # + # source://patchelf//lib/patchelf/helper.rb#40 def colorize(str, type); end + + # The size of one page. + # + # source://patchelf//lib/patchelf/helper.rb#17 def page_size(e_machine = T.unsafe(nil)); end end end +# Color codes for pretty print. +# +# source://patchelf//lib/patchelf/helper.rb#9 PatchELF::Helper::COLOR_CODE = T.let(T.unsafe(nil), Hash) +# A logger for internal usage. +# +# source://patchelf//lib/patchelf/logger.rb#9 module PatchELF::Logger private + # source://patchelf//lib/patchelf/logger.rb#19 def debug(msg); end + + # source://patchelf//lib/patchelf/logger.rb#19 def error(msg); end + + # source://patchelf//lib/patchelf/logger.rb#19 def info(msg); end + + # source://patchelf//lib/patchelf/logger.rb#19 def level=(msg); end + + # source://patchelf//lib/patchelf/logger.rb#19 def warn(msg); end class << self + # source://patchelf//lib/patchelf/logger.rb#19 def debug(msg); end + + # source://patchelf//lib/patchelf/logger.rb#19 def error(msg); end + + # source://patchelf//lib/patchelf/logger.rb#19 def info(msg); end + + # source://patchelf//lib/patchelf/logger.rb#19 def level=(msg); end + + # source://patchelf//lib/patchelf/logger.rb#19 def warn(msg); end end end +# Memory management, provides malloc/free to allocate LOAD segments. +# +# @private +# +# source://patchelf//lib/patchelf/mm.rb#8 class PatchELF::MM + # Instantiate a {MM} object. + # + # @param elf [ELFTools::ELFFile] + # @return [MM] a new instance of MM + # + # source://patchelf//lib/patchelf/mm.rb#14 def initialize(elf); end + # Let the malloc / free requests be effective. + # + # @return [void] + # + # source://patchelf//lib/patchelf/mm.rb#35 def dispatch!; end + + # @return [Integer] The size extended. + # + # source://patchelf//lib/patchelf/mm.rb#9 def extend_size; end + + # Query if extended. + # + # @return [Boolean] + # + # source://patchelf//lib/patchelf/mm.rb#57 def extended?; end + + # Get correct offset after the extension. + # + # @param off [Integer] + # @return [Integer] Shifted offset. + # + # source://patchelf//lib/patchelf/mm.rb#66 def extended_offset(off); end + + # @param size [Integer] + # @raise [ArgumentError] + # @return [void] + # @yieldparam off [Integer] + # @yieldparam vaddr [Integer] + # @yieldreturn [void] One can only do the following things in the block: + # 1. Set ELF headers' attributes (with ELFTools) + # 2. Invoke {Saver#inline_patch} + # + # source://patchelf//lib/patchelf/mm.rb#27 def malloc(size, &block); end + + # @return [Integer] Where the file start to be extended. + # + # source://patchelf//lib/patchelf/mm.rb#10 def threshold; end private + # @raise [ArgumentError] + # + # source://patchelf//lib/patchelf/mm.rb#182 def abnormal_elf(msg); end + + # source://patchelf//lib/patchelf/mm.rb#86 def extend_backward(seg, size = T.unsafe(nil)); end + + # source://patchelf//lib/patchelf/mm.rb#93 def extend_forward(seg, size = T.unsafe(nil)); end + + # source://patchelf//lib/patchelf/mm.rb#75 def fgap_method; end + + # source://patchelf//lib/patchelf/mm.rb#122 def find_gap(check_sz: T.unsafe(nil)); end + + # source://patchelf//lib/patchelf/mm.rb#174 def invoke_callbacks(seg, start); end + + # source://patchelf//lib/patchelf/mm.rb#170 def load_segments; end + + # source://patchelf//lib/patchelf/mm.rb#102 def mgap_method; end + + # TODO + # + # @raise [NotImplementedError] + # + # source://patchelf//lib/patchelf/mm.rb#138 def new_load_method; end + + # For all attributes >= threshold, += offset + # + # source://patchelf//lib/patchelf/mm.rb#147 def shift_attributes; end + + # @return [Boolean] + # + # source://patchelf//lib/patchelf/mm.rb#142 def writable?(seg); end end +# Raised on missing Program Header(segment) +# +# source://patchelf//lib/patchelf/exceptions.rb#14 class PatchELF::MissingSegmentError < ::PatchELF::PatchError; end + +# Raised when Dynamic Tag is missing +# +# source://patchelf//lib/patchelf/exceptions.rb#11 class PatchELF::MissingTagError < ::PatchELF::PatchError; end + +# Raised on an error during ELF modification. +# +# source://patchelf//lib/patchelf/exceptions.rb#8 class PatchELF::PatchError < ::ELFTools::ELFError; end +# Class to handle all patching things. +# +# source://patchelf//lib/patchelf/patcher.rb#12 class PatchELF::Patcher + # Instantiate a {Patcher} object. + # + # @param filename [String] Filename of input ELF. + # @param logging [Boolean] *deprecated*: use +on_error+ instead + # @param on_error [:log, :silent, :exception] action when the desired segment/tag field isn't present + # :log = logs to stderr + # :exception = raise exception related to the error + # :silent = ignore the errors + # @raise [ArgumentError] + # @return [Patcher] a new instance of Patcher + # + # source://patchelf//lib/patchelf/patcher.rb#28 def initialize(filename, on_error: T.unsafe(nil), logging: T.unsafe(nil)); end + # Add the needed library. + # + # @note This setting will be saved after {#save} being invoked. + # @param need [String] + # @return [void] + # + # source://patchelf//lib/patchelf/patcher.rb#81 def add_needed(need); end + + # @note This setting will be saved after {#save} being invoked. + # + # source://patchelf//lib/patchelf/patcher.rb#16 def elf; end + + # @example + # PatchELF::Patcher.new('/bin/ls').interpreter + # #=> "/lib64/ld-linux-x86-64.so.2" + # @return [String?] Get interpreter's name. + # + # source://patchelf//lib/patchelf/patcher.rb#44 def interpreter; end + + # Set interpreter's name. + # + # If the input ELF has no existent interpreter, + # this method will show a warning and has no effect. + # + # @note This setting will be saved after {#save} being invoked. + # @param interp [String] + # + # source://patchelf//lib/patchelf/patcher.rb#54 def interpreter=(interp); end + + # Get needed libraries. + # + # @example + # patcher = PatchELF::Patcher.new('/bin/ls') + # patcher.needed + # #=> ["libselinux.so.1", "libc.so.6"] + # @return [Array] + # + # source://patchelf//lib/patchelf/patcher.rb#66 def needed; end + + # Set needed libraries. + # + # @note This setting will be saved after {#save} being invoked. + # @param needs [Array] + # + # source://patchelf//lib/patchelf/patcher.rb#73 def needed=(needs); end + + # Remove the needed library. + # + # @note This setting will be saved after {#save} being invoked. + # @param need [String] + # @return [void] + # + # source://patchelf//lib/patchelf/patcher.rb#90 def remove_needed(need); end + + # Replace needed library +src+ with +tar+. + # + # @note This setting will be saved after {#save} being invoked. + # @param src [String] Library to be replaced. + # @param tar [String] Library replace with. + # @return [void] + # + # source://patchelf//lib/patchelf/patcher.rb#103 def replace_needed(src, tar); end + + # Get rpath + # return [String?] + # + # source://patchelf//lib/patchelf/patcher.rb#142 def rpath; end + + # Set rpath + # + # Modify / set DT_RPATH of the given ELF. + # similar to runpath= except DT_RPATH is modifed/created in DYNAMIC segment. + # + # @note This setting will be saved after {#save} being invoked. + # @param rpath [String] + # + # source://patchelf//lib/patchelf/patcher.rb#152 def rpath=(rpath); end + + # Get runpath. + # + # @return [String?] + # + # source://patchelf//lib/patchelf/patcher.rb#136 def runpath; end + + # Set runpath. + # + # If DT_RUNPATH is not presented in the input ELF, + # a new DT_RUNPATH attribute will be inserted into the DYNAMIC segment. + # + # @note This setting will be saved after {#save} being invoked. + # @param runpath [String] + # + # source://patchelf//lib/patchelf/patcher.rb#162 def runpath=(runpath); end + + # Save the patched ELF as +out_file+. + # + # @param out_file [String?] If +out_file+ is +nil+, the original input file will be modified. + # @param patchelf_compatible [Boolean] When +patchelf_compatible+ is true, tries to produce same ELF as the one produced by NixOS/patchelf. + # @return [void] + # + # source://patchelf//lib/patchelf/patcher.rb#179 def save(out_file = T.unsafe(nil), patchelf_compatible: T.unsafe(nil)); end + + # Get the soname of a shared library. + # + # @example + # patcher = PatchELF::Patcher.new('/bin/ls') + # patcher.soname + # # [WARN] Entry DT_SONAME not found, not a shared library? + # #=> nil + # @example + # PatchELF::Patcher.new('/lib/x86_64-linux-gnu/libc.so.6').soname + # #=> "libc.so.6" + # @return [String?] The name. + # + # source://patchelf//lib/patchelf/patcher.rb#118 def soname; end + + # Set soname. + # + # If the input ELF is not a shared library with a soname, + # this method will show a warning and has no effect. + # + # @note This setting will be saved after {#save} being invoked. + # @param name [String] + # + # source://patchelf//lib/patchelf/patcher.rb#128 def soname=(name); end + + # Set all operations related to DT_RUNPATH to use DT_RPATH. + # + # @return [self] + # + # source://patchelf//lib/patchelf/patcher.rb#168 def use_rpath!; end private + # @return [Boolean] + # + # source://patchelf//lib/patchelf/patcher.rb#228 def dirty?; end + + # source://patchelf//lib/patchelf/patcher.rb#242 def dynamic_or_log; end + + # source://patchelf//lib/patchelf/patcher.rb#202 def interpreter_; end + + # @raise [exception] + # + # source://patchelf//lib/patchelf/patcher.rb#196 def log_or_raise(msg, exception = T.unsafe(nil)); end + + # @return [Array] + # + # source://patchelf//lib/patchelf/patcher.rb#210 def needed_; end + + # @return [String?] + # + # source://patchelf//lib/patchelf/patcher.rb#218 def runpath_(rpath_sym = T.unsafe(nil)); end + + # @return [String?] + # + # source://patchelf//lib/patchelf/patcher.rb#223 def soname_; end + + # source://patchelf//lib/patchelf/patcher.rb#232 def tag_name_or_log(type, log_msg); end end +# Internal use only. +# +# For {Patcher} to do patching things and save to file. +# +# @private +# +# source://patchelf//lib/patchelf/saver.rb#16 class PatchELF::Saver + # Instantiate a {Saver} object. + # + # @param in_file [String] + # @param out_file [String] + # @param set [{Symbol => String, Array}] + # @return [Saver] a new instance of Saver + # + # source://patchelf//lib/patchelf/saver.rb#24 def initialize(in_file, out_file, set); end + # @return [String] Input filename. + # + # source://patchelf//lib/patchelf/saver.rb#17 def in_file; end + + # @return [String] Output filename. + # + # source://patchelf//lib/patchelf/saver.rb#18 def out_file; end + + # @return [void] + # + # source://patchelf//lib/patchelf/saver.rb#37 def save!; end private + # source://patchelf//lib/patchelf/saver.rb#278 def dynamic; end + + # source://patchelf//lib/patchelf/saver.rb#158 def expand_dynamic!; end + + # This can only be used for patching interpreter's name + # or set strings in a malloc-ed area. + # i.e. NEVER intend to change the string defined in strtab + # + # source://patchelf//lib/patchelf/saver.rb#238 def inline_patch(off, str); end + + # Create a temp tag header. + # + # @return [ELFTools::Structs::ELF_Dyn] + # + # source://patchelf//lib/patchelf/saver.rb#150 def lazy_dyn(sym); end + + # source://patchelf//lib/patchelf/saver.rb#179 def malloc_strtab!; end + + # source://patchelf//lib/patchelf/saver.rb#88 def patch_dynamic; end + + # source://patchelf//lib/patchelf/saver.rb#53 def patch_interpreter; end + + # source://patchelf//lib/patchelf/saver.rb#121 def patch_needed; end + + # Modify the out_file according to registered patches. + # + # source://patchelf//lib/patchelf/saver.rb#243 def patch_out(out_file); end + + # source://patchelf//lib/patchelf/saver.rb#111 def patch_runpath(sym = T.unsafe(nil)); end + + # source://patchelf//lib/patchelf/saver.rb#103 def patch_soname; end + + # @param str [String] + # @yieldparam idx [Integer] + # @yieldreturn [void] + # + # source://patchelf//lib/patchelf/saver.rb#208 def reg_str_table(str, &block); end + + # @return [ELFTools::Sections::Section?] + # + # source://patchelf//lib/patchelf/saver.rb#271 def section_header(name); end + + # source://patchelf//lib/patchelf/saver.rb#217 def strtab_string; end end +# To mark a not-using tag +# +# source://patchelf//lib/patchelf/saver.rb#120 PatchELF::Saver::IGNORE = T.let(T.unsafe(nil), Integer) + +# Current gem version. +# +# source://patchelf//lib/patchelf/version.rb#5 PatchELF::VERSION = T.let(T.unsafe(nil), String) diff --git a/Library/Homebrew/sorbet/rbi/gems/plist@3.7.0.rbi b/Library/Homebrew/sorbet/rbi/gems/plist@3.7.0.rbi index d621be496bd158..8b58e3a3d82cc9 100644 --- a/Library/Homebrew/sorbet/rbi/gems/plist@3.7.0.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/plist@3.7.0.rbi @@ -4,128 +4,331 @@ # This is an autogenerated file for types exported from the `plist` gem. # Please instead update this file by running `bin/tapioca gem plist`. +# source://plist//lib/plist/generator.rb#174 +class Array + include ::Enumerable + include ::Plist::Emit +end + +# source://plist//lib/plist/generator.rb#178 +class Hash + include ::Enumerable + include ::Plist::Emit +end + +# Plist parses Mac OS X xml property list files into ruby data structures. +# +# === Load a plist file +# This is the main point of the library: +# +# r = Plist.parse_xml(filename_or_xml) +# +# source://plist//lib/plist/generator.rb#9 module Plist class << self + # Note that I don't use these two elements much: + # + # + Date elements are returned as DateTime objects. + # + Data elements are implemented as Tempfiles + # + # Plist.parse_xml will blow up if it encounters a Date element. + # If you encounter such an error, or if you have a Date element which + # can't be parsed into a Time object, please create an issue + # attaching your plist file at https://github.com/patsplat/plist/issues + # so folks can implement the proper support. + # + # By default, will be assumed to be a marshaled Ruby object and + # interpreted with Marshal.load. Pass marshal: false + # to disable this behavior and return the raw binary data as an IO + # object instead. + # + # source://plist//lib/plist/parser.rb#34 def parse_xml(filename_or_xml, options = T.unsafe(nil)); end end end +# === Create a plist +# You can dump an object to a plist in one of two ways: +# +# * Plist::Emit.dump(obj) +# * obj.to_plist +# * This requires that you mixin the Plist::Emit module, which is already done for +Array+ and +Hash+. +# +# The following Ruby classes are converted into native plist types: +# Array, Bignum, Date, DateTime, Fixnum, Float, Hash, Integer, String, Symbol, Time, true, false +# * +Array+ and +Hash+ are both recursive; their elements will be converted into plist nodes inside the and containers (respectively). +# * +IO+ (and its descendants) and +StringIO+ objects are read from and their contents placed in a element. +# * User classes may implement +to_plist_node+ to dictate how they should be serialized; otherwise the object will be passed to Marshal.dump and the result placed in a element. +# +# For detailed usage instructions, refer to USAGE[link:files/docs/USAGE.html] and the methods documented below. +# +# source://plist//lib/plist/generator.rb#24 module Plist::Emit + # Helper method for injecting into classes. Calls Plist::Emit.save_plist with +self+. + # + # source://plist//lib/plist/generator.rb#33 def save_plist(filename, options = T.unsafe(nil)); end + + # Helper method for injecting into classes. Calls Plist::Emit.dump with +self+. + # + # source://plist//lib/plist/generator.rb#28 def to_plist(envelope = T.unsafe(nil), options = T.unsafe(nil)); end class << self + # The following Ruby classes are converted into native plist types: + # Array, Bignum, Date, DateTime, Fixnum, Float, Hash, Integer, String, Symbol, Time + # + # Write us (via RubyForge) if you think another class can be coerced safely into one of the expected plist classes. + # + # +IO+ and +StringIO+ objects are encoded and placed in elements; other objects are Marshal.dump'ed unless they implement +to_plist_node+. + # + # The +envelope+ parameters dictates whether or not the resultant plist fragment is wrapped in the normal XML/plist header and footer. Set it to false if you only want the fragment. + # + # source://plist//lib/plist/generator.rb#45 def dump(obj, envelope = T.unsafe(nil), options = T.unsafe(nil)); end + + # Writes the serialized object's plist to the specified filename. + # + # source://plist//lib/plist/generator.rb#55 def save_plist(obj, filename, options = T.unsafe(nil)); end + + # source://plist//lib/plist/generator.rb#162 def wrap(contents); end end end +# source://plist//lib/plist/generator.rb#25 Plist::Emit::DEFAULT_INDENT = T.let(T.unsafe(nil), String) +# source://plist//lib/plist/generator.rb#63 class Plist::Emit::PlistBuilder + # @return [PlistBuilder] a new instance of PlistBuilder + # + # source://plist//lib/plist/generator.rb#64 def initialize(indent_str); end + # source://plist//lib/plist/generator.rb#68 def build(element, level = T.unsafe(nil)); end private + # source://plist//lib/plist/generator.rb#157 def comment_tag(content); end + + # source://plist//lib/plist/generator.rb#125 def data_tag(data, level); end + + # source://plist//lib/plist/generator.rb#144 def element_type(item); end + + # source://plist//lib/plist/generator.rb#140 def indent(str, level); end + + # source://plist//lib/plist/generator.rb#113 def tag(type, contents, level, &block); end end +# source://plist//lib/plist/parser.rb#42 class Plist::Listener + # @return [Listener] a new instance of Listener + # + # source://plist//lib/plist/parser.rb#47 def initialize(options = T.unsafe(nil)); end + # include REXML::StreamListener + # + # source://plist//lib/plist/parser.rb#45 def open; end + + # include REXML::StreamListener + # + # source://plist//lib/plist/parser.rb#45 def open=(_arg0); end + + # include REXML::StreamListener + # + # source://plist//lib/plist/parser.rb#45 def result; end + + # include REXML::StreamListener + # + # source://plist//lib/plist/parser.rb#45 def result=(_arg0); end + + # source://plist//lib/plist/parser.rb#64 def tag_end(name); end + + # source://plist//lib/plist/parser.rb#53 def tag_start(name, attributes); end + + # source://plist//lib/plist/parser.rb#57 def text(contents); end end +# source://plist//lib/plist/parser.rb#210 class Plist::PArray < ::Plist::PTag + # source://plist//lib/plist/parser.rb#211 def to_ruby; end end +# source://plist//lib/plist/parser.rb#250 class Plist::PData < ::Plist::PTag + # source://plist//lib/plist/parser.rb#251 def to_ruby; end end +# source://plist//lib/plist/parser.rb#243 class Plist::PDate < ::Plist::PTag + # source://plist//lib/plist/parser.rb#244 def to_ruby; end end +# source://plist//lib/plist/parser.rb#180 class Plist::PDict < ::Plist::PTag + # source://plist//lib/plist/parser.rb#181 def to_ruby; end end +# source://plist//lib/plist/parser.rb#230 class Plist::PFalse < ::Plist::PTag + # source://plist//lib/plist/parser.rb#231 def to_ruby; end end +# source://plist//lib/plist/parser.rb#218 class Plist::PInteger < ::Plist::PTag + # source://plist//lib/plist/parser.rb#219 def to_ruby; end end +# source://plist//lib/plist/parser.rb#198 class Plist::PKey < ::Plist::PTag + # source://plist//lib/plist/parser.rb#199 def to_ruby; end end +# source://plist//lib/plist/parser.rb#174 class Plist::PList < ::Plist::PTag + # source://plist//lib/plist/parser.rb#175 def to_ruby; end end +# source://plist//lib/plist/parser.rb#236 class Plist::PReal < ::Plist::PTag + # source://plist//lib/plist/parser.rb#237 def to_ruby; end end +# source://plist//lib/plist/parser.rb#204 class Plist::PString < ::Plist::PTag + # source://plist//lib/plist/parser.rb#205 def to_ruby; end end +# source://plist//lib/plist/parser.rb#150 class Plist::PTag + # @return [PTag] a new instance of PTag + # + # source://plist//lib/plist/parser.rb#164 def initialize(options); end + # Returns the value of attribute children. + # + # source://plist//lib/plist/parser.rb#163 def children; end + + # Sets the attribute children + # + # @param value the value to set the attribute children to. + # + # source://plist//lib/plist/parser.rb#163 def children=(_arg0); end + + # Returns the value of attribute options. + # + # source://plist//lib/plist/parser.rb#163 def options; end + + # Sets the attribute options + # + # @param value the value to set the attribute options to. + # + # source://plist//lib/plist/parser.rb#163 def options=(_arg0); end + + # Returns the value of attribute text. + # + # source://plist//lib/plist/parser.rb#163 def text; end + + # Sets the attribute text + # + # @param value the value to set the attribute text to. + # + # source://plist//lib/plist/parser.rb#163 def text=(_arg0); end + + # source://plist//lib/plist/parser.rb#169 def to_ruby; end class << self + # @private + # + # source://plist//lib/plist/parser.rb#155 def inherited(sub_class); end + + # source://plist//lib/plist/parser.rb#151 def mappings; end end end +# source://plist//lib/plist/parser.rb#224 class Plist::PTrue < ::Plist::PTag + # source://plist//lib/plist/parser.rb#225 def to_ruby; end end +# source://plist//lib/plist/parser.rb#74 class Plist::StreamParser + # @return [StreamParser] a new instance of StreamParser + # + # source://plist//lib/plist/parser.rb#75 def initialize(plist_data_or_file, listener); end + # source://plist//lib/plist/parser.rb#96 def parse; end private + # source://plist//lib/plist/parser.rb#135 def parse_encoding_from_xml_declaration(xml_declaration); end end +# source://plist//lib/plist/parser.rb#88 Plist::StreamParser::CDATA = T.let(T.unsafe(nil), Regexp) + +# source://plist//lib/plist/parser.rb#92 Plist::StreamParser::COMMENT_END = T.let(T.unsafe(nil), Regexp) + +# source://plist//lib/plist/parser.rb#91 Plist::StreamParser::COMMENT_START = T.let(T.unsafe(nil), Regexp) + +# source://plist//lib/plist/parser.rb#90 Plist::StreamParser::DOCTYPE_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://plist//lib/plist/parser.rb#87 Plist::StreamParser::TEXT = T.let(T.unsafe(nil), Regexp) + +# source://plist//lib/plist/parser.rb#93 Plist::StreamParser::UNIMPLEMENTED_ERROR = T.let(T.unsafe(nil), String) + +# source://plist//lib/plist/parser.rb#89 Plist::StreamParser::XMLDECL_PATTERN = T.let(T.unsafe(nil), Regexp) + +# Raised when an element is not implemented +# +# source://plist//lib/plist/parser.rb#17 class Plist::UnimplementedElementError < ::RuntimeError; end + +# source://plist//lib/plist/version.rb#4 Plist::VERSION = T.let(T.unsafe(nil), String) diff --git a/Library/Homebrew/sorbet/rbi/gems/prettier_print@1.2.1.rbi b/Library/Homebrew/sorbet/rbi/gems/prettier_print@1.2.1.rbi new file mode 100644 index 00000000000000..4e8852502c4bc7 --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/gems/prettier_print@1.2.1.rbi @@ -0,0 +1,951 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `prettier_print` gem. +# Please instead update this file by running `bin/tapioca gem prettier_print`. + +# This class implements a pretty printing algorithm. It finds line breaks and +# nice indentations for grouped structure. +# +# By default, the class assumes that primitive elements are strings and each +# byte in the strings is a single column in width. But it can be used for other +# situations by giving suitable arguments for some methods: +# +# * newline object and space generation block for PrettierPrint.new +# * optional width argument for PrettierPrint#text +# * PrettierPrint#breakable +# +# There are several candidate uses: +# * text formatting using proportional fonts +# * multibyte characters which has columns different to number of bytes +# * non-string formatting +# +# == Usage +# +# To use this module, you will need to generate a tree of print nodes that +# represent indentation and newline behavior before it gets sent to the printer. +# Each node has different semantics, depending on the desired output. +# +# The most basic node is a Text node. This represents plain text content that +# cannot be broken up even if it doesn't fit on one line. You would create one +# of those with the text method, as in: +# +# PrettierPrint.format { |q| q.text('my content') } +# +# No matter what the desired output width is, the output for the snippet above +# will always be the same. +# +# If you want to allow the printer to break up the content on the space +# character when there isn't enough width for the full string on the same line, +# you can use the Breakable and Group nodes. For example: +# +# PrettierPrint.format do |q| +# q.group do +# q.text("my") +# q.breakable +# q.text("content") +# end +# end +# +# Now, if everything fits on one line (depending on the maximum width specified) +# then it will be the same output as the first example. If, however, there is +# not enough room on the line, then you will get two lines of output, one for +# the first string and one for the second. +# +# There are other nodes for the print tree as well, described in the +# documentation below. They control alignment, indentation, conditional +# formatting, and more. +# +# == References +# Christian Lindig, Strictly Pretty, March 2000 +# https://lindig.github.io/papers/strictly-pretty-2000.pdf +# +# Philip Wadler, A prettier printer, March 1998 +# https://homepages.inf.ed.ac.uk/wadler/papers/prettier/prettier.pdf +# +# source://prettier_print//lib/prettier_print.rb#62 +class PrettierPrint + # Creates a buffer for pretty printing. + # + # +output+ is an output target. If it is not specified, '' is assumed. It + # should have a << method which accepts the first argument +obj+ of + # PrettierPrint#text, the first argument +separator+ of PrettierPrint#breakable, + # the first argument +newline+ of PrettierPrint.new, and the result of a given + # block for PrettierPrint.new. + # + # +maxwidth+ specifies maximum line length. If it is not specified, 80 is + # assumed. However actual outputs may overflow +maxwidth+ if long + # non-breakable texts are provided. + # + # +newline+ is used for line breaks. "\n" is used if it is not specified. + # + # The block is used to generate spaces. ->(n) { ' ' * n } is used if it is not + # given. + # + # @return [PrettierPrint] a new instance of PrettierPrint + # + # source://prettier_print//lib/prettier_print.rb#441 + def initialize(output = T.unsafe(nil), maxwidth = T.unsafe(nil), newline = T.unsafe(nil), &genspace); end + + # This inserts a BreakParent node into the print tree which forces the + # surrounding and all parent group nodes to break. + # + # source://prettier_print//lib/prettier_print.rb#814 + def break_parent; end + + # This says "you can break a line here if necessary", and a +width+\-column + # text +separator+ is inserted if a line is not broken at the point. + # + # If +separator+ is not specified, ' ' is used. + # + # If +width+ is not specified, +separator.length+ is used. You will have to + # specify this when +separator+ is a multibyte character, for example. + # + # By default, if the surrounding group is broken and a newline is inserted, + # the printer will indent the subsequent line up to the current level of + # indentation. You can disable this behavior with the +indent+ argument if + # that's not desired (rare). + # + # By default, when you insert a Breakable into the print tree, it only breaks + # the surrounding group when the group's contents cannot fit onto the + # remaining space of the current line. You can force it to break the + # surrounding group instead if you always want the newline with the +force+ + # argument. + # + # There are a few circumstances where you'll want to force the newline into + # the output but no insert a break parent (because you don't want to + # necessarily force the groups to break unless they need to). In this case you + # can pass `force: :skip_break_parent` to this method and it will not insert + # a break parent.` + # + # source://prettier_print//lib/prettier_print.rb#802 + def breakable(separator = T.unsafe(nil), width = T.unsafe(nil), indent: T.unsafe(nil), force: T.unsafe(nil)); end + + # Another very common breakable call you receive while formatting is an + # empty string in flat mode and a newline in break mode. Similar to + # breakable_space, this is here for avoid unnecessary calculation. + # + # source://prettier_print//lib/prettier_print.rb#646 + def breakable_empty; end + + # The final of the very common breakable calls you receive while formatting + # is the normal breakable space but with the addition of the break_parent. + # + # source://prettier_print//lib/prettier_print.rb#652 + def breakable_force; end + + # This is the same shortcut as breakable_force, except that it doesn't indent + # the next line. This is necessary if you're trying to preserve some custom + # formatting like a multi-line string. + # + # source://prettier_print//lib/prettier_print.rb#660 + def breakable_return; end + + # The vast majority of breakable calls you receive while formatting are a + # space in flat mode and a newline in break mode. Since this is so common, + # we have a method here to skip past unnecessary calculation. + # + # source://prettier_print//lib/prettier_print.rb#639 + def breakable_space; end + + # This is an output buffer that wraps the output object and provides + # additional functionality depending on its type. + # + # This defaults to Buffer::StringBuffer.new("".dup) + # + # source://prettier_print//lib/prettier_print.rb#400 + def buffer; end + + # A convenience method which is same as follows: + # + # text(",") + # breakable + # + # source://prettier_print//lib/prettier_print.rb#669 + def comma_breakable; end + + # Returns the group most recently added to the stack. + # + # Contrived example: + # out = "" + # => "" + # q = PrettierPrint.new(out) + # => # + # q.group { + # q.text q.current_group.inspect + # q.text q.newline + # q.group(q.current_group.depth + 1) { + # q.text q.current_group.inspect + # q.text q.newline + # q.group(q.current_group.depth + 1) { + # q.text q.current_group.inspect + # q.text q.newline + # q.group(q.current_group.depth + 1) { + # q.text q.current_group.inspect + # q.text q.newline + # } + # } + # } + # } + # => 284 + # puts out + # # + # # + # # + # # + # + # source://prettier_print//lib/prettier_print.rb#484 + def current_group; end + + # This is similar to #breakable except the decision to break or not is + # determined individually. + # + # Two #fill_breakable under a group may cause 4 results: + # (break,break), (break,non-break), (non-break,break), (non-break,non-break). + # This is different to #breakable because two #breakable under a group + # may cause 2 results: (break,break), (non-break,non-break). + # + # The text +separator+ is inserted if a line is not broken at this point. + # + # If +separator+ is not specified, ' ' is used. + # + # If +width+ is not specified, +separator.length+ is used. You will have to + # specify this when +separator+ is a multibyte character, for example. + # + # source://prettier_print//lib/prettier_print.rb#688 + def fill_breakable(separator = T.unsafe(nil), width = T.unsafe(nil)); end + + # Flushes all of the generated print tree onto the output buffer, then clears + # the generated tree from memory. + # + # source://prettier_print//lib/prettier_print.rb#490 + def flush(base_indentation = T.unsafe(nil)); end + + # An object that responds to call that takes one argument, of an Integer, and + # returns the corresponding number of spaces. + # + # By default this is: ->(n) { ' ' * n } + # + # source://prettier_print//lib/prettier_print.rb#416 + def genspace; end + + # Groups line break hints added in the block. The line break hints are all to + # be used or not. + # + # If +indent+ is specified, the method call is regarded as nested by + # nest(indent) { ... }. + # + # If +open_object+ is specified, text(open_object, open_width) is + # called before grouping. If +close_object+ is specified, + # text(close_object, close_width) is called after grouping. + # + # source://prettier_print//lib/prettier_print.rb#845 + def group(indent = T.unsafe(nil), open_object = T.unsafe(nil), close_object = T.unsafe(nil), open_width = T.unsafe(nil), close_width = T.unsafe(nil)); end + + # The stack of groups that are being printed. + # + # source://prettier_print//lib/prettier_print.rb#419 + def groups; end + + # Inserts an IfBreak node with the contents of the block being added to its + # list of nodes that should be printed if the surrounding node breaks. If it + # doesn't, then you can specify the contents to be printed with the #if_flat + # method used on the return object from this method. For example, + # + # q.if_break { q.text('do') }.if_flat { q.text('{') } + # + # In the example above, if the surrounding group is broken it will print 'do' + # and if it is not it will print '{'. + # + # source://prettier_print//lib/prettier_print.rb#917 + def if_break; end + + # This is similar to if_break in that it also inserts an IfBreak node into the + # print tree, however it's starting from the flat contents, and cannot be used + # to build the break contents. + # + # source://prettier_print//lib/prettier_print.rb#936 + def if_flat; end + + # Very similar to the #nest method, this indents the nested content by one + # level by inserting an Indent node into the print tree. The contents of the + # node are determined by the block. + # + # source://prettier_print//lib/prettier_print.rb#956 + def indent; end + + # This method calculates the position of the text relative to the current + # indentation level when the doc has been printed. It's useful for + # determining how to align text to doc nodes that are already built into the + # tree. + # + # source://prettier_print//lib/prettier_print.rb#696 + def last_position(node); end + + # Inserts a LineSuffix node into the print tree. The contents of the node are + # determined by the block. + # + # source://prettier_print//lib/prettier_print.rb#967 + def line_suffix(priority: T.unsafe(nil)); end + + # The maximum width of a line, before it is separated in to a newline + # + # This defaults to 80, and should be an Integer + # + # source://prettier_print//lib/prettier_print.rb#405 + def maxwidth; end + + # Increases left margin after newline with +indent+ for line breaks added in + # the block. + # + # source://prettier_print//lib/prettier_print.rb#977 + def nest(indent); end + + # The value that is appended to +output+ to add a new line. + # + # This defaults to "\n", and should be String + # + # source://prettier_print//lib/prettier_print.rb#410 + def newline; end + + # The output object. It represents the final destination of the contents of + # the print tree. It should respond to <<. + # + # This defaults to "".dup + # + # source://prettier_print//lib/prettier_print.rb#394 + def output; end + + # This method will remove any breakables from the list of contents so that + # no newlines are present in the output. If a newline is being forced into + # the output, the replace value will be used. + # + # source://prettier_print//lib/prettier_print.rb#721 + def remove_breaks(node, replace = T.unsafe(nil)); end + + # Adds a separated list. + # The list is separated by comma with breakable space, by default. + # + # #seplist iterates the +list+ using +iter_method+. + # It yields each object to the block given for #seplist. + # The procedure +separator_proc+ is called between each yields. + # + # If the iteration is zero times, +separator_proc+ is not called at all. + # + # If +separator_proc+ is nil or not given, + # +lambda { comma_breakable }+ is used. + # If +iter_method+ is not given, :each is used. + # + # For example, following 3 code fragments has similar effect. + # + # q.seplist([1,2,3]) {|v| xxx v } + # + # q.seplist([1,2,3], lambda { q.comma_breakable }, :each) {|v| xxx v } + # + # xxx 1 + # q.comma_breakable + # xxx 2 + # q.comma_breakable + # xxx 3 + # + # source://prettier_print//lib/prettier_print.rb#760 + def seplist(list, sep = T.unsafe(nil), iter_method = T.unsafe(nil)); end + + # The current array of contents that calls to methods that generate print tree + # nodes will append to. + # + # source://prettier_print//lib/prettier_print.rb#423 + def target; end + + # This adds +object+ as a text of +width+ columns in width. + # + # If +width+ is not specified, object.length is used. + # + # source://prettier_print//lib/prettier_print.rb#989 + def text(object = T.unsafe(nil), width = T.unsafe(nil)); end + + # This inserts a Trim node into the print tree which, when printed, will clear + # all whitespace at the end of the output buffer. This is useful for the rare + # case where you need to delete printed indentation and force the next node + # to start at the beginning of the line. + # + # source://prettier_print//lib/prettier_print.rb#828 + def trim; end + + # A convenience method used by a lot of the print tree node builders that + # temporarily changes the target that the builders will append to. + # + # source://prettier_print//lib/prettier_print.rb#1007 + def with_target(target); end + + private + + # This method returns a boolean as to whether or not the remaining commands + # fit onto the remaining space on the current line. If we finish printing + # all of the commands or if we hit a newline, then we return true. Otherwise + # if we continue printing past the remaining space, we return false. + # + # @return [Boolean] + # + # source://prettier_print//lib/prettier_print.rb#1019 + def fits?(next_commands, rest_commands, remaining); end + + # source://prettier_print//lib/prettier_print.rb#1091 + def remove_breaks_with(doc, replace); end + + # Resets the group stack and target array so that this pretty printer object + # can continue to be used before calling flush again if desired. + # + # source://prettier_print//lib/prettier_print.rb#1085 + def reset; end + + class << self + # This is a convenience method which is same as follows: + # + # begin + # q = PrettierPrint.new(output, maxwidth, newline, &genspace) + # ... + # q.flush + # output + # end + # + # @yield [q] + # + # source://prettier_print//lib/prettier_print.rb#377 + def format(output = T.unsafe(nil), maxwidth = T.unsafe(nil), newline = T.unsafe(nil), genspace = T.unsafe(nil), indentation = T.unsafe(nil)); end + + # This is similar to PrettierPrint::format but the result has no breaks. + # + # +maxwidth+, +newline+ and +genspace+ are ignored. + # + # The invocation of +breakable+ in the block doesn't break a line and is + # treated as just an invocation of +text+. + # + # @yield [q] + # + # source://prettier_print//lib/prettier_print/single_line.rb#156 + def singleline_format(output = T.unsafe(nil), _maxwidth = T.unsafe(nil), _newline = T.unsafe(nil), _genspace = T.unsafe(nil)); end + end +end + +# A node in the print tree that represents aligning nested nodes to a certain +# prefix width or string. +# +# source://prettier_print//lib/prettier_print.rb#65 +class PrettierPrint::Align + # @return [Align] a new instance of Align + # + # source://prettier_print//lib/prettier_print.rb#68 + def initialize(indent:, contents: T.unsafe(nil)); end + + # Returns the value of attribute contents. + # + # source://prettier_print//lib/prettier_print.rb#66 + def contents; end + + # Returns the value of attribute indent. + # + # source://prettier_print//lib/prettier_print.rb#66 + def indent; end + + # source://prettier_print//lib/prettier_print.rb#73 + def pretty_print(q); end +end + +# source://prettier_print//lib/prettier_print.rb#126 +PrettierPrint::BREAKABLE_EMPTY = T.let(T.unsafe(nil), PrettierPrint::Breakable) + +# source://prettier_print//lib/prettier_print.rb#127 +PrettierPrint::BREAKABLE_FORCE = T.let(T.unsafe(nil), PrettierPrint::Breakable) + +# source://prettier_print//lib/prettier_print.rb#128 +PrettierPrint::BREAKABLE_RETURN = T.let(T.unsafe(nil), PrettierPrint::Breakable) + +# Below here are the most common combination of options that are created when +# creating new breakables. They are here to cut down on some allocations. +# +# source://prettier_print//lib/prettier_print.rb#125 +PrettierPrint::BREAKABLE_SPACE = T.let(T.unsafe(nil), PrettierPrint::Breakable) + +# Since there's really no difference in these instances, just using the same +# one saves on some allocations. +# +# source://prettier_print//lib/prettier_print.rb#141 +PrettierPrint::BREAK_PARENT = T.let(T.unsafe(nil), PrettierPrint::BreakParent) + +# A node in the print tree that forces the surrounding group to print out in +# the "break" mode as opposed to the "flat" mode. Useful for when you need to +# force a newline into a group. +# +# source://prettier_print//lib/prettier_print.rb#133 +class PrettierPrint::BreakParent + # source://prettier_print//lib/prettier_print.rb#134 + def pretty_print(q); end +end + +# A node in the print tree that represents a place in the buffer that the +# content can be broken onto multiple lines. +# +# source://prettier_print//lib/prettier_print.rb#82 +class PrettierPrint::Breakable + # @return [Breakable] a new instance of Breakable + # + # source://prettier_print//lib/prettier_print.rb#85 + def initialize(separator = T.unsafe(nil), width = T.unsafe(nil), force: T.unsafe(nil), indent: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://prettier_print//lib/prettier_print.rb#97 + def force?; end + + # @return [Boolean] + # + # source://prettier_print//lib/prettier_print.rb#101 + def indent?; end + + # source://prettier_print//lib/prettier_print.rb#105 + def pretty_print(q); end + + # Returns the value of attribute separator. + # + # source://prettier_print//lib/prettier_print.rb#83 + def separator; end + + # Returns the value of attribute width. + # + # source://prettier_print//lib/prettier_print.rb#83 + def width; end +end + +# When building up the contents in the output buffer, it's convenient to be +# able to trim trailing whitespace before newlines. If the output object is a +# string or array or strings, then we can do this with some gsub calls. If +# not, then this effectively just wraps the output object and forwards on +# calls to <<. +# +# source://prettier_print//lib/prettier_print.rb#277 +module PrettierPrint::Buffer + class << self + # This is a switch for building the correct output buffer wrapper class for + # the given output object. + # + # source://prettier_print//lib/prettier_print.rb#336 + def for(output); end + end +end + +# This is an output buffer that wraps an array output object. It provides a +# trim! method that trims off trailing whitespace from the last element in +# the array if it's an unfrozen string using the same method as the +# StringBuffer. +# +# source://prettier_print//lib/prettier_print.rb#303 +class PrettierPrint::Buffer::ArrayBuffer + # @return [ArrayBuffer] a new instance of ArrayBuffer + # + # source://prettier_print//lib/prettier_print.rb#306 + def initialize(output = T.unsafe(nil)); end + + # source://prettier_print//lib/prettier_print.rb#310 + def <<(object); end + + # Returns the value of attribute output. + # + # source://prettier_print//lib/prettier_print.rb#304 + def output; end + + # source://prettier_print//lib/prettier_print.rb#314 + def trim!; end +end + +# This is an output buffer that wraps a string output object. It provides a +# trim! method that trims off trailing whitespace from the string using +# gsub!. +# +# source://prettier_print//lib/prettier_print.rb#281 +class PrettierPrint::Buffer::StringBuffer + # @return [StringBuffer] a new instance of StringBuffer + # + # source://prettier_print//lib/prettier_print.rb#284 + def initialize(output = T.unsafe(nil)); end + + # source://prettier_print//lib/prettier_print.rb#288 + def <<(object); end + + # Returns the value of attribute output. + # + # source://prettier_print//lib/prettier_print.rb#282 + def output; end + + # source://prettier_print//lib/prettier_print.rb#292 + def trim!; end +end + +# When generating spaces after a newline for indentation, by default we +# generate one space per character needed for indentation. You can change this +# behavior (for instance to use tabs) by passing a different genspace +# procedure. +# +# source://prettier_print//lib/prettier_print.rb#350 +PrettierPrint::DEFAULT_GENSPACE = T.let(T.unsafe(nil), Proc) + +# The default indentation for printing is zero, assuming that the code starts +# at the top level. That can be changed if desired to start from a different +# indentation level. +# +# source://prettier_print//lib/prettier_print.rb#366 +PrettierPrint::DEFAULT_INDENTATION = T.let(T.unsafe(nil), Integer) + +# When printing, you can optionally specify the value that should be used +# whenever a group needs to be broken onto multiple lines. In this case the +# default is \n. +# +# source://prettier_print//lib/prettier_print.rb#344 +PrettierPrint::DEFAULT_NEWLINE = T.let(T.unsafe(nil), String) + +# A node in the print tree that represents a group of items which the printer +# should try to fit onto one line. This is the basic command to tell the +# printer when to break. Groups are usually nested, and the printer will try +# to fit everything on one line, but if it doesn't fit it will break the +# outermost group first and try again. It will continue breaking groups until +# everything fits (or there are no more groups to break). +# +# source://prettier_print//lib/prettier_print.rb#149 +class PrettierPrint::Group + # @return [Group] a new instance of Group + # + # source://prettier_print//lib/prettier_print.rb#152 + def initialize(depth, contents: T.unsafe(nil)); end + + # source://prettier_print//lib/prettier_print.rb#158 + def break; end + + # @return [Boolean] + # + # source://prettier_print//lib/prettier_print.rb#162 + def break?; end + + # Returns the value of attribute contents. + # + # source://prettier_print//lib/prettier_print.rb#150 + def contents; end + + # Returns the value of attribute depth. + # + # source://prettier_print//lib/prettier_print.rb#150 + def depth; end + + # source://prettier_print//lib/prettier_print.rb#166 + def pretty_print(q); end +end + +# A node in the print tree that represents printing one thing if the +# surrounding group node is broken and another thing if the surrounding group +# node is flat. +# +# source://prettier_print//lib/prettier_print.rb#176 +class PrettierPrint::IfBreak + # @return [IfBreak] a new instance of IfBreak + # + # source://prettier_print//lib/prettier_print.rb#179 + def initialize(break_contents: T.unsafe(nil), flat_contents: T.unsafe(nil)); end + + # Returns the value of attribute break_contents. + # + # source://prettier_print//lib/prettier_print.rb#177 + def break_contents; end + + # Returns the value of attribute flat_contents. + # + # source://prettier_print//lib/prettier_print.rb#177 + def flat_contents; end + + # source://prettier_print//lib/prettier_print.rb#184 + def pretty_print(q); end +end + +# A small DSL-like object used for specifying the alternative contents to be +# printed if the surrounding group doesn't break for an IfBreak node. +# +# source://prettier_print//lib/prettier_print.rb#874 +class PrettierPrint::IfBreakBuilder + # @return [IfBreakBuilder] a new instance of IfBreakBuilder + # + # source://prettier_print//lib/prettier_print.rb#877 + def initialize(q, flat_contents); end + + # Returns the value of attribute flat_contents. + # + # source://prettier_print//lib/prettier_print.rb#875 + def flat_contents; end + + # source://prettier_print//lib/prettier_print.rb#882 + def if_flat; end + + # Returns the value of attribute q. + # + # source://prettier_print//lib/prettier_print.rb#875 + def q; end +end + +# When we already know that groups are broken, we don't actually need to track +# the flat versions of the contents. So this builder version is effectively a +# no-op, but we need it to maintain the same API. The only thing this can +# impact is that if there's a forced break in the flat contents, then we need +# to propagate that break up the whole tree. +# +# source://prettier_print//lib/prettier_print.rb#892 +class PrettierPrint::IfFlatIgnore + # @return [IfFlatIgnore] a new instance of IfFlatIgnore + # + # source://prettier_print//lib/prettier_print.rb#895 + def initialize(q); end + + # source://prettier_print//lib/prettier_print.rb#899 + def if_flat; end + + # Returns the value of attribute q. + # + # source://prettier_print//lib/prettier_print.rb#893 + def q; end +end + +# A node in the print tree that is a variant of the Align node that indents +# its contents by one level. +# +# source://prettier_print//lib/prettier_print.rb#200 +class PrettierPrint::Indent + # @return [Indent] a new instance of Indent + # + # source://prettier_print//lib/prettier_print.rb#203 + def initialize(contents: T.unsafe(nil)); end + + # Returns the value of attribute contents. + # + # source://prettier_print//lib/prettier_print.rb#201 + def contents; end + + # source://prettier_print//lib/prettier_print.rb#207 + def pretty_print(q); end +end + +# A node in the print tree that has its own special buffer for implementing +# content that should flush before any newline. +# +# Useful for implementating trailing content, as it's not always practical to +# constantly check where the line ends to avoid accidentally printing some +# content after a line suffix node. +# +# source://prettier_print//lib/prettier_print.rb#220 +class PrettierPrint::LineSuffix + # @return [LineSuffix] a new instance of LineSuffix + # + # source://prettier_print//lib/prettier_print.rb#225 + def initialize(priority: T.unsafe(nil), contents: T.unsafe(nil)); end + + # Returns the value of attribute contents. + # + # source://prettier_print//lib/prettier_print.rb#223 + def contents; end + + # source://prettier_print//lib/prettier_print.rb#230 + def pretty_print(q); end + + # Returns the value of attribute priority. + # + # source://prettier_print//lib/prettier_print.rb#223 + def priority; end +end + +# source://prettier_print//lib/prettier_print.rb#221 +PrettierPrint::LineSuffix::DEFAULT_PRIORITY = T.let(T.unsafe(nil), Integer) + +# There are two modes in printing, break and flat. When we're in break mode, +# any lines will use their newline, any if-breaks will use their break +# contents, etc. +# +# source://prettier_print//lib/prettier_print.rb#356 +PrettierPrint::MODE_BREAK = T.let(T.unsafe(nil), Integer) + +# This is another print mode much like MODE_BREAK. When we're in flat mode, we +# attempt to print everything on one line until we either hit a broken group, +# a forced line, or the maximum width. +# +# source://prettier_print//lib/prettier_print.rb#361 +PrettierPrint::MODE_FLAT = T.let(T.unsafe(nil), Integer) + +# PrettierPrint::SingleLine is used by PrettierPrint.singleline_format +# +# It is passed to be similar to a PrettierPrint object itself, by responding to +# all of the same print tree node builder methods, as well as the #flush +# method. +# +# The significant difference here is that there are no line breaks in the +# output. If an IfBreak node is used, only the flat contents are printed. +# LineSuffix nodes are printed at the end of the buffer when #flush is called. +# +# source://prettier_print//lib/prettier_print/single_line.rb#13 +class PrettierPrint::SingleLine + # Create a PrettierPrint::SingleLine object + # + # Arguments: + # * +output+ - String (or similar) to store rendered text. Needs to respond + # to '<<'. + # * +maxwidth+ - Argument position expected to be here for compatibility. + # This argument is a noop. + # * +newline+ - Argument position expected to be here for compatibility. + # This argument is a noop. + # + # @return [SingleLine] a new instance of SingleLine + # + # source://prettier_print//lib/prettier_print/single_line.rb#34 + def initialize(output, _maxwidth = T.unsafe(nil), _newline = T.unsafe(nil)); end + + # Here for compatibility, does nothing. + # + # source://prettier_print//lib/prettier_print/single_line.rb#64 + def break_parent; end + + # Appends +separator+ to the text to be output. By default +separator+ is + # ' ' + # + # The +width+, +indent+, and +force+ arguments are here for compatibility. + # They are all noop arguments. + # + # source://prettier_print//lib/prettier_print/single_line.rb#54 + def breakable(separator = T.unsafe(nil), _width = T.unsafe(nil), indent: T.unsafe(nil), force: T.unsafe(nil)); end + + # Appends +separator+ to the output buffer. +width+ is a noop here for + # compatibility. + # + # source://prettier_print//lib/prettier_print/single_line.rb#69 + def fill_breakable(separator = T.unsafe(nil), _width = T.unsafe(nil)); end + + # Flushes the line suffixes onto the output buffer. + # + # source://prettier_print//lib/prettier_print/single_line.rb#41 + def flush; end + + # Opens a block for grouping objects to be pretty printed. + # + # Arguments: + # * +indent+ - noop argument. Present for compatibility. + # * +open_obj+ - text appended before the &block. Default is '' + # * +close_obj+ - text appended after the &block. Default is '' + # * +open_width+ - noop argument. Present for compatibility. + # * +close_width+ - noop argument. Present for compatibility. + # + # source://prettier_print//lib/prettier_print/single_line.rb#90 + def group(_indent = T.unsafe(nil), open_object = T.unsafe(nil), close_object = T.unsafe(nil), _open_width = T.unsafe(nil), _close_width = T.unsafe(nil)); end + + # Effectively unnecessary, but here for compatibility. + # + # source://prettier_print//lib/prettier_print/single_line.rb#113 + def if_break; end + + # Also effectively unnecessary, but here for compatibility. + # + # source://prettier_print//lib/prettier_print/single_line.rb#118 + def if_flat; end + + # A noop that immediately yields. + # + # source://prettier_print//lib/prettier_print/single_line.rb#122 + def indent; end + + # Changes the target output buffer to the line suffix output buffer which + # will get flushed at the end of printing. + # + # source://prettier_print//lib/prettier_print/single_line.rb#128 + def line_suffix; end + + # A buffer output that wraps any calls to line_suffix that will be flushed + # at the end of printing. + # + # source://prettier_print//lib/prettier_print/single_line.rb#23 + def line_suffixes; end + + # Takes +indent+ arg, but does nothing with it. + # + # Yields to a block. + # + # source://prettier_print//lib/prettier_print/single_line.rb#137 + def nest(_indent); end + + # The output object. It stores rendered text and should respond to <<. + # + # source://prettier_print//lib/prettier_print/single_line.rb#15 + def output; end + + # The current array of contents that the print tree builder methods should + # append to. + # + # source://prettier_print//lib/prettier_print/single_line.rb#19 + def target; end + + # Add +object+ to the text to be output. + # + # +width+ argument is here for compatibility. It is a noop argument. + # + # source://prettier_print//lib/prettier_print/single_line.rb#144 + def text(object = T.unsafe(nil), _width = T.unsafe(nil)); end + + # Immediately trims the output buffer. + # + # source://prettier_print//lib/prettier_print/single_line.rb#74 + def trim; end +end + +# A class that wraps the ability to call #if_flat. The contents of the +# #if_flat block are executed immediately, so effectively this class and the +# #if_break method that triggers it are unnecessary, but they're here to +# maintain compatibility. +# +# source://prettier_print//lib/prettier_print/single_line.rb#106 +class PrettierPrint::SingleLine::IfBreakBuilder + # source://prettier_print//lib/prettier_print/single_line.rb#107 + def if_flat; end +end + +# Since all of the instances here are the same, we can reuse the same one to +# cut down on allocations. +# +# source://prettier_print//lib/prettier_print.rb#270 +PrettierPrint::TRIM = T.let(T.unsafe(nil), PrettierPrint::Trim) + +# A node in the print tree that represents plain content that cannot be broken +# up (by default this assumes strings, but it can really be anything). +# +# source://prettier_print//lib/prettier_print.rb#239 +class PrettierPrint::Text + # @return [Text] a new instance of Text + # + # source://prettier_print//lib/prettier_print.rb#242 + def initialize; end + + # source://prettier_print//lib/prettier_print.rb#247 + def add(object: T.unsafe(nil), width: T.unsafe(nil)); end + + # Returns the value of attribute objects. + # + # source://prettier_print//lib/prettier_print.rb#240 + def objects; end + + # source://prettier_print//lib/prettier_print.rb#252 + def pretty_print(q); end + + # Returns the value of attribute width. + # + # source://prettier_print//lib/prettier_print.rb#240 + def width; end +end + +# A node in the print tree that represents trimming all of the indentation of +# the current line, in the rare case that you need to ignore the indentation +# that you've already created. This node should be placed after a Breakable. +# +# source://prettier_print//lib/prettier_print.rb#262 +class PrettierPrint::Trim + # source://prettier_print//lib/prettier_print.rb#263 + def pretty_print(q); end +end diff --git a/Library/Homebrew/sorbet/rbi/gems/prism@0.18.0.rbi b/Library/Homebrew/sorbet/rbi/gems/prism@0.18.0.rbi new file mode 100644 index 00000000000000..2cca8f4618567a --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/gems/prism@0.18.0.rbi @@ -0,0 +1,28702 @@ +# 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`. + +# =begin +# This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/rbi/prism.rbi.erb +# if you are looking to modify the template +# =end + +# The Prism Ruby parser. +# +# "Parsing Ruby is suddenly manageable!" +# - You, hopefully +# +# source://prism//lib/prism.rb#8 +module Prism + class << self + # Mirror the Prism.dump API by using the serialization API. + def dump(*_arg0); end + + # Mirror the Prism.dump_file API by using the serialization API. + def dump_file(*_arg0); end + + # Mirror the Prism.lex API by using the serialization API. + def lex(*_arg0); end + + # :call-seq: + # Prism::lex_compat(source, **options) -> Array + # + # Returns an array of tokens that closely resembles that of the Ripper lexer. + # The only difference is that since we don't keep track of lexer state in the + # same way, it's going to always return the NONE state. + # + # For supported options, see Prism::parse. + # + # source://prism//lib/prism.rb#46 + def lex_compat(source, **options); end + + # Mirror the Prism.lex_file API by using the serialization API. + def lex_file(*_arg0); end + + # :call-seq: + # Prism::lex_ripper(source) -> Array + # + # This lexes with the Ripper lex. It drops any space events but otherwise + # returns the same tokens. Raises SyntaxError if the syntax in source is + # invalid. + # + # source://prism//lib/prism.rb#56 + def lex_ripper(source); end + + # :call-seq: + # Prism::load(source, serialized) -> ParseResult + # + # Load the serialized AST using the source as a reference into a tree. + # + # source://prism//lib/prism.rb#64 + def load(source, serialized); end + + # Mirror the Prism.parse API by using the serialization API. + def parse(*_arg0); end + + # Mirror the Prism.parse_comments API by using the serialization API. + def parse_comments(*_arg0); end + + # Mirror the Prism.parse_file API by using the serialization API. This uses + # native strings instead of Ruby strings because it allows us to use mmap when + # it is available. + def parse_file(*_arg0); end + + # Mirror the Prism.parse_file_comments API by using the serialization + # API. This uses native strings instead of Ruby strings because it allows us + # to use mmap when it is available. + def parse_file_comments(*_arg0); end + + # Mirror the Prism.parse_lex API by using the serialization API. + def parse_lex(*_arg0); end + + # Mirror the Prism.parse_lex_file API by using the serialization API. + def parse_lex_file(*_arg0); end + end +end + +# Represents the use of the `alias` keyword to alias a global variable. +# +# alias $foo $bar +# ^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#53 +class Prism::AliasGlobalVariableNode < ::Prism::Node + # def initialize: (new_name: Node, old_name: Node, keyword_loc: Location, location: Location) -> void + # + # @return [AliasGlobalVariableNode] a new instance of AliasGlobalVariableNode + # + # source://prism//lib/prism/node.rb#63 + sig do + params( + new_name: Prism::Node, + old_name: Prism::Node, + keyword_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(new_name, old_name, keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#71 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#76 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#86 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#81 + def compact_child_nodes; end + + # def copy: (**params) -> AliasGlobalVariableNode + # + # source://prism//lib/prism/node.rb#91 + sig { params(params: T.untyped).returns(Prism::AliasGlobalVariableNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#76 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#104 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#114 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#109 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#60 + sig { returns(Prism::Location) } + def keyword_loc; end + + # attr_reader new_name: Node + # + # source://prism//lib/prism/node.rb#54 + sig { returns(Prism::Node) } + def new_name; end + + # attr_reader old_name: Node + # + # source://prism//lib/prism/node.rb#57 + sig { returns(Prism::Node) } + def old_name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#138 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#148 + def type; end + end +end + +# Represents the use of the `alias` keyword to alias a method. +# +# alias foo bar +# ^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#158 +class Prism::AliasMethodNode < ::Prism::Node + # def initialize: (new_name: Node, old_name: Node, keyword_loc: Location, location: Location) -> void + # + # @return [AliasMethodNode] a new instance of AliasMethodNode + # + # source://prism//lib/prism/node.rb#168 + sig do + params( + new_name: Prism::Node, + old_name: Prism::Node, + keyword_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(new_name, old_name, keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#176 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#181 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#191 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#186 + def compact_child_nodes; end + + # def copy: (**params) -> AliasMethodNode + # + # source://prism//lib/prism/node.rb#196 + sig { params(params: T.untyped).returns(Prism::AliasMethodNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#181 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#209 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#219 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#214 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#165 + sig { returns(Prism::Location) } + def keyword_loc; end + + # attr_reader new_name: Node + # + # source://prism//lib/prism/node.rb#159 + sig { returns(Prism::Node) } + def new_name; end + + # attr_reader old_name: Node + # + # source://prism//lib/prism/node.rb#162 + sig { returns(Prism::Node) } + def old_name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#243 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#253 + def type; end + end +end + +# Represents an alternation pattern in pattern matching. +# +# foo => bar | baz +# ^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#263 +class Prism::AlternationPatternNode < ::Prism::Node + # def initialize: (left: Node, right: Node, operator_loc: Location, location: Location) -> void + # + # @return [AlternationPatternNode] a new instance of AlternationPatternNode + # + # source://prism//lib/prism/node.rb#273 + sig { params(left: Prism::Node, right: Prism::Node, operator_loc: Prism::Location, location: Prism::Location).void } + def initialize(left, right, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#281 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#286 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#296 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#291 + def compact_child_nodes; end + + # def copy: (**params) -> AlternationPatternNode + # + # source://prism//lib/prism/node.rb#301 + sig { params(params: T.untyped).returns(Prism::AlternationPatternNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#286 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#314 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#324 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader left: Node + # + # source://prism//lib/prism/node.rb#264 + sig { returns(Prism::Node) } + def left; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#319 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#270 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader right: Node + # + # source://prism//lib/prism/node.rb#267 + sig { returns(Prism::Node) } + def right; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#348 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#358 + def type; end + end +end + +# Represents the use of the `&&` operator or the `and` keyword. +# +# left and right +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#368 +class Prism::AndNode < ::Prism::Node + # def initialize: (left: Node, right: Node, operator_loc: Location, location: Location) -> void + # + # @return [AndNode] a new instance of AndNode + # + # source://prism//lib/prism/node.rb#378 + sig { params(left: Prism::Node, right: Prism::Node, operator_loc: Prism::Location, location: Prism::Location).void } + def initialize(left, right, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#386 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#391 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#401 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#396 + def compact_child_nodes; end + + # def copy: (**params) -> AndNode + # + # source://prism//lib/prism/node.rb#406 + sig { params(params: T.untyped).returns(Prism::AndNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#391 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#419 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#429 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader left: Node + # + # source://prism//lib/prism/node.rb#369 + sig { returns(Prism::Node) } + def left; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#424 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#375 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader right: Node + # + # source://prism//lib/prism/node.rb#372 + sig { returns(Prism::Node) } + def right; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#453 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#463 + def type; end + end +end + +# Represents a set of arguments to a method or a keyword. +# +# return foo, bar, baz +# ^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#473 +class Prism::ArgumentsNode < ::Prism::Node + # def initialize: (arguments: Array[Node], flags: Integer, location: Location) -> void + # + # @return [ArgumentsNode] a new instance of ArgumentsNode + # + # source://prism//lib/prism/node.rb#480 + sig { params(arguments: T::Array[Prism::Node], flags: Integer, location: Prism::Location).void } + def initialize(arguments, flags, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#487 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # attr_reader arguments: Array[Node] + # + # source://prism//lib/prism/node.rb#474 + sig { returns(T::Array[Prism::Node]) } + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#492 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#502 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#497 + def compact_child_nodes; end + + # def copy: (**params) -> ArgumentsNode + # + # source://prism//lib/prism/node.rb#507 + sig { params(params: T.untyped).returns(Prism::ArgumentsNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#492 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#519 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#529 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword_splat?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#524 + sig { returns(T::Boolean) } + def keyword_splat?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#551 + def type; end + + private + + # Returns the value of attribute flags. + # + # source://prism//lib/prism/node.rb#477 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#561 + def type; end + end +end + +# Flags for arguments nodes. +# +# source://prism//lib/prism/node.rb#16605 +module Prism::ArgumentsNodeFlags; end + +# if arguments contain keyword splat +# +# source://prism//lib/prism/node.rb#16607 +Prism::ArgumentsNodeFlags::KEYWORD_SPLAT = T.let(T.unsafe(nil), Integer) + +# Represents an array literal. This can be a regular array using brackets or +# a special array using % like %w or %i. +# +# [1, 2, 3] +# ^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#572 +class Prism::ArrayNode < ::Prism::Node + # def initialize: (elements: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location) -> void + # + # @return [ArrayNode] a new instance of ArrayNode + # + # source://prism//lib/prism/node.rb#582 + sig do + params( + elements: T::Array[Prism::Node], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(elements, opening_loc, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#590 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#595 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#633 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#579 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#605 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#600 + def compact_child_nodes; end + + # def copy: (**params) -> ArrayNode + # + # source://prism//lib/prism/node.rb#610 + sig { params(params: T.untyped).returns(Prism::ArrayNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#595 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#623 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # attr_reader elements: Array[Node] + # + # source://prism//lib/prism/node.rb#573 + sig { returns(T::Array[Prism::Node]) } + def elements; end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#638 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#628 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#576 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#660 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#670 + def type; end + end +end + +# Represents an array pattern in pattern matching. +# +# foo in 1, 2 +# ^^^^^^^^^^^ +# +# foo in [1, 2] +# ^^^^^^^^^^^^^ +# +# foo in *1 +# ^^^^^^^^^ +# +# foo in Bar[] +# ^^^^^^^^^^^^ +# +# foo in Bar[1, 2, 3] +# ^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#692 +class Prism::ArrayPatternNode < ::Prism::Node + # def initialize: (constant: Node?, requireds: Array[Node], rest: Node?, posts: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location) -> void + # + # @return [ArrayPatternNode] a new instance of ArrayPatternNode + # + # source://prism//lib/prism/node.rb#711 + sig do + params( + constant: T.nilable(Prism::Node), + requireds: T::Array[Prism::Node], + rest: T.nilable(Prism::Node), + posts: T::Array[Prism::Node], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(constant, requireds, rest, posts, opening_loc, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#722 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#727 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#773 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#708 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#742 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#732 + def compact_child_nodes; end + + # attr_reader constant: Node? + # + # source://prism//lib/prism/node.rb#693 + sig { returns(T.nilable(Prism::Node)) } + def constant; end + + # def copy: (**params) -> ArrayPatternNode + # + # source://prism//lib/prism/node.rb#747 + sig { params(params: T.untyped).returns(Prism::ArrayPatternNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#727 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#763 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#778 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#768 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#705 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # attr_reader posts: Array[Node] + # + # source://prism//lib/prism/node.rb#702 + sig { returns(T::Array[Prism::Node]) } + def posts; end + + # attr_reader requireds: Array[Node] + # + # source://prism//lib/prism/node.rb#696 + sig { returns(T::Array[Prism::Node]) } + def requireds; end + + # attr_reader rest: Node? + # + # source://prism//lib/prism/node.rb#699 + sig { returns(T.nilable(Prism::Node)) } + def rest; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#813 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#823 + def type; end + end +end + +# Represents a hash key/value pair. +# +# { a => b } +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#833 +class Prism::AssocNode < ::Prism::Node + # def initialize: (key: Node, value: Node?, operator_loc: Location?, location: Location) -> void + # + # @return [AssocNode] a new instance of AssocNode + # + # source://prism//lib/prism/node.rb#843 + sig do + params( + key: Prism::Node, + value: T.nilable(Prism::Node), + operator_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(key, value, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#851 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#856 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#869 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#861 + def compact_child_nodes; end + + # def copy: (**params) -> AssocNode + # + # source://prism//lib/prism/node.rb#874 + sig { params(params: T.untyped).returns(Prism::AssocNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#856 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#887 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#897 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader key: Node + # + # source://prism//lib/prism/node.rb#834 + sig { returns(Prism::Node) } + def key; end + + # def operator: () -> String? + # + # source://prism//lib/prism/node.rb#892 + sig { returns(T.nilable(String)) } + def operator; end + + # attr_reader operator_loc: Location? + # + # source://prism//lib/prism/node.rb#840 + sig { returns(T.nilable(Prism::Location)) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#925 + def type; end + + # attr_reader value: Node? + # + # source://prism//lib/prism/node.rb#837 + sig { returns(T.nilable(Prism::Node)) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#935 + def type; end + end +end + +# Represents a splat in a hash literal. +# +# { **foo } +# ^^^^^ +# +# source://prism//lib/prism/node.rb#945 +class Prism::AssocSplatNode < ::Prism::Node + # def initialize: (value: Node?, operator_loc: Location, location: Location) -> void + # + # @return [AssocSplatNode] a new instance of AssocSplatNode + # + # source://prism//lib/prism/node.rb#952 + sig { params(value: T.nilable(Prism::Node), operator_loc: Prism::Location, location: Prism::Location).void } + def initialize(value, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#959 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#964 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#976 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#969 + def compact_child_nodes; end + + # def copy: (**params) -> AssocSplatNode + # + # source://prism//lib/prism/node.rb#981 + sig { params(params: T.untyped).returns(Prism::AssocSplatNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#964 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#993 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#1003 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#998 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#949 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1029 + def type; end + + # attr_reader value: Node? + # + # source://prism//lib/prism/node.rb#946 + sig { returns(T.nilable(Prism::Node)) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1039 + def type; end + end +end + +Prism::BACKEND = T.let(T.unsafe(nil), Symbol) + +# Represents reading a reference to a field in the previous match. +# +# $' +# ^^ +# +# source://prism//lib/prism/node.rb#1049 +class Prism::BackReferenceReadNode < ::Prism::Node + # def initialize: (name: Symbol, location: Location) -> void + # + # @return [BackReferenceReadNode] a new instance of BackReferenceReadNode + # + # source://prism//lib/prism/node.rb#1053 + sig { params(name: Symbol, location: Prism::Location).void } + def initialize(name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#1059 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1064 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1074 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1069 + def compact_child_nodes; end + + # def copy: (**params) -> BackReferenceReadNode + # + # source://prism//lib/prism/node.rb#1079 + sig { params(params: T.untyped).returns(Prism::BackReferenceReadNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1064 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#1090 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#1095 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#1050 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1115 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1125 + def type; end + end +end + +# A class that knows how to walk down the tree. None of the individual visit +# methods are implemented on this visitor, so it forces the consumer to +# implement each one that they need. For a default implementation that +# continues walking the tree, see the Visitor class. +# +# source://prism//lib/prism/visitor.rb#13 +class Prism::BasicVisitor + # Calls `accept` on the given node if it is not `nil`, which in turn should + # call back into this visitor by calling the appropriate `visit_*` method. + # + # source://prism//lib/prism/visitor.rb#16 + sig { params(node: T.nilable(Prism::Node)).void } + def visit(node); end + + # Visits each node in `nodes` by calling `accept` on each one. + # + # source://prism//lib/prism/visitor.rb#21 + sig { params(nodes: T::Array[T.nilable(Prism::Node)]).void } + def visit_all(nodes); end + + # Visits the child nodes of `node` by calling `accept` on each one. + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::Node).void } + def visit_child_nodes(node); end +end + +# Represents a begin statement. +# +# begin +# foo +# end +# ^^^^^ +# +# source://prism//lib/prism/node.rb#1137 +class Prism::BeginNode < ::Prism::Node + # def initialize: (begin_keyword_loc: Location?, statements: StatementsNode?, rescue_clause: RescueNode?, else_clause: ElseNode?, ensure_clause: EnsureNode?, end_keyword_loc: Location?, location: Location) -> void + # + # @return [BeginNode] a new instance of BeginNode + # + # source://prism//lib/prism/node.rb#1156 + sig do + params( + begin_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + rescue_clause: T.nilable(Prism::RescueNode), + else_clause: T.nilable(Prism::ElseNode), + ensure_clause: T.nilable(Prism::EnsureNode), + end_keyword_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(begin_keyword_loc, statements, rescue_clause, else_clause, ensure_clause, end_keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#1167 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def begin_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#1217 + sig { returns(T.nilable(String)) } + def begin_keyword; end + + # attr_reader begin_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#1138 + sig { returns(T.nilable(Prism::Location)) } + def begin_keyword_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1176 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1191 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1181 + def compact_child_nodes; end + + # def copy: (**params) -> BeginNode + # + # source://prism//lib/prism/node.rb#1196 + sig { params(params: T.untyped).returns(Prism::BeginNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1176 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#1212 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # attr_reader else_clause: ElseNode? + # + # source://prism//lib/prism/node.rb#1147 + sig { returns(T.nilable(Prism::ElseNode)) } + def else_clause; end + + # def end_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#1222 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#1153 + sig { returns(T.nilable(Prism::Location)) } + def end_keyword_loc; end + + # attr_reader ensure_clause: EnsureNode? + # + # source://prism//lib/prism/node.rb#1150 + sig { returns(T.nilable(Prism::EnsureNode)) } + def ensure_clause; end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#1227 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader rescue_clause: RescueNode? + # + # source://prism//lib/prism/node.rb#1144 + sig { returns(T.nilable(Prism::RescueNode)) } + def rescue_clause; end + + # source://prism//lib/prism/node.rb#1171 + def set_newline_flag(newline_marked); end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#1141 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1272 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1282 + def type; end + end +end + +# Represents block method arguments. +# +# bar(&args) +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#1292 +class Prism::BlockArgumentNode < ::Prism::Node + # def initialize: (expression: Node?, operator_loc: Location, location: Location) -> void + # + # @return [BlockArgumentNode] a new instance of BlockArgumentNode + # + # source://prism//lib/prism/node.rb#1299 + sig { params(expression: T.nilable(Prism::Node), operator_loc: Prism::Location, location: Prism::Location).void } + def initialize(expression, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#1306 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1311 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1323 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1316 + def compact_child_nodes; end + + # def copy: (**params) -> BlockArgumentNode + # + # source://prism//lib/prism/node.rb#1328 + sig { params(params: T.untyped).returns(Prism::BlockArgumentNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1311 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#1340 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # attr_reader expression: Node? + # + # source://prism//lib/prism/node.rb#1293 + sig { returns(T.nilable(Prism::Node)) } + def expression; end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#1350 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#1345 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#1296 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1376 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1386 + def type; end + end +end + +# Represents a block local variable. +# +# a { |; b| } +# ^ +# +# source://prism//lib/prism/node.rb#1396 +class Prism::BlockLocalVariableNode < ::Prism::Node + # def initialize: (name: Symbol, location: Location) -> void + # + # @return [BlockLocalVariableNode] a new instance of BlockLocalVariableNode + # + # source://prism//lib/prism/node.rb#1400 + sig { params(name: Symbol, location: Prism::Location).void } + def initialize(name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#1406 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1411 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1421 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1416 + def compact_child_nodes; end + + # def copy: (**params) -> BlockLocalVariableNode + # + # source://prism//lib/prism/node.rb#1426 + sig { params(params: T.untyped).returns(Prism::BlockLocalVariableNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1411 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#1437 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#1442 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#1397 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1462 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1472 + def type; end + end +end + +# Represents a block of ruby code. +# +# [1, 2, 3].each { |i| puts x } +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#1482 +class Prism::BlockNode < ::Prism::Node + # def initialize: (locals: Array[Symbol], parameters: BlockParametersNode?, body: Node?, opening_loc: Location, closing_loc: Location, location: Location) -> void + # + # @return [BlockNode] a new instance of BlockNode + # + # source://prism//lib/prism/node.rb#1498 + sig do + params( + locals: T::Array[Symbol], + parameters: T.nilable(Prism::BlockParametersNode), + body: T.nilable(Prism::Node), + opening_loc: Prism::Location, + closing_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(locals, parameters, body, opening_loc, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#1508 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # attr_reader body: Node? + # + # source://prism//lib/prism/node.rb#1489 + sig { returns(T.nilable(Prism::Node)) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1513 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#1556 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#1495 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1526 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1518 + def compact_child_nodes; end + + # def copy: (**params) -> BlockNode + # + # source://prism//lib/prism/node.rb#1531 + sig { params(params: T.untyped).returns(Prism::BlockNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1513 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#1546 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#1561 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#1483 + sig { returns(T::Array[Symbol]) } + def locals; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#1551 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#1492 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader parameters: BlockParametersNode? + # + # source://prism//lib/prism/node.rb#1486 + sig { returns(T.nilable(Prism::BlockParametersNode)) } + def parameters; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1595 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1605 + def type; end + end +end + +# Represents a block parameter to a method, block, or lambda definition. +# +# def a(&b) +# ^^ +# end +# +# source://prism//lib/prism/node.rb#1616 +class Prism::BlockParameterNode < ::Prism::Node + # def initialize: (name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location) -> void + # + # @return [BlockParameterNode] a new instance of BlockParameterNode + # + # source://prism//lib/prism/node.rb#1626 + sig do + params( + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(name, name_loc, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#1634 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1639 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1649 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1644 + def compact_child_nodes; end + + # def copy: (**params) -> BlockParameterNode + # + # source://prism//lib/prism/node.rb#1654 + sig { params(params: T.untyped).returns(Prism::BlockParameterNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1639 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#1667 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#1677 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol? + # + # source://prism//lib/prism/node.rb#1617 + sig { returns(T.nilable(Symbol)) } + def name; end + + # attr_reader name_loc: Location? + # + # source://prism//lib/prism/node.rb#1620 + sig { returns(T.nilable(Prism::Location)) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#1672 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#1623 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1703 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1713 + def type; end + end +end + +# Represents a block's parameters declaration. +# +# -> (a, b = 1; local) { } +# ^^^^^^^^^^^^^^^^^ +# +# foo do |a, b = 1; local| +# ^^^^^^^^^^^^^^^^^ +# end +# +# source://prism//lib/prism/node.rb#1727 +class Prism::BlockParametersNode < ::Prism::Node + # def initialize: (parameters: ParametersNode?, locals: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location) -> void + # + # @return [BlockParametersNode] a new instance of BlockParametersNode + # + # source://prism//lib/prism/node.rb#1740 + sig do + params( + parameters: T.nilable(Prism::ParametersNode), + locals: T::Array[Prism::Node], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(parameters, locals, opening_loc, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#1749 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1754 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#1796 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#1737 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1767 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1759 + def compact_child_nodes; end + + # def copy: (**params) -> BlockParametersNode + # + # source://prism//lib/prism/node.rb#1772 + sig { params(params: T.untyped).returns(Prism::BlockParametersNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1754 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#1786 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#1801 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader locals: Array[Node] + # + # source://prism//lib/prism/node.rb#1731 + sig { returns(T::Array[Prism::Node]) } + def locals; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#1791 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#1734 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # attr_reader parameters: ParametersNode? + # + # source://prism//lib/prism/node.rb#1728 + sig { returns(T.nilable(Prism::ParametersNode)) } + def parameters; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1829 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1839 + def type; end + end +end + +# Represents the use of the `break` keyword. +# +# break foo +# ^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#1849 +class Prism::BreakNode < ::Prism::Node + # def initialize: (arguments: ArgumentsNode?, keyword_loc: Location, location: Location) -> void + # + # @return [BreakNode] a new instance of BreakNode + # + # source://prism//lib/prism/node.rb#1856 + sig do + params( + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(arguments, keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#1863 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#1850 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1868 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1880 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1873 + def compact_child_nodes; end + + # def copy: (**params) -> BreakNode + # + # source://prism//lib/prism/node.rb#1885 + sig { params(params: T.untyped).returns(Prism::BreakNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1868 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#1897 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#1907 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#1902 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#1853 + sig { returns(Prism::Location) } + def keyword_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1933 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1943 + def type; end + end +end + +# Represents the use of the `&&=` operator on a call. +# +# foo.bar &&= value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#1953 +class Prism::CallAndWriteNode < ::Prism::Node + # def initialize: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, flags: Integer, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [CallAndWriteNode] a new instance of CallAndWriteNode + # + # source://prism//lib/prism/node.rb#1978 + sig do + params( + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + flags: Integer, + read_name: Symbol, + write_name: Symbol, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(receiver, call_operator_loc, message_loc, flags, read_name, write_name, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#1991 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#2037 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#1957 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1996 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#2009 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#2001 + def compact_child_nodes; end + + # def copy: (**params) -> CallAndWriteNode + # + # source://prism//lib/prism/node.rb#2014 + sig { params(params: T.untyped).returns(Prism::CallAndWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1996 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#2032 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#2062 + def inspect(inspector = T.unsafe(nil)); end + + # def message: () -> String? + # + # source://prism//lib/prism/node.rb#2042 + sig { returns(T.nilable(String)) } + def message; end + + # attr_reader message_loc: Location? + # + # source://prism//lib/prism/node.rb#1960 + sig { returns(T.nilable(Prism::Location)) } + def message_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#2057 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#1972 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader read_name: Symbol + # + # source://prism//lib/prism/node.rb#1966 + sig { returns(Symbol) } + def read_name; end + + # attr_reader receiver: Node? + # + # source://prism//lib/prism/node.rb#1954 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2047 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#2096 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#1975 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2052 + sig { returns(T::Boolean) } + def variable_call?; end + + # attr_reader write_name: Symbol + # + # source://prism//lib/prism/node.rb#1969 + sig { returns(Symbol) } + def write_name; end + + private + + # Returns the value of attribute flags. + # + # source://prism//lib/prism/node.rb#1963 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#2106 + def type; end + end +end + +# Represents a method call, in all of the various forms that can take. +# +# foo +# ^^^ +# +# foo() +# ^^^^^ +# +# +foo +# ^^^^ +# +# foo + bar +# ^^^^^^^^^ +# +# foo.bar +# ^^^^^^^ +# +# foo&.bar +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#2131 +class Prism::CallNode < ::Prism::Node + # def initialize: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, block: Node?, flags: Integer, name: Symbol, location: Location) -> void + # + # @return [CallNode] a new instance of CallNode + # + # source://prism//lib/prism/node.rb#2159 + sig do + params( + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + opening_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: T.nilable(Prism::Location), + block: T.nilable(Prism::Node), + flags: Integer, + name: Symbol, + location: Prism::Location + ).void + end + def initialize(receiver, call_operator_loc, message_loc, opening_loc, arguments, closing_loc, block, flags, name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#2173 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#2144 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # attr_reader block: Node? + # + # source://prism//lib/prism/node.rb#2150 + sig { returns(T.nilable(Prism::Node)) } + def block; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#2221 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#2135 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2178 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#2236 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#2147 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#2192 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#2183 + def compact_child_nodes; end + + # def copy: (**params) -> CallNode + # + # source://prism//lib/prism/node.rb#2197 + sig { params(params: T.untyped).returns(Prism::CallNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2178 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#2216 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#2251 + def inspect(inspector = T.unsafe(nil)); end + + # def message: () -> String? + # + # source://prism//lib/prism/node.rb#2226 + sig { returns(T.nilable(String)) } + def message; end + + # attr_reader message_loc: Location? + # + # source://prism//lib/prism/node.rb#2138 + sig { returns(T.nilable(Prism::Location)) } + def message_loc; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#2156 + sig { returns(Symbol) } + def name; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#2231 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#2141 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # attr_reader receiver: Node? + # + # source://prism//lib/prism/node.rb#2132 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2241 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#2295 + def type; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2246 + sig { returns(T::Boolean) } + def variable_call?; end + + private + + # Returns the value of attribute flags. + # + # source://prism//lib/prism/node.rb#2153 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#2305 + def type; end + end +end + +# Flags for call nodes. +# +# source://prism//lib/prism/node.rb#16611 +module Prism::CallNodeFlags; end + +# &. operator +# +# source://prism//lib/prism/node.rb#16613 +Prism::CallNodeFlags::SAFE_NAVIGATION = T.let(T.unsafe(nil), Integer) + +# a call that could have been a local variable +# +# source://prism//lib/prism/node.rb#16616 +Prism::CallNodeFlags::VARIABLE_CALL = T.let(T.unsafe(nil), Integer) + +# Represents the use of an assignment operator on a call. +# +# foo.bar += baz +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#2315 +class Prism::CallOperatorWriteNode < ::Prism::Node + # def initialize: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, flags: Integer, read_name: Symbol, write_name: Symbol, operator: Symbol, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [CallOperatorWriteNode] a new instance of CallOperatorWriteNode + # + # source://prism//lib/prism/node.rb#2343 + sig do + params( + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + flags: Integer, + read_name: Symbol, + write_name: Symbol, + operator: Symbol, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(receiver, call_operator_loc, message_loc, flags, read_name, write_name, operator, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#2357 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#2404 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#2319 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2362 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#2375 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#2367 + def compact_child_nodes; end + + # def copy: (**params) -> CallOperatorWriteNode + # + # source://prism//lib/prism/node.rb#2380 + sig { params(params: T.untyped).returns(Prism::CallOperatorWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2362 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#2399 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#2424 + def inspect(inspector = T.unsafe(nil)); end + + # def message: () -> String? + # + # source://prism//lib/prism/node.rb#2409 + sig { returns(T.nilable(String)) } + def message; end + + # attr_reader message_loc: Location? + # + # source://prism//lib/prism/node.rb#2322 + sig { returns(T.nilable(Prism::Location)) } + def message_loc; end + + # attr_reader operator: Symbol + # + # source://prism//lib/prism/node.rb#2334 + sig { returns(Symbol) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#2337 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader read_name: Symbol + # + # source://prism//lib/prism/node.rb#2328 + sig { returns(Symbol) } + def read_name; end + + # attr_reader receiver: Node? + # + # source://prism//lib/prism/node.rb#2316 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2414 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#2459 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#2340 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2419 + sig { returns(T::Boolean) } + def variable_call?; end + + # attr_reader write_name: Symbol + # + # source://prism//lib/prism/node.rb#2331 + sig { returns(Symbol) } + def write_name; end + + private + + # Returns the value of attribute flags. + # + # source://prism//lib/prism/node.rb#2325 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#2469 + def type; end + end +end + +# Represents the use of the `||=` operator on a call. +# +# foo.bar ||= value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#2479 +class Prism::CallOrWriteNode < ::Prism::Node + # def initialize: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, flags: Integer, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [CallOrWriteNode] a new instance of CallOrWriteNode + # + # source://prism//lib/prism/node.rb#2504 + sig do + params( + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + flags: Integer, + read_name: Symbol, + write_name: Symbol, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(receiver, call_operator_loc, message_loc, flags, read_name, write_name, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#2517 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#2563 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#2483 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2522 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#2535 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#2527 + def compact_child_nodes; end + + # def copy: (**params) -> CallOrWriteNode + # + # source://prism//lib/prism/node.rb#2540 + sig { params(params: T.untyped).returns(Prism::CallOrWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2522 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#2558 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#2588 + def inspect(inspector = T.unsafe(nil)); end + + # def message: () -> String? + # + # source://prism//lib/prism/node.rb#2568 + sig { returns(T.nilable(String)) } + def message; end + + # attr_reader message_loc: Location? + # + # source://prism//lib/prism/node.rb#2486 + sig { returns(T.nilable(Prism::Location)) } + def message_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#2583 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#2498 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader read_name: Symbol + # + # source://prism//lib/prism/node.rb#2492 + sig { returns(Symbol) } + def read_name; end + + # attr_reader receiver: Node? + # + # source://prism//lib/prism/node.rb#2480 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2573 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#2622 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#2501 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2578 + sig { returns(T::Boolean) } + def variable_call?; end + + # attr_reader write_name: Symbol + # + # source://prism//lib/prism/node.rb#2495 + sig { returns(Symbol) } + def write_name; end + + private + + # Returns the value of attribute flags. + # + # source://prism//lib/prism/node.rb#2489 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#2632 + def type; end + end +end + +# Represents assigning to a local variable in pattern matching. +# +# foo => [bar => baz] +# ^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#2642 +class Prism::CapturePatternNode < ::Prism::Node + # def initialize: (value: Node, target: Node, operator_loc: Location, location: Location) -> void + # + # @return [CapturePatternNode] a new instance of CapturePatternNode + # + # source://prism//lib/prism/node.rb#2652 + sig do + params( + value: Prism::Node, + target: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(value, target, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#2660 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2665 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#2675 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#2670 + def compact_child_nodes; end + + # def copy: (**params) -> CapturePatternNode + # + # source://prism//lib/prism/node.rb#2680 + sig { params(params: T.untyped).returns(Prism::CapturePatternNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2665 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#2693 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#2703 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#2698 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#2649 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader target: Node + # + # source://prism//lib/prism/node.rb#2646 + sig { returns(Prism::Node) } + def target; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#2727 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#2643 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#2737 + def type; end + end +end + +# Represents the use of a case statement for pattern matching. +# +# case true +# in false +# end +# ^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#2749 +class Prism::CaseMatchNode < ::Prism::Node + # def initialize: (predicate: Node?, conditions: Array[Node], consequent: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location, location: Location) -> void + # + # @return [CaseMatchNode] a new instance of CaseMatchNode + # + # source://prism//lib/prism/node.rb#2765 + sig do + params( + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::Node], + consequent: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#2775 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def case_keyword: () -> String + # + # source://prism//lib/prism/node.rb#2819 + sig { returns(String) } + def case_keyword; end + + # attr_reader case_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#2759 + sig { returns(Prism::Location) } + def case_keyword_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2780 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#2794 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#2785 + def compact_child_nodes; end + + # attr_reader conditions: Array[Node] + # + # source://prism//lib/prism/node.rb#2753 + sig { returns(T::Array[Prism::Node]) } + def conditions; end + + # attr_reader consequent: ElseNode? + # + # source://prism//lib/prism/node.rb#2756 + sig { returns(T.nilable(Prism::ElseNode)) } + def consequent; end + + # def copy: (**params) -> CaseMatchNode + # + # source://prism//lib/prism/node.rb#2799 + sig { params(params: T.untyped).returns(Prism::CaseMatchNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2780 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#2814 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#2824 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#2762 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#2829 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader predicate: Node? + # + # source://prism//lib/prism/node.rb#2750 + sig { returns(T.nilable(Prism::Node)) } + def predicate; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#2863 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#2873 + def type; end + end +end + +# Represents the use of a case statement. +# +# case true +# when false +# end +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#2885 +class Prism::CaseNode < ::Prism::Node + # def initialize: (predicate: Node?, conditions: Array[Node], consequent: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location, location: Location) -> void + # + # @return [CaseNode] a new instance of CaseNode + # + # source://prism//lib/prism/node.rb#2901 + sig do + params( + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::Node], + consequent: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#2911 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def case_keyword: () -> String + # + # source://prism//lib/prism/node.rb#2955 + sig { returns(String) } + def case_keyword; end + + # attr_reader case_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#2895 + sig { returns(Prism::Location) } + def case_keyword_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2916 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#2930 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#2921 + def compact_child_nodes; end + + # attr_reader conditions: Array[Node] + # + # source://prism//lib/prism/node.rb#2889 + sig { returns(T::Array[Prism::Node]) } + def conditions; end + + # attr_reader consequent: ElseNode? + # + # source://prism//lib/prism/node.rb#2892 + sig { returns(T.nilable(Prism::ElseNode)) } + def consequent; end + + # def copy: (**params) -> CaseNode + # + # source://prism//lib/prism/node.rb#2935 + sig { params(params: T.untyped).returns(Prism::CaseNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2916 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#2950 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#2960 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#2898 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#2965 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader predicate: Node? + # + # source://prism//lib/prism/node.rb#2886 + sig { returns(T.nilable(Prism::Node)) } + def predicate; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#2999 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3009 + def type; end + end +end + +# Represents a class declaration involving the `class` keyword. +# +# class Foo end +# ^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3019 +class Prism::ClassNode < ::Prism::Node + # def initialize: (locals: Array[Symbol], class_keyword_loc: Location, constant_path: Node, inheritance_operator_loc: Location?, superclass: Node?, body: Node?, end_keyword_loc: Location, name: Symbol, location: Location) -> void + # + # @return [ClassNode] a new instance of ClassNode + # + # source://prism//lib/prism/node.rb#3044 + sig do + params( + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + constant_path: Prism::Node, + inheritance_operator_loc: T.nilable(Prism::Location), + superclass: T.nilable(Prism::Node), + body: T.nilable(Prism::Node), + end_keyword_loc: Prism::Location, + name: Symbol, + location: Prism::Location + ).void + end + def initialize(locals, class_keyword_loc, constant_path, inheritance_operator_loc, superclass, body, end_keyword_loc, name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#3057 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # attr_reader body: Node? + # + # source://prism//lib/prism/node.rb#3035 + sig { returns(T.nilable(Prism::Node)) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3062 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def class_keyword: () -> String + # + # source://prism//lib/prism/node.rb#3104 + sig { returns(String) } + def class_keyword; end + + # attr_reader class_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#3023 + sig { returns(Prism::Location) } + def class_keyword_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3076 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3067 + def compact_child_nodes; end + + # attr_reader constant_path: Node + # + # source://prism//lib/prism/node.rb#3026 + sig { returns(Prism::Node) } + def constant_path; end + + # def copy: (**params) -> ClassNode + # + # source://prism//lib/prism/node.rb#3081 + sig { params(params: T.untyped).returns(Prism::ClassNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3062 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#3099 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#3114 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#3038 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + # def inheritance_operator: () -> String? + # + # source://prism//lib/prism/node.rb#3109 + sig { returns(T.nilable(String)) } + def inheritance_operator; end + + # attr_reader inheritance_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#3029 + sig { returns(T.nilable(Prism::Location)) } + def inheritance_operator_loc; end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#3119 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#3020 + sig { returns(T::Array[Symbol]) } + def locals; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#3041 + sig { returns(Symbol) } + def name; end + + # attr_reader superclass: Node? + # + # source://prism//lib/prism/node.rb#3032 + sig { returns(T.nilable(Prism::Node)) } + def superclass; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3157 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3167 + def type; end + end +end + +# Represents the use of the `&&=` operator for assignment to a class variable. +# +# @@target &&= value +# ^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3177 +class Prism::ClassVariableAndWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [ClassVariableAndWriteNode] a new instance of ClassVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#3190 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(name, name_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#3199 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3204 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3214 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3209 + def compact_child_nodes; end + + # def copy: (**params) -> ClassVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#3219 + sig { params(params: T.untyped).returns(Prism::ClassVariableAndWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3204 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#3233 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#3243 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#3178 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#3181 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#3238 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#3184 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3267 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#3187 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3277 + def type; end + end +end + +# Represents assigning to a class variable using an operator that isn't `=`. +# +# @@target += value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3287 +class Prism::ClassVariableOperatorWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> void + # + # @return [ClassVariableOperatorWriteNode] a new instance of ClassVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#3303 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + operator: Symbol, + location: Prism::Location + ).void + end + def initialize(name, name_loc, operator_loc, value, operator, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#3313 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3318 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3328 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3323 + def compact_child_nodes; end + + # def copy: (**params) -> ClassVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#3333 + sig { params(params: T.untyped).returns(Prism::ClassVariableOperatorWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3318 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#3348 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#3353 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#3288 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#3291 + sig { returns(Prism::Location) } + def name_loc; end + + # attr_reader operator: Symbol + # + # source://prism//lib/prism/node.rb#3300 + sig { returns(Symbol) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#3294 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3378 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#3297 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3388 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to a class variable. +# +# @@target ||= value +# ^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3398 +class Prism::ClassVariableOrWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [ClassVariableOrWriteNode] a new instance of ClassVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#3411 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(name, name_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#3420 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3425 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3435 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3430 + def compact_child_nodes; end + + # def copy: (**params) -> ClassVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#3440 + sig { params(params: T.untyped).returns(Prism::ClassVariableOrWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3425 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#3454 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#3464 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#3399 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#3402 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#3459 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#3405 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3488 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#3408 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3498 + def type; end + end +end + +# Represents referencing a class variable. +# +# @@foo +# ^^^^^ +# +# source://prism//lib/prism/node.rb#3508 +class Prism::ClassVariableReadNode < ::Prism::Node + # def initialize: (name: Symbol, location: Location) -> void + # + # @return [ClassVariableReadNode] a new instance of ClassVariableReadNode + # + # source://prism//lib/prism/node.rb#3512 + sig { params(name: Symbol, location: Prism::Location).void } + def initialize(name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#3518 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3523 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3533 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3528 + def compact_child_nodes; end + + # def copy: (**params) -> ClassVariableReadNode + # + # source://prism//lib/prism/node.rb#3538 + sig { params(params: T.untyped).returns(Prism::ClassVariableReadNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3523 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#3549 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#3554 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#3509 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3574 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3584 + def type; end + end +end + +# Represents writing to a class variable in a context that doesn't have an explicit value. +# +# @@foo, @@bar = baz +# ^^^^^ ^^^^^ +# +# source://prism//lib/prism/node.rb#3594 +class Prism::ClassVariableTargetNode < ::Prism::Node + # def initialize: (name: Symbol, location: Location) -> void + # + # @return [ClassVariableTargetNode] a new instance of ClassVariableTargetNode + # + # source://prism//lib/prism/node.rb#3598 + sig { params(name: Symbol, location: Prism::Location).void } + def initialize(name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#3604 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3609 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3619 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3614 + def compact_child_nodes; end + + # def copy: (**params) -> ClassVariableTargetNode + # + # source://prism//lib/prism/node.rb#3624 + sig { params(params: T.untyped).returns(Prism::ClassVariableTargetNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3609 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#3635 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#3640 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#3595 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3660 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3670 + def type; end + end +end + +# Represents writing to a class variable. +# +# @@foo = 1 +# ^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3680 +class Prism::ClassVariableWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location?, location: Location) -> void + # + # @return [ClassVariableWriteNode] a new instance of ClassVariableWriteNode + # + # source://prism//lib/prism/node.rb#3693 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(name, name_loc, value, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#3702 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3707 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3717 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3712 + def compact_child_nodes; end + + # def copy: (**params) -> ClassVariableWriteNode + # + # source://prism//lib/prism/node.rb#3722 + sig { params(params: T.untyped).returns(Prism::ClassVariableWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3707 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#3736 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#3746 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#3681 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#3684 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String? + # + # source://prism//lib/prism/node.rb#3741 + sig { returns(T.nilable(String)) } + def operator; end + + # attr_reader operator_loc: Location? + # + # source://prism//lib/prism/node.rb#3690 + sig { returns(T.nilable(Prism::Location)) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3770 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#3687 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3780 + def type; end + end +end + +# This represents a comment that was encountered during parsing. It is the +# base class for all comment types. +# +# source://prism//lib/prism/parse_result.rb#228 +class Prism::Comment + # Create a new comment object with the given location. + # + # @return [Comment] a new instance of Comment + # + # source://prism//lib/prism/parse_result.rb#233 + def initialize(location); end + + # Implement the hash pattern matching interface for Comment. + # + # source://prism//lib/prism/parse_result.rb#238 + def deconstruct_keys(keys); end + + # The location of this comment in the source. + # + # source://prism//lib/prism/parse_result.rb#230 + sig { returns(Prism::Location) } + def location; end + + # This can only be true for inline comments. + # + # @return [Boolean] + # + # source://prism//lib/prism/parse_result.rb#243 + sig { returns(T::Boolean) } + def trailing?; end +end + +# A compiler is a visitor that returns the value of each node as it visits. +# This is as opposed to a visitor which will only walk the tree. This can be +# useful when you are trying to compile a tree into a different format. +# +# For example, to build a representation of the tree as s-expressions, you +# could write: +# +# class SExpressions < Prism::Compiler +# def visit_arguments_node(node) = [:arguments, super] +# def visit_call_node(node) = [:call, super] +# def visit_integer_node(node) = [:integer] +# def visit_program_node(node) = [:program, super] +# end +# +# Prism.parse("1 + 2").value.accept(SExpressions.new) +# # => [:program, [[[:call, [[:integer], [:arguments, [[:integer]]]]]]]] +# +# source://prism//lib/prism/compiler.rb#26 +class Prism::Compiler + # Visit an individual node. + # + # source://prism//lib/prism/compiler.rb#28 + def visit(node); end + + # Visit the child nodes of the given node. + # Compile a AliasGlobalVariableNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_alias_global_variable_node(node); end + + # Visit the child nodes of the given node. + # Compile a AliasMethodNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_alias_method_node(node); end + + # Visit a list of nodes. + # + # source://prism//lib/prism/compiler.rb#33 + def visit_all(nodes); end + + # Visit the child nodes of the given node. + # Compile a AlternationPatternNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_alternation_pattern_node(node); end + + # Visit the child nodes of the given node. + # Compile a AndNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_and_node(node); end + + # Visit the child nodes of the given node. + # Compile a ArgumentsNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_arguments_node(node); end + + # Visit the child nodes of the given node. + # Compile a ArrayNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_array_node(node); end + + # Visit the child nodes of the given node. + # Compile a ArrayPatternNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_array_pattern_node(node); end + + # Visit the child nodes of the given node. + # Compile a AssocNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_assoc_node(node); end + + # Visit the child nodes of the given node. + # Compile a AssocSplatNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_assoc_splat_node(node); end + + # Visit the child nodes of the given node. + # Compile a BackReferenceReadNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_back_reference_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a BeginNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_begin_node(node); end + + # Visit the child nodes of the given node. + # Compile a BlockArgumentNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_block_argument_node(node); end + + # Visit the child nodes of the given node. + # Compile a BlockLocalVariableNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_block_local_variable_node(node); end + + # Visit the child nodes of the given node. + # Compile a BlockNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_block_node(node); end + + # Visit the child nodes of the given node. + # Compile a BlockParameterNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_block_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a BlockParametersNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_block_parameters_node(node); end + + # Visit the child nodes of the given node. + # Compile a BreakNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_break_node(node); end + + # Visit the child nodes of the given node. + # Compile a CallAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_call_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a CallNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_call_node(node); end + + # Visit the child nodes of the given node. + # Compile a CallOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_call_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a CallOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_call_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a CapturePatternNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_capture_pattern_node(node); end + + # Visit the child nodes of the given node. + # Compile a CaseMatchNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_case_match_node(node); end + + # Visit the child nodes of the given node. + # Compile a CaseNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_case_node(node); end + + # Visit the child nodes of the given node. + # + # source://prism//lib/prism/compiler.rb#38 + def visit_child_nodes(node); end + + # Visit the child nodes of the given node. + # Compile a ClassNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_class_node(node); end + + # Visit the child nodes of the given node. + # Compile a ClassVariableAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_class_variable_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ClassVariableOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_class_variable_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ClassVariableOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_class_variable_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ClassVariableReadNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_class_variable_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a ClassVariableTargetNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_class_variable_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a ClassVariableWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_class_variable_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_constant_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_constant_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_constant_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantPathAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_constant_path_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantPathNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_constant_path_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantPathOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_constant_path_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantPathOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_constant_path_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantPathTargetNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_constant_path_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantPathWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_constant_path_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantReadNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_constant_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantTargetNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_constant_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_constant_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a DefNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_def_node(node); end + + # Visit the child nodes of the given node. + # Compile a DefinedNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_defined_node(node); end + + # Visit the child nodes of the given node. + # Compile a ElseNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_else_node(node); end + + # Visit the child nodes of the given node. + # Compile a EmbeddedStatementsNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_embedded_statements_node(node); end + + # Visit the child nodes of the given node. + # Compile a EmbeddedVariableNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_embedded_variable_node(node); end + + # Visit the child nodes of the given node. + # Compile a EnsureNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_ensure_node(node); end + + # Visit the child nodes of the given node. + # Compile a FalseNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_false_node(node); end + + # Visit the child nodes of the given node. + # Compile a FindPatternNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_find_pattern_node(node); end + + # Visit the child nodes of the given node. + # Compile a FlipFlopNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_flip_flop_node(node); end + + # Visit the child nodes of the given node. + # Compile a FloatNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_float_node(node); end + + # Visit the child nodes of the given node. + # Compile a ForNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_for_node(node); end + + # Visit the child nodes of the given node. + # Compile a ForwardingArgumentsNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_forwarding_arguments_node(node); end + + # Visit the child nodes of the given node. + # Compile a ForwardingParameterNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_forwarding_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a ForwardingSuperNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_forwarding_super_node(node); end + + # Visit the child nodes of the given node. + # Compile a GlobalVariableAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_global_variable_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a GlobalVariableOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_global_variable_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a GlobalVariableOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_global_variable_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a GlobalVariableReadNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_global_variable_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a GlobalVariableTargetNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_global_variable_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a GlobalVariableWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_global_variable_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a HashNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_hash_node(node); end + + # Visit the child nodes of the given node. + # Compile a HashPatternNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_hash_pattern_node(node); end + + # Visit the child nodes of the given node. + # Compile a IfNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_if_node(node); end + + # Visit the child nodes of the given node. + # Compile a ImaginaryNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_imaginary_node(node); end + + # Visit the child nodes of the given node. + # Compile a ImplicitNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_implicit_node(node); end + + # Visit the child nodes of the given node. + # Compile a InNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_in_node(node); end + + # Visit the child nodes of the given node. + # Compile a IndexAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_index_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a IndexOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_index_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a IndexOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_index_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a InstanceVariableAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_instance_variable_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a InstanceVariableOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_instance_variable_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a InstanceVariableOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_instance_variable_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a InstanceVariableReadNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_instance_variable_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a InstanceVariableTargetNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_instance_variable_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a InstanceVariableWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_instance_variable_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a IntegerNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_integer_node(node); end + + # Visit the child nodes of the given node. + # Compile a InterpolatedMatchLastLineNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_interpolated_match_last_line_node(node); end + + # Visit the child nodes of the given node. + # Compile a InterpolatedRegularExpressionNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_interpolated_regular_expression_node(node); end + + # Visit the child nodes of the given node. + # Compile a InterpolatedStringNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_interpolated_string_node(node); end + + # Visit the child nodes of the given node. + # Compile a InterpolatedSymbolNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_interpolated_symbol_node(node); end + + # Visit the child nodes of the given node. + # Compile a InterpolatedXStringNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_interpolated_x_string_node(node); end + + # Visit the child nodes of the given node. + # Compile a KeywordHashNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_keyword_hash_node(node); end + + # Visit the child nodes of the given node. + # Compile a KeywordRestParameterNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_keyword_rest_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a LambdaNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_lambda_node(node); end + + # Visit the child nodes of the given node. + # Compile a LocalVariableAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_local_variable_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a LocalVariableOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_local_variable_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a LocalVariableOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_local_variable_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a LocalVariableReadNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_local_variable_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a LocalVariableTargetNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_local_variable_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a LocalVariableWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_local_variable_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a MatchLastLineNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_match_last_line_node(node); end + + # Visit the child nodes of the given node. + # Compile a MatchPredicateNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_match_predicate_node(node); end + + # Visit the child nodes of the given node. + # Compile a MatchRequiredNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_match_required_node(node); end + + # Visit the child nodes of the given node. + # Compile a MatchWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_match_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a MissingNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_missing_node(node); end + + # Visit the child nodes of the given node. + # Compile a ModuleNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_module_node(node); end + + # Visit the child nodes of the given node. + # Compile a MultiTargetNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_multi_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a MultiWriteNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_multi_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a NextNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_next_node(node); end + + # Visit the child nodes of the given node. + # Compile a NilNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_nil_node(node); end + + # Visit the child nodes of the given node. + # Compile a NoKeywordsParameterNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_no_keywords_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a NumberedReferenceReadNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_numbered_reference_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a OptionalKeywordParameterNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_optional_keyword_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a OptionalParameterNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_optional_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a OrNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_or_node(node); end + + # Visit the child nodes of the given node. + # Compile a ParametersNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_parameters_node(node); end + + # Visit the child nodes of the given node. + # Compile a ParenthesesNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_parentheses_node(node); end + + # Visit the child nodes of the given node. + # Compile a PinnedExpressionNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_pinned_expression_node(node); end + + # Visit the child nodes of the given node. + # Compile a PinnedVariableNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_pinned_variable_node(node); end + + # Visit the child nodes of the given node. + # Compile a PostExecutionNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_post_execution_node(node); end + + # Visit the child nodes of the given node. + # Compile a PreExecutionNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_pre_execution_node(node); end + + # Visit the child nodes of the given node. + # Compile a ProgramNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_program_node(node); end + + # Visit the child nodes of the given node. + # Compile a RangeNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_range_node(node); end + + # Visit the child nodes of the given node. + # Compile a RationalNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_rational_node(node); end + + # Visit the child nodes of the given node. + # Compile a RedoNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_redo_node(node); end + + # Visit the child nodes of the given node. + # Compile a RegularExpressionNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_regular_expression_node(node); end + + # Visit the child nodes of the given node. + # Compile a RequiredKeywordParameterNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_required_keyword_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a RequiredParameterNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_required_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a RescueModifierNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_rescue_modifier_node(node); end + + # Visit the child nodes of the given node. + # Compile a RescueNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_rescue_node(node); end + + # Visit the child nodes of the given node. + # Compile a RestParameterNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_rest_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a RetryNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_retry_node(node); end + + # Visit the child nodes of the given node. + # Compile a ReturnNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_return_node(node); end + + # Visit the child nodes of the given node. + # Compile a SelfNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_self_node(node); end + + # Visit the child nodes of the given node. + # Compile a SingletonClassNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_singleton_class_node(node); end + + # Visit the child nodes of the given node. + # Compile a SourceEncodingNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_source_encoding_node(node); end + + # Visit the child nodes of the given node. + # Compile a SourceFileNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_source_file_node(node); end + + # Visit the child nodes of the given node. + # Compile a SourceLineNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_source_line_node(node); end + + # Visit the child nodes of the given node. + # Compile a SplatNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_splat_node(node); end + + # Visit the child nodes of the given node. + # Compile a StatementsNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_statements_node(node); end + + # Visit the child nodes of the given node. + # Compile a StringNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_string_node(node); end + + # Visit the child nodes of the given node. + # Compile a SuperNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_super_node(node); end + + # Visit the child nodes of the given node. + # Compile a SymbolNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_symbol_node(node); end + + # Visit the child nodes of the given node. + # Compile a TrueNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_true_node(node); end + + # Visit the child nodes of the given node. + # Compile a UndefNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_undef_node(node); end + + # Visit the child nodes of the given node. + # Compile a UnlessNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_unless_node(node); end + + # Visit the child nodes of the given node. + # Compile a UntilNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_until_node(node); end + + # Visit the child nodes of the given node. + # Compile a WhenNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_when_node(node); end + + # Visit the child nodes of the given node. + # Compile a WhileNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_while_node(node); end + + # Visit the child nodes of the given node. + # Compile a XStringNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_x_string_node(node); end + + # Visit the child nodes of the given node. + # Compile a YieldNode node + # + # source://prism//lib/prism/compiler.rb#38 + def visit_yield_node(node); end +end + +# Represents the use of the `&&=` operator for assignment to a constant. +# +# Target &&= value +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3790 +class Prism::ConstantAndWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [ConstantAndWriteNode] a new instance of ConstantAndWriteNode + # + # source://prism//lib/prism/node.rb#3803 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(name, name_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#3812 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3817 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3827 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3822 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantAndWriteNode + # + # source://prism//lib/prism/node.rb#3832 + sig { params(params: T.untyped).returns(Prism::ConstantAndWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3817 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#3846 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#3856 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#3791 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#3794 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#3851 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#3797 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3880 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#3800 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3890 + def type; end + end +end + +# Represents assigning to a constant using an operator that isn't `=`. +# +# Target += value +# ^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3900 +class Prism::ConstantOperatorWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> void + # + # @return [ConstantOperatorWriteNode] a new instance of ConstantOperatorWriteNode + # + # source://prism//lib/prism/node.rb#3916 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + operator: Symbol, + location: Prism::Location + ).void + end + def initialize(name, name_loc, operator_loc, value, operator, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#3926 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3931 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3941 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3936 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantOperatorWriteNode + # + # source://prism//lib/prism/node.rb#3946 + sig { params(params: T.untyped).returns(Prism::ConstantOperatorWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3931 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#3961 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#3966 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#3901 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#3904 + sig { returns(Prism::Location) } + def name_loc; end + + # attr_reader operator: Symbol + # + # source://prism//lib/prism/node.rb#3913 + sig { returns(Symbol) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#3907 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3991 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#3910 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4001 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to a constant. +# +# Target ||= value +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4011 +class Prism::ConstantOrWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [ConstantOrWriteNode] a new instance of ConstantOrWriteNode + # + # source://prism//lib/prism/node.rb#4024 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(name, name_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#4033 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4038 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4048 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4043 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantOrWriteNode + # + # source://prism//lib/prism/node.rb#4053 + sig { params(params: T.untyped).returns(Prism::ConstantOrWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4038 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#4067 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#4077 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#4012 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#4015 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#4072 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#4018 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4101 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#4021 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4111 + def type; end + end +end + +# Represents the use of the `&&=` operator for assignment to a constant path. +# +# Parent::Child &&= value +# ^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4121 +class Prism::ConstantPathAndWriteNode < ::Prism::Node + # def initialize: (target: ConstantPathNode, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [ConstantPathAndWriteNode] a new instance of ConstantPathAndWriteNode + # + # source://prism//lib/prism/node.rb#4131 + sig do + params( + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(target, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#4139 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4144 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4154 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4149 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantPathAndWriteNode + # + # source://prism//lib/prism/node.rb#4159 + sig { params(params: T.untyped).returns(Prism::ConstantPathAndWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4144 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#4172 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#4182 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#4177 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#4125 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader target: ConstantPathNode + # + # source://prism//lib/prism/node.rb#4122 + sig { returns(Prism::ConstantPathNode) } + def target; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4206 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#4128 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4216 + def type; end + end +end + +# Represents accessing a constant through a path of `::` operators. +# +# Foo::Bar +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4226 +class Prism::ConstantPathNode < ::Prism::Node + # def initialize: (parent: Node?, child: Node, delimiter_loc: Location, location: Location) -> void + # + # @return [ConstantPathNode] a new instance of ConstantPathNode + # + # source://prism//lib/prism/node.rb#4236 + sig do + params( + parent: T.nilable(Prism::Node), + child: Prism::Node, + delimiter_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(parent, child, delimiter_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#4244 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # attr_reader child: Node + # + # source://prism//lib/prism/node.rb#4230 + sig { returns(Prism::Node) } + def child; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4249 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4262 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4254 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantPathNode + # + # source://prism//lib/prism/node.rb#4267 + sig { params(params: T.untyped).returns(Prism::ConstantPathNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4249 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#4280 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def delimiter: () -> String + # + # source://prism//lib/prism/node.rb#4285 + sig { returns(String) } + def delimiter; end + + # attr_reader delimiter_loc: Location + # + # source://prism//lib/prism/node.rb#4233 + sig { returns(Prism::Location) } + def delimiter_loc; end + + # Returns the full name of this constant path. For example: "Foo::Bar" + # + # source://prism//lib/prism/node_ext.rb#104 + def full_name; end + + # Returns the list of parts for the full name of this constant path. + # For example: [:Foo, :Bar] + # + # source://prism//lib/prism/node_ext.rb#87 + def full_name_parts; end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#4290 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader parent: Node? + # + # source://prism//lib/prism/node.rb#4227 + sig { returns(T.nilable(Prism::Node)) } + def parent; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4318 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4328 + def type; end + end +end + +# An error class raised when dynamic parts are found while computing a +# constant path's full name. For example: +# Foo::Bar::Baz -> does not raise because all parts of the constant path are +# simple constants +# var::Bar::Baz -> raises because the first part of the constant path is a +# local variable +# +# source://prism//lib/prism/node_ext.rb#83 +class Prism::ConstantPathNode::DynamicPartsInConstantPathError < ::StandardError; end + +# Represents assigning to a constant path using an operator that isn't `=`. +# +# Parent::Child += value +# ^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4338 +class Prism::ConstantPathOperatorWriteNode < ::Prism::Node + # def initialize: (target: ConstantPathNode, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> void + # + # @return [ConstantPathOperatorWriteNode] a new instance of ConstantPathOperatorWriteNode + # + # source://prism//lib/prism/node.rb#4351 + sig do + params( + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node, + operator: Symbol, + location: Prism::Location + ).void + end + def initialize(target, operator_loc, value, operator, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#4360 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4365 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4375 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4370 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantPathOperatorWriteNode + # + # source://prism//lib/prism/node.rb#4380 + sig { params(params: T.untyped).returns(Prism::ConstantPathOperatorWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4365 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#4394 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#4399 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader operator: Symbol + # + # source://prism//lib/prism/node.rb#4348 + sig { returns(Symbol) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#4342 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader target: ConstantPathNode + # + # source://prism//lib/prism/node.rb#4339 + sig { returns(Prism::ConstantPathNode) } + def target; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4424 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#4345 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4434 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to a constant path. +# +# Parent::Child ||= value +# ^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4444 +class Prism::ConstantPathOrWriteNode < ::Prism::Node + # def initialize: (target: ConstantPathNode, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [ConstantPathOrWriteNode] a new instance of ConstantPathOrWriteNode + # + # source://prism//lib/prism/node.rb#4454 + sig do + params( + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(target, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#4462 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4467 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4477 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4472 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantPathOrWriteNode + # + # source://prism//lib/prism/node.rb#4482 + sig { params(params: T.untyped).returns(Prism::ConstantPathOrWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4467 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#4495 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#4505 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#4500 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#4448 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader target: ConstantPathNode + # + # source://prism//lib/prism/node.rb#4445 + sig { returns(Prism::ConstantPathNode) } + def target; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4529 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#4451 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4539 + def type; end + end +end + +# Represents writing to a constant path in a context that doesn't have an explicit value. +# +# Foo::Foo, Bar::Bar = baz +# ^^^^^^^^ ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4549 +class Prism::ConstantPathTargetNode < ::Prism::Node + # def initialize: (parent: Node?, child: Node, delimiter_loc: Location, location: Location) -> void + # + # @return [ConstantPathTargetNode] a new instance of ConstantPathTargetNode + # + # source://prism//lib/prism/node.rb#4559 + sig do + params( + parent: T.nilable(Prism::Node), + child: Prism::Node, + delimiter_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(parent, child, delimiter_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#4567 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # attr_reader child: Node + # + # source://prism//lib/prism/node.rb#4553 + sig { returns(Prism::Node) } + def child; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4572 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4585 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4577 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantPathTargetNode + # + # source://prism//lib/prism/node.rb#4590 + sig { params(params: T.untyped).returns(Prism::ConstantPathTargetNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4572 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#4603 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def delimiter: () -> String + # + # source://prism//lib/prism/node.rb#4608 + sig { returns(String) } + def delimiter; end + + # attr_reader delimiter_loc: Location + # + # source://prism//lib/prism/node.rb#4556 + sig { returns(Prism::Location) } + def delimiter_loc; end + + # Returns the full name of this constant path. For example: "Foo::Bar" + # + # source://prism//lib/prism/node_ext.rb#117 + def full_name; end + + # Returns the list of parts for the full name of this constant path. + # For example: [:Foo, :Bar] + # + # source://prism//lib/prism/node_ext.rb#112 + def full_name_parts; end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#4613 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader parent: Node? + # + # source://prism//lib/prism/node.rb#4550 + sig { returns(T.nilable(Prism::Node)) } + def parent; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4641 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4651 + def type; end + end +end + +# Represents writing to a constant path. +# +# ::Foo = 1 +# ^^^^^^^^^ +# +# Foo::Bar = 1 +# ^^^^^^^^^^^^ +# +# ::Foo::Bar = 1 +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4667 +class Prism::ConstantPathWriteNode < ::Prism::Node + # def initialize: (target: ConstantPathNode, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [ConstantPathWriteNode] a new instance of ConstantPathWriteNode + # + # source://prism//lib/prism/node.rb#4677 + sig do + params( + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(target, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#4685 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4690 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4700 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4695 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantPathWriteNode + # + # source://prism//lib/prism/node.rb#4705 + sig { params(params: T.untyped).returns(Prism::ConstantPathWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4690 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#4718 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#4728 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#4723 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#4671 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader target: ConstantPathNode + # + # source://prism//lib/prism/node.rb#4668 + sig { returns(Prism::ConstantPathNode) } + def target; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4752 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#4674 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4762 + def type; end + end +end + +# Represents referencing a constant. +# +# Foo +# ^^^ +# +# source://prism//lib/prism/node.rb#4772 +class Prism::ConstantReadNode < ::Prism::Node + # def initialize: (name: Symbol, location: Location) -> void + # + # @return [ConstantReadNode] a new instance of ConstantReadNode + # + # source://prism//lib/prism/node.rb#4776 + sig { params(name: Symbol, location: Prism::Location).void } + def initialize(name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#4782 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4787 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4797 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4792 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantReadNode + # + # source://prism//lib/prism/node.rb#4802 + sig { params(params: T.untyped).returns(Prism::ConstantReadNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4787 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#4813 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # Returns the full name of this constant. For example: "Foo" + # + # source://prism//lib/prism/node_ext.rb#71 + def full_name; end + + # Returns the list of parts for the full name of this constant. + # For example: [:Foo] + # + # source://prism//lib/prism/node_ext.rb#66 + def full_name_parts; end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#4818 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#4773 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4838 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4848 + def type; end + end +end + +# Represents writing to a constant in a context that doesn't have an explicit value. +# +# Foo, Bar = baz +# ^^^ ^^^ +# +# source://prism//lib/prism/node.rb#4858 +class Prism::ConstantTargetNode < ::Prism::Node + # def initialize: (name: Symbol, location: Location) -> void + # + # @return [ConstantTargetNode] a new instance of ConstantTargetNode + # + # source://prism//lib/prism/node.rb#4862 + sig { params(name: Symbol, location: Prism::Location).void } + def initialize(name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#4868 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4873 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4883 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4878 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantTargetNode + # + # source://prism//lib/prism/node.rb#4888 + sig { params(params: T.untyped).returns(Prism::ConstantTargetNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4873 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#4899 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#4904 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#4859 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4924 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4934 + def type; end + end +end + +# Represents writing to a constant. +# +# Foo = 1 +# ^^^^^^^ +# +# source://prism//lib/prism/node.rb#4944 +class Prism::ConstantWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> void + # + # @return [ConstantWriteNode] a new instance of ConstantWriteNode + # + # source://prism//lib/prism/node.rb#4957 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(name, name_loc, value, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#4966 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4971 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4981 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4976 + def compact_child_nodes; end + + # def copy: (**params) -> ConstantWriteNode + # + # source://prism//lib/prism/node.rb#4986 + sig { params(params: T.untyped).returns(Prism::ConstantWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4971 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#5000 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#5010 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#4945 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#4948 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#5005 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#4954 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5034 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#4951 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5044 + def type; end + end +end + +# DATAComment objects correspond to comments that are after the __END__ +# keyword in a source file. +# +# source://prism//lib/prism/parse_result.rb#275 +class Prism::DATAComment < ::Prism::Comment + # Returns a string representation of this comment. + # + # source://prism//lib/prism/parse_result.rb#276 + def inspect; 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.new("[1]") +# +# Prism::ArrayNode.new( +# [ +# Prism::IntegerNode.new( +# Prism::IntegerBaseFlags::DECIMAL, +# Prism::Location.new(source, 1, 1), +# ) +# ], +# Prism::Location.new(source, 0, 1), +# Prism::Location.new(source, 2, 1) +# ) +# +# you could instead write: +# +# source = Prism::Source.new("[1]") +# +# ArrayNode( +# IntegerNode(Prism::IntegerBaseFlags::DECIMAL, Location(source, 1, 1))), +# Location(source, 0, 1), +# Location(source, 2, 1) +# ) +# +# This is mostly helpful in the context of writing tests, but can also be used +# to generate trees programmatically. +# +# source://prism//lib/prism/dsl.rb#37 +module Prism::DSL + private + + # Create a new AliasGlobalVariableNode node + # + # source://prism//lib/prism/dsl.rb#46 + def AliasGlobalVariableNode(new_name, old_name, keyword_loc, location = T.unsafe(nil)); end + + # Create a new AliasMethodNode node + # + # source://prism//lib/prism/dsl.rb#51 + def AliasMethodNode(new_name, old_name, keyword_loc, location = T.unsafe(nil)); end + + # Create a new AlternationPatternNode node + # + # source://prism//lib/prism/dsl.rb#56 + def AlternationPatternNode(left, right, operator_loc, location = T.unsafe(nil)); end + + # Create a new AndNode node + # + # source://prism//lib/prism/dsl.rb#61 + def AndNode(left, right, operator_loc, location = T.unsafe(nil)); end + + # Create a new ArgumentsNode node + # + # source://prism//lib/prism/dsl.rb#66 + def ArgumentsNode(arguments, flags, location = T.unsafe(nil)); end + + # Create a new ArrayNode node + # + # source://prism//lib/prism/dsl.rb#71 + def ArrayNode(elements, opening_loc, closing_loc, location = T.unsafe(nil)); end + + # Create a new ArrayPatternNode node + # + # source://prism//lib/prism/dsl.rb#76 + def ArrayPatternNode(constant, requireds, rest, posts, opening_loc, closing_loc, location = T.unsafe(nil)); end + + # Create a new AssocNode node + # + # source://prism//lib/prism/dsl.rb#81 + def AssocNode(key, value, operator_loc, location = T.unsafe(nil)); end + + # Create a new AssocSplatNode node + # + # source://prism//lib/prism/dsl.rb#86 + def AssocSplatNode(value, operator_loc, location = T.unsafe(nil)); end + + # Create a new BackReferenceReadNode node + # + # source://prism//lib/prism/dsl.rb#91 + def BackReferenceReadNode(name, location = T.unsafe(nil)); end + + # Create a new BeginNode node + # + # source://prism//lib/prism/dsl.rb#96 + def BeginNode(begin_keyword_loc, statements, rescue_clause, else_clause, ensure_clause, end_keyword_loc, location = T.unsafe(nil)); end + + # Create a new BlockArgumentNode node + # + # source://prism//lib/prism/dsl.rb#101 + def BlockArgumentNode(expression, operator_loc, location = T.unsafe(nil)); end + + # Create a new BlockLocalVariableNode node + # + # source://prism//lib/prism/dsl.rb#106 + def BlockLocalVariableNode(name, location = T.unsafe(nil)); end + + # Create a new BlockNode node + # + # source://prism//lib/prism/dsl.rb#111 + def BlockNode(locals, parameters, body, opening_loc, closing_loc, location = T.unsafe(nil)); end + + # Create a new BlockParameterNode node + # + # source://prism//lib/prism/dsl.rb#116 + def BlockParameterNode(name, name_loc, operator_loc, location = T.unsafe(nil)); end + + # Create a new BlockParametersNode node + # + # source://prism//lib/prism/dsl.rb#121 + def BlockParametersNode(parameters, locals, opening_loc, closing_loc, location = T.unsafe(nil)); end + + # Create a new BreakNode node + # + # source://prism//lib/prism/dsl.rb#126 + def BreakNode(arguments, keyword_loc, location = T.unsafe(nil)); end + + # Create a new CallAndWriteNode node + # + # source://prism//lib/prism/dsl.rb#131 + def CallAndWriteNode(receiver, call_operator_loc, message_loc, flags, read_name, write_name, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new CallNode node + # + # source://prism//lib/prism/dsl.rb#136 + def CallNode(receiver, call_operator_loc, message_loc, opening_loc, arguments, closing_loc, block, flags, name, location = T.unsafe(nil)); end + + # Create a new CallOperatorWriteNode node + # + # source://prism//lib/prism/dsl.rb#141 + def CallOperatorWriteNode(receiver, call_operator_loc, message_loc, flags, read_name, write_name, operator, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new CallOrWriteNode node + # + # source://prism//lib/prism/dsl.rb#146 + def CallOrWriteNode(receiver, call_operator_loc, message_loc, flags, read_name, write_name, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new CapturePatternNode node + # + # source://prism//lib/prism/dsl.rb#151 + def CapturePatternNode(value, target, operator_loc, location = T.unsafe(nil)); end + + # Create a new CaseMatchNode node + # + # source://prism//lib/prism/dsl.rb#156 + def CaseMatchNode(predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location = T.unsafe(nil)); end + + # Create a new CaseNode node + # + # source://prism//lib/prism/dsl.rb#161 + def CaseNode(predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location = T.unsafe(nil)); end + + # Create a new ClassNode node + # + # source://prism//lib/prism/dsl.rb#166 + def ClassNode(locals, class_keyword_loc, constant_path, inheritance_operator_loc, superclass, body, end_keyword_loc, name, location = T.unsafe(nil)); end + + # Create a new ClassVariableAndWriteNode node + # + # source://prism//lib/prism/dsl.rb#171 + def ClassVariableAndWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new ClassVariableOperatorWriteNode node + # + # source://prism//lib/prism/dsl.rb#176 + def ClassVariableOperatorWriteNode(name, name_loc, operator_loc, value, operator, location = T.unsafe(nil)); end + + # Create a new ClassVariableOrWriteNode node + # + # source://prism//lib/prism/dsl.rb#181 + def ClassVariableOrWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new ClassVariableReadNode node + # + # source://prism//lib/prism/dsl.rb#186 + def ClassVariableReadNode(name, location = T.unsafe(nil)); end + + # Create a new ClassVariableTargetNode node + # + # source://prism//lib/prism/dsl.rb#191 + def ClassVariableTargetNode(name, location = T.unsafe(nil)); end + + # Create a new ClassVariableWriteNode node + # + # source://prism//lib/prism/dsl.rb#196 + def ClassVariableWriteNode(name, name_loc, value, operator_loc, location = T.unsafe(nil)); end + + # Create a new ConstantAndWriteNode node + # + # source://prism//lib/prism/dsl.rb#201 + def ConstantAndWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new ConstantOperatorWriteNode node + # + # source://prism//lib/prism/dsl.rb#206 + def ConstantOperatorWriteNode(name, name_loc, operator_loc, value, operator, location = T.unsafe(nil)); end + + # Create a new ConstantOrWriteNode node + # + # source://prism//lib/prism/dsl.rb#211 + def ConstantOrWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new ConstantPathAndWriteNode node + # + # source://prism//lib/prism/dsl.rb#216 + def ConstantPathAndWriteNode(target, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new ConstantPathNode node + # + # source://prism//lib/prism/dsl.rb#221 + def ConstantPathNode(parent, child, delimiter_loc, location = T.unsafe(nil)); end + + # Create a new ConstantPathOperatorWriteNode node + # + # source://prism//lib/prism/dsl.rb#226 + def ConstantPathOperatorWriteNode(target, operator_loc, value, operator, location = T.unsafe(nil)); end + + # Create a new ConstantPathOrWriteNode node + # + # source://prism//lib/prism/dsl.rb#231 + def ConstantPathOrWriteNode(target, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new ConstantPathTargetNode node + # + # source://prism//lib/prism/dsl.rb#236 + def ConstantPathTargetNode(parent, child, delimiter_loc, location = T.unsafe(nil)); end + + # Create a new ConstantPathWriteNode node + # + # source://prism//lib/prism/dsl.rb#241 + def ConstantPathWriteNode(target, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new ConstantReadNode node + # + # source://prism//lib/prism/dsl.rb#246 + def ConstantReadNode(name, location = T.unsafe(nil)); end + + # Create a new ConstantTargetNode node + # + # source://prism//lib/prism/dsl.rb#251 + def ConstantTargetNode(name, location = T.unsafe(nil)); end + + # Create a new ConstantWriteNode node + # + # source://prism//lib/prism/dsl.rb#256 + def ConstantWriteNode(name, name_loc, value, operator_loc, location = T.unsafe(nil)); end + + # Create a new DefNode node + # + # source://prism//lib/prism/dsl.rb#261 + def DefNode(name, name_loc, receiver, parameters, body, locals, def_keyword_loc, operator_loc, lparen_loc, rparen_loc, equal_loc, end_keyword_loc, location = T.unsafe(nil)); end + + # Create a new DefinedNode node + # + # source://prism//lib/prism/dsl.rb#266 + def DefinedNode(lparen_loc, value, rparen_loc, keyword_loc, location = T.unsafe(nil)); end + + # Create a new ElseNode node + # + # source://prism//lib/prism/dsl.rb#271 + def ElseNode(else_keyword_loc, statements, end_keyword_loc, location = T.unsafe(nil)); end + + # Create a new EmbeddedStatementsNode node + # + # source://prism//lib/prism/dsl.rb#276 + def EmbeddedStatementsNode(opening_loc, statements, closing_loc, location = T.unsafe(nil)); end + + # Create a new EmbeddedVariableNode node + # + # source://prism//lib/prism/dsl.rb#281 + def EmbeddedVariableNode(operator_loc, variable, location = T.unsafe(nil)); end + + # Create a new EnsureNode node + # + # source://prism//lib/prism/dsl.rb#286 + def EnsureNode(ensure_keyword_loc, statements, end_keyword_loc, location = T.unsafe(nil)); end + + # Create a new FalseNode node + # + # source://prism//lib/prism/dsl.rb#291 + def FalseNode(location = T.unsafe(nil)); end + + # Create a new FindPatternNode node + # + # source://prism//lib/prism/dsl.rb#296 + def FindPatternNode(constant, left, requireds, right, opening_loc, closing_loc, location = T.unsafe(nil)); end + + # Create a new FlipFlopNode node + # + # source://prism//lib/prism/dsl.rb#301 + def FlipFlopNode(left, right, operator_loc, flags, location = T.unsafe(nil)); end + + # Create a new FloatNode node + # + # source://prism//lib/prism/dsl.rb#306 + def FloatNode(location = T.unsafe(nil)); end + + # Create a new ForNode node + # + # source://prism//lib/prism/dsl.rb#311 + def ForNode(index, collection, statements, for_keyword_loc, in_keyword_loc, do_keyword_loc, end_keyword_loc, location = T.unsafe(nil)); end + + # Create a new ForwardingArgumentsNode node + # + # source://prism//lib/prism/dsl.rb#316 + def ForwardingArgumentsNode(location = T.unsafe(nil)); end + + # Create a new ForwardingParameterNode node + # + # source://prism//lib/prism/dsl.rb#321 + def ForwardingParameterNode(location = T.unsafe(nil)); end + + # Create a new ForwardingSuperNode node + # + # source://prism//lib/prism/dsl.rb#326 + def ForwardingSuperNode(block, location = T.unsafe(nil)); end + + # Create a new GlobalVariableAndWriteNode node + # + # source://prism//lib/prism/dsl.rb#331 + def GlobalVariableAndWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new GlobalVariableOperatorWriteNode node + # + # source://prism//lib/prism/dsl.rb#336 + def GlobalVariableOperatorWriteNode(name, name_loc, operator_loc, value, operator, location = T.unsafe(nil)); end + + # Create a new GlobalVariableOrWriteNode node + # + # source://prism//lib/prism/dsl.rb#341 + def GlobalVariableOrWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new GlobalVariableReadNode node + # + # source://prism//lib/prism/dsl.rb#346 + def GlobalVariableReadNode(name, location = T.unsafe(nil)); end + + # Create a new GlobalVariableTargetNode node + # + # source://prism//lib/prism/dsl.rb#351 + def GlobalVariableTargetNode(name, location = T.unsafe(nil)); end + + # Create a new GlobalVariableWriteNode node + # + # source://prism//lib/prism/dsl.rb#356 + def GlobalVariableWriteNode(name, name_loc, value, operator_loc, location = T.unsafe(nil)); end + + # Create a new HashNode node + # + # source://prism//lib/prism/dsl.rb#361 + def HashNode(opening_loc, elements, closing_loc, location = T.unsafe(nil)); end + + # Create a new HashPatternNode node + # + # source://prism//lib/prism/dsl.rb#366 + def HashPatternNode(constant, elements, rest, opening_loc, closing_loc, location = T.unsafe(nil)); end + + # Create a new IfNode node + # + # source://prism//lib/prism/dsl.rb#371 + def IfNode(if_keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, location = T.unsafe(nil)); end + + # Create a new ImaginaryNode node + # + # source://prism//lib/prism/dsl.rb#376 + def ImaginaryNode(numeric, location = T.unsafe(nil)); end + + # Create a new ImplicitNode node + # + # source://prism//lib/prism/dsl.rb#381 + def ImplicitNode(value, location = T.unsafe(nil)); end + + # Create a new InNode node + # + # source://prism//lib/prism/dsl.rb#386 + def InNode(pattern, statements, in_loc, then_loc, location = T.unsafe(nil)); end + + # Create a new IndexAndWriteNode node + # + # source://prism//lib/prism/dsl.rb#391 + def IndexAndWriteNode(receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, flags, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new IndexOperatorWriteNode node + # + # source://prism//lib/prism/dsl.rb#396 + def IndexOperatorWriteNode(receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, flags, operator, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new IndexOrWriteNode node + # + # source://prism//lib/prism/dsl.rb#401 + def IndexOrWriteNode(receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, flags, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new InstanceVariableAndWriteNode node + # + # source://prism//lib/prism/dsl.rb#406 + def InstanceVariableAndWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new InstanceVariableOperatorWriteNode node + # + # source://prism//lib/prism/dsl.rb#411 + def InstanceVariableOperatorWriteNode(name, name_loc, operator_loc, value, operator, location = T.unsafe(nil)); end + + # Create a new InstanceVariableOrWriteNode node + # + # source://prism//lib/prism/dsl.rb#416 + def InstanceVariableOrWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new InstanceVariableReadNode node + # + # source://prism//lib/prism/dsl.rb#421 + def InstanceVariableReadNode(name, location = T.unsafe(nil)); end + + # Create a new InstanceVariableTargetNode node + # + # source://prism//lib/prism/dsl.rb#426 + def InstanceVariableTargetNode(name, location = T.unsafe(nil)); end + + # Create a new InstanceVariableWriteNode node + # + # source://prism//lib/prism/dsl.rb#431 + def InstanceVariableWriteNode(name, name_loc, value, operator_loc, location = T.unsafe(nil)); end + + # Create a new IntegerNode node + # + # source://prism//lib/prism/dsl.rb#436 + def IntegerNode(flags, location = T.unsafe(nil)); end + + # Create a new InterpolatedMatchLastLineNode node + # + # source://prism//lib/prism/dsl.rb#441 + def InterpolatedMatchLastLineNode(opening_loc, parts, closing_loc, flags, location = T.unsafe(nil)); end + + # Create a new InterpolatedRegularExpressionNode node + # + # source://prism//lib/prism/dsl.rb#446 + def InterpolatedRegularExpressionNode(opening_loc, parts, closing_loc, flags, location = T.unsafe(nil)); end + + # Create a new InterpolatedStringNode node + # + # source://prism//lib/prism/dsl.rb#451 + def InterpolatedStringNode(opening_loc, parts, closing_loc, location = T.unsafe(nil)); end + + # Create a new InterpolatedSymbolNode node + # + # source://prism//lib/prism/dsl.rb#456 + def InterpolatedSymbolNode(opening_loc, parts, closing_loc, location = T.unsafe(nil)); end + + # Create a new InterpolatedXStringNode node + # + # source://prism//lib/prism/dsl.rb#461 + def InterpolatedXStringNode(opening_loc, parts, closing_loc, location = T.unsafe(nil)); end + + # Create a new KeywordHashNode node + # + # source://prism//lib/prism/dsl.rb#466 + def KeywordHashNode(elements, location = T.unsafe(nil)); end + + # Create a new KeywordRestParameterNode node + # + # source://prism//lib/prism/dsl.rb#471 + def KeywordRestParameterNode(name, name_loc, operator_loc, location = T.unsafe(nil)); end + + # Create a new LambdaNode node + # + # source://prism//lib/prism/dsl.rb#476 + def LambdaNode(locals, operator_loc, opening_loc, closing_loc, parameters, body, location = T.unsafe(nil)); end + + # Create a new LocalVariableAndWriteNode node + # + # source://prism//lib/prism/dsl.rb#481 + def LocalVariableAndWriteNode(name_loc, operator_loc, value, name, depth, location = T.unsafe(nil)); end + + # Create a new LocalVariableOperatorWriteNode node + # + # source://prism//lib/prism/dsl.rb#486 + def LocalVariableOperatorWriteNode(name_loc, operator_loc, value, name, operator, depth, location = T.unsafe(nil)); end + + # Create a new LocalVariableOrWriteNode node + # + # source://prism//lib/prism/dsl.rb#491 + def LocalVariableOrWriteNode(name_loc, operator_loc, value, name, depth, location = T.unsafe(nil)); end + + # Create a new LocalVariableReadNode node + # + # source://prism//lib/prism/dsl.rb#496 + def LocalVariableReadNode(name, depth, location = T.unsafe(nil)); end + + # Create a new LocalVariableTargetNode node + # + # source://prism//lib/prism/dsl.rb#501 + def LocalVariableTargetNode(name, depth, location = T.unsafe(nil)); end + + # Create a new LocalVariableWriteNode node + # + # source://prism//lib/prism/dsl.rb#506 + def LocalVariableWriteNode(name, depth, name_loc, value, operator_loc, location = T.unsafe(nil)); end + + # Create a new Location object + # + # source://prism//lib/prism/dsl.rb#41 + def Location(source = T.unsafe(nil), start_offset = T.unsafe(nil), length = T.unsafe(nil)); end + + # Create a new MatchLastLineNode node + # + # source://prism//lib/prism/dsl.rb#511 + def MatchLastLineNode(opening_loc, content_loc, closing_loc, unescaped, flags, location = T.unsafe(nil)); end + + # Create a new MatchPredicateNode node + # + # source://prism//lib/prism/dsl.rb#516 + def MatchPredicateNode(value, pattern, operator_loc, location = T.unsafe(nil)); end + + # Create a new MatchRequiredNode node + # + # source://prism//lib/prism/dsl.rb#521 + def MatchRequiredNode(value, pattern, operator_loc, location = T.unsafe(nil)); end + + # Create a new MatchWriteNode node + # + # source://prism//lib/prism/dsl.rb#526 + def MatchWriteNode(call, targets, location = T.unsafe(nil)); end + + # Create a new MissingNode node + # + # source://prism//lib/prism/dsl.rb#531 + def MissingNode(location = T.unsafe(nil)); end + + # Create a new ModuleNode node + # + # source://prism//lib/prism/dsl.rb#536 + def ModuleNode(locals, module_keyword_loc, constant_path, body, end_keyword_loc, name, location = T.unsafe(nil)); end + + # Create a new MultiTargetNode node + # + # source://prism//lib/prism/dsl.rb#541 + def MultiTargetNode(lefts, rest, rights, lparen_loc, rparen_loc, location = T.unsafe(nil)); end + + # Create a new MultiWriteNode node + # + # source://prism//lib/prism/dsl.rb#546 + def MultiWriteNode(lefts, rest, rights, lparen_loc, rparen_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new NextNode node + # + # source://prism//lib/prism/dsl.rb#551 + def NextNode(arguments, keyword_loc, location = T.unsafe(nil)); end + + # Create a new NilNode node + # + # source://prism//lib/prism/dsl.rb#556 + def NilNode(location = T.unsafe(nil)); end + + # Create a new NoKeywordsParameterNode node + # + # source://prism//lib/prism/dsl.rb#561 + def NoKeywordsParameterNode(operator_loc, keyword_loc, location = T.unsafe(nil)); end + + # Create a new NumberedReferenceReadNode node + # + # source://prism//lib/prism/dsl.rb#566 + def NumberedReferenceReadNode(number, location = T.unsafe(nil)); end + + # Create a new OptionalKeywordParameterNode node + # + # source://prism//lib/prism/dsl.rb#571 + def OptionalKeywordParameterNode(name, name_loc, value, location = T.unsafe(nil)); end + + # Create a new OptionalParameterNode node + # + # source://prism//lib/prism/dsl.rb#576 + def OptionalParameterNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new OrNode node + # + # source://prism//lib/prism/dsl.rb#581 + def OrNode(left, right, operator_loc, location = T.unsafe(nil)); end + + # Create a new ParametersNode node + # + # source://prism//lib/prism/dsl.rb#586 + def ParametersNode(requireds, optionals, rest, posts, keywords, keyword_rest, block, location = T.unsafe(nil)); end + + # Create a new ParenthesesNode node + # + # source://prism//lib/prism/dsl.rb#591 + def ParenthesesNode(body, opening_loc, closing_loc, location = T.unsafe(nil)); end + + # Create a new PinnedExpressionNode node + # + # source://prism//lib/prism/dsl.rb#596 + def PinnedExpressionNode(expression, operator_loc, lparen_loc, rparen_loc, location = T.unsafe(nil)); end + + # Create a new PinnedVariableNode node + # + # source://prism//lib/prism/dsl.rb#601 + def PinnedVariableNode(variable, operator_loc, location = T.unsafe(nil)); end + + # Create a new PostExecutionNode node + # + # source://prism//lib/prism/dsl.rb#606 + def PostExecutionNode(statements, keyword_loc, opening_loc, closing_loc, location = T.unsafe(nil)); end + + # Create a new PreExecutionNode node + # + # source://prism//lib/prism/dsl.rb#611 + def PreExecutionNode(statements, keyword_loc, opening_loc, closing_loc, location = T.unsafe(nil)); end + + # Create a new ProgramNode node + # + # source://prism//lib/prism/dsl.rb#616 + def ProgramNode(locals, statements, location = T.unsafe(nil)); end + + # Create a new RangeNode node + # + # source://prism//lib/prism/dsl.rb#621 + def RangeNode(left, right, operator_loc, flags, location = T.unsafe(nil)); end + + # Create a new RationalNode node + # + # source://prism//lib/prism/dsl.rb#626 + def RationalNode(numeric, location = T.unsafe(nil)); end + + # Create a new RedoNode node + # + # source://prism//lib/prism/dsl.rb#631 + def RedoNode(location = T.unsafe(nil)); end + + # Create a new RegularExpressionNode node + # + # source://prism//lib/prism/dsl.rb#636 + def RegularExpressionNode(opening_loc, content_loc, closing_loc, unescaped, flags, location = T.unsafe(nil)); end + + # Create a new RequiredKeywordParameterNode node + # + # source://prism//lib/prism/dsl.rb#641 + def RequiredKeywordParameterNode(name, name_loc, location = T.unsafe(nil)); end + + # Create a new RequiredParameterNode node + # + # source://prism//lib/prism/dsl.rb#646 + def RequiredParameterNode(name, location = T.unsafe(nil)); end + + # Create a new RescueModifierNode node + # + # source://prism//lib/prism/dsl.rb#651 + def RescueModifierNode(expression, keyword_loc, rescue_expression, location = T.unsafe(nil)); end + + # Create a new RescueNode node + # + # source://prism//lib/prism/dsl.rb#656 + def RescueNode(keyword_loc, exceptions, operator_loc, reference, statements, consequent, location = T.unsafe(nil)); end + + # Create a new RestParameterNode node + # + # source://prism//lib/prism/dsl.rb#661 + def RestParameterNode(name, name_loc, operator_loc, location = T.unsafe(nil)); end + + # Create a new RetryNode node + # + # source://prism//lib/prism/dsl.rb#666 + def RetryNode(location = T.unsafe(nil)); end + + # Create a new ReturnNode node + # + # source://prism//lib/prism/dsl.rb#671 + def ReturnNode(keyword_loc, arguments, location = T.unsafe(nil)); end + + # Create a new SelfNode node + # + # source://prism//lib/prism/dsl.rb#676 + def SelfNode(location = T.unsafe(nil)); end + + # Create a new SingletonClassNode node + # + # source://prism//lib/prism/dsl.rb#681 + def SingletonClassNode(locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc, location = T.unsafe(nil)); end + + # Create a new SourceEncodingNode node + # + # source://prism//lib/prism/dsl.rb#686 + def SourceEncodingNode(location = T.unsafe(nil)); end + + # Create a new SourceFileNode node + # + # source://prism//lib/prism/dsl.rb#691 + def SourceFileNode(filepath, location = T.unsafe(nil)); end + + # Create a new SourceLineNode node + # + # source://prism//lib/prism/dsl.rb#696 + def SourceLineNode(location = T.unsafe(nil)); end + + # Create a new SplatNode node + # + # source://prism//lib/prism/dsl.rb#701 + def SplatNode(operator_loc, expression, location = T.unsafe(nil)); end + + # Create a new StatementsNode node + # + # source://prism//lib/prism/dsl.rb#706 + def StatementsNode(body, location = T.unsafe(nil)); end + + # Create a new StringNode node + # + # source://prism//lib/prism/dsl.rb#711 + def StringNode(flags, opening_loc, content_loc, closing_loc, unescaped, location = T.unsafe(nil)); end + + # Create a new SuperNode node + # + # source://prism//lib/prism/dsl.rb#716 + def SuperNode(keyword_loc, lparen_loc, arguments, rparen_loc, block, location = T.unsafe(nil)); end + + # Create a new SymbolNode node + # + # source://prism//lib/prism/dsl.rb#721 + def SymbolNode(opening_loc, value_loc, closing_loc, unescaped, location = T.unsafe(nil)); end + + # Create a new TrueNode node + # + # source://prism//lib/prism/dsl.rb#726 + def TrueNode(location = T.unsafe(nil)); end + + # Create a new UndefNode node + # + # source://prism//lib/prism/dsl.rb#731 + def UndefNode(names, keyword_loc, location = T.unsafe(nil)); end + + # Create a new UnlessNode node + # + # source://prism//lib/prism/dsl.rb#736 + def UnlessNode(keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, location = T.unsafe(nil)); end + + # Create a new UntilNode node + # + # source://prism//lib/prism/dsl.rb#741 + def UntilNode(keyword_loc, closing_loc, predicate, statements, flags, location = T.unsafe(nil)); end + + # Create a new WhenNode node + # + # source://prism//lib/prism/dsl.rb#746 + def WhenNode(keyword_loc, conditions, statements, location = T.unsafe(nil)); end + + # Create a new WhileNode node + # + # source://prism//lib/prism/dsl.rb#751 + def WhileNode(keyword_loc, closing_loc, predicate, statements, flags, location = T.unsafe(nil)); end + + # Create a new XStringNode node + # + # source://prism//lib/prism/dsl.rb#756 + def XStringNode(opening_loc, content_loc, closing_loc, unescaped, location = T.unsafe(nil)); end + + # Create a new YieldNode node + # + # source://prism//lib/prism/dsl.rb#761 + def YieldNode(keyword_loc, lparen_loc, arguments, rparen_loc, location = T.unsafe(nil)); end +end + +# This module is used for testing and debugging and is not meant to be used by +# consumers of this library. +# +# source://prism//lib/prism/debug.rb#6 +module Prism::Debug + class << self + # :call-seq: + # Debug::cruby_locals(source) -> Array + # + # For the given source, compiles with CRuby and returns a list of all of the + # sets of local variables that were encountered. + # + # source://prism//lib/prism/debug.rb#54 + def cruby_locals(source); end + + def inspect_node(_arg0); end + def memsize(_arg0); end + def named_captures(_arg0); end + + # :call-seq: + # Debug::newlines(source) -> Array + # + # For the given source string, return the byte offsets of every newline in + # the source. + # + # source://prism//lib/prism/debug.rb#191 + def newlines(source); end + + # :call-seq: + # Debug::prism_locals(source) -> Array + # + # For the given source, parses with prism and returns a list of all of the + # sets of local variables that were encountered. + # + # source://prism//lib/prism/debug.rb#98 + def prism_locals(source); end + + def profile_file(_arg0); end + end +end + +# Used to hold the place of a local that will be in the local table but +# cannot be accessed directly from the source code. For example, the +# iteration variable in a for loop or the positional parameter on a method +# definition that is destructured. +# +# source://prism//lib/prism/debug.rb#90 +Prism::Debug::AnonymousLocal = T.let(T.unsafe(nil), Object) + +# A wrapper around a RubyVM::InstructionSequence that provides a more +# convenient interface for accessing parts of the iseq. +# +# source://prism//lib/prism/debug.rb#9 +class Prism::Debug::ISeq + # @return [ISeq] a new instance of ISeq + # + # source://prism//lib/prism/debug.rb#12 + def initialize(parts); end + + # source://prism//lib/prism/debug.rb#28 + def each_child; end + + # source://prism//lib/prism/debug.rb#24 + def instructions; end + + # source://prism//lib/prism/debug.rb#20 + def local_table; end + + # source://prism//lib/prism/debug.rb#10 + def parts; end + + # source://prism//lib/prism/debug.rb#16 + def type; end +end + +# Represents a method definition. +# +# def method +# end +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#5055 +class Prism::DefNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, receiver: Node?, parameters: ParametersNode?, body: Node?, locals: Array[Symbol], def_keyword_loc: Location, operator_loc: Location?, lparen_loc: Location?, rparen_loc: Location?, equal_loc: Location?, end_keyword_loc: Location?, location: Location) -> void + # + # @return [DefNode] a new instance of DefNode + # + # source://prism//lib/prism/node.rb#5092 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + receiver: T.nilable(Prism::Node), + parameters: T.nilable(Prism::ParametersNode), + body: T.nilable(Prism::Node), + locals: T::Array[Symbol], + def_keyword_loc: Prism::Location, + operator_loc: T.nilable(Prism::Location), + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + equal_loc: T.nilable(Prism::Location), + end_keyword_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(name, name_loc, receiver, parameters, body, locals, def_keyword_loc, operator_loc, lparen_loc, rparen_loc, equal_loc, end_keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#5109 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # attr_reader body: Node? + # + # source://prism//lib/prism/node.rb#5068 + sig { returns(T.nilable(Prism::Node)) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5114 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5128 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5119 + def compact_child_nodes; end + + # def copy: (**params) -> DefNode + # + # source://prism//lib/prism/node.rb#5133 + sig { params(params: T.untyped).returns(Prism::DefNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5114 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#5155 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def def_keyword: () -> String + # + # source://prism//lib/prism/node.rb#5160 + sig { returns(String) } + def def_keyword; end + + # attr_reader def_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#5074 + sig { returns(Prism::Location) } + def def_keyword_loc; end + + # def end_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#5185 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#5089 + sig { returns(T.nilable(Prism::Location)) } + def end_keyword_loc; end + + # def equal: () -> String? + # + # source://prism//lib/prism/node.rb#5180 + sig { returns(T.nilable(String)) } + def equal; end + + # attr_reader equal_loc: Location? + # + # source://prism//lib/prism/node.rb#5086 + sig { returns(T.nilable(Prism::Location)) } + def equal_loc; end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#5190 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#5071 + sig { returns(T::Array[Symbol]) } + def locals; end + + # def lparen: () -> String? + # + # source://prism//lib/prism/node.rb#5170 + sig { returns(T.nilable(String)) } + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://prism//lib/prism/node.rb#5080 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#5056 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#5059 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String? + # + # source://prism//lib/prism/node.rb#5165 + sig { returns(T.nilable(String)) } + def operator; end + + # attr_reader operator_loc: Location? + # + # source://prism//lib/prism/node.rb#5077 + sig { returns(T.nilable(Prism::Location)) } + def operator_loc; end + + # attr_reader parameters: ParametersNode? + # + # source://prism//lib/prism/node.rb#5065 + sig { returns(T.nilable(Prism::ParametersNode)) } + def parameters; end + + # attr_reader receiver: Node? + # + # source://prism//lib/prism/node.rb#5062 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def rparen: () -> String? + # + # source://prism//lib/prism/node.rb#5175 + sig { returns(T.nilable(String)) } + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://prism//lib/prism/node.rb#5083 + sig { returns(T.nilable(Prism::Location)) } + def rparen_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5236 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5246 + def type; end + end +end + +# Represents the use of the `defined?` keyword. +# +# defined?(a) +# ^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#5256 +class Prism::DefinedNode < ::Prism::Node + # def initialize: (lparen_loc: Location?, value: Node, rparen_loc: Location?, keyword_loc: Location, location: Location) -> void + # + # @return [DefinedNode] a new instance of DefinedNode + # + # source://prism//lib/prism/node.rb#5269 + sig do + params( + lparen_loc: T.nilable(Prism::Location), + value: Prism::Node, + rparen_loc: T.nilable(Prism::Location), + keyword_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(lparen_loc, value, rparen_loc, keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#5278 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5283 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5293 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5288 + def compact_child_nodes; end + + # def copy: (**params) -> DefinedNode + # + # source://prism//lib/prism/node.rb#5298 + sig { params(params: T.untyped).returns(Prism::DefinedNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5283 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#5312 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#5332 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#5327 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#5266 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def lparen: () -> String? + # + # source://prism//lib/prism/node.rb#5317 + sig { returns(T.nilable(String)) } + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://prism//lib/prism/node.rb#5257 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # def rparen: () -> String? + # + # source://prism//lib/prism/node.rb#5322 + sig { returns(T.nilable(String)) } + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://prism//lib/prism/node.rb#5263 + sig { returns(T.nilable(Prism::Location)) } + def rparen_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5356 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#5260 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5366 + def type; end + end +end + +# DesugarCompiler is a compiler that desugars Ruby code into a more primitive +# form. This is useful for consumers that want to deal with fewer node types. +# +# source://prism//lib/prism/desugar_compiler.rb#11 +class Prism::DesugarCompiler < ::Prism::MutationCompiler + # @@foo &&= bar + # + # becomes + # + # @@foo && @@foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#12 + def visit_class_variable_and_write_node(node); end + + # @@foo += bar + # + # becomes + # + # @@foo = @@foo + bar + # + # source://prism//lib/prism/desugar_compiler.rb#30 + def visit_class_variable_operator_write_node(node); end + + # @@foo ||= bar + # + # becomes + # + # defined?(@@foo) ? @@foo : @@foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#21 + def visit_class_variable_or_write_node(node); end + + # Foo &&= bar + # + # becomes + # + # Foo && Foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#39 + def visit_constant_and_write_node(node); end + + # Foo += bar + # + # becomes + # + # Foo = Foo + bar + # + # source://prism//lib/prism/desugar_compiler.rb#57 + def visit_constant_operator_write_node(node); end + + # Foo ||= bar + # + # becomes + # + # defined?(Foo) ? Foo : Foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#48 + def visit_constant_or_write_node(node); end + + # $foo &&= bar + # + # becomes + # + # $foo && $foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#66 + def visit_global_variable_and_write_node(node); end + + # $foo += bar + # + # becomes + # + # $foo = $foo + bar + # + # source://prism//lib/prism/desugar_compiler.rb#84 + def visit_global_variable_operator_write_node(node); end + + # $foo ||= bar + # + # becomes + # + # defined?($foo) ? $foo : $foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#75 + def visit_global_variable_or_write_node(node); end + + # becomes + # + # source://prism//lib/prism/desugar_compiler.rb#93 + def visit_instance_variable_and_write_node(node); end + + # becomes + # + # source://prism//lib/prism/desugar_compiler.rb#111 + def visit_instance_variable_operator_write_node(node); end + + # becomes + # + # source://prism//lib/prism/desugar_compiler.rb#102 + def visit_instance_variable_or_write_node(node); end + + # foo &&= bar + # + # becomes + # + # foo && foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#120 + def visit_local_variable_and_write_node(node); end + + # foo += bar + # + # becomes + # + # foo = foo + bar + # + # source://prism//lib/prism/desugar_compiler.rb#138 + def visit_local_variable_operator_write_node(node); end + + # foo ||= bar + # + # becomes + # + # foo || foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#129 + def visit_local_variable_or_write_node(node); end + + private + + # Desugar `x &&= y` to `x && x = y` + # + # source://prism//lib/prism/desugar_compiler.rb#145 + def desugar_and_write_node(node, read_class, write_class, *arguments); end + + # Desugar `x += y` to `x = x + y` + # + # source://prism//lib/prism/desugar_compiler.rb#155 + def desugar_operator_write_node(node, read_class, write_class, *arguments); end + + # Desugar `x ||= y` to `defined?(x) ? x : x = y` + # + # source://prism//lib/prism/desugar_compiler.rb#187 + def desugar_or_write_defined_node(node, read_class, write_class, *arguments); end + + # Desugar `x ||= y` to `x || x = y` + # + # source://prism//lib/prism/desugar_compiler.rb#177 + def desugar_or_write_node(node, read_class, write_class, *arguments); end +end + +# The dispatcher class fires events for nodes that are found while walking an +# AST to all registered listeners. It's useful for performing different types +# of analysis on the AST while only having to walk the tree once. +# +# To use the dispatcher, you would first instantiate it and register listeners +# for the events you're interested in: +# +# class OctalListener +# def on_integer_node_enter(node) +# if node.octal? && !node.slice.start_with?("0o") +# warn("Octal integers should be written with the 0o prefix") +# end +# end +# end +# +# dispatcher = Dispatcher.new +# dispatcher.register(listener, :on_integer_node_enter) +# +# Then, you can walk any number of trees and dispatch events to the listeners: +# +# result = Prism.parse("001 + 002 + 003") +# dispatcher.dispatch(result.value) +# +# Optionally, you can also use `#dispatch_once` to dispatch enter and leave +# events for a single node without recursing further down the tree. This can +# be useful in circumstances where you want to reuse the listeners you already +# have registers but want to stop walking the tree at a certain point. +# +# integer = result.value.statements.body.first.receiver.receiver +# dispatcher.dispatch_once(integer) +# +# source://prism//lib/prism/dispatcher.rb#41 +class Prism::Dispatcher < ::Prism::Visitor + # Initialize a new dispatcher. + # + # @return [Dispatcher] a new instance of Dispatcher + # + # source://prism//lib/prism/dispatcher.rb#45 + def initialize; end + + # Walks `root` dispatching events to all registered listeners. + # + # def dispatch: (Node) -> void + # + # source://prism//lib/prism/visitor.rb#16 + def dispatch(node); end + + # Dispatches a single event for `node` to all registered listeners. + # + # def dispatch_once: (Node) -> void + # + # source://prism//lib/prism/dispatcher.rb#64 + def dispatch_once(node); end + + # attr_reader listeners: Hash[Symbol, Array[Listener]] + # + # source://prism//lib/prism/dispatcher.rb#42 + def listeners; end + + # Register a listener for one or more events. + # + # def register: (Listener, *Symbol) -> void + # + # source://prism//lib/prism/dispatcher.rb#52 + def register(listener, *events); end + + # Dispatch enter and leave events for AliasGlobalVariableNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#70 + def visit_alias_global_variable_node(node); end + + # Dispatch enter and leave events for AliasMethodNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#78 + def visit_alias_method_node(node); end + + # Dispatch enter and leave events for AlternationPatternNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#86 + def visit_alternation_pattern_node(node); end + + # Dispatch enter and leave events for AndNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#94 + def visit_and_node(node); end + + # Dispatch enter and leave events for ArgumentsNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#102 + def visit_arguments_node(node); end + + # Dispatch enter and leave events for ArrayNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#110 + def visit_array_node(node); end + + # Dispatch enter and leave events for ArrayPatternNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#118 + def visit_array_pattern_node(node); end + + # Dispatch enter and leave events for AssocNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#126 + def visit_assoc_node(node); end + + # Dispatch enter and leave events for AssocSplatNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#134 + def visit_assoc_splat_node(node); end + + # Dispatch enter and leave events for BackReferenceReadNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#142 + def visit_back_reference_read_node(node); end + + # Dispatch enter and leave events for BeginNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#150 + def visit_begin_node(node); end + + # Dispatch enter and leave events for BlockArgumentNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#158 + def visit_block_argument_node(node); end + + # Dispatch enter and leave events for BlockLocalVariableNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#166 + def visit_block_local_variable_node(node); end + + # Dispatch enter and leave events for BlockNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#174 + def visit_block_node(node); end + + # Dispatch enter and leave events for BlockParameterNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#182 + def visit_block_parameter_node(node); end + + # Dispatch enter and leave events for BlockParametersNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#190 + def visit_block_parameters_node(node); end + + # Dispatch enter and leave events for BreakNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#198 + def visit_break_node(node); end + + # Dispatch enter and leave events for CallAndWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#206 + def visit_call_and_write_node(node); end + + # Dispatch enter and leave events for CallNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#214 + def visit_call_node(node); end + + # Dispatch enter and leave events for CallOperatorWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#222 + def visit_call_operator_write_node(node); end + + # Dispatch enter and leave events for CallOrWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#230 + def visit_call_or_write_node(node); end + + # Dispatch enter and leave events for CapturePatternNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#238 + def visit_capture_pattern_node(node); end + + # Dispatch enter and leave events for CaseMatchNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#246 + def visit_case_match_node(node); end + + # Dispatch enter and leave events for CaseNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#254 + def visit_case_node(node); end + + # Dispatch enter and leave events for ClassNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#262 + def visit_class_node(node); end + + # Dispatch enter and leave events for ClassVariableAndWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#270 + def visit_class_variable_and_write_node(node); end + + # Dispatch enter and leave events for ClassVariableOperatorWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#278 + def visit_class_variable_operator_write_node(node); end + + # Dispatch enter and leave events for ClassVariableOrWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#286 + def visit_class_variable_or_write_node(node); end + + # Dispatch enter and leave events for ClassVariableReadNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#294 + def visit_class_variable_read_node(node); end + + # Dispatch enter and leave events for ClassVariableTargetNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#302 + def visit_class_variable_target_node(node); end + + # Dispatch enter and leave events for ClassVariableWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#310 + def visit_class_variable_write_node(node); end + + # Dispatch enter and leave events for ConstantAndWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#318 + def visit_constant_and_write_node(node); end + + # Dispatch enter and leave events for ConstantOperatorWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#326 + def visit_constant_operator_write_node(node); end + + # Dispatch enter and leave events for ConstantOrWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#334 + def visit_constant_or_write_node(node); end + + # Dispatch enter and leave events for ConstantPathAndWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#342 + def visit_constant_path_and_write_node(node); end + + # Dispatch enter and leave events for ConstantPathNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#350 + def visit_constant_path_node(node); end + + # Dispatch enter and leave events for ConstantPathOperatorWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#358 + def visit_constant_path_operator_write_node(node); end + + # Dispatch enter and leave events for ConstantPathOrWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#366 + def visit_constant_path_or_write_node(node); end + + # Dispatch enter and leave events for ConstantPathTargetNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#374 + def visit_constant_path_target_node(node); end + + # Dispatch enter and leave events for ConstantPathWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#382 + def visit_constant_path_write_node(node); end + + # Dispatch enter and leave events for ConstantReadNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#390 + def visit_constant_read_node(node); end + + # Dispatch enter and leave events for ConstantTargetNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#398 + def visit_constant_target_node(node); end + + # Dispatch enter and leave events for ConstantWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#406 + def visit_constant_write_node(node); end + + # Dispatch enter and leave events for DefNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#414 + def visit_def_node(node); end + + # Dispatch enter and leave events for DefinedNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#422 + def visit_defined_node(node); end + + # Dispatch enter and leave events for ElseNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#430 + def visit_else_node(node); end + + # Dispatch enter and leave events for EmbeddedStatementsNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#438 + def visit_embedded_statements_node(node); end + + # Dispatch enter and leave events for EmbeddedVariableNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#446 + def visit_embedded_variable_node(node); end + + # Dispatch enter and leave events for EnsureNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#454 + def visit_ensure_node(node); end + + # Dispatch enter and leave events for FalseNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#462 + def visit_false_node(node); end + + # Dispatch enter and leave events for FindPatternNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#470 + def visit_find_pattern_node(node); end + + # Dispatch enter and leave events for FlipFlopNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#478 + def visit_flip_flop_node(node); end + + # Dispatch enter and leave events for FloatNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#486 + def visit_float_node(node); end + + # Dispatch enter and leave events for ForNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#494 + def visit_for_node(node); end + + # Dispatch enter and leave events for ForwardingArgumentsNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#502 + def visit_forwarding_arguments_node(node); end + + # Dispatch enter and leave events for ForwardingParameterNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#510 + def visit_forwarding_parameter_node(node); end + + # Dispatch enter and leave events for ForwardingSuperNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#518 + def visit_forwarding_super_node(node); end + + # Dispatch enter and leave events for GlobalVariableAndWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#526 + def visit_global_variable_and_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableOperatorWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#534 + def visit_global_variable_operator_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableOrWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#542 + def visit_global_variable_or_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableReadNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#550 + def visit_global_variable_read_node(node); end + + # Dispatch enter and leave events for GlobalVariableTargetNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#558 + def visit_global_variable_target_node(node); end + + # Dispatch enter and leave events for GlobalVariableWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#566 + def visit_global_variable_write_node(node); end + + # Dispatch enter and leave events for HashNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#574 + def visit_hash_node(node); end + + # Dispatch enter and leave events for HashPatternNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#582 + def visit_hash_pattern_node(node); end + + # Dispatch enter and leave events for IfNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#590 + def visit_if_node(node); end + + # Dispatch enter and leave events for ImaginaryNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#598 + def visit_imaginary_node(node); end + + # Dispatch enter and leave events for ImplicitNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#606 + def visit_implicit_node(node); end + + # Dispatch enter and leave events for InNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#614 + def visit_in_node(node); end + + # Dispatch enter and leave events for IndexAndWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#622 + def visit_index_and_write_node(node); end + + # Dispatch enter and leave events for IndexOperatorWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#630 + def visit_index_operator_write_node(node); end + + # Dispatch enter and leave events for IndexOrWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#638 + def visit_index_or_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableAndWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#646 + def visit_instance_variable_and_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableOperatorWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#654 + def visit_instance_variable_operator_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableOrWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#662 + def visit_instance_variable_or_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableReadNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#670 + def visit_instance_variable_read_node(node); end + + # Dispatch enter and leave events for InstanceVariableTargetNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#678 + def visit_instance_variable_target_node(node); end + + # Dispatch enter and leave events for InstanceVariableWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#686 + def visit_instance_variable_write_node(node); end + + # Dispatch enter and leave events for IntegerNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#694 + def visit_integer_node(node); end + + # Dispatch enter and leave events for InterpolatedMatchLastLineNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#702 + def visit_interpolated_match_last_line_node(node); end + + # Dispatch enter and leave events for InterpolatedRegularExpressionNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#710 + def visit_interpolated_regular_expression_node(node); end + + # Dispatch enter and leave events for InterpolatedStringNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#718 + def visit_interpolated_string_node(node); end + + # Dispatch enter and leave events for InterpolatedSymbolNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#726 + def visit_interpolated_symbol_node(node); end + + # Dispatch enter and leave events for InterpolatedXStringNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#734 + def visit_interpolated_x_string_node(node); end + + # Dispatch enter and leave events for KeywordHashNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#742 + def visit_keyword_hash_node(node); end + + # Dispatch enter and leave events for KeywordRestParameterNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#750 + def visit_keyword_rest_parameter_node(node); end + + # Dispatch enter and leave events for LambdaNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#758 + def visit_lambda_node(node); end + + # Dispatch enter and leave events for LocalVariableAndWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#766 + def visit_local_variable_and_write_node(node); end + + # Dispatch enter and leave events for LocalVariableOperatorWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#774 + def visit_local_variable_operator_write_node(node); end + + # Dispatch enter and leave events for LocalVariableOrWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#782 + def visit_local_variable_or_write_node(node); end + + # Dispatch enter and leave events for LocalVariableReadNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#790 + def visit_local_variable_read_node(node); end + + # Dispatch enter and leave events for LocalVariableTargetNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#798 + def visit_local_variable_target_node(node); end + + # Dispatch enter and leave events for LocalVariableWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#806 + def visit_local_variable_write_node(node); end + + # Dispatch enter and leave events for MatchLastLineNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#814 + def visit_match_last_line_node(node); end + + # Dispatch enter and leave events for MatchPredicateNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#822 + def visit_match_predicate_node(node); end + + # Dispatch enter and leave events for MatchRequiredNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#830 + def visit_match_required_node(node); end + + # Dispatch enter and leave events for MatchWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#838 + def visit_match_write_node(node); end + + # Dispatch enter and leave events for MissingNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#846 + def visit_missing_node(node); end + + # Dispatch enter and leave events for ModuleNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#854 + def visit_module_node(node); end + + # Dispatch enter and leave events for MultiTargetNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#862 + def visit_multi_target_node(node); end + + # Dispatch enter and leave events for MultiWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#870 + def visit_multi_write_node(node); end + + # Dispatch enter and leave events for NextNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#878 + def visit_next_node(node); end + + # Dispatch enter and leave events for NilNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#886 + def visit_nil_node(node); end + + # Dispatch enter and leave events for NoKeywordsParameterNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#894 + def visit_no_keywords_parameter_node(node); end + + # Dispatch enter and leave events for NumberedReferenceReadNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#902 + def visit_numbered_reference_read_node(node); end + + # Dispatch enter and leave events for OptionalKeywordParameterNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#910 + def visit_optional_keyword_parameter_node(node); end + + # Dispatch enter and leave events for OptionalParameterNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#918 + def visit_optional_parameter_node(node); end + + # Dispatch enter and leave events for OrNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#926 + def visit_or_node(node); end + + # Dispatch enter and leave events for ParametersNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#934 + def visit_parameters_node(node); end + + # Dispatch enter and leave events for ParenthesesNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#942 + def visit_parentheses_node(node); end + + # Dispatch enter and leave events for PinnedExpressionNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#950 + def visit_pinned_expression_node(node); end + + # Dispatch enter and leave events for PinnedVariableNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#958 + def visit_pinned_variable_node(node); end + + # Dispatch enter and leave events for PostExecutionNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#966 + def visit_post_execution_node(node); end + + # Dispatch enter and leave events for PreExecutionNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#974 + def visit_pre_execution_node(node); end + + # Dispatch enter and leave events for ProgramNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#982 + def visit_program_node(node); end + + # Dispatch enter and leave events for RangeNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#990 + def visit_range_node(node); end + + # Dispatch enter and leave events for RationalNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#998 + def visit_rational_node(node); end + + # Dispatch enter and leave events for RedoNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1006 + def visit_redo_node(node); end + + # Dispatch enter and leave events for RegularExpressionNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1014 + def visit_regular_expression_node(node); end + + # Dispatch enter and leave events for RequiredKeywordParameterNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1022 + def visit_required_keyword_parameter_node(node); end + + # Dispatch enter and leave events for RequiredParameterNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1030 + def visit_required_parameter_node(node); end + + # Dispatch enter and leave events for RescueModifierNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1038 + def visit_rescue_modifier_node(node); end + + # Dispatch enter and leave events for RescueNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1046 + def visit_rescue_node(node); end + + # Dispatch enter and leave events for RestParameterNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1054 + def visit_rest_parameter_node(node); end + + # Dispatch enter and leave events for RetryNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1062 + def visit_retry_node(node); end + + # Dispatch enter and leave events for ReturnNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1070 + def visit_return_node(node); end + + # Dispatch enter and leave events for SelfNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1078 + def visit_self_node(node); end + + # Dispatch enter and leave events for SingletonClassNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1086 + def visit_singleton_class_node(node); end + + # Dispatch enter and leave events for SourceEncodingNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1094 + def visit_source_encoding_node(node); end + + # Dispatch enter and leave events for SourceFileNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1102 + def visit_source_file_node(node); end + + # Dispatch enter and leave events for SourceLineNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1110 + def visit_source_line_node(node); end + + # Dispatch enter and leave events for SplatNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1118 + def visit_splat_node(node); end + + # Dispatch enter and leave events for StatementsNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1126 + def visit_statements_node(node); end + + # Dispatch enter and leave events for StringNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1134 + def visit_string_node(node); end + + # Dispatch enter and leave events for SuperNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1142 + def visit_super_node(node); end + + # Dispatch enter and leave events for SymbolNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1150 + def visit_symbol_node(node); end + + # Dispatch enter and leave events for TrueNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1158 + def visit_true_node(node); end + + # Dispatch enter and leave events for UndefNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1166 + def visit_undef_node(node); end + + # Dispatch enter and leave events for UnlessNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1174 + def visit_unless_node(node); end + + # Dispatch enter and leave events for UntilNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1182 + def visit_until_node(node); end + + # Dispatch enter and leave events for WhenNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1190 + def visit_when_node(node); end + + # Dispatch enter and leave events for WhileNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1198 + def visit_while_node(node); end + + # Dispatch enter and leave events for XStringNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1206 + def visit_x_string_node(node); end + + # Dispatch enter and leave events for YieldNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1214 + def visit_yield_node(node); end +end + +# source://prism//lib/prism/dispatcher.rb#1220 +class Prism::Dispatcher::DispatchOnce < ::Prism::Visitor + # @return [DispatchOnce] a new instance of DispatchOnce + # + # source://prism//lib/prism/dispatcher.rb#1223 + def initialize(listeners); end + + # Returns the value of attribute listeners. + # + # source://prism//lib/prism/dispatcher.rb#1221 + def listeners; end + + # Dispatch enter and leave events for AliasGlobalVariableNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1228 + def visit_alias_global_variable_node(node); end + + # Dispatch enter and leave events for AliasMethodNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1234 + def visit_alias_method_node(node); end + + # Dispatch enter and leave events for AlternationPatternNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1240 + def visit_alternation_pattern_node(node); end + + # Dispatch enter and leave events for AndNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1246 + def visit_and_node(node); end + + # Dispatch enter and leave events for ArgumentsNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1252 + def visit_arguments_node(node); end + + # Dispatch enter and leave events for ArrayNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1258 + def visit_array_node(node); end + + # Dispatch enter and leave events for ArrayPatternNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1264 + def visit_array_pattern_node(node); end + + # Dispatch enter and leave events for AssocNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1270 + def visit_assoc_node(node); end + + # Dispatch enter and leave events for AssocSplatNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1276 + def visit_assoc_splat_node(node); end + + # Dispatch enter and leave events for BackReferenceReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1282 + def visit_back_reference_read_node(node); end + + # Dispatch enter and leave events for BeginNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1288 + def visit_begin_node(node); end + + # Dispatch enter and leave events for BlockArgumentNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1294 + def visit_block_argument_node(node); end + + # Dispatch enter and leave events for BlockLocalVariableNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1300 + def visit_block_local_variable_node(node); end + + # Dispatch enter and leave events for BlockNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1306 + def visit_block_node(node); end + + # Dispatch enter and leave events for BlockParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1312 + def visit_block_parameter_node(node); end + + # Dispatch enter and leave events for BlockParametersNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1318 + def visit_block_parameters_node(node); end + + # Dispatch enter and leave events for BreakNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1324 + def visit_break_node(node); end + + # Dispatch enter and leave events for CallAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1330 + def visit_call_and_write_node(node); end + + # Dispatch enter and leave events for CallNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1336 + def visit_call_node(node); end + + # Dispatch enter and leave events for CallOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1342 + def visit_call_operator_write_node(node); end + + # Dispatch enter and leave events for CallOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1348 + def visit_call_or_write_node(node); end + + # Dispatch enter and leave events for CapturePatternNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1354 + def visit_capture_pattern_node(node); end + + # Dispatch enter and leave events for CaseMatchNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1360 + def visit_case_match_node(node); end + + # Dispatch enter and leave events for CaseNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1366 + def visit_case_node(node); end + + # Dispatch enter and leave events for ClassNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1372 + def visit_class_node(node); end + + # Dispatch enter and leave events for ClassVariableAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1378 + def visit_class_variable_and_write_node(node); end + + # Dispatch enter and leave events for ClassVariableOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1384 + def visit_class_variable_operator_write_node(node); end + + # Dispatch enter and leave events for ClassVariableOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1390 + def visit_class_variable_or_write_node(node); end + + # Dispatch enter and leave events for ClassVariableReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1396 + def visit_class_variable_read_node(node); end + + # Dispatch enter and leave events for ClassVariableTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1402 + def visit_class_variable_target_node(node); end + + # Dispatch enter and leave events for ClassVariableWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1408 + def visit_class_variable_write_node(node); end + + # Dispatch enter and leave events for ConstantAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1414 + def visit_constant_and_write_node(node); end + + # Dispatch enter and leave events for ConstantOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1420 + def visit_constant_operator_write_node(node); end + + # Dispatch enter and leave events for ConstantOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1426 + def visit_constant_or_write_node(node); end + + # Dispatch enter and leave events for ConstantPathAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1432 + def visit_constant_path_and_write_node(node); end + + # Dispatch enter and leave events for ConstantPathNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1438 + def visit_constant_path_node(node); end + + # Dispatch enter and leave events for ConstantPathOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1444 + def visit_constant_path_operator_write_node(node); end + + # Dispatch enter and leave events for ConstantPathOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1450 + def visit_constant_path_or_write_node(node); end + + # Dispatch enter and leave events for ConstantPathTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1456 + def visit_constant_path_target_node(node); end + + # Dispatch enter and leave events for ConstantPathWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1462 + def visit_constant_path_write_node(node); end + + # Dispatch enter and leave events for ConstantReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1468 + def visit_constant_read_node(node); end + + # Dispatch enter and leave events for ConstantTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1474 + def visit_constant_target_node(node); end + + # Dispatch enter and leave events for ConstantWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1480 + def visit_constant_write_node(node); end + + # Dispatch enter and leave events for DefNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1486 + def visit_def_node(node); end + + # Dispatch enter and leave events for DefinedNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1492 + def visit_defined_node(node); end + + # Dispatch enter and leave events for ElseNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1498 + def visit_else_node(node); end + + # Dispatch enter and leave events for EmbeddedStatementsNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1504 + def visit_embedded_statements_node(node); end + + # Dispatch enter and leave events for EmbeddedVariableNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1510 + def visit_embedded_variable_node(node); end + + # Dispatch enter and leave events for EnsureNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1516 + def visit_ensure_node(node); end + + # Dispatch enter and leave events for FalseNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1522 + def visit_false_node(node); end + + # Dispatch enter and leave events for FindPatternNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1528 + def visit_find_pattern_node(node); end + + # Dispatch enter and leave events for FlipFlopNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1534 + def visit_flip_flop_node(node); end + + # Dispatch enter and leave events for FloatNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1540 + def visit_float_node(node); end + + # Dispatch enter and leave events for ForNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1546 + def visit_for_node(node); end + + # Dispatch enter and leave events for ForwardingArgumentsNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1552 + def visit_forwarding_arguments_node(node); end + + # Dispatch enter and leave events for ForwardingParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1558 + def visit_forwarding_parameter_node(node); end + + # Dispatch enter and leave events for ForwardingSuperNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1564 + def visit_forwarding_super_node(node); end + + # Dispatch enter and leave events for GlobalVariableAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1570 + def visit_global_variable_and_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1576 + def visit_global_variable_operator_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1582 + def visit_global_variable_or_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1588 + def visit_global_variable_read_node(node); end + + # Dispatch enter and leave events for GlobalVariableTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1594 + def visit_global_variable_target_node(node); end + + # Dispatch enter and leave events for GlobalVariableWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1600 + def visit_global_variable_write_node(node); end + + # Dispatch enter and leave events for HashNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1606 + def visit_hash_node(node); end + + # Dispatch enter and leave events for HashPatternNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1612 + def visit_hash_pattern_node(node); end + + # Dispatch enter and leave events for IfNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1618 + def visit_if_node(node); end + + # Dispatch enter and leave events for ImaginaryNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1624 + def visit_imaginary_node(node); end + + # Dispatch enter and leave events for ImplicitNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1630 + def visit_implicit_node(node); end + + # Dispatch enter and leave events for InNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1636 + def visit_in_node(node); end + + # Dispatch enter and leave events for IndexAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1642 + def visit_index_and_write_node(node); end + + # Dispatch enter and leave events for IndexOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1648 + def visit_index_operator_write_node(node); end + + # Dispatch enter and leave events for IndexOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1654 + def visit_index_or_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1660 + def visit_instance_variable_and_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1666 + def visit_instance_variable_operator_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1672 + def visit_instance_variable_or_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1678 + def visit_instance_variable_read_node(node); end + + # Dispatch enter and leave events for InstanceVariableTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1684 + def visit_instance_variable_target_node(node); end + + # Dispatch enter and leave events for InstanceVariableWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1690 + def visit_instance_variable_write_node(node); end + + # Dispatch enter and leave events for IntegerNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1696 + def visit_integer_node(node); end + + # Dispatch enter and leave events for InterpolatedMatchLastLineNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1702 + def visit_interpolated_match_last_line_node(node); end + + # Dispatch enter and leave events for InterpolatedRegularExpressionNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1708 + def visit_interpolated_regular_expression_node(node); end + + # Dispatch enter and leave events for InterpolatedStringNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1714 + def visit_interpolated_string_node(node); end + + # Dispatch enter and leave events for InterpolatedSymbolNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1720 + def visit_interpolated_symbol_node(node); end + + # Dispatch enter and leave events for InterpolatedXStringNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1726 + def visit_interpolated_x_string_node(node); end + + # Dispatch enter and leave events for KeywordHashNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1732 + def visit_keyword_hash_node(node); end + + # Dispatch enter and leave events for KeywordRestParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1738 + def visit_keyword_rest_parameter_node(node); end + + # Dispatch enter and leave events for LambdaNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1744 + def visit_lambda_node(node); end + + # Dispatch enter and leave events for LocalVariableAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1750 + def visit_local_variable_and_write_node(node); end + + # Dispatch enter and leave events for LocalVariableOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1756 + def visit_local_variable_operator_write_node(node); end + + # Dispatch enter and leave events for LocalVariableOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1762 + def visit_local_variable_or_write_node(node); end + + # Dispatch enter and leave events for LocalVariableReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1768 + def visit_local_variable_read_node(node); end + + # Dispatch enter and leave events for LocalVariableTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1774 + def visit_local_variable_target_node(node); end + + # Dispatch enter and leave events for LocalVariableWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1780 + def visit_local_variable_write_node(node); end + + # Dispatch enter and leave events for MatchLastLineNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1786 + def visit_match_last_line_node(node); end + + # Dispatch enter and leave events for MatchPredicateNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1792 + def visit_match_predicate_node(node); end + + # Dispatch enter and leave events for MatchRequiredNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1798 + def visit_match_required_node(node); end + + # Dispatch enter and leave events for MatchWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1804 + def visit_match_write_node(node); end + + # Dispatch enter and leave events for MissingNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1810 + def visit_missing_node(node); end + + # Dispatch enter and leave events for ModuleNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1816 + def visit_module_node(node); end + + # Dispatch enter and leave events for MultiTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1822 + def visit_multi_target_node(node); end + + # Dispatch enter and leave events for MultiWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1828 + def visit_multi_write_node(node); end + + # Dispatch enter and leave events for NextNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1834 + def visit_next_node(node); end + + # Dispatch enter and leave events for NilNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1840 + def visit_nil_node(node); end + + # Dispatch enter and leave events for NoKeywordsParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1846 + def visit_no_keywords_parameter_node(node); end + + # Dispatch enter and leave events for NumberedReferenceReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1852 + def visit_numbered_reference_read_node(node); end + + # Dispatch enter and leave events for OptionalKeywordParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1858 + def visit_optional_keyword_parameter_node(node); end + + # Dispatch enter and leave events for OptionalParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1864 + def visit_optional_parameter_node(node); end + + # Dispatch enter and leave events for OrNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1870 + def visit_or_node(node); end + + # Dispatch enter and leave events for ParametersNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1876 + def visit_parameters_node(node); end + + # Dispatch enter and leave events for ParenthesesNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1882 + def visit_parentheses_node(node); end + + # Dispatch enter and leave events for PinnedExpressionNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1888 + def visit_pinned_expression_node(node); end + + # Dispatch enter and leave events for PinnedVariableNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1894 + def visit_pinned_variable_node(node); end + + # Dispatch enter and leave events for PostExecutionNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1900 + def visit_post_execution_node(node); end + + # Dispatch enter and leave events for PreExecutionNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1906 + def visit_pre_execution_node(node); end + + # Dispatch enter and leave events for ProgramNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1912 + def visit_program_node(node); end + + # Dispatch enter and leave events for RangeNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1918 + def visit_range_node(node); end + + # Dispatch enter and leave events for RationalNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1924 + def visit_rational_node(node); end + + # Dispatch enter and leave events for RedoNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1930 + def visit_redo_node(node); end + + # Dispatch enter and leave events for RegularExpressionNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1936 + def visit_regular_expression_node(node); end + + # Dispatch enter and leave events for RequiredKeywordParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1942 + def visit_required_keyword_parameter_node(node); end + + # Dispatch enter and leave events for RequiredParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1948 + def visit_required_parameter_node(node); end + + # Dispatch enter and leave events for RescueModifierNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1954 + def visit_rescue_modifier_node(node); end + + # Dispatch enter and leave events for RescueNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1960 + def visit_rescue_node(node); end + + # Dispatch enter and leave events for RestParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1966 + def visit_rest_parameter_node(node); end + + # Dispatch enter and leave events for RetryNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1972 + def visit_retry_node(node); end + + # Dispatch enter and leave events for ReturnNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1978 + def visit_return_node(node); end + + # Dispatch enter and leave events for SelfNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1984 + def visit_self_node(node); end + + # Dispatch enter and leave events for SingletonClassNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1990 + def visit_singleton_class_node(node); end + + # Dispatch enter and leave events for SourceEncodingNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1996 + def visit_source_encoding_node(node); end + + # Dispatch enter and leave events for SourceFileNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2002 + def visit_source_file_node(node); end + + # Dispatch enter and leave events for SourceLineNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2008 + def visit_source_line_node(node); end + + # Dispatch enter and leave events for SplatNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2014 + def visit_splat_node(node); end + + # Dispatch enter and leave events for StatementsNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2020 + def visit_statements_node(node); end + + # Dispatch enter and leave events for StringNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2026 + def visit_string_node(node); end + + # Dispatch enter and leave events for SuperNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2032 + def visit_super_node(node); end + + # Dispatch enter and leave events for SymbolNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2038 + def visit_symbol_node(node); end + + # Dispatch enter and leave events for TrueNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2044 + def visit_true_node(node); end + + # Dispatch enter and leave events for UndefNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2050 + def visit_undef_node(node); end + + # Dispatch enter and leave events for UnlessNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2056 + def visit_unless_node(node); end + + # Dispatch enter and leave events for UntilNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2062 + def visit_until_node(node); end + + # Dispatch enter and leave events for WhenNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2068 + def visit_when_node(node); end + + # Dispatch enter and leave events for WhileNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2074 + def visit_while_node(node); end + + # Dispatch enter and leave events for XStringNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2080 + def visit_x_string_node(node); end + + # Dispatch enter and leave events for YieldNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2086 + def visit_yield_node(node); end +end + +# This visitor provides the ability to call Node#to_dot, which converts a +# subtree into a graphviz dot graph. +# +# source://prism//lib/prism/dot_visitor.rb#13 +class Prism::DotVisitor < ::Prism::Visitor + # Initialize a new dot visitor. + # + # @return [DotVisitor] a new instance of DotVisitor + # + # source://prism//lib/prism/dot_visitor.rb#105 + def initialize; end + + # The digraph that is being built. + # + # source://prism//lib/prism/dot_visitor.rb#102 + def digraph; end + + # Convert this visitor into a graphviz dot graph string. + # + # source://prism//lib/prism/dot_visitor.rb#110 + def to_dot; end + + # Visit a AliasGlobalVariableNode node. + # + # source://prism//lib/prism/dot_visitor.rb#115 + def visit_alias_global_variable_node(node); end + + # Visit a AliasMethodNode node. + # + # source://prism//lib/prism/dot_visitor.rb#140 + def visit_alias_method_node(node); end + + # Visit a AlternationPatternNode node. + # + # source://prism//lib/prism/dot_visitor.rb#165 + def visit_alternation_pattern_node(node); end + + # Visit a AndNode node. + # + # source://prism//lib/prism/dot_visitor.rb#190 + def visit_and_node(node); end + + # Visit a ArgumentsNode node. + # + # source://prism//lib/prism/dot_visitor.rb#215 + def visit_arguments_node(node); end + + # Visit a ArrayNode node. + # + # source://prism//lib/prism/dot_visitor.rb#241 + def visit_array_node(node); end + + # Visit a ArrayPatternNode node. + # + # source://prism//lib/prism/dot_visitor.rb#274 + def visit_array_pattern_node(node); end + + # Visit a AssocNode node. + # + # source://prism//lib/prism/dot_visitor.rb#328 + def visit_assoc_node(node); end + + # Visit a AssocSplatNode node. + # + # source://prism//lib/prism/dot_visitor.rb#357 + def visit_assoc_splat_node(node); end + + # Visit a BackReferenceReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#380 + def visit_back_reference_read_node(node); end + + # Visit a BeginNode node. + # + # source://prism//lib/prism/dot_visitor.rb#397 + def visit_begin_node(node); end + + # Visit a BlockArgumentNode node. + # + # source://prism//lib/prism/dot_visitor.rb#445 + def visit_block_argument_node(node); end + + # Visit a BlockLocalVariableNode node. + # + # source://prism//lib/prism/dot_visitor.rb#468 + def visit_block_local_variable_node(node); end + + # Visit a BlockNode node. + # + # source://prism//lib/prism/dot_visitor.rb#485 + def visit_block_node(node); end + + # Visit a BlockParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#520 + def visit_block_parameter_node(node); end + + # Visit a BlockParametersNode node. + # + # source://prism//lib/prism/dot_visitor.rb#545 + def visit_block_parameters_node(node); end + + # Visit a BreakNode node. + # + # source://prism//lib/prism/dot_visitor.rb#584 + def visit_break_node(node); end + + # Visit a CallAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#607 + def visit_call_and_write_node(node); end + + # Visit a CallNode node. + # + # source://prism//lib/prism/dot_visitor.rb#653 + def visit_call_node(node); end + + # Visit a CallOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#711 + def visit_call_operator_write_node(node); end + + # Visit a CallOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#760 + def visit_call_or_write_node(node); end + + # Visit a CapturePatternNode node. + # + # source://prism//lib/prism/dot_visitor.rb#806 + def visit_capture_pattern_node(node); end + + # Visit a CaseMatchNode node. + # + # source://prism//lib/prism/dot_visitor.rb#831 + def visit_case_match_node(node); end + + # Visit a CaseNode node. + # + # source://prism//lib/prism/dot_visitor.rb#872 + def visit_case_node(node); end + + # Visit a ClassNode node. + # + # source://prism//lib/prism/dot_visitor.rb#913 + def visit_class_node(node); end + + # Visit a ClassVariableAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#960 + def visit_class_variable_and_write_node(node); end + + # Visit a ClassVariableOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#987 + def visit_class_variable_operator_write_node(node); end + + # Visit a ClassVariableOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1017 + def visit_class_variable_or_write_node(node); end + + # Visit a ClassVariableReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1044 + def visit_class_variable_read_node(node); end + + # Visit a ClassVariableTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1061 + def visit_class_variable_target_node(node); end + + # Visit a ClassVariableWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1078 + def visit_class_variable_write_node(node); end + + # Visit a ConstantAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1107 + def visit_constant_and_write_node(node); end + + # Visit a ConstantOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1134 + def visit_constant_operator_write_node(node); end + + # Visit a ConstantOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1164 + def visit_constant_or_write_node(node); end + + # Visit a ConstantPathAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1191 + def visit_constant_path_and_write_node(node); end + + # Visit a ConstantPathNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1216 + def visit_constant_path_node(node); end + + # Visit a ConstantPathOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1243 + def visit_constant_path_operator_write_node(node); end + + # Visit a ConstantPathOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1271 + def visit_constant_path_or_write_node(node); end + + # Visit a ConstantPathTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1296 + def visit_constant_path_target_node(node); end + + # Visit a ConstantPathWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1323 + def visit_constant_path_write_node(node); end + + # Visit a ConstantReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1348 + def visit_constant_read_node(node); end + + # Visit a ConstantTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1365 + def visit_constant_target_node(node); end + + # Visit a ConstantWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1382 + def visit_constant_write_node(node); end + + # Visit a DefNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1409 + def visit_def_node(node); end + + # Visit a DefinedNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1478 + def visit_defined_node(node); end + + # Visit a ElseNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1509 + def visit_else_node(node); end + + # Visit a EmbeddedStatementsNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1537 + def visit_embedded_statements_node(node); end + + # Visit a EmbeddedVariableNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1563 + def visit_embedded_variable_node(node); end + + # Visit a EnsureNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1584 + def visit_ensure_node(node); end + + # Visit a FalseNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1610 + def visit_false_node(node); end + + # Visit a FindPatternNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1624 + def visit_find_pattern_node(node); end + + # Visit a FlipFlopNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1671 + def visit_flip_flop_node(node); end + + # Visit a FloatNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1703 + def visit_float_node(node); end + + # Visit a ForNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1717 + def visit_for_node(node); end + + # Visit a ForwardingArgumentsNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1759 + def visit_forwarding_arguments_node(node); end + + # Visit a ForwardingParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1773 + def visit_forwarding_parameter_node(node); end + + # Visit a ForwardingSuperNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1787 + def visit_forwarding_super_node(node); end + + # Visit a GlobalVariableAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1807 + def visit_global_variable_and_write_node(node); end + + # Visit a GlobalVariableOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1834 + def visit_global_variable_operator_write_node(node); end + + # Visit a GlobalVariableOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1864 + def visit_global_variable_or_write_node(node); end + + # Visit a GlobalVariableReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1891 + def visit_global_variable_read_node(node); end + + # Visit a GlobalVariableTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1908 + def visit_global_variable_target_node(node); end + + # Visit a GlobalVariableWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1925 + def visit_global_variable_write_node(node); end + + # Visit a HashNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1952 + def visit_hash_node(node); end + + # Visit a HashPatternNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1981 + def visit_hash_pattern_node(node); end + + # Visit a IfNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2026 + def visit_if_node(node); end + + # Visit a ImaginaryNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2071 + def visit_imaginary_node(node); end + + # Visit a ImplicitNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2089 + def visit_implicit_node(node); end + + # Visit a InNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2107 + def visit_in_node(node); end + + # Visit a IndexAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2139 + def visit_index_and_write_node(node); end + + # Visit a IndexOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2192 + def visit_index_operator_write_node(node); end + + # Visit a IndexOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2248 + def visit_index_or_write_node(node); end + + # Visit a InstanceVariableAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2301 + def visit_instance_variable_and_write_node(node); end + + # Visit a InstanceVariableOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2328 + def visit_instance_variable_operator_write_node(node); end + + # Visit a InstanceVariableOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2358 + def visit_instance_variable_or_write_node(node); end + + # Visit a InstanceVariableReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2385 + def visit_instance_variable_read_node(node); end + + # Visit a InstanceVariableTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2402 + def visit_instance_variable_target_node(node); end + + # Visit a InstanceVariableWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2419 + def visit_instance_variable_write_node(node); end + + # Visit a IntegerNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2446 + def visit_integer_node(node); end + + # Visit a InterpolatedMatchLastLineNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2463 + def visit_interpolated_match_last_line_node(node); end + + # Visit a InterpolatedRegularExpressionNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2495 + def visit_interpolated_regular_expression_node(node); end + + # Visit a InterpolatedStringNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2527 + def visit_interpolated_string_node(node); end + + # Visit a InterpolatedSymbolNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2560 + def visit_interpolated_symbol_node(node); end + + # Visit a InterpolatedXStringNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2593 + def visit_interpolated_x_string_node(node); end + + # Visit a KeywordHashNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2622 + def visit_keyword_hash_node(node); end + + # Visit a KeywordRestParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2645 + def visit_keyword_rest_parameter_node(node); end + + # Visit a LambdaNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2670 + def visit_lambda_node(node); end + + # Visit a LocalVariableAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2708 + def visit_local_variable_and_write_node(node); end + + # Visit a LocalVariableOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2738 + def visit_local_variable_operator_write_node(node); end + + # Visit a LocalVariableOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2771 + def visit_local_variable_or_write_node(node); end + + # Visit a LocalVariableReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2801 + def visit_local_variable_read_node(node); end + + # Visit a LocalVariableTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2821 + def visit_local_variable_target_node(node); end + + # Visit a LocalVariableWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2841 + def visit_local_variable_write_node(node); end + + # Visit a MatchLastLineNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2871 + def visit_match_last_line_node(node); end + + # Visit a MatchPredicateNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2900 + def visit_match_predicate_node(node); end + + # Visit a MatchRequiredNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2925 + def visit_match_required_node(node); end + + # Visit a MatchWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2950 + def visit_match_write_node(node); end + + # Visit a MissingNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2977 + def visit_missing_node(node); end + + # Visit a ModuleNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2991 + def visit_module_node(node); end + + # Visit a MultiTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3027 + def visit_multi_target_node(node); end + + # Visit a MultiWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3075 + def visit_multi_write_node(node); end + + # Visit a NextNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3130 + def visit_next_node(node); end + + # Visit a NilNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3153 + def visit_nil_node(node); end + + # Visit a NoKeywordsParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3167 + def visit_no_keywords_parameter_node(node); end + + # Visit a NumberedReferenceReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3187 + def visit_numbered_reference_read_node(node); end + + # Visit a OptionalKeywordParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3204 + def visit_optional_keyword_parameter_node(node); end + + # Visit a OptionalParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3228 + def visit_optional_parameter_node(node); end + + # Visit a OrNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3255 + def visit_or_node(node); end + + # Visit a ParametersNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3280 + def visit_parameters_node(node); end + + # Visit a ParenthesesNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3348 + def visit_parentheses_node(node); end + + # Visit a PinnedExpressionNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3374 + def visit_pinned_expression_node(node); end + + # Visit a PinnedVariableNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3401 + def visit_pinned_variable_node(node); end + + # Visit a PostExecutionNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3422 + def visit_post_execution_node(node); end + + # Visit a PreExecutionNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3451 + def visit_pre_execution_node(node); end + + # Visit a ProgramNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3480 + def visit_program_node(node); end + + # Visit a RangeNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3501 + def visit_range_node(node); end + + # Visit a RationalNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3533 + def visit_rational_node(node); end + + # Visit a RedoNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3551 + def visit_redo_node(node); end + + # Visit a RegularExpressionNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3565 + def visit_regular_expression_node(node); end + + # Visit a RequiredKeywordParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3594 + def visit_required_keyword_parameter_node(node); end + + # Visit a RequiredParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3614 + def visit_required_parameter_node(node); end + + # Visit a RescueModifierNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3631 + def visit_rescue_modifier_node(node); end + + # Visit a RescueNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3656 + def visit_rescue_node(node); end + + # Visit a RestParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3705 + def visit_rest_parameter_node(node); end + + # Visit a RetryNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3730 + def visit_retry_node(node); end + + # Visit a ReturnNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3744 + def visit_return_node(node); end + + # Visit a SelfNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3767 + def visit_self_node(node); end + + # Visit a SingletonClassNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3781 + def visit_singleton_class_node(node); end + + # Visit a SourceEncodingNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3817 + def visit_source_encoding_node(node); end + + # Visit a SourceFileNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3831 + def visit_source_file_node(node); end + + # Visit a SourceLineNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3848 + def visit_source_line_node(node); end + + # Visit a SplatNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3862 + def visit_splat_node(node); end + + # Visit a StatementsNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3885 + def visit_statements_node(node); end + + # Visit a StringNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3908 + def visit_string_node(node); end + + # Visit a SuperNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3941 + def visit_super_node(node); end + + # Visit a SymbolNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3980 + def visit_symbol_node(node); end + + # Visit a TrueNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4012 + def visit_true_node(node); end + + # Visit a UndefNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4026 + def visit_undef_node(node); end + + # Visit a UnlessNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4052 + def visit_unless_node(node); end + + # Visit a UntilNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4095 + def visit_until_node(node); end + + # Visit a WhenNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4130 + def visit_when_node(node); end + + # Visit a WhileNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4162 + def visit_while_node(node); end + + # Visit a XStringNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4197 + def visit_x_string_node(node); end + + # Visit a YieldNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4223 + def visit_yield_node(node); end + + private + + # Inspect a node that has arguments_node_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4269 + def arguments_node_flags_inspect(node); end + + # Inspect a node that has call_node_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4277 + def call_node_flags_inspect(node); end + + # Inspect a node that has integer_base_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4286 + def integer_base_flags_inspect(node); end + + # Inspect a location to display the start and end line and column numbers. + # + # source://prism//lib/prism/dot_visitor.rb#4263 + def location_inspect(location); end + + # Inspect a node that has loop_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4297 + def loop_flags_inspect(node); end + + # Generate a unique node ID for a node throughout the digraph. + # + # source://prism//lib/prism/dot_visitor.rb#4258 + def node_id(node); end + + # Inspect a node that has range_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4305 + def range_flags_inspect(node); end + + # Inspect a node that has regular_expression_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4313 + def regular_expression_flags_inspect(node); end + + # Inspect a node that has string_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4328 + def string_flags_inspect(node); end +end + +# source://prism//lib/prism/dot_visitor.rb#58 +class Prism::DotVisitor::Digraph + # @return [Digraph] a new instance of Digraph + # + # source://prism//lib/prism/dot_visitor.rb#61 + def initialize; end + + # source://prism//lib/prism/dot_visitor.rb#75 + def edge(value); end + + # Returns the value of attribute edges. + # + # source://prism//lib/prism/dot_visitor.rb#59 + def edges; end + + # source://prism//lib/prism/dot_visitor.rb#67 + def node(value); end + + # Returns the value of attribute nodes. + # + # source://prism//lib/prism/dot_visitor.rb#59 + def nodes; end + + # source://prism//lib/prism/dot_visitor.rb#79 + def to_dot; end + + # source://prism//lib/prism/dot_visitor.rb#71 + def waypoint(value); end + + # Returns the value of attribute waypoints. + # + # source://prism//lib/prism/dot_visitor.rb#59 + def waypoints; end +end + +# source://prism//lib/prism/dot_visitor.rb#14 +class Prism::DotVisitor::Field + # @return [Field] a new instance of Field + # + # source://prism//lib/prism/dot_visitor.rb#17 + def initialize(name, value, port); end + + # Returns the value of attribute name. + # + # source://prism//lib/prism/dot_visitor.rb#15 + def name; end + + # Returns the value of attribute port. + # + # source://prism//lib/prism/dot_visitor.rb#15 + def port; end + + # source://prism//lib/prism/dot_visitor.rb#23 + def to_dot; end + + # Returns the value of attribute value. + # + # source://prism//lib/prism/dot_visitor.rb#15 + def value; end +end + +# source://prism//lib/prism/dot_visitor.rb#32 +class Prism::DotVisitor::Table + # @return [Table] a new instance of Table + # + # source://prism//lib/prism/dot_visitor.rb#35 + def initialize(name); end + + # source://prism//lib/prism/dot_visitor.rb#40 + def field(name, value = T.unsafe(nil), port: T.unsafe(nil)); end + + # Returns the value of attribute fields. + # + # source://prism//lib/prism/dot_visitor.rb#33 + def fields; end + + # Returns the value of attribute name. + # + # source://prism//lib/prism/dot_visitor.rb#33 + def name; end + + # source://prism//lib/prism/dot_visitor.rb#44 + def to_dot; end +end + +# Represents an `else` clause in a `case`, `if`, or `unless` statement. +# +# if a then b else c end +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#5376 +class Prism::ElseNode < ::Prism::Node + # def initialize: (else_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location?, location: Location) -> void + # + # @return [ElseNode] a new instance of ElseNode + # + # source://prism//lib/prism/node.rb#5386 + sig do + params( + else_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + end_keyword_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(else_keyword_loc, statements, end_keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#5394 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5399 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5411 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5404 + def compact_child_nodes; end + + # def copy: (**params) -> ElseNode + # + # source://prism//lib/prism/node.rb#5416 + sig { params(params: T.untyped).returns(Prism::ElseNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5399 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#5429 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def else_keyword: () -> String + # + # source://prism//lib/prism/node.rb#5434 + sig { returns(String) } + def else_keyword; end + + # attr_reader else_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#5377 + sig { returns(Prism::Location) } + def else_keyword_loc; end + + # def end_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#5439 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#5383 + sig { returns(T.nilable(Prism::Location)) } + def end_keyword_loc; end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#5444 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#5380 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5471 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5481 + def type; end + end +end + +# EmbDocComment objects correspond to comments that are surrounded by =begin +# and =end. +# +# source://prism//lib/prism/parse_result.rb#266 +class Prism::EmbDocComment < ::Prism::Comment + # Returns a string representation of this comment. + # + # source://prism//lib/prism/parse_result.rb#267 + def inspect; end +end + +# Represents an interpolated set of statements. +# +# "foo #{bar}" +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#5491 +class Prism::EmbeddedStatementsNode < ::Prism::Node + # def initialize: (opening_loc: Location, statements: StatementsNode?, closing_loc: Location, location: Location) -> void + # + # @return [EmbeddedStatementsNode] a new instance of EmbeddedStatementsNode + # + # source://prism//lib/prism/node.rb#5501 + sig do + params( + opening_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + closing_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(opening_loc, statements, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#5509 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5514 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#5554 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#5498 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5526 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5519 + def compact_child_nodes; end + + # def copy: (**params) -> EmbeddedStatementsNode + # + # source://prism//lib/prism/node.rb#5531 + sig { params(params: T.untyped).returns(Prism::EmbeddedStatementsNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5514 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#5544 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#5559 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#5549 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#5492 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#5495 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5586 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5596 + def type; end + end +end + +# Represents an interpolated variable. +# +# "foo #@bar" +# ^^^^^ +# +# source://prism//lib/prism/node.rb#5606 +class Prism::EmbeddedVariableNode < ::Prism::Node + # def initialize: (operator_loc: Location, variable: Node, location: Location) -> void + # + # @return [EmbeddedVariableNode] a new instance of EmbeddedVariableNode + # + # source://prism//lib/prism/node.rb#5613 + sig { params(operator_loc: Prism::Location, variable: Prism::Node, location: Prism::Location).void } + def initialize(operator_loc, variable, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#5620 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5625 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5635 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5630 + def compact_child_nodes; end + + # def copy: (**params) -> EmbeddedVariableNode + # + # source://prism//lib/prism/node.rb#5640 + sig { params(params: T.untyped).returns(Prism::EmbeddedVariableNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5625 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#5652 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#5662 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#5657 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#5607 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5684 + def type; end + + # attr_reader variable: Node + # + # source://prism//lib/prism/node.rb#5610 + sig { returns(Prism::Node) } + def variable; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5694 + def type; end + end +end + +# Represents an `ensure` clause in a `begin` statement. +# +# begin +# foo +# ensure +# ^^^^^^ +# bar +# end +# +# source://prism//lib/prism/node.rb#5708 +class Prism::EnsureNode < ::Prism::Node + # def initialize: (ensure_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location, location: Location) -> void + # + # @return [EnsureNode] a new instance of EnsureNode + # + # source://prism//lib/prism/node.rb#5718 + sig do + params( + ensure_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + end_keyword_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(ensure_keyword_loc, statements, end_keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#5726 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5731 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5743 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5736 + def compact_child_nodes; end + + # def copy: (**params) -> EnsureNode + # + # source://prism//lib/prism/node.rb#5748 + sig { params(params: T.untyped).returns(Prism::EnsureNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5731 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#5761 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#5771 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#5715 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + # def ensure_keyword: () -> String + # + # source://prism//lib/prism/node.rb#5766 + sig { returns(String) } + def ensure_keyword; end + + # attr_reader ensure_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#5709 + sig { returns(Prism::Location) } + def ensure_keyword_loc; end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#5776 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#5712 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5803 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5813 + def type; end + end +end + +# Represents the use of the literal `false` keyword. +# +# false +# ^^^^^ +# +# source://prism//lib/prism/node.rb#5823 +class Prism::FalseNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [FalseNode] a new instance of FalseNode + # + # source://prism//lib/prism/node.rb#5824 + sig { params(location: Prism::Location).void } + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#5829 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5834 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5844 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5839 + def compact_child_nodes; end + + # def copy: (**params) -> FalseNode + # + # source://prism//lib/prism/node.rb#5849 + sig { params(params: T.untyped).returns(Prism::FalseNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5834 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#5859 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#5864 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5883 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5893 + def type; end + end +end + +# Represents a find pattern in pattern matching. +# +# foo in *bar, baz, *qux +# ^^^^^^^^^^^^^^^ +# +# foo in [*bar, baz, *qux] +# ^^^^^^^^^^^^^^^^^ +# +# foo in Foo(*bar, baz, *qux) +# ^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#5909 +class Prism::FindPatternNode < ::Prism::Node + # def initialize: (constant: Node?, left: Node, requireds: Array[Node], right: Node, opening_loc: Location?, closing_loc: Location?, location: Location) -> void + # + # @return [FindPatternNode] a new instance of FindPatternNode + # + # source://prism//lib/prism/node.rb#5928 + sig do + params( + constant: T.nilable(Prism::Node), + left: Prism::Node, + requireds: T::Array[Prism::Node], + right: Prism::Node, + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(constant, left, requireds, right, opening_loc, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#5939 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5944 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#5990 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#5925 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5959 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5949 + def compact_child_nodes; end + + # attr_reader constant: Node? + # + # source://prism//lib/prism/node.rb#5910 + sig { returns(T.nilable(Prism::Node)) } + def constant; end + + # def copy: (**params) -> FindPatternNode + # + # source://prism//lib/prism/node.rb#5964 + sig { params(params: T.untyped).returns(Prism::FindPatternNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5944 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#5980 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#5995 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader left: Node + # + # source://prism//lib/prism/node.rb#5913 + sig { returns(Prism::Node) } + def left; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#5985 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#5922 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # attr_reader requireds: Array[Node] + # + # source://prism//lib/prism/node.rb#5916 + sig { returns(T::Array[Prism::Node]) } + def requireds; end + + # attr_reader right: Node + # + # source://prism//lib/prism/node.rb#5919 + sig { returns(Prism::Node) } + def right; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6027 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6037 + def type; end + end +end + +# Represents the use of the `..` or `...` operators to create flip flops. +# +# baz if foo .. bar +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#6047 +class Prism::FlipFlopNode < ::Prism::Node + # def initialize: (left: Node?, right: Node?, operator_loc: Location, flags: Integer, location: Location) -> void + # + # @return [FlipFlopNode] a new instance of FlipFlopNode + # + # source://prism//lib/prism/node.rb#6060 + sig do + params( + left: T.nilable(Prism::Node), + right: T.nilable(Prism::Node), + operator_loc: Prism::Location, + flags: Integer, + location: Prism::Location + ).void + end + def initialize(left, right, operator_loc, flags, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#6069 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6074 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6087 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6079 + def compact_child_nodes; end + + # def copy: (**params) -> FlipFlopNode + # + # source://prism//lib/prism/node.rb#6092 + sig { params(params: T.untyped).returns(Prism::FlipFlopNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6074 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#6106 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def exclude_end?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#6116 + sig { returns(T::Boolean) } + def exclude_end?; end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#6121 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader left: Node? + # + # source://prism//lib/prism/node.rb#6048 + sig { returns(T.nilable(Prism::Node)) } + def left; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#6111 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#6054 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader right: Node? + # + # source://prism//lib/prism/node.rb#6051 + sig { returns(T.nilable(Prism::Node)) } + def right; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6155 + def type; end + + private + + # Returns the value of attribute flags. + # + # source://prism//lib/prism/node.rb#6057 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6165 + def type; end + end +end + +# Represents a floating point number literal. +# +# 1.0 +# ^^^ +# +# source://prism//lib/prism/node.rb#6175 +class Prism::FloatNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [FloatNode] a new instance of FloatNode + # + # source://prism//lib/prism/node.rb#6176 + sig { params(location: Prism::Location).void } + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#6181 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6186 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6196 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6191 + def compact_child_nodes; end + + # def copy: (**params) -> FloatNode + # + # source://prism//lib/prism/node.rb#6201 + sig { params(params: T.untyped).returns(Prism::FloatNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6186 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#6211 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#6216 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6235 + def type; end + + # Returns the value of the node as a Ruby Float. + # + # source://prism//lib/prism/node_ext.rb#21 + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6245 + def type; end + end +end + +# Represents the use of the `for` keyword. +# +# for i in a end +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#6255 +class Prism::ForNode < ::Prism::Node + # def initialize: (index: Node, collection: Node, statements: StatementsNode?, for_keyword_loc: Location, in_keyword_loc: Location, do_keyword_loc: Location?, end_keyword_loc: Location, location: Location) -> void + # + # @return [ForNode] a new instance of ForNode + # + # source://prism//lib/prism/node.rb#6277 + sig do + params( + index: Prism::Node, + collection: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + for_keyword_loc: Prism::Location, + in_keyword_loc: Prism::Location, + do_keyword_loc: T.nilable(Prism::Location), + end_keyword_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(index, collection, statements, for_keyword_loc, in_keyword_loc, do_keyword_loc, end_keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#6289 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6294 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # attr_reader collection: Node + # + # source://prism//lib/prism/node.rb#6259 + sig { returns(Prism::Node) } + def collection; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6308 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6299 + def compact_child_nodes; end + + # def copy: (**params) -> ForNode + # + # source://prism//lib/prism/node.rb#6313 + sig { params(params: T.untyped).returns(Prism::ForNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6294 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#6330 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def do_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#6345 + sig { returns(T.nilable(String)) } + def do_keyword; end + + # attr_reader do_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#6271 + sig { returns(T.nilable(Prism::Location)) } + def do_keyword_loc; end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#6350 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#6274 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + # def for_keyword: () -> String + # + # source://prism//lib/prism/node.rb#6335 + sig { returns(String) } + def for_keyword; end + + # attr_reader for_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#6265 + sig { returns(Prism::Location) } + def for_keyword_loc; end + + # def in_keyword: () -> String + # + # source://prism//lib/prism/node.rb#6340 + sig { returns(String) } + def in_keyword; end + + # attr_reader in_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#6268 + sig { returns(Prism::Location) } + def in_keyword_loc; end + + # attr_reader index: Node + # + # source://prism//lib/prism/node.rb#6256 + sig { returns(Prism::Node) } + def index; end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#6355 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#6262 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6388 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6398 + def type; end + end +end + +# Represents forwarding all arguments to this method to another method. +# +# def foo(...) +# bar(...) +# ^^^ +# end +# +# source://prism//lib/prism/node.rb#6410 +class Prism::ForwardingArgumentsNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [ForwardingArgumentsNode] a new instance of ForwardingArgumentsNode + # + # source://prism//lib/prism/node.rb#6411 + sig { params(location: Prism::Location).void } + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#6416 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6421 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6431 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6426 + def compact_child_nodes; end + + # def copy: (**params) -> ForwardingArgumentsNode + # + # source://prism//lib/prism/node.rb#6436 + sig { params(params: T.untyped).returns(Prism::ForwardingArgumentsNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6421 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#6446 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#6451 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6470 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6480 + def type; end + end +end + +# Represents the use of the forwarding parameter in a method, block, or lambda declaration. +# +# def foo(...) +# ^^^ +# end +# +# source://prism//lib/prism/node.rb#6491 +class Prism::ForwardingParameterNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [ForwardingParameterNode] a new instance of ForwardingParameterNode + # + # source://prism//lib/prism/node.rb#6492 + sig { params(location: Prism::Location).void } + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#6497 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6502 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6512 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6507 + def compact_child_nodes; end + + # def copy: (**params) -> ForwardingParameterNode + # + # source://prism//lib/prism/node.rb#6517 + sig { params(params: T.untyped).returns(Prism::ForwardingParameterNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6502 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#6527 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#6532 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6551 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6561 + def type; end + end +end + +# Represents the use of the `super` keyword without parentheses or arguments. +# +# super +# ^^^^^ +# +# source://prism//lib/prism/node.rb#6571 +class Prism::ForwardingSuperNode < ::Prism::Node + # def initialize: (block: BlockNode?, location: Location) -> void + # + # @return [ForwardingSuperNode] a new instance of ForwardingSuperNode + # + # source://prism//lib/prism/node.rb#6575 + sig { params(block: T.nilable(Prism::BlockNode), location: Prism::Location).void } + def initialize(block, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#6581 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # attr_reader block: BlockNode? + # + # source://prism//lib/prism/node.rb#6572 + sig { returns(T.nilable(Prism::BlockNode)) } + def block; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6586 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6598 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6591 + def compact_child_nodes; end + + # def copy: (**params) -> ForwardingSuperNode + # + # source://prism//lib/prism/node.rb#6603 + sig { params(params: T.untyped).returns(Prism::ForwardingSuperNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6586 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#6614 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#6619 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6644 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6654 + def type; end + end +end + +# Represents the use of the `&&=` operator for assignment to a global variable. +# +# $target &&= value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#6664 +class Prism::GlobalVariableAndWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [GlobalVariableAndWriteNode] a new instance of GlobalVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#6677 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(name, name_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#6686 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6691 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6701 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6696 + def compact_child_nodes; end + + # def copy: (**params) -> GlobalVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#6706 + sig { params(params: T.untyped).returns(Prism::GlobalVariableAndWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6691 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#6720 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#6730 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#6665 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#6668 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#6725 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#6671 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6754 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#6674 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6764 + def type; end + end +end + +# Represents assigning to a global variable using an operator that isn't `=`. +# +# $target += value +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#6774 +class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> void + # + # @return [GlobalVariableOperatorWriteNode] a new instance of GlobalVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#6790 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + operator: Symbol, + location: Prism::Location + ).void + end + def initialize(name, name_loc, operator_loc, value, operator, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#6800 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6805 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6815 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6810 + def compact_child_nodes; end + + # def copy: (**params) -> GlobalVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#6820 + sig { params(params: T.untyped).returns(Prism::GlobalVariableOperatorWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6805 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#6835 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#6840 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#6775 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#6778 + sig { returns(Prism::Location) } + def name_loc; end + + # attr_reader operator: Symbol + # + # source://prism//lib/prism/node.rb#6787 + sig { returns(Symbol) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#6781 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6865 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#6784 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6875 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to a global variable. +# +# $target ||= value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#6885 +class Prism::GlobalVariableOrWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [GlobalVariableOrWriteNode] a new instance of GlobalVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#6898 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(name, name_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#6907 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6912 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6922 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6917 + def compact_child_nodes; end + + # def copy: (**params) -> GlobalVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#6927 + sig { params(params: T.untyped).returns(Prism::GlobalVariableOrWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6912 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#6941 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#6951 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#6886 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#6889 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#6946 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#6892 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6975 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#6895 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6985 + def type; end + end +end + +# Represents referencing a global variable. +# +# $foo +# ^^^^ +# +# source://prism//lib/prism/node.rb#6995 +class Prism::GlobalVariableReadNode < ::Prism::Node + # def initialize: (name: Symbol, location: Location) -> void + # + # @return [GlobalVariableReadNode] a new instance of GlobalVariableReadNode + # + # source://prism//lib/prism/node.rb#6999 + sig { params(name: Symbol, location: Prism::Location).void } + def initialize(name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#7005 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7010 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7020 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7015 + def compact_child_nodes; end + + # def copy: (**params) -> GlobalVariableReadNode + # + # source://prism//lib/prism/node.rb#7025 + sig { params(params: T.untyped).returns(Prism::GlobalVariableReadNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7010 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#7036 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#7041 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#6996 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7061 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7071 + def type; end + end +end + +# Represents writing to a global variable in a context that doesn't have an explicit value. +# +# $foo, $bar = baz +# ^^^^ ^^^^ +# +# source://prism//lib/prism/node.rb#7081 +class Prism::GlobalVariableTargetNode < ::Prism::Node + # def initialize: (name: Symbol, location: Location) -> void + # + # @return [GlobalVariableTargetNode] a new instance of GlobalVariableTargetNode + # + # source://prism//lib/prism/node.rb#7085 + sig { params(name: Symbol, location: Prism::Location).void } + def initialize(name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#7091 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7096 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7106 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7101 + def compact_child_nodes; end + + # def copy: (**params) -> GlobalVariableTargetNode + # + # source://prism//lib/prism/node.rb#7111 + sig { params(params: T.untyped).returns(Prism::GlobalVariableTargetNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7096 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#7122 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#7127 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#7082 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7147 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7157 + def type; end + end +end + +# Represents writing to a global variable. +# +# $foo = 1 +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#7167 +class Prism::GlobalVariableWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> void + # + # @return [GlobalVariableWriteNode] a new instance of GlobalVariableWriteNode + # + # source://prism//lib/prism/node.rb#7180 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(name, name_loc, value, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#7189 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7194 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7204 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7199 + def compact_child_nodes; end + + # def copy: (**params) -> GlobalVariableWriteNode + # + # source://prism//lib/prism/node.rb#7209 + sig { params(params: T.untyped).returns(Prism::GlobalVariableWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7194 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#7223 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#7233 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#7168 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#7171 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#7228 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#7177 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7257 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#7174 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7267 + def type; end + end +end + +# Represents a hash literal. +# +# { a => b } +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#7277 +class Prism::HashNode < ::Prism::Node + # def initialize: (opening_loc: Location, elements: Array[Node], closing_loc: Location, location: Location) -> void + # + # @return [HashNode] a new instance of HashNode + # + # source://prism//lib/prism/node.rb#7287 + sig do + params( + opening_loc: Prism::Location, + elements: T::Array[Prism::Node], + closing_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(opening_loc, elements, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#7295 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7300 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#7338 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#7284 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7310 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7305 + def compact_child_nodes; end + + # def copy: (**params) -> HashNode + # + # source://prism//lib/prism/node.rb#7315 + sig { params(params: T.untyped).returns(Prism::HashNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7300 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#7328 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # attr_reader elements: Array[Node] + # + # source://prism//lib/prism/node.rb#7281 + sig { returns(T::Array[Prism::Node]) } + def elements; end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#7343 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#7333 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#7278 + sig { returns(Prism::Location) } + def opening_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7365 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7375 + def type; end + end +end + +# Represents a hash pattern in pattern matching. +# +# foo => { a: 1, b: 2 } +# ^^^^^^^^^^^^^^ +# +# foo => { a: 1, b: 2, **c } +# ^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#7388 +class Prism::HashPatternNode < ::Prism::Node + # def initialize: (constant: Node?, elements: Array[Node], rest: Node?, opening_loc: Location?, closing_loc: Location?, location: Location) -> void + # + # @return [HashPatternNode] a new instance of HashPatternNode + # + # source://prism//lib/prism/node.rb#7404 + sig do + params( + constant: T.nilable(Prism::Node), + elements: T::Array[Prism::Node], + rest: T.nilable(Prism::Node), + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(constant, elements, rest, opening_loc, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#7414 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7419 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#7463 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#7401 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7433 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7424 + def compact_child_nodes; end + + # attr_reader constant: Node? + # + # source://prism//lib/prism/node.rb#7389 + sig { returns(T.nilable(Prism::Node)) } + def constant; end + + # def copy: (**params) -> HashPatternNode + # + # source://prism//lib/prism/node.rb#7438 + sig { params(params: T.untyped).returns(Prism::HashPatternNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7419 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#7453 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # attr_reader elements: Array[Node] + # + # source://prism//lib/prism/node.rb#7392 + sig { returns(T::Array[Prism::Node]) } + def elements; end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#7468 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#7458 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#7398 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # attr_reader rest: Node? + # + # source://prism//lib/prism/node.rb#7395 + sig { returns(T.nilable(Prism::Node)) } + def rest; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7502 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7512 + def type; end + end +end + +# Represents the use of the `if` keyword, either in the block form or the modifier form. +# +# bar if foo +# ^^^^^^^^^^ +# +# if foo then bar end +# ^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#7525 +class Prism::IfNode < ::Prism::Node + # def initialize: (if_keyword_loc: Location?, predicate: Node, then_keyword_loc: Location?, statements: StatementsNode?, consequent: Node?, end_keyword_loc: Location?, location: Location) -> void + # + # @return [IfNode] a new instance of IfNode + # + # source://prism//lib/prism/node.rb#7544 + sig do + params( + if_keyword_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + consequent: T.nilable(Prism::Node), + end_keyword_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(if_keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#7555 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7564 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7578 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7569 + def compact_child_nodes; end + + # attr_reader consequent: Node? + # + # source://prism//lib/prism/node.rb#7538 + sig { returns(T.nilable(Prism::Node)) } + def consequent; end + + # def copy: (**params) -> IfNode + # + # source://prism//lib/prism/node.rb#7583 + sig { params(params: T.untyped).returns(Prism::IfNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7564 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#7599 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def end_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#7614 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#7541 + sig { returns(T.nilable(Prism::Location)) } + def end_keyword_loc; end + + # def if_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#7604 + sig { returns(T.nilable(String)) } + def if_keyword; end + + # attr_reader if_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#7526 + sig { returns(T.nilable(Prism::Location)) } + def if_keyword_loc; end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#7619 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader predicate: Node + # + # source://prism//lib/prism/node.rb#7529 + sig { returns(Prism::Node) } + def predicate; end + + # source://prism//lib/prism/node.rb#7559 + def set_newline_flag(newline_marked); end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#7535 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # def then_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#7609 + sig { returns(T.nilable(String)) } + def then_keyword; end + + # attr_reader then_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#7532 + sig { returns(T.nilable(Prism::Location)) } + def then_keyword_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7655 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7665 + def type; end + end +end + +# Represents an imaginary number literal. +# +# 1.0i +# ^^^^ +# +# source://prism//lib/prism/node.rb#7675 +class Prism::ImaginaryNode < ::Prism::Node + # def initialize: (numeric: Node, location: Location) -> void + # + # @return [ImaginaryNode] a new instance of ImaginaryNode + # + # source://prism//lib/prism/node.rb#7679 + sig { params(numeric: Prism::Node, location: Prism::Location).void } + def initialize(numeric, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#7685 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7690 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7700 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7695 + def compact_child_nodes; end + + # def copy: (**params) -> ImaginaryNode + # + # source://prism//lib/prism/node.rb#7705 + sig { params(params: T.untyped).returns(Prism::ImaginaryNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7690 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#7716 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#7721 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader numeric: Node + # + # source://prism//lib/prism/node.rb#7676 + sig { returns(Prism::Node) } + def numeric; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7742 + def type; end + + # Returns the value of the node as a Ruby Complex. + # + # source://prism//lib/prism/node_ext.rb#28 + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7752 + 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: } +# ^^^^ +# +# source://prism//lib/prism/node.rb#7766 +class Prism::ImplicitNode < ::Prism::Node + # def initialize: (value: Node, location: Location) -> void + # + # @return [ImplicitNode] a new instance of ImplicitNode + # + # source://prism//lib/prism/node.rb#7770 + sig { params(value: Prism::Node, location: Prism::Location).void } + def initialize(value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#7776 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7781 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7791 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7786 + def compact_child_nodes; end + + # def copy: (**params) -> ImplicitNode + # + # source://prism//lib/prism/node.rb#7796 + sig { params(params: T.untyped).returns(Prism::ImplicitNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7781 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#7807 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#7812 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7833 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#7767 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7843 + def type; end + end +end + +# Represents the use of the `in` keyword in a case statement. +# +# case a; in b then c end +# ^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#7853 +class Prism::InNode < ::Prism::Node + # def initialize: (pattern: Node, statements: StatementsNode?, in_loc: Location, then_loc: Location?, location: Location) -> void + # + # @return [InNode] a new instance of InNode + # + # source://prism//lib/prism/node.rb#7866 + sig do + params( + pattern: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + in_loc: Prism::Location, + then_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(pattern, statements, in_loc, then_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#7875 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7880 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7893 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7885 + def compact_child_nodes; end + + # def copy: (**params) -> InNode + # + # source://prism//lib/prism/node.rb#7898 + sig { params(params: T.untyped).returns(Prism::InNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7880 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#7912 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def in: () -> String + # + # source://prism//lib/prism/node.rb#7917 + sig { returns(String) } + def in; end + + # attr_reader in_loc: Location + # + # source://prism//lib/prism/node.rb#7860 + sig { returns(Prism::Location) } + def in_loc; end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#7927 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader pattern: Node + # + # source://prism//lib/prism/node.rb#7854 + sig { returns(Prism::Node) } + def pattern; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#7857 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # def then: () -> String? + # + # source://prism//lib/prism/node.rb#7922 + sig { returns(T.nilable(String)) } + def then; end + + # attr_reader then_loc: Location? + # + # source://prism//lib/prism/node.rb#7863 + sig { returns(T.nilable(Prism::Location)) } + def then_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7956 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7966 + def type; end + end +end + +# Represents the use of the `&&=` operator on a call to the `[]` method. +# +# foo.bar[baz] &&= value +# ^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#7976 +class Prism::IndexAndWriteNode < ::Prism::Node + # def initialize: (receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, flags: Integer, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [IndexAndWriteNode] a new instance of IndexAndWriteNode + # + # source://prism//lib/prism/node.rb#8004 + sig do + params( + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::Node), + flags: Integer, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, flags, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#8018 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#7986 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # attr_reader block: Node? + # + # source://prism//lib/prism/node.rb#7992 + sig { returns(T.nilable(Prism::Node)) } + def block; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#8067 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#7980 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8023 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#8077 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#7989 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8038 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8028 + def compact_child_nodes; end + + # def copy: (**params) -> IndexAndWriteNode + # + # source://prism//lib/prism/node.rb#8043 + sig { params(params: T.untyped).returns(Prism::IndexAndWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8023 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#8062 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#8097 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#8072 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#7983 + sig { returns(Prism::Location) } + def opening_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#8092 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#7998 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader receiver: Node? + # + # source://prism//lib/prism/node.rb#7977 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#8082 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8142 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#8001 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#8087 + sig { returns(T::Boolean) } + def variable_call?; end + + private + + # Returns the value of attribute flags. + # + # source://prism//lib/prism/node.rb#7995 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8152 + def type; end + end +end + +# Represents the use of an assignment operator on a call to `[]`. +# +# foo.bar[baz] += value +# ^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#8162 +class Prism::IndexOperatorWriteNode < ::Prism::Node + # def initialize: (receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, flags: Integer, operator: Symbol, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [IndexOperatorWriteNode] a new instance of IndexOperatorWriteNode + # + # source://prism//lib/prism/node.rb#8193 + sig do + params( + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::Node), + flags: Integer, + operator: Symbol, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, flags, operator, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#8208 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#8172 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # attr_reader block: Node? + # + # source://prism//lib/prism/node.rb#8178 + sig { returns(T.nilable(Prism::Node)) } + def block; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#8258 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#8166 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8213 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#8268 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#8175 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8228 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8218 + def compact_child_nodes; end + + # def copy: (**params) -> IndexOperatorWriteNode + # + # source://prism//lib/prism/node.rb#8233 + sig { params(params: T.untyped).returns(Prism::IndexOperatorWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8213 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#8253 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#8283 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#8263 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#8169 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader operator: Symbol + # + # source://prism//lib/prism/node.rb#8184 + sig { returns(Symbol) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#8187 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader receiver: Node? + # + # source://prism//lib/prism/node.rb#8163 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#8273 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8329 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#8190 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#8278 + sig { returns(T::Boolean) } + def variable_call?; end + + private + + # Returns the value of attribute flags. + # + # source://prism//lib/prism/node.rb#8181 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8339 + def type; end + end +end + +# Represents the use of the `||=` operator on a call to `[]`. +# +# foo.bar[baz] ||= value +# ^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#8349 +class Prism::IndexOrWriteNode < ::Prism::Node + # def initialize: (receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, flags: Integer, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [IndexOrWriteNode] a new instance of IndexOrWriteNode + # + # source://prism//lib/prism/node.rb#8377 + sig do + params( + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::Node), + flags: Integer, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, flags, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#8391 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#8359 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # attr_reader block: Node? + # + # source://prism//lib/prism/node.rb#8365 + sig { returns(T.nilable(Prism::Node)) } + def block; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#8440 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#8353 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8396 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#8450 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#8362 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8411 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8401 + def compact_child_nodes; end + + # def copy: (**params) -> IndexOrWriteNode + # + # source://prism//lib/prism/node.rb#8416 + sig { params(params: T.untyped).returns(Prism::IndexOrWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8396 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#8435 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#8470 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#8445 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#8356 + sig { returns(Prism::Location) } + def opening_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#8465 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#8371 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader receiver: Node? + # + # source://prism//lib/prism/node.rb#8350 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#8455 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8515 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#8374 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#8460 + sig { returns(T::Boolean) } + def variable_call?; end + + private + + # Returns the value of attribute flags. + # + # source://prism//lib/prism/node.rb#8368 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8525 + def type; end + end +end + +# InlineComment objects are the most common. They correspond to comments in +# the source file like this one that start with #. +# +# source://prism//lib/prism/parse_result.rb#252 +class Prism::InlineComment < ::Prism::Comment + # Returns a string representation of this comment. + # + # source://prism//lib/prism/parse_result.rb#258 + def inspect; end + + # Returns true if this comment happens on the same line as other code and + # false if the comment is by itself. + # + # @return [Boolean] + # + # source://prism//lib/prism/parse_result.rb#253 + sig { override.returns(T::Boolean) } + def trailing?; end +end + +# Represents the use of the `&&=` operator for assignment to an instance variable. +# +# @target &&= value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#8535 +class Prism::InstanceVariableAndWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [InstanceVariableAndWriteNode] a new instance of InstanceVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#8548 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(name, name_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#8557 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8562 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8572 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8567 + def compact_child_nodes; end + + # def copy: (**params) -> InstanceVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#8577 + sig { params(params: T.untyped).returns(Prism::InstanceVariableAndWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8562 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#8591 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#8601 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#8536 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#8539 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#8596 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#8542 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8625 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#8545 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8635 + def type; end + end +end + +# Represents assigning to an instance variable using an operator that isn't `=`. +# +# @target += value +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#8645 +class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> void + # + # @return [InstanceVariableOperatorWriteNode] a new instance of InstanceVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#8661 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + operator: Symbol, + location: Prism::Location + ).void + end + def initialize(name, name_loc, operator_loc, value, operator, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#8671 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8676 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8686 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8681 + def compact_child_nodes; end + + # def copy: (**params) -> InstanceVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#8691 + sig { params(params: T.untyped).returns(Prism::InstanceVariableOperatorWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8676 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#8706 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#8711 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#8646 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#8649 + sig { returns(Prism::Location) } + def name_loc; end + + # attr_reader operator: Symbol + # + # source://prism//lib/prism/node.rb#8658 + sig { returns(Symbol) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#8652 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8736 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#8655 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8746 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to an instance variable. +# +# @target ||= value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#8756 +class Prism::InstanceVariableOrWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [InstanceVariableOrWriteNode] a new instance of InstanceVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#8769 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(name, name_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#8778 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8783 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8793 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8788 + def compact_child_nodes; end + + # def copy: (**params) -> InstanceVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#8798 + sig { params(params: T.untyped).returns(Prism::InstanceVariableOrWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8783 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#8812 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#8822 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#8757 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#8760 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#8817 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#8763 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8846 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#8766 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8856 + def type; end + end +end + +# Represents referencing an instance variable. +# +# @foo +# ^^^^ +# +# source://prism//lib/prism/node.rb#8866 +class Prism::InstanceVariableReadNode < ::Prism::Node + # def initialize: (name: Symbol, location: Location) -> void + # + # @return [InstanceVariableReadNode] a new instance of InstanceVariableReadNode + # + # source://prism//lib/prism/node.rb#8870 + sig { params(name: Symbol, location: Prism::Location).void } + def initialize(name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#8876 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8881 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8891 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8886 + def compact_child_nodes; end + + # def copy: (**params) -> InstanceVariableReadNode + # + # source://prism//lib/prism/node.rb#8896 + sig { params(params: T.untyped).returns(Prism::InstanceVariableReadNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8881 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#8907 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#8912 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#8867 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8932 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8942 + def type; end + end +end + +# Represents writing to an instance variable in a context that doesn't have an explicit value. +# +# @foo, @bar = baz +# ^^^^ ^^^^ +# +# source://prism//lib/prism/node.rb#8952 +class Prism::InstanceVariableTargetNode < ::Prism::Node + # def initialize: (name: Symbol, location: Location) -> void + # + # @return [InstanceVariableTargetNode] a new instance of InstanceVariableTargetNode + # + # source://prism//lib/prism/node.rb#8956 + sig { params(name: Symbol, location: Prism::Location).void } + def initialize(name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#8962 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8967 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8977 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8972 + def compact_child_nodes; end + + # def copy: (**params) -> InstanceVariableTargetNode + # + # source://prism//lib/prism/node.rb#8982 + sig { params(params: T.untyped).returns(Prism::InstanceVariableTargetNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8967 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#8993 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#8998 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#8953 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9018 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9028 + def type; end + end +end + +# Represents writing to an instance variable. +# +# @foo = 1 +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#9038 +class Prism::InstanceVariableWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> void + # + # @return [InstanceVariableWriteNode] a new instance of InstanceVariableWriteNode + # + # source://prism//lib/prism/node.rb#9051 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(name, name_loc, value, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#9060 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9065 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9075 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9070 + def compact_child_nodes; end + + # def copy: (**params) -> InstanceVariableWriteNode + # + # source://prism//lib/prism/node.rb#9080 + sig { params(params: T.untyped).returns(Prism::InstanceVariableWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9065 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#9094 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#9104 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#9039 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#9042 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#9099 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#9048 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9128 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#9045 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9138 + def type; end + end +end + +# Flags for integer nodes that correspond to the base of the integer. +# +# source://prism//lib/prism/node.rb#16620 +module Prism::IntegerBaseFlags; end + +# 0b prefix +# +# source://prism//lib/prism/node.rb#16622 +Prism::IntegerBaseFlags::BINARY = T.let(T.unsafe(nil), Integer) + +# 0d or no prefix +# +# source://prism//lib/prism/node.rb#16628 +Prism::IntegerBaseFlags::DECIMAL = T.let(T.unsafe(nil), Integer) + +# 0x prefix +# +# source://prism//lib/prism/node.rb#16631 +Prism::IntegerBaseFlags::HEXADECIMAL = T.let(T.unsafe(nil), Integer) + +# 0o or 0 prefix +# +# source://prism//lib/prism/node.rb#16625 +Prism::IntegerBaseFlags::OCTAL = T.let(T.unsafe(nil), Integer) + +# Represents an integer number literal. +# +# 1 +# ^ +# +# source://prism//lib/prism/node.rb#9148 +class Prism::IntegerNode < ::Prism::Node + # def initialize: (flags: Integer, location: Location) -> void + # + # @return [IntegerNode] a new instance of IntegerNode + # + # source://prism//lib/prism/node.rb#9152 + sig { params(flags: Integer, location: Prism::Location).void } + def initialize(flags, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#9158 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def binary?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9194 + sig { returns(T::Boolean) } + def binary?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9163 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9173 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9168 + def compact_child_nodes; end + + # def copy: (**params) -> IntegerNode + # + # source://prism//lib/prism/node.rb#9178 + sig { params(params: T.untyped).returns(Prism::IntegerNode) } + def copy(**params); end + + # def decimal?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9204 + sig { returns(T::Boolean) } + def decimal?; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9163 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#9189 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def hexadecimal?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9209 + sig { returns(T::Boolean) } + def hexadecimal?; end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#9214 + def inspect(inspector = T.unsafe(nil)); end + + # def octal?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9199 + sig { returns(T::Boolean) } + def octal?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9235 + def type; end + + # Returns the value of the node as a Ruby Integer. + # + # source://prism//lib/prism/node_ext.rb#35 + def value; end + + private + + # Returns the value of attribute flags. + # + # source://prism//lib/prism/node.rb#9149 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9245 + def type; end + end +end + +# Represents a regular expression literal that contains interpolation that +# is being used in the predicate of a conditional to implicitly match +# against the last line read by an IO object. +# +# if /foo #{bar} baz/ then end +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#9257 +class Prism::InterpolatedMatchLastLineNode < ::Prism::Node + include ::Prism::RegularExpressionOptions + + # def initialize: (opening_loc: Location, parts: Array[Node], closing_loc: Location, flags: Integer, location: Location) -> void + # + # @return [InterpolatedMatchLastLineNode] a new instance of InterpolatedMatchLastLineNode + # + # source://prism//lib/prism/node.rb#9270 + sig do + params( + opening_loc: Prism::Location, + parts: T::Array[Prism::Node], + closing_loc: Prism::Location, + flags: Integer, + location: Prism::Location + ).void + end + def initialize(opening_loc, parts, closing_loc, flags, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#9279 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def ascii_8bit?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9358 + sig { returns(T::Boolean) } + def ascii_8bit?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9289 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#9328 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#9264 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9299 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9294 + def compact_child_nodes; end + + # def copy: (**params) -> InterpolatedMatchLastLineNode + # + # source://prism//lib/prism/node.rb#9304 + sig { params(params: T.untyped).returns(Prism::InterpolatedMatchLastLineNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9289 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#9318 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def euc_jp?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9353 + sig { returns(T::Boolean) } + def euc_jp?; end + + # def extended?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9338 + sig { returns(T::Boolean) } + def extended?; end + + # def ignore_case?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9333 + sig { returns(T::Boolean) } + def ignore_case?; end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#9373 + def inspect(inspector = T.unsafe(nil)); end + + # def multi_line?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9343 + sig { returns(T::Boolean) } + def multi_line?; end + + # def once?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9348 + sig { returns(T::Boolean) } + def once?; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#9323 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#9258 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader parts: Array[Node] + # + # source://prism//lib/prism/node.rb#9261 + sig { returns(T::Array[Prism::Node]) } + def parts; end + + # source://prism//lib/prism/node.rb#9283 + def set_newline_flag(newline_marked); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9397 + def type; end + + # def utf_8?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9368 + sig { returns(T::Boolean) } + def utf_8?; end + + # def windows_31j?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9363 + sig { returns(T::Boolean) } + def windows_31j?; end + + private + + # Returns the value of attribute flags. + # + # source://prism//lib/prism/node.rb#9267 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9407 + def type; end + end +end + +# Represents a regular expression literal that contains interpolation. +# +# /foo #{bar} baz/ +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#9417 +class Prism::InterpolatedRegularExpressionNode < ::Prism::Node + include ::Prism::RegularExpressionOptions + + # def initialize: (opening_loc: Location, parts: Array[Node], closing_loc: Location, flags: Integer, location: Location) -> void + # + # @return [InterpolatedRegularExpressionNode] a new instance of InterpolatedRegularExpressionNode + # + # source://prism//lib/prism/node.rb#9430 + sig do + params( + opening_loc: Prism::Location, + parts: T::Array[Prism::Node], + closing_loc: Prism::Location, + flags: Integer, + location: Prism::Location + ).void + end + def initialize(opening_loc, parts, closing_loc, flags, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#9439 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def ascii_8bit?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9518 + sig { returns(T::Boolean) } + def ascii_8bit?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9449 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#9488 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#9424 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9459 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9454 + def compact_child_nodes; end + + # def copy: (**params) -> InterpolatedRegularExpressionNode + # + # source://prism//lib/prism/node.rb#9464 + sig { params(params: T.untyped).returns(Prism::InterpolatedRegularExpressionNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9449 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#9478 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def euc_jp?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9513 + sig { returns(T::Boolean) } + def euc_jp?; end + + # def extended?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9498 + sig { returns(T::Boolean) } + def extended?; end + + # def ignore_case?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9493 + sig { returns(T::Boolean) } + def ignore_case?; end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#9533 + def inspect(inspector = T.unsafe(nil)); end + + # def multi_line?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9503 + sig { returns(T::Boolean) } + def multi_line?; end + + # def once?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9508 + sig { returns(T::Boolean) } + def once?; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#9483 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#9418 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader parts: Array[Node] + # + # source://prism//lib/prism/node.rb#9421 + sig { returns(T::Array[Prism::Node]) } + def parts; end + + # source://prism//lib/prism/node.rb#9443 + def set_newline_flag(newline_marked); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9557 + def type; end + + # def utf_8?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9528 + sig { returns(T::Boolean) } + def utf_8?; end + + # def windows_31j?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9523 + sig { returns(T::Boolean) } + def windows_31j?; end + + private + + # Returns the value of attribute flags. + # + # source://prism//lib/prism/node.rb#9427 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9567 + def type; end + end +end + +# Represents a string literal that contains interpolation. +# +# "foo #{bar} baz" +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#9577 +class Prism::InterpolatedStringNode < ::Prism::Node + # def initialize: (opening_loc: Location?, parts: Array[Node], closing_loc: Location?, location: Location) -> void + # + # @return [InterpolatedStringNode] a new instance of InterpolatedStringNode + # + # source://prism//lib/prism/node.rb#9587 + sig do + params( + opening_loc: T.nilable(Prism::Location), + parts: T::Array[Prism::Node], + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(opening_loc, parts, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#9595 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9605 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#9643 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#9584 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9615 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9610 + def compact_child_nodes; end + + # def copy: (**params) -> InterpolatedStringNode + # + # source://prism//lib/prism/node.rb#9620 + sig { params(params: T.untyped).returns(Prism::InterpolatedStringNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9605 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#9633 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#9648 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#9638 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#9578 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # attr_reader parts: Array[Node] + # + # source://prism//lib/prism/node.rb#9581 + sig { returns(T::Array[Prism::Node]) } + def parts; end + + # source://prism//lib/prism/node.rb#9599 + def set_newline_flag(newline_marked); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9670 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9680 + def type; end + end +end + +# Represents a symbol literal that contains interpolation. +# +# :"foo #{bar} baz" +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#9690 +class Prism::InterpolatedSymbolNode < ::Prism::Node + # def initialize: (opening_loc: Location?, parts: Array[Node], closing_loc: Location?, location: Location) -> void + # + # @return [InterpolatedSymbolNode] a new instance of InterpolatedSymbolNode + # + # source://prism//lib/prism/node.rb#9700 + sig do + params( + opening_loc: T.nilable(Prism::Location), + parts: T::Array[Prism::Node], + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(opening_loc, parts, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#9708 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9718 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#9756 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#9697 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9728 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9723 + def compact_child_nodes; end + + # def copy: (**params) -> InterpolatedSymbolNode + # + # source://prism//lib/prism/node.rb#9733 + sig { params(params: T.untyped).returns(Prism::InterpolatedSymbolNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9718 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#9746 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#9761 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#9751 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#9691 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # attr_reader parts: Array[Node] + # + # source://prism//lib/prism/node.rb#9694 + sig { returns(T::Array[Prism::Node]) } + def parts; end + + # source://prism//lib/prism/node.rb#9712 + def set_newline_flag(newline_marked); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9783 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9793 + def type; end + end +end + +# Represents an xstring literal that contains interpolation. +# +# `foo #{bar} baz` +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#9803 +class Prism::InterpolatedXStringNode < ::Prism::Node + # def initialize: (opening_loc: Location, parts: Array[Node], closing_loc: Location, location: Location) -> void + # + # @return [InterpolatedXStringNode] a new instance of InterpolatedXStringNode + # + # source://prism//lib/prism/node.rb#9813 + sig do + params( + opening_loc: Prism::Location, + parts: T::Array[Prism::Node], + closing_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(opening_loc, parts, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#9821 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9831 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#9869 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#9810 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9841 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9836 + def compact_child_nodes; end + + # def copy: (**params) -> InterpolatedXStringNode + # + # source://prism//lib/prism/node.rb#9846 + sig { params(params: T.untyped).returns(Prism::InterpolatedXStringNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9831 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#9859 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#9874 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#9864 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#9804 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader parts: Array[Node] + # + # source://prism//lib/prism/node.rb#9807 + sig { returns(T::Array[Prism::Node]) } + def parts; end + + # source://prism//lib/prism/node.rb#9825 + def set_newline_flag(newline_marked); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9896 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9906 + def type; end + end +end + +# Represents a hash literal without opening and closing braces. +# +# foo(a: b) +# ^^^^ +# +# source://prism//lib/prism/node.rb#9916 +class Prism::KeywordHashNode < ::Prism::Node + # def initialize: (elements: Array[Node], location: Location) -> void + # + # @return [KeywordHashNode] a new instance of KeywordHashNode + # + # source://prism//lib/prism/node.rb#9920 + sig { params(elements: T::Array[Prism::Node], location: Prism::Location).void } + def initialize(elements, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#9926 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9931 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9941 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9936 + def compact_child_nodes; end + + # def copy: (**params) -> KeywordHashNode + # + # source://prism//lib/prism/node.rb#9946 + sig { params(params: T.untyped).returns(Prism::KeywordHashNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9931 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#9957 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # attr_reader elements: Array[Node] + # + # source://prism//lib/prism/node.rb#9917 + sig { returns(T::Array[Prism::Node]) } + def elements; end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#9962 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9982 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9992 + def type; end + end +end + +# Represents a keyword rest parameter to a method, block, or lambda definition. +# +# def a(**b) +# ^^^ +# end +# +# source://prism//lib/prism/node.rb#10003 +class Prism::KeywordRestParameterNode < ::Prism::Node + # def initialize: (name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location) -> void + # + # @return [KeywordRestParameterNode] a new instance of KeywordRestParameterNode + # + # source://prism//lib/prism/node.rb#10013 + sig do + params( + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(name, name_loc, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#10021 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10026 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10036 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10031 + def compact_child_nodes; end + + # def copy: (**params) -> KeywordRestParameterNode + # + # source://prism//lib/prism/node.rb#10041 + sig { params(params: T.untyped).returns(Prism::KeywordRestParameterNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10026 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#10054 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#10064 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol? + # + # source://prism//lib/prism/node.rb#10004 + sig { returns(T.nilable(Symbol)) } + def name; end + + # attr_reader name_loc: Location? + # + # source://prism//lib/prism/node.rb#10007 + sig { returns(T.nilable(Prism::Location)) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#10059 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#10010 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10090 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10100 + def type; end + end +end + +# Represents using a lambda literal (not the lambda method call). +# +# ->(value) { value * 2 } +# ^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#10110 +class Prism::LambdaNode < ::Prism::Node + # def initialize: (locals: Array[Symbol], operator_loc: Location, opening_loc: Location, closing_loc: Location, parameters: BlockParametersNode?, body: Node?, location: Location) -> void + # + # @return [LambdaNode] a new instance of LambdaNode + # + # source://prism//lib/prism/node.rb#10129 + sig do + params( + locals: T::Array[Symbol], + operator_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location, + parameters: T.nilable(Prism::BlockParametersNode), + body: T.nilable(Prism::Node), + location: Prism::Location + ).void + end + def initialize(locals, operator_loc, opening_loc, closing_loc, parameters, body, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#10140 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # attr_reader body: Node? + # + # source://prism//lib/prism/node.rb#10126 + sig { returns(T.nilable(Prism::Node)) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10145 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#10194 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#10120 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10158 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10150 + def compact_child_nodes; end + + # def copy: (**params) -> LambdaNode + # + # source://prism//lib/prism/node.rb#10163 + sig { params(params: T.untyped).returns(Prism::LambdaNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10145 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#10179 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#10199 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#10111 + sig { returns(T::Array[Symbol]) } + def locals; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#10189 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#10117 + sig { returns(Prism::Location) } + def opening_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#10184 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#10114 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader parameters: BlockParametersNode? + # + # source://prism//lib/prism/node.rb#10123 + sig { returns(T.nilable(Prism::BlockParametersNode)) } + def parameters; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10234 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10244 + def type; end + end +end + +# This class is responsible for lexing the source using prism and then +# converting those tokens to be compatible with Ripper. In the vast majority +# of cases, this is a one-to-one mapping of the token type. Everything else +# generally lines up. However, there are a few cases that require special +# handling. +# +# source://prism//lib/prism/lex_compat.rb#11 +class Prism::LexCompat + # @return [LexCompat] a new instance of LexCompat + # + # source://prism//lib/prism/lex_compat.rb#599 + def initialize(source, **options); end + + # Returns the value of attribute options. + # + # source://prism//lib/prism/lex_compat.rb#597 + def options; end + + # source://prism//lib/prism/lex_compat.rb#604 + def result; end + + # Returns the value of attribute source. + # + # source://prism//lib/prism/lex_compat.rb#597 + def source; end +end + +# Ripper doesn't include the rest of the token in the event, so we need to +# trim it down to just the content on the first line when comparing. +# +# source://prism//lib/prism/lex_compat.rb#210 +class Prism::LexCompat::EndContentToken < ::Prism::LexCompat::Token + # source://prism//lib/prism/lex_compat.rb#211 + def ==(other); end +end + +# A heredoc in this case is a list of tokens that belong to the body of the +# heredoc that should be appended onto the list of tokens when the heredoc +# closes. +# +# source://prism//lib/prism/lex_compat.rb#271 +module Prism::LexCompat::Heredoc + class << self + # Here we will split between the two types of heredocs and return the + # object that will store their tokens. + # + # source://prism//lib/prism/lex_compat.rb#583 + def build(opening); end + end +end + +# Dash heredocs are a little more complicated. They are a list of tokens +# that need to be split on "\\\n" to mimic Ripper's behavior. We also need +# to keep track of the state that the heredoc was opened in. +# +# source://prism//lib/prism/lex_compat.rb#295 +class Prism::LexCompat::Heredoc::DashHeredoc + # @return [DashHeredoc] a new instance of DashHeredoc + # + # source://prism//lib/prism/lex_compat.rb#298 + def initialize(split); end + + # source://prism//lib/prism/lex_compat.rb#303 + def <<(token); end + + # source://prism//lib/prism/lex_compat.rb#296 + def split; end + + # source://prism//lib/prism/lex_compat.rb#307 + def to_a; end + + # source://prism//lib/prism/lex_compat.rb#296 + def tokens; end +end + +# Heredocs that are dedenting heredocs are a little more complicated. +# Ripper outputs on_ignored_sp tokens for the whitespace that is being +# removed from the output. prism only modifies the node itself and keeps +# the token the same. This simplifies prism, but makes comparing against +# Ripper much harder because there is a length mismatch. +# +# Fortunately, we already have to pull out the heredoc tokens in order to +# insert them into the stream in the correct order. As such, we can do +# some extra manipulation on the tokens to make them match Ripper's +# output by mirroring the dedent logic that Ripper uses. +# +# source://prism//lib/prism/lex_compat.rb#354 +class Prism::LexCompat::Heredoc::DedentingHeredoc + # @return [DedentingHeredoc] a new instance of DedentingHeredoc + # + # source://prism//lib/prism/lex_compat.rb#359 + def initialize; end + + # As tokens are coming in, we track the minimum amount of common leading + # whitespace on plain string content tokens. This allows us to later + # remove that amount of whitespace from the beginning of each line. + # + # source://prism//lib/prism/lex_compat.rb#370 + def <<(token); end + + # Returns the value of attribute dedent. + # + # source://prism//lib/prism/lex_compat.rb#357 + def dedent; end + + # Returns the value of attribute dedent_next. + # + # source://prism//lib/prism/lex_compat.rb#357 + def dedent_next; end + + # Returns the value of attribute embexpr_balance. + # + # source://prism//lib/prism/lex_compat.rb#357 + def embexpr_balance; end + + # source://prism//lib/prism/lex_compat.rb#407 + def to_a; end + + # Returns the value of attribute tokens. + # + # source://prism//lib/prism/lex_compat.rb#357 + def tokens; end +end + +# source://prism//lib/prism/lex_compat.rb#355 +Prism::LexCompat::Heredoc::DedentingHeredoc::TAB_WIDTH = T.let(T.unsafe(nil), Integer) + +# Heredocs that are no dash or tilde heredocs are just a list of tokens. +# We need to keep them around so that we can insert them in the correct +# order back into the token stream and set the state of the last token to +# the state that the heredoc was opened in. +# +# source://prism//lib/prism/lex_compat.rb#276 +class Prism::LexCompat::Heredoc::PlainHeredoc + # @return [PlainHeredoc] a new instance of PlainHeredoc + # + # source://prism//lib/prism/lex_compat.rb#279 + def initialize; end + + # source://prism//lib/prism/lex_compat.rb#283 + def <<(token); end + + # source://prism//lib/prism/lex_compat.rb#287 + def to_a; end + + # source://prism//lib/prism/lex_compat.rb#277 + def tokens; end +end + +# Ident tokens for the most part are exactly the same, except sometimes we +# know an ident is a local when ripper doesn't (when they are introduced +# through named captures in regular expressions). In that case we don't +# compare the state. +# +# source://prism//lib/prism/lex_compat.rb#228 +class Prism::LexCompat::IdentToken < ::Prism::LexCompat::Token + # source://prism//lib/prism/lex_compat.rb#229 + def ==(other); end +end + +# Tokens where state should be ignored +# used for :on_comment, :on_heredoc_end, :on_embexpr_end +# +# source://prism//lib/prism/lex_compat.rb#218 +class Prism::LexCompat::IgnoreStateToken < ::Prism::LexCompat::Token + # source://prism//lib/prism/lex_compat.rb#219 + def ==(other); end +end + +# Ignored newlines can occasionally have a LABEL state attached to them, so +# we compare the state differently here. +# +# source://prism//lib/prism/lex_compat.rb#239 +class Prism::LexCompat::IgnoredNewlineToken < ::Prism::LexCompat::Token + # source://prism//lib/prism/lex_compat.rb#240 + def ==(other); end +end + +# If we have an identifier that follows a method name like: +# +# def foo bar +# +# then Ripper will mark bar as END|LABEL if there is a local in a parent +# scope named bar because it hasn't pushed the local table yet. We do this +# more accurately, so we need to allow comparing against both END and +# END|LABEL. +# +# source://prism//lib/prism/lex_compat.rb#259 +class Prism::LexCompat::ParamToken < ::Prism::LexCompat::Token + # source://prism//lib/prism/lex_compat.rb#260 + def ==(other); end +end + +# This is a mapping of prism token types to Ripper token types. This is a +# many-to-one mapping because we split up our token types, whereas Ripper +# tends to group them. +# +# source://prism//lib/prism/lex_compat.rb#15 +Prism::LexCompat::RIPPER = T.let(T.unsafe(nil), Hash) + +# When we produce tokens, we produce the same arrays that Ripper does. +# However, we add a couple of convenience methods onto them to make them a +# little easier to work with. We delegate all other methods to the array. +# +# source://prism//lib/prism/lex_compat.rb#187 +class Prism::LexCompat::Token < ::SimpleDelegator + # The type of the token. + # + # source://prism//lib/prism/lex_compat.rb#193 + def event; end + + # The location of the token in the source. + # + # source://prism//lib/prism/lex_compat.rb#188 + def location; end + + # The state of the lexer when this token was produced. + # + # source://prism//lib/prism/lex_compat.rb#203 + def state; end + + # The slice of the source that this token represents. + # + # source://prism//lib/prism/lex_compat.rb#198 + def value; end +end + +# This is a class that wraps the Ripper lexer to produce almost exactly the +# same tokens. +# +# source://prism//lib/prism/lex_compat.rb#842 +class Prism::LexRipper + # @return [LexRipper] a new instance of LexRipper + # + # source://prism//lib/prism/lex_compat.rb#845 + def initialize(source); end + + # source://prism//lib/prism/lex_compat.rb#849 + def result; end + + # source://prism//lib/prism/lex_compat.rb#843 + def source; end +end + +# Represents the use of the `&&=` operator for assignment to a local variable. +# +# target &&= value +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#10254 +class Prism::LocalVariableAndWriteNode < ::Prism::Node + # def initialize: (name_loc: Location, operator_loc: Location, value: Node, name: Symbol, depth: Integer, location: Location) -> void + # + # @return [LocalVariableAndWriteNode] a new instance of LocalVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#10270 + sig do + params( + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + depth: Integer, + location: Prism::Location + ).void + end + def initialize(name_loc, operator_loc, value, name, depth, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#10280 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10285 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10295 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10290 + def compact_child_nodes; end + + # def copy: (**params) -> LocalVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#10300 + sig { params(params: T.untyped).returns(Prism::LocalVariableAndWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10285 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#10315 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://prism//lib/prism/node.rb#10267 + sig { returns(Integer) } + def depth; end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#10325 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#10264 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#10255 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#10320 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#10258 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10350 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#10261 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10360 + def type; end + end +end + +# Represents assigning to a local variable using an operator that isn't `=`. +# +# target += value +# ^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#10370 +class Prism::LocalVariableOperatorWriteNode < ::Prism::Node + # def initialize: (name_loc: Location, operator_loc: Location, value: Node, name: Symbol, operator: Symbol, depth: Integer, location: Location) -> void + # + # @return [LocalVariableOperatorWriteNode] a new instance of LocalVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#10389 + sig do + params( + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + operator: Symbol, + depth: Integer, + location: Prism::Location + ).void + end + def initialize(name_loc, operator_loc, value, name, operator, depth, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#10400 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10405 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10415 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10410 + def compact_child_nodes; end + + # def copy: (**params) -> LocalVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#10420 + sig { params(params: T.untyped).returns(Prism::LocalVariableOperatorWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10405 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#10436 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://prism//lib/prism/node.rb#10386 + sig { returns(Integer) } + def depth; end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#10441 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#10380 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#10371 + sig { returns(Prism::Location) } + def name_loc; end + + # attr_reader operator: Symbol + # + # source://prism//lib/prism/node.rb#10383 + sig { returns(Symbol) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#10374 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10467 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#10377 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10477 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to a local variable. +# +# target ||= value +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#10487 +class Prism::LocalVariableOrWriteNode < ::Prism::Node + # def initialize: (name_loc: Location, operator_loc: Location, value: Node, name: Symbol, depth: Integer, location: Location) -> void + # + # @return [LocalVariableOrWriteNode] a new instance of LocalVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#10503 + sig do + params( + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + depth: Integer, + location: Prism::Location + ).void + end + def initialize(name_loc, operator_loc, value, name, depth, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#10513 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10518 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10528 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10523 + def compact_child_nodes; end + + # def copy: (**params) -> LocalVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#10533 + sig { params(params: T.untyped).returns(Prism::LocalVariableOrWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10518 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#10548 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://prism//lib/prism/node.rb#10500 + sig { returns(Integer) } + def depth; end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#10558 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#10497 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#10488 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#10553 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#10491 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10583 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#10494 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10593 + def type; end + end +end + +# Represents reading a local variable. Note that this requires that a local +# variable of the same name has already been written to in the same scope, +# otherwise it is parsed as a method call. +# +# foo +# ^^^ +# +# source://prism//lib/prism/node.rb#10605 +class Prism::LocalVariableReadNode < ::Prism::Node + # def initialize: (name: Symbol, depth: Integer, location: Location) -> void + # + # @return [LocalVariableReadNode] a new instance of LocalVariableReadNode + # + # source://prism//lib/prism/node.rb#10612 + sig { params(name: Symbol, depth: Integer, location: Prism::Location).void } + def initialize(name, depth, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#10619 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10624 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10634 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10629 + def compact_child_nodes; end + + # def copy: (**params) -> LocalVariableReadNode + # + # source://prism//lib/prism/node.rb#10639 + sig { params(params: T.untyped).returns(Prism::LocalVariableReadNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10624 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#10651 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://prism//lib/prism/node.rb#10609 + sig { returns(Integer) } + def depth; end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#10656 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#10606 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10677 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10687 + def type; end + end +end + +# Represents writing to a local variable in a context that doesn't have an explicit value. +# +# foo, bar = baz +# ^^^ ^^^ +# +# source://prism//lib/prism/node.rb#10697 +class Prism::LocalVariableTargetNode < ::Prism::Node + # def initialize: (name: Symbol, depth: Integer, location: Location) -> void + # + # @return [LocalVariableTargetNode] a new instance of LocalVariableTargetNode + # + # source://prism//lib/prism/node.rb#10704 + sig { params(name: Symbol, depth: Integer, location: Prism::Location).void } + def initialize(name, depth, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#10711 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10716 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10726 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10721 + def compact_child_nodes; end + + # def copy: (**params) -> LocalVariableTargetNode + # + # source://prism//lib/prism/node.rb#10731 + sig { params(params: T.untyped).returns(Prism::LocalVariableTargetNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10716 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#10743 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://prism//lib/prism/node.rb#10701 + sig { returns(Integer) } + def depth; end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#10748 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#10698 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10769 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10779 + def type; end + end +end + +# Represents writing to a local variable. +# +# foo = 1 +# ^^^^^^^ +# +# source://prism//lib/prism/node.rb#10789 +class Prism::LocalVariableWriteNode < ::Prism::Node + # def initialize: (name: Symbol, depth: Integer, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> void + # + # @return [LocalVariableWriteNode] a new instance of LocalVariableWriteNode + # + # source://prism//lib/prism/node.rb#10805 + sig do + params( + name: Symbol, + depth: Integer, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(name, depth, name_loc, value, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#10815 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10820 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10830 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10825 + def compact_child_nodes; end + + # def copy: (**params) -> LocalVariableWriteNode + # + # source://prism//lib/prism/node.rb#10835 + sig { params(params: T.untyped).returns(Prism::LocalVariableWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10820 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#10850 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://prism//lib/prism/node.rb#10793 + sig { returns(Integer) } + def depth; end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#10860 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#10790 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#10796 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#10855 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#10802 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10885 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#10799 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10895 + def type; end + end +end + +# This represents a location in the source. +# +# source://prism//lib/prism/parse_result.rb#91 +class Prism::Location + # Create a new location object with the given source, start byte offset, and + # byte length. + # + # @return [Location] a new instance of Location + # + # source://prism//lib/prism/parse_result.rb#108 + sig { params(source: Prism::Source, start_offset: Integer, length: Integer).void } + def initialize(source, start_offset, length); end + + # Returns true if the given other location is equal to this location. + # + # source://prism//lib/prism/parse_result.rb#202 + def ==(other); end + + # The list of comments attached to this location + # + # source://prism//lib/prism/parse_result.rb#104 + sig { returns(T::Array[Prism::Comment]) } + def comments; end + + # Create a new location object with the given options. + # + # source://prism//lib/prism/parse_result.rb#116 + sig { params(options: T.untyped).returns(Prism::Location) } + def copy(**options); end + + # Implement the hash pattern matching interface for Location. + # + # source://prism//lib/prism/parse_result.rb#192 + def deconstruct_keys(keys); end + + # The column number in characters where this location ends from the start of + # the line. + # + # source://prism//lib/prism/parse_result.rb#187 + def end_character_column; end + + # The character offset from the beginning of the source where this location + # ends. + # + # source://prism//lib/prism/parse_result.rb#147 + def end_character_offset; end + + # The column number in bytes where this location ends from the start of the + # line. + # + # source://prism//lib/prism/parse_result.rb#181 + sig { returns(Integer) } + def end_column; end + + # The line number where this location ends. + # + # source://prism//lib/prism/parse_result.rb#163 + sig { returns(Integer) } + def end_line; end + + # The byte offset from the beginning of the source where this location ends. + # + # source://prism//lib/prism/parse_result.rb#141 + sig { returns(Integer) } + def end_offset; end + + # Returns a string representation of this location. + # + # source://prism//lib/prism/parse_result.rb#125 + def inspect; end + + # Returns a new location that stretches from this location to the given + # other location. Raises an error if this location is not before the other + # location or if they don't share the same source. + # + # source://prism//lib/prism/parse_result.rb#211 + def join(other); end + + # The length of this location in bytes. + # + # source://prism//lib/prism/parse_result.rb#101 + def length; end + + # Implement the pretty print interface for Location. + # + # source://prism//lib/prism/parse_result.rb#197 + def pretty_print(q); end + + # The source code that this location represents. + # + # source://prism//lib/prism/parse_result.rb#130 + sig { returns(String) } + def slice; end + + # The column number in characters where this location ends from the start of + # the line. + # + # source://prism//lib/prism/parse_result.rb#175 + def start_character_column; end + + # The character offset from the beginning of the source where this location + # starts. + # + # source://prism//lib/prism/parse_result.rb#136 + def start_character_offset; end + + # The column number in bytes where this location starts from the start of + # the line. + # + # source://prism//lib/prism/parse_result.rb#169 + sig { returns(Integer) } + def start_column; end + + # The line number where this location starts. + # + # source://prism//lib/prism/parse_result.rb#152 + sig { returns(Integer) } + def start_line; end + + # The content of the line where this location starts before this location. + # + # source://prism//lib/prism/parse_result.rb#157 + def start_line_slice; end + + # The byte offset from the beginning of the source where this location + # starts. + # + # source://prism//lib/prism/parse_result.rb#98 + sig { returns(Integer) } + def start_offset; end + + protected + + # Returns the value of attribute source. + # + # source://prism//lib/prism/parse_result.rb#94 + def source; end + + class << self + # Returns a null location that does not correspond to a source and points to + # the beginning of the file. Useful for when you want a location object but + # do not care where it points. + # + # source://prism//lib/prism/parse_result.rb#221 + def null; end + end +end + +# Flags for while and until loop nodes. +# +# source://prism//lib/prism/node.rb#16635 +module Prism::LoopFlags; end + +# a loop after a begin statement, so the body is executed first before the condition +# +# source://prism//lib/prism/node.rb#16637 +Prism::LoopFlags::BEGIN_MODIFIER = T.let(T.unsafe(nil), Integer) + +# This represents a magic comment that was encountered during parsing. +# +# source://prism//lib/prism/parse_result.rb#282 +class Prism::MagicComment + # Create a new magic comment object with the given key and value locations. + # + # @return [MagicComment] a new instance of MagicComment + # + # source://prism//lib/prism/parse_result.rb#290 + def initialize(key_loc, value_loc); end + + # Implement the hash pattern matching interface for MagicComment. + # + # source://prism//lib/prism/parse_result.rb#306 + def deconstruct_keys(keys); end + + # Returns a string representation of this magic comment. + # + # source://prism//lib/prism/parse_result.rb#311 + def inspect; end + + # Returns the key of the magic comment by slicing it from the source code. + # + # source://prism//lib/prism/parse_result.rb#296 + def key; end + + # A Location object representing the location of the key in the source. + # + # source://prism//lib/prism/parse_result.rb#284 + def key_loc; end + + # Returns the value of the magic comment by slicing it from the source code. + # + # source://prism//lib/prism/parse_result.rb#301 + def value; end + + # A Location object representing the location of the value in the source. + # + # source://prism//lib/prism/parse_result.rb#287 + def value_loc; end +end + +# Represents a regular expression literal used in the predicate of a +# conditional to implicitly match against the last line read by an IO +# object. +# +# if /foo/i then end +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#10907 +class Prism::MatchLastLineNode < ::Prism::Node + include ::Prism::RegularExpressionOptions + + # def initialize: (opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, flags: Integer, location: Location) -> void + # + # @return [MatchLastLineNode] a new instance of MatchLastLineNode + # + # source://prism//lib/prism/node.rb#10923 + sig do + params( + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String, + flags: Integer, + location: Prism::Location + ).void + end + def initialize(opening_loc, content_loc, closing_loc, unescaped, flags, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#10933 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def ascii_8bit?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11013 + sig { returns(T::Boolean) } + def ascii_8bit?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10938 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#10983 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#10914 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10948 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10943 + def compact_child_nodes; end + + # def content: () -> String + # + # source://prism//lib/prism/node.rb#10978 + sig { returns(String) } + def content; end + + # attr_reader content_loc: Location + # + # source://prism//lib/prism/node.rb#10911 + sig { returns(Prism::Location) } + def content_loc; end + + # def copy: (**params) -> MatchLastLineNode + # + # source://prism//lib/prism/node.rb#10953 + sig { params(params: T.untyped).returns(Prism::MatchLastLineNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10938 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#10968 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def euc_jp?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11008 + sig { returns(T::Boolean) } + def euc_jp?; end + + # def extended?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10993 + sig { returns(T::Boolean) } + def extended?; end + + # def ignore_case?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10988 + sig { returns(T::Boolean) } + def ignore_case?; end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#11028 + def inspect(inspector = T.unsafe(nil)); end + + # def multi_line?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10998 + sig { returns(T::Boolean) } + def multi_line?; end + + # def once?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11003 + sig { returns(T::Boolean) } + def once?; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#10973 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#10908 + sig { returns(Prism::Location) } + def opening_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11053 + def type; end + + # attr_reader unescaped: String + # + # source://prism//lib/prism/node.rb#10917 + sig { returns(String) } + def unescaped; end + + # def utf_8?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11023 + sig { returns(T::Boolean) } + def utf_8?; end + + # def windows_31j?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11018 + sig { returns(T::Boolean) } + def windows_31j?; end + + private + + # Returns the value of attribute flags. + # + # source://prism//lib/prism/node.rb#10920 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11063 + def type; end + end +end + +# Represents the use of the modifier `in` operator. +# +# foo in bar +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#11073 +class Prism::MatchPredicateNode < ::Prism::Node + # def initialize: (value: Node, pattern: Node, operator_loc: Location, location: Location) -> void + # + # @return [MatchPredicateNode] a new instance of MatchPredicateNode + # + # source://prism//lib/prism/node.rb#11083 + sig do + params( + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(value, pattern, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#11091 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11096 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11106 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11101 + def compact_child_nodes; end + + # def copy: (**params) -> MatchPredicateNode + # + # source://prism//lib/prism/node.rb#11111 + sig { params(params: T.untyped).returns(Prism::MatchPredicateNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11096 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#11124 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#11134 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#11129 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#11080 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader pattern: Node + # + # source://prism//lib/prism/node.rb#11077 + sig { returns(Prism::Node) } + def pattern; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11158 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#11074 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11168 + def type; end + end +end + +# Represents the use of the `=>` operator. +# +# foo => bar +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#11178 +class Prism::MatchRequiredNode < ::Prism::Node + # def initialize: (value: Node, pattern: Node, operator_loc: Location, location: Location) -> void + # + # @return [MatchRequiredNode] a new instance of MatchRequiredNode + # + # source://prism//lib/prism/node.rb#11188 + sig do + params( + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(value, pattern, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#11196 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11201 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11211 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11206 + def compact_child_nodes; end + + # def copy: (**params) -> MatchRequiredNode + # + # source://prism//lib/prism/node.rb#11216 + sig { params(params: T.untyped).returns(Prism::MatchRequiredNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11201 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#11229 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#11239 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#11234 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#11185 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader pattern: Node + # + # source://prism//lib/prism/node.rb#11182 + sig { returns(Prism::Node) } + def pattern; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11263 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#11179 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11273 + def type; end + end +end + +# Represents writing local variables using a regular expression match with +# named capture groups. +# +# /(?bar)/ =~ baz +# ^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#11284 +class Prism::MatchWriteNode < ::Prism::Node + # def initialize: (call: CallNode, targets: Array[Node], location: Location) -> void + # + # @return [MatchWriteNode] a new instance of MatchWriteNode + # + # source://prism//lib/prism/node.rb#11291 + sig { params(call: Prism::CallNode, targets: T::Array[Prism::Node], location: Prism::Location).void } + def initialize(call, targets, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#11298 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # attr_reader call: CallNode + # + # source://prism//lib/prism/node.rb#11285 + sig { returns(Prism::CallNode) } + def call; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11303 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11313 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11308 + def compact_child_nodes; end + + # def copy: (**params) -> MatchWriteNode + # + # source://prism//lib/prism/node.rb#11318 + sig { params(params: T.untyped).returns(Prism::MatchWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11303 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#11330 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#11335 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader targets: Array[Node] + # + # source://prism//lib/prism/node.rb#11288 + sig { returns(T::Array[Prism::Node]) } + def targets; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11357 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11367 + def type; end + end +end + +# Represents a node that is missing from the source and results in a syntax +# error. +# +# source://prism//lib/prism/node.rb#11375 +class Prism::MissingNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [MissingNode] a new instance of MissingNode + # + # source://prism//lib/prism/node.rb#11376 + sig { params(location: Prism::Location).void } + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#11381 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11386 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11396 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11391 + def compact_child_nodes; end + + # def copy: (**params) -> MissingNode + # + # source://prism//lib/prism/node.rb#11401 + sig { params(params: T.untyped).returns(Prism::MissingNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11386 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#11411 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#11416 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11435 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11445 + def type; end + end +end + +# Represents a module declaration involving the `module` keyword. +# +# module Foo end +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#11455 +class Prism::ModuleNode < ::Prism::Node + # def initialize: (locals: Array[Symbol], module_keyword_loc: Location, constant_path: Node, body: Node?, end_keyword_loc: Location, name: Symbol, location: Location) -> void + # + # @return [ModuleNode] a new instance of ModuleNode + # + # source://prism//lib/prism/node.rb#11474 + sig do + params( + locals: T::Array[Symbol], + module_keyword_loc: Prism::Location, + constant_path: Prism::Node, + body: T.nilable(Prism::Node), + end_keyword_loc: Prism::Location, + name: Symbol, + location: Prism::Location + ).void + end + def initialize(locals, module_keyword_loc, constant_path, body, end_keyword_loc, name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#11485 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # attr_reader body: Node? + # + # source://prism//lib/prism/node.rb#11465 + sig { returns(T.nilable(Prism::Node)) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11490 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11503 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11495 + def compact_child_nodes; end + + # attr_reader constant_path: Node + # + # source://prism//lib/prism/node.rb#11462 + sig { returns(Prism::Node) } + def constant_path; end + + # def copy: (**params) -> ModuleNode + # + # source://prism//lib/prism/node.rb#11508 + sig { params(params: T.untyped).returns(Prism::ModuleNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11490 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#11524 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#11534 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#11468 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#11539 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#11456 + sig { returns(T::Array[Symbol]) } + def locals; end + + # def module_keyword: () -> String + # + # source://prism//lib/prism/node.rb#11529 + sig { returns(String) } + def module_keyword; end + + # attr_reader module_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#11459 + sig { returns(Prism::Location) } + def module_keyword_loc; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#11471 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11570 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11580 + def type; end + end +end + +# Represents a multi-target expression. +# +# a, (b, c) = 1, 2, 3 +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#11590 +class Prism::MultiTargetNode < ::Prism::Node + # def initialize: (lefts: Array[Node], rest: Node?, rights: Array[Node], lparen_loc: Location?, rparen_loc: Location?, location: Location) -> void + # + # @return [MultiTargetNode] a new instance of MultiTargetNode + # + # source://prism//lib/prism/node.rb#11606 + sig do + params( + lefts: T::Array[Prism::Node], + rest: T.nilable(Prism::Node), + rights: T::Array[Prism::Node], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(lefts, rest, rights, lparen_loc, rparen_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#11616 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11621 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11635 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11626 + def compact_child_nodes; end + + # def copy: (**params) -> MultiTargetNode + # + # source://prism//lib/prism/node.rb#11640 + sig { params(params: T.untyped).returns(Prism::MultiTargetNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11621 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#11655 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#11670 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader lefts: Array[Node] + # + # source://prism//lib/prism/node.rb#11591 + sig { returns(T::Array[Prism::Node]) } + def lefts; end + + # def lparen: () -> String? + # + # source://prism//lib/prism/node.rb#11660 + sig { returns(T.nilable(String)) } + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://prism//lib/prism/node.rb#11600 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # attr_reader rest: Node? + # + # source://prism//lib/prism/node.rb#11594 + sig { returns(T.nilable(Prism::Node)) } + def rest; end + + # attr_reader rights: Array[Node] + # + # source://prism//lib/prism/node.rb#11597 + sig { returns(T::Array[Prism::Node]) } + def rights; end + + # def rparen: () -> String? + # + # source://prism//lib/prism/node.rb#11665 + sig { returns(T.nilable(String)) } + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://prism//lib/prism/node.rb#11603 + sig { returns(T.nilable(Prism::Location)) } + def rparen_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11699 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11709 + def type; end + end +end + +# Represents a write to a multi-target expression. +# +# a, b, c = 1, 2, 3 +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#11719 +class Prism::MultiWriteNode < ::Prism::Node + # def initialize: (lefts: Array[Node], rest: Node?, rights: Array[Node], lparen_loc: Location?, rparen_loc: Location?, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [MultiWriteNode] a new instance of MultiWriteNode + # + # source://prism//lib/prism/node.rb#11741 + sig do + params( + lefts: T::Array[Prism::Node], + rest: T.nilable(Prism::Node), + rights: T::Array[Prism::Node], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(lefts, rest, rights, lparen_loc, rparen_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#11753 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11758 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11773 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11763 + def compact_child_nodes; end + + # def copy: (**params) -> MultiWriteNode + # + # source://prism//lib/prism/node.rb#11778 + sig { params(params: T.untyped).returns(Prism::MultiWriteNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11758 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#11795 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#11815 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader lefts: Array[Node] + # + # source://prism//lib/prism/node.rb#11720 + sig { returns(T::Array[Prism::Node]) } + def lefts; end + + # def lparen: () -> String? + # + # source://prism//lib/prism/node.rb#11800 + sig { returns(T.nilable(String)) } + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://prism//lib/prism/node.rb#11729 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#11810 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#11735 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader rest: Node? + # + # source://prism//lib/prism/node.rb#11723 + sig { returns(T.nilable(Prism::Node)) } + def rest; end + + # attr_reader rights: Array[Node] + # + # source://prism//lib/prism/node.rb#11726 + sig { returns(T::Array[Prism::Node]) } + def rights; end + + # def rparen: () -> String? + # + # source://prism//lib/prism/node.rb#11805 + sig { returns(T.nilable(String)) } + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://prism//lib/prism/node.rb#11732 + sig { returns(T.nilable(Prism::Location)) } + def rparen_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11847 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#11738 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11857 + def type; end + end +end + +# This visitor walks through the tree and copies each node as it is being +# visited. This is useful for consumers that want to mutate the tree, as you +# can change subtrees in place without effecting the rest of the tree. +# +# source://prism//lib/prism/mutation_compiler.rb#13 +class Prism::MutationCompiler < ::Prism::Compiler + # Copy a AliasGlobalVariableNode node + # + # source://prism//lib/prism/mutation_compiler.rb#14 + def visit_alias_global_variable_node(node); end + + # Copy a AliasMethodNode node + # + # source://prism//lib/prism/mutation_compiler.rb#19 + def visit_alias_method_node(node); end + + # Copy a AlternationPatternNode node + # + # source://prism//lib/prism/mutation_compiler.rb#24 + def visit_alternation_pattern_node(node); end + + # Copy a AndNode node + # + # source://prism//lib/prism/mutation_compiler.rb#29 + def visit_and_node(node); end + + # Copy a ArgumentsNode node + # + # source://prism//lib/prism/mutation_compiler.rb#34 + def visit_arguments_node(node); end + + # Copy a ArrayNode node + # + # source://prism//lib/prism/mutation_compiler.rb#39 + def visit_array_node(node); end + + # Copy a ArrayPatternNode node + # + # source://prism//lib/prism/mutation_compiler.rb#44 + def visit_array_pattern_node(node); end + + # Copy a AssocNode node + # + # source://prism//lib/prism/mutation_compiler.rb#49 + def visit_assoc_node(node); end + + # Copy a AssocSplatNode node + # + # source://prism//lib/prism/mutation_compiler.rb#54 + def visit_assoc_splat_node(node); end + + # Copy a BackReferenceReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#59 + def visit_back_reference_read_node(node); end + + # Copy a BeginNode node + # + # source://prism//lib/prism/mutation_compiler.rb#64 + def visit_begin_node(node); end + + # Copy a BlockArgumentNode node + # + # source://prism//lib/prism/mutation_compiler.rb#69 + def visit_block_argument_node(node); end + + # Copy a BlockLocalVariableNode node + # + # source://prism//lib/prism/mutation_compiler.rb#74 + def visit_block_local_variable_node(node); end + + # Copy a BlockNode node + # + # source://prism//lib/prism/mutation_compiler.rb#79 + def visit_block_node(node); end + + # Copy a BlockParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#84 + def visit_block_parameter_node(node); end + + # Copy a BlockParametersNode node + # + # source://prism//lib/prism/mutation_compiler.rb#89 + def visit_block_parameters_node(node); end + + # Copy a BreakNode node + # + # source://prism//lib/prism/mutation_compiler.rb#94 + def visit_break_node(node); end + + # Copy a CallAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#99 + def visit_call_and_write_node(node); end + + # Copy a CallNode node + # + # source://prism//lib/prism/mutation_compiler.rb#104 + def visit_call_node(node); end + + # Copy a CallOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#109 + def visit_call_operator_write_node(node); end + + # Copy a CallOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#114 + def visit_call_or_write_node(node); end + + # Copy a CapturePatternNode node + # + # source://prism//lib/prism/mutation_compiler.rb#119 + def visit_capture_pattern_node(node); end + + # Copy a CaseMatchNode node + # + # source://prism//lib/prism/mutation_compiler.rb#124 + def visit_case_match_node(node); end + + # Copy a CaseNode node + # + # source://prism//lib/prism/mutation_compiler.rb#129 + def visit_case_node(node); end + + # Copy a ClassNode node + # + # source://prism//lib/prism/mutation_compiler.rb#134 + def visit_class_node(node); end + + # Copy a ClassVariableAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#139 + def visit_class_variable_and_write_node(node); end + + # Copy a ClassVariableOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#144 + def visit_class_variable_operator_write_node(node); end + + # Copy a ClassVariableOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#149 + def visit_class_variable_or_write_node(node); end + + # Copy a ClassVariableReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#154 + def visit_class_variable_read_node(node); end + + # Copy a ClassVariableTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#159 + def visit_class_variable_target_node(node); end + + # Copy a ClassVariableWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#164 + def visit_class_variable_write_node(node); end + + # Copy a ConstantAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#169 + def visit_constant_and_write_node(node); end + + # Copy a ConstantOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#174 + def visit_constant_operator_write_node(node); end + + # Copy a ConstantOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#179 + def visit_constant_or_write_node(node); end + + # Copy a ConstantPathAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#184 + def visit_constant_path_and_write_node(node); end + + # Copy a ConstantPathNode node + # + # source://prism//lib/prism/mutation_compiler.rb#189 + def visit_constant_path_node(node); end + + # Copy a ConstantPathOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#194 + def visit_constant_path_operator_write_node(node); end + + # Copy a ConstantPathOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#199 + def visit_constant_path_or_write_node(node); end + + # Copy a ConstantPathTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#204 + def visit_constant_path_target_node(node); end + + # Copy a ConstantPathWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#209 + def visit_constant_path_write_node(node); end + + # Copy a ConstantReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#214 + def visit_constant_read_node(node); end + + # Copy a ConstantTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#219 + def visit_constant_target_node(node); end + + # Copy a ConstantWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#224 + def visit_constant_write_node(node); end + + # Copy a DefNode node + # + # source://prism//lib/prism/mutation_compiler.rb#229 + def visit_def_node(node); end + + # Copy a DefinedNode node + # + # source://prism//lib/prism/mutation_compiler.rb#234 + def visit_defined_node(node); end + + # Copy a ElseNode node + # + # source://prism//lib/prism/mutation_compiler.rb#239 + def visit_else_node(node); end + + # Copy a EmbeddedStatementsNode node + # + # source://prism//lib/prism/mutation_compiler.rb#244 + def visit_embedded_statements_node(node); end + + # Copy a EmbeddedVariableNode node + # + # source://prism//lib/prism/mutation_compiler.rb#249 + def visit_embedded_variable_node(node); end + + # Copy a EnsureNode node + # + # source://prism//lib/prism/mutation_compiler.rb#254 + def visit_ensure_node(node); end + + # Copy a FalseNode node + # + # source://prism//lib/prism/mutation_compiler.rb#259 + def visit_false_node(node); end + + # Copy a FindPatternNode node + # + # source://prism//lib/prism/mutation_compiler.rb#264 + def visit_find_pattern_node(node); end + + # Copy a FlipFlopNode node + # + # source://prism//lib/prism/mutation_compiler.rb#269 + def visit_flip_flop_node(node); end + + # Copy a FloatNode node + # + # source://prism//lib/prism/mutation_compiler.rb#274 + def visit_float_node(node); end + + # Copy a ForNode node + # + # source://prism//lib/prism/mutation_compiler.rb#279 + def visit_for_node(node); end + + # Copy a ForwardingArgumentsNode node + # + # source://prism//lib/prism/mutation_compiler.rb#284 + def visit_forwarding_arguments_node(node); end + + # Copy a ForwardingParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#289 + def visit_forwarding_parameter_node(node); end + + # Copy a ForwardingSuperNode node + # + # source://prism//lib/prism/mutation_compiler.rb#294 + def visit_forwarding_super_node(node); end + + # Copy a GlobalVariableAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#299 + def visit_global_variable_and_write_node(node); end + + # Copy a GlobalVariableOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#304 + def visit_global_variable_operator_write_node(node); end + + # Copy a GlobalVariableOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#309 + def visit_global_variable_or_write_node(node); end + + # Copy a GlobalVariableReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#314 + def visit_global_variable_read_node(node); end + + # Copy a GlobalVariableTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#319 + def visit_global_variable_target_node(node); end + + # Copy a GlobalVariableWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#324 + def visit_global_variable_write_node(node); end + + # Copy a HashNode node + # + # source://prism//lib/prism/mutation_compiler.rb#329 + def visit_hash_node(node); end + + # Copy a HashPatternNode node + # + # source://prism//lib/prism/mutation_compiler.rb#334 + def visit_hash_pattern_node(node); end + + # Copy a IfNode node + # + # source://prism//lib/prism/mutation_compiler.rb#339 + def visit_if_node(node); end + + # Copy a ImaginaryNode node + # + # source://prism//lib/prism/mutation_compiler.rb#344 + def visit_imaginary_node(node); end + + # Copy a ImplicitNode node + # + # source://prism//lib/prism/mutation_compiler.rb#349 + def visit_implicit_node(node); end + + # Copy a InNode node + # + # source://prism//lib/prism/mutation_compiler.rb#354 + def visit_in_node(node); end + + # Copy a IndexAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#359 + def visit_index_and_write_node(node); end + + # Copy a IndexOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#364 + def visit_index_operator_write_node(node); end + + # Copy a IndexOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#369 + def visit_index_or_write_node(node); end + + # Copy a InstanceVariableAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#374 + def visit_instance_variable_and_write_node(node); end + + # Copy a InstanceVariableOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#379 + def visit_instance_variable_operator_write_node(node); end + + # Copy a InstanceVariableOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#384 + def visit_instance_variable_or_write_node(node); end + + # Copy a InstanceVariableReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#389 + def visit_instance_variable_read_node(node); end + + # Copy a InstanceVariableTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#394 + def visit_instance_variable_target_node(node); end + + # Copy a InstanceVariableWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#399 + def visit_instance_variable_write_node(node); end + + # Copy a IntegerNode node + # + # source://prism//lib/prism/mutation_compiler.rb#404 + def visit_integer_node(node); end + + # Copy a InterpolatedMatchLastLineNode node + # + # source://prism//lib/prism/mutation_compiler.rb#409 + def visit_interpolated_match_last_line_node(node); end + + # Copy a InterpolatedRegularExpressionNode node + # + # source://prism//lib/prism/mutation_compiler.rb#414 + def visit_interpolated_regular_expression_node(node); end + + # Copy a InterpolatedStringNode node + # + # source://prism//lib/prism/mutation_compiler.rb#419 + def visit_interpolated_string_node(node); end + + # Copy a InterpolatedSymbolNode node + # + # source://prism//lib/prism/mutation_compiler.rb#424 + def visit_interpolated_symbol_node(node); end + + # Copy a InterpolatedXStringNode node + # + # source://prism//lib/prism/mutation_compiler.rb#429 + def visit_interpolated_x_string_node(node); end + + # Copy a KeywordHashNode node + # + # source://prism//lib/prism/mutation_compiler.rb#434 + def visit_keyword_hash_node(node); end + + # Copy a KeywordRestParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#439 + def visit_keyword_rest_parameter_node(node); end + + # Copy a LambdaNode node + # + # source://prism//lib/prism/mutation_compiler.rb#444 + def visit_lambda_node(node); end + + # Copy a LocalVariableAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#449 + def visit_local_variable_and_write_node(node); end + + # Copy a LocalVariableOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#454 + def visit_local_variable_operator_write_node(node); end + + # Copy a LocalVariableOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#459 + def visit_local_variable_or_write_node(node); end + + # Copy a LocalVariableReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#464 + def visit_local_variable_read_node(node); end + + # Copy a LocalVariableTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#469 + def visit_local_variable_target_node(node); end + + # Copy a LocalVariableWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#474 + def visit_local_variable_write_node(node); end + + # Copy a MatchLastLineNode node + # + # source://prism//lib/prism/mutation_compiler.rb#479 + def visit_match_last_line_node(node); end + + # Copy a MatchPredicateNode node + # + # source://prism//lib/prism/mutation_compiler.rb#484 + def visit_match_predicate_node(node); end + + # Copy a MatchRequiredNode node + # + # source://prism//lib/prism/mutation_compiler.rb#489 + def visit_match_required_node(node); end + + # Copy a MatchWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#494 + def visit_match_write_node(node); end + + # Copy a MissingNode node + # + # source://prism//lib/prism/mutation_compiler.rb#499 + def visit_missing_node(node); end + + # Copy a ModuleNode node + # + # source://prism//lib/prism/mutation_compiler.rb#504 + def visit_module_node(node); end + + # Copy a MultiTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#509 + def visit_multi_target_node(node); end + + # Copy a MultiWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#514 + def visit_multi_write_node(node); end + + # Copy a NextNode node + # + # source://prism//lib/prism/mutation_compiler.rb#519 + def visit_next_node(node); end + + # Copy a NilNode node + # + # source://prism//lib/prism/mutation_compiler.rb#524 + def visit_nil_node(node); end + + # Copy a NoKeywordsParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#529 + def visit_no_keywords_parameter_node(node); end + + # Copy a NumberedReferenceReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#534 + def visit_numbered_reference_read_node(node); end + + # Copy a OptionalKeywordParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#539 + def visit_optional_keyword_parameter_node(node); end + + # Copy a OptionalParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#544 + def visit_optional_parameter_node(node); end + + # Copy a OrNode node + # + # source://prism//lib/prism/mutation_compiler.rb#549 + def visit_or_node(node); end + + # Copy a ParametersNode node + # + # source://prism//lib/prism/mutation_compiler.rb#554 + def visit_parameters_node(node); end + + # Copy a ParenthesesNode node + # + # source://prism//lib/prism/mutation_compiler.rb#559 + def visit_parentheses_node(node); end + + # Copy a PinnedExpressionNode node + # + # source://prism//lib/prism/mutation_compiler.rb#564 + def visit_pinned_expression_node(node); end + + # Copy a PinnedVariableNode node + # + # source://prism//lib/prism/mutation_compiler.rb#569 + def visit_pinned_variable_node(node); end + + # Copy a PostExecutionNode node + # + # source://prism//lib/prism/mutation_compiler.rb#574 + def visit_post_execution_node(node); end + + # Copy a PreExecutionNode node + # + # source://prism//lib/prism/mutation_compiler.rb#579 + def visit_pre_execution_node(node); end + + # Copy a ProgramNode node + # + # source://prism//lib/prism/mutation_compiler.rb#584 + def visit_program_node(node); end + + # Copy a RangeNode node + # + # source://prism//lib/prism/mutation_compiler.rb#589 + def visit_range_node(node); end + + # Copy a RationalNode node + # + # source://prism//lib/prism/mutation_compiler.rb#594 + def visit_rational_node(node); end + + # Copy a RedoNode node + # + # source://prism//lib/prism/mutation_compiler.rb#599 + def visit_redo_node(node); end + + # Copy a RegularExpressionNode node + # + # source://prism//lib/prism/mutation_compiler.rb#604 + def visit_regular_expression_node(node); end + + # Copy a RequiredKeywordParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#609 + def visit_required_keyword_parameter_node(node); end + + # Copy a RequiredParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#614 + def visit_required_parameter_node(node); end + + # Copy a RescueModifierNode node + # + # source://prism//lib/prism/mutation_compiler.rb#619 + def visit_rescue_modifier_node(node); end + + # Copy a RescueNode node + # + # source://prism//lib/prism/mutation_compiler.rb#624 + def visit_rescue_node(node); end + + # Copy a RestParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#629 + def visit_rest_parameter_node(node); end + + # Copy a RetryNode node + # + # source://prism//lib/prism/mutation_compiler.rb#634 + def visit_retry_node(node); end + + # Copy a ReturnNode node + # + # source://prism//lib/prism/mutation_compiler.rb#639 + def visit_return_node(node); end + + # Copy a SelfNode node + # + # source://prism//lib/prism/mutation_compiler.rb#644 + def visit_self_node(node); end + + # Copy a SingletonClassNode node + # + # source://prism//lib/prism/mutation_compiler.rb#649 + def visit_singleton_class_node(node); end + + # Copy a SourceEncodingNode node + # + # source://prism//lib/prism/mutation_compiler.rb#654 + def visit_source_encoding_node(node); end + + # Copy a SourceFileNode node + # + # source://prism//lib/prism/mutation_compiler.rb#659 + def visit_source_file_node(node); end + + # Copy a SourceLineNode node + # + # source://prism//lib/prism/mutation_compiler.rb#664 + def visit_source_line_node(node); end + + # Copy a SplatNode node + # + # source://prism//lib/prism/mutation_compiler.rb#669 + def visit_splat_node(node); end + + # Copy a StatementsNode node + # + # source://prism//lib/prism/mutation_compiler.rb#674 + def visit_statements_node(node); end + + # Copy a StringNode node + # + # source://prism//lib/prism/mutation_compiler.rb#679 + def visit_string_node(node); end + + # Copy a SuperNode node + # + # source://prism//lib/prism/mutation_compiler.rb#684 + def visit_super_node(node); end + + # Copy a SymbolNode node + # + # source://prism//lib/prism/mutation_compiler.rb#689 + def visit_symbol_node(node); end + + # Copy a TrueNode node + # + # source://prism//lib/prism/mutation_compiler.rb#694 + def visit_true_node(node); end + + # Copy a UndefNode node + # + # source://prism//lib/prism/mutation_compiler.rb#699 + def visit_undef_node(node); end + + # Copy a UnlessNode node + # + # source://prism//lib/prism/mutation_compiler.rb#704 + def visit_unless_node(node); end + + # Copy a UntilNode node + # + # source://prism//lib/prism/mutation_compiler.rb#709 + def visit_until_node(node); end + + # Copy a WhenNode node + # + # source://prism//lib/prism/mutation_compiler.rb#714 + def visit_when_node(node); end + + # Copy a WhileNode node + # + # source://prism//lib/prism/mutation_compiler.rb#719 + def visit_while_node(node); end + + # Copy a XStringNode node + # + # source://prism//lib/prism/mutation_compiler.rb#724 + def visit_x_string_node(node); end + + # Copy a YieldNode node + # + # source://prism//lib/prism/mutation_compiler.rb#729 + def visit_yield_node(node); end +end + +# Represents the use of the `next` keyword. +# +# next 1 +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#11867 +class Prism::NextNode < ::Prism::Node + # def initialize: (arguments: ArgumentsNode?, keyword_loc: Location, location: Location) -> void + # + # @return [NextNode] a new instance of NextNode + # + # source://prism//lib/prism/node.rb#11874 + sig do + params( + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(arguments, keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#11881 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#11868 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11886 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11898 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11891 + def compact_child_nodes; end + + # def copy: (**params) -> NextNode + # + # source://prism//lib/prism/node.rb#11903 + sig { params(params: T.untyped).returns(Prism::NextNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11886 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#11915 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#11925 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#11920 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#11871 + sig { returns(Prism::Location) } + def keyword_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11951 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11961 + def type; end + end +end + +# Represents the use of the `nil` keyword. +# +# nil +# ^^^ +# +# source://prism//lib/prism/node.rb#11971 +class Prism::NilNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [NilNode] a new instance of NilNode + # + # source://prism//lib/prism/node.rb#11972 + sig { params(location: Prism::Location).void } + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#11977 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11982 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11992 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11987 + def compact_child_nodes; end + + # def copy: (**params) -> NilNode + # + # source://prism//lib/prism/node.rb#11997 + sig { params(params: T.untyped).returns(Prism::NilNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11982 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#12007 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#12012 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12031 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12041 + def type; end + end +end + +# Represents the use of `**nil` inside method arguments. +# +# def a(**nil) +# ^^^^^ +# end +# +# source://prism//lib/prism/node.rb#12052 +class Prism::NoKeywordsParameterNode < ::Prism::Node + # def initialize: (operator_loc: Location, keyword_loc: Location, location: Location) -> void + # + # @return [NoKeywordsParameterNode] a new instance of NoKeywordsParameterNode + # + # source://prism//lib/prism/node.rb#12059 + sig { params(operator_loc: Prism::Location, keyword_loc: Prism::Location, location: Prism::Location).void } + def initialize(operator_loc, keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#12066 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12071 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12081 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12076 + def compact_child_nodes; end + + # def copy: (**params) -> NoKeywordsParameterNode + # + # source://prism//lib/prism/node.rb#12086 + sig { params(params: T.untyped).returns(Prism::NoKeywordsParameterNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12071 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#12098 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#12113 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#12108 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#12056 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#12103 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#12053 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12134 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12144 + def type; end + end +end + +# This represents a node in the tree. It is the parent class of all of the +# various node types. +# +# source://prism//lib/prism/node.rb#11 +class Prism::Node + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # A Location instance that represents the location of this node in the + # source. + # + # source://prism//lib/prism/node.rb#14 + sig { returns(Prism::Location) } + def location; end + + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16 + def newline?; end + + # Similar to inspect, but respects the current level of indentation given by + # the pretty print object. + # + # source://prism//lib/prism/node.rb#35 + def pretty_print(q); end + + # source://prism//lib/prism/node.rb#20 + def set_newline_flag(newline_marked); end + + # Slice the location of the node from the source. + # + # source://prism//lib/prism/node.rb#29 + sig { returns(String) } + def slice; end + + # Convert this node into a graphviz dot graph string. + # + # source://prism//lib/prism/node.rb#43 + def to_dot; end +end + +# This object is responsible for generating the output for the inspect method +# implementations of child nodes. +# +# source://prism//lib/prism/node_inspector.rb#6 +class Prism::NodeInspector + # @return [NodeInspector] a new instance of NodeInspector + # + # source://prism//lib/prism/node_inspector.rb#9 + def initialize(prefix = T.unsafe(nil)); end + + # Appends a line to the output with the current prefix. + # + # source://prism//lib/prism/node_inspector.rb#15 + sig { params(line: String).void } + def <<(line); end + + # Returns a new inspector that can be used to inspect a child node. + # + # source://prism//lib/prism/node_inspector.rb#59 + sig { params(append: String).returns(Prism::NodeInspector) } + def child_inspector(append); end + + # Generates a string that represents a child node. + # + # source://prism//lib/prism/node_inspector.rb#54 + sig { params(node: Prism::Node, append: String).returns(String) } + def child_node(node, append); end + + # This generates a string that is used as the header of the inspect output + # for any given node. + # + # source://prism//lib/prism/node_inspector.rb#21 + # This generates a string that is used as the header of the inspect output + sig { params(node: Prism::Node).returns(String) } + def header(node); end + + # Generates a string that represents a list of nodes. It handles properly + # using the box drawing characters to make the output look nice. + # + # source://prism//lib/prism/node_inspector.rb#31 + # Generates a string that represents a list of nodes. It handles properly + sig { params(prefix: String, nodes: T::Array[Prism::Node]).returns(String) } + def list(prefix, nodes); end + + # Generates a string that represents a location field on a node. + # + # source://prism//lib/prism/node_inspector.rb#45 + sig { params(value: Prism::Location).returns(String) } + def location(value); end + + # source://prism//lib/prism/node_inspector.rb#7 + sig { returns(String) } + def output; end + + # source://prism//lib/prism/node_inspector.rb#7 + sig { returns(String) } + def prefix; end + + # Returns the output as a string. + # + # source://prism//lib/prism/node_inspector.rb#64 + sig { returns(String) } + def to_str; end +end + +# Represents reading a numbered reference to a capture in the previous match. +# +# $1 +# ^^ +# +# source://prism//lib/prism/node.rb#12154 +class Prism::NumberedReferenceReadNode < ::Prism::Node + # def initialize: (number: Integer, location: Location) -> void + # + # @return [NumberedReferenceReadNode] a new instance of NumberedReferenceReadNode + # + # source://prism//lib/prism/node.rb#12158 + sig { params(number: Integer, location: Prism::Location).void } + def initialize(number, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#12164 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12169 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12179 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12174 + def compact_child_nodes; end + + # def copy: (**params) -> NumberedReferenceReadNode + # + # source://prism//lib/prism/node.rb#12184 + sig { params(params: T.untyped).returns(Prism::NumberedReferenceReadNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12169 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#12195 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#12200 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader number: Integer + # + # source://prism//lib/prism/node.rb#12155 + sig { returns(Integer) } + def number; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12220 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12230 + def type; end + end +end + +# Represents an optional keyword parameter to a method, block, or lambda definition. +# +# def a(b: 1) +# ^^^^ +# end +# +# source://prism//lib/prism/node.rb#12241 +class Prism::OptionalKeywordParameterNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, value: Node, location: Location) -> void + # + # @return [OptionalKeywordParameterNode] a new instance of OptionalKeywordParameterNode + # + # source://prism//lib/prism/node.rb#12251 + sig { params(name: Symbol, name_loc: Prism::Location, value: Prism::Node, location: Prism::Location).void } + def initialize(name, name_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#12259 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12264 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12274 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12269 + def compact_child_nodes; end + + # def copy: (**params) -> OptionalKeywordParameterNode + # + # source://prism//lib/prism/node.rb#12279 + sig { params(params: T.untyped).returns(Prism::OptionalKeywordParameterNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12264 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#12292 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#12297 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#12242 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#12245 + sig { returns(Prism::Location) } + def name_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12320 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#12248 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12330 + def type; end + end +end + +# Represents an optional parameter to a method, block, or lambda definition. +# +# def a(b = 1) +# ^^^^^ +# end +# +# source://prism//lib/prism/node.rb#12341 +class Prism::OptionalParameterNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [OptionalParameterNode] a new instance of OptionalParameterNode + # + # source://prism//lib/prism/node.rb#12354 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(name, name_loc, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#12363 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12368 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12378 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12373 + def compact_child_nodes; end + + # def copy: (**params) -> OptionalParameterNode + # + # source://prism//lib/prism/node.rb#12383 + sig { params(params: T.untyped).returns(Prism::OptionalParameterNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12368 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#12397 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#12407 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#12342 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#12345 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#12402 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#12348 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12431 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#12351 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12441 + def type; end + end +end + +# Represents the use of the `||` operator or the `or` keyword. +# +# left or right +# ^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#12451 +class Prism::OrNode < ::Prism::Node + # def initialize: (left: Node, right: Node, operator_loc: Location, location: Location) -> void + # + # @return [OrNode] a new instance of OrNode + # + # source://prism//lib/prism/node.rb#12461 + sig { params(left: Prism::Node, right: Prism::Node, operator_loc: Prism::Location, location: Prism::Location).void } + def initialize(left, right, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#12469 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12474 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12484 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12479 + def compact_child_nodes; end + + # def copy: (**params) -> OrNode + # + # source://prism//lib/prism/node.rb#12489 + sig { params(params: T.untyped).returns(Prism::OrNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12474 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#12502 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#12512 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader left: Node + # + # source://prism//lib/prism/node.rb#12452 + sig { returns(Prism::Node) } + def left; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#12507 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#12458 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader right: Node + # + # source://prism//lib/prism/node.rb#12455 + sig { returns(Prism::Node) } + def right; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12536 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12546 + def type; end + end +end + +# A parser for the pack template language. +# +# source://prism//lib/prism/pack.rb#5 +module Prism::Pack + class << self + def parse(_arg0, _arg1, _arg2); end + end +end + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::AGNOSTIC_ENDIAN = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::BACK = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::BER = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::BIG_ENDIAN = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::COMMENT = T.let(T.unsafe(nil), Symbol) + +# A directive in the pack template language. +# +# source://prism//lib/prism/pack.rb#59 +class Prism::Pack::Directive + # Initialize a new directive with the given values. + # + # @return [Directive] a new instance of Directive + # + # source://prism//lib/prism/pack.rb#88 + def initialize(version, variant, source, type, signed, endian, size, length_type, length); end + + # Provide a human-readable description of the directive. + # + # source://prism//lib/prism/pack.rb#130 + def describe; end + + # The type of endianness of the directive. + # + # source://prism//lib/prism/pack.rb#76 + def endian; end + + # The length of this directive (used for integers). + # + # source://prism//lib/prism/pack.rb#85 + def length; end + + # The length type of this directive (used for integers). + # + # source://prism//lib/prism/pack.rb#82 + def length_type; end + + # The type of signedness of the directive. + # + # source://prism//lib/prism/pack.rb#73 + def signed; end + + # The size of the directive. + # + # source://prism//lib/prism/pack.rb#79 + def size; end + + # A byteslice of the source string that this directive represents. + # + # source://prism//lib/prism/pack.rb#67 + def source; end + + # The type of the directive. + # + # source://prism//lib/prism/pack.rb#70 + def type; end + + # A symbol representing whether or not we are packing or unpacking. + # + # source://prism//lib/prism/pack.rb#64 + def variant; end + + # A symbol representing the version of Ruby. + # + # source://prism//lib/prism/pack.rb#61 + def version; end +end + +# The descriptions of the various types of endianness. +# +# source://prism//lib/prism/pack.rb#101 +Prism::Pack::Directive::ENDIAN_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) + +# The descriptions of the various types of signedness. +# +# source://prism//lib/prism/pack.rb#110 +Prism::Pack::Directive::SIGNED_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) + +# The descriptions of the various types of sizes. +# +# source://prism//lib/prism/pack.rb#117 +Prism::Pack::Directive::SIZE_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::ENDIAN_NA = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::FLOAT = T.let(T.unsafe(nil), Symbol) + +# The result of parsing a pack template. +# +# source://prism//lib/prism/pack.rb#195 +class Prism::Pack::Format + # Create a new Format with the given directives and encoding. + # + # @return [Format] a new instance of Format + # + # source://prism//lib/prism/pack.rb#203 + def initialize(directives, encoding); end + + # Provide a human-readable description of the format. + # + # source://prism//lib/prism/pack.rb#209 + def describe; end + + # A list of the directives in the template. + # + # source://prism//lib/prism/pack.rb#197 + def directives; end + + # The encoding of the template. + # + # source://prism//lib/prism/pack.rb#200 + def encoding; end +end + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::INTEGER = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::LENGTH_FIXED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::LENGTH_MAX = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::LENGTH_NA = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::LENGTH_RELATIVE = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::LITTLE_ENDIAN = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::MOVE = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::NATIVE_ENDIAN = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::NULL = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::SIGNED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::SIGNED_NA = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::SIZE_16 = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::SIZE_32 = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::SIZE_64 = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::SIZE_8 = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::SIZE_INT = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::SIZE_LONG = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::SIZE_LONG_LONG = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::SIZE_NA = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::SIZE_P = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::SIZE_SHORT = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::SPACE = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::STRING_BASE64 = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::STRING_FIXED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::STRING_HEX_HIGH = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::STRING_HEX_LOW = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::STRING_LSB = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::STRING_MIME = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::STRING_MSB = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::STRING_NULL_PADDED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::STRING_NULL_TERMINATED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::STRING_POINTER = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::STRING_SPACE_PADDED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::STRING_UU = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::UNSIGNED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#55 +Prism::Pack::UTF8 = T.let(T.unsafe(nil), Symbol) + +# Represents the list of parameters on a method, block, or lambda definition. +# +# def a(b, c, d) +# ^^^^^^^ +# end +# +# source://prism//lib/prism/node.rb#12557 +class Prism::ParametersNode < ::Prism::Node + # def initialize: (requireds: Array[Node], optionals: Array[Node], rest: RestParameterNode?, posts: Array[Node], keywords: Array[Node], keyword_rest: Node?, block: BlockParameterNode?, location: Location) -> void + # + # @return [ParametersNode] a new instance of ParametersNode + # + # source://prism//lib/prism/node.rb#12579 + sig do + params( + requireds: T::Array[Prism::Node], + optionals: T::Array[Prism::Node], + rest: T.nilable(Prism::RestParameterNode), + posts: T::Array[Prism::Node], + keywords: T::Array[Prism::Node], + keyword_rest: T.nilable(Prism::Node), + block: T.nilable(Prism::BlockParameterNode), + location: Prism::Location + ).void + end + def initialize(requireds, optionals, rest, posts, keywords, keyword_rest, block, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#12591 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # attr_reader block: BlockParameterNode? + # + # source://prism//lib/prism/node.rb#12576 + sig { returns(T.nilable(Prism::BlockParameterNode)) } + def block; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12596 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12614 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12601 + def compact_child_nodes; end + + # def copy: (**params) -> ParametersNode + # + # source://prism//lib/prism/node.rb#12619 + sig { params(params: T.untyped).returns(Prism::ParametersNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12596 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#12636 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#12641 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader keyword_rest: Node? + # + # source://prism//lib/prism/node.rb#12573 + sig { returns(T.nilable(Prism::Node)) } + def keyword_rest; end + + # attr_reader keywords: Array[Node] + # + # source://prism//lib/prism/node.rb#12570 + sig { returns(T::Array[Prism::Node]) } + def keywords; end + + # attr_reader optionals: Array[Node] + # + # source://prism//lib/prism/node.rb#12561 + sig { returns(T::Array[Prism::Node]) } + def optionals; end + + # attr_reader posts: Array[Node] + # + # source://prism//lib/prism/node.rb#12567 + sig { returns(T::Array[Prism::Node]) } + def posts; end + + # attr_reader requireds: Array[Node] + # + # source://prism//lib/prism/node.rb#12558 + sig { returns(T::Array[Prism::Node]) } + def requireds; end + + # attr_reader rest: RestParameterNode? + # + # source://prism//lib/prism/node.rb#12564 + sig { returns(T.nilable(Prism::RestParameterNode)) } + def rest; end + + # Mirrors the Method#parameters method. + # + # source://prism//lib/prism/node_ext.rb#124 + def signature; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12682 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12692 + def type; end + end +end + +# Represents a parenthesized expression +# +# (10 + 34) +# ^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#12702 +class Prism::ParenthesesNode < ::Prism::Node + # def initialize: (body: Node?, opening_loc: Location, closing_loc: Location, location: Location) -> void + # + # @return [ParenthesesNode] a new instance of ParenthesesNode + # + # source://prism//lib/prism/node.rb#12712 + sig do + params( + body: T.nilable(Prism::Node), + opening_loc: Prism::Location, + closing_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(body, opening_loc, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#12720 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # attr_reader body: Node? + # + # source://prism//lib/prism/node.rb#12703 + sig { returns(T.nilable(Prism::Node)) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12729 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#12769 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#12709 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12741 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12734 + def compact_child_nodes; end + + # def copy: (**params) -> ParenthesesNode + # + # source://prism//lib/prism/node.rb#12746 + sig { params(params: T.untyped).returns(Prism::ParenthesesNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12729 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#12759 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#12774 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#12764 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#12706 + sig { returns(Prism::Location) } + def opening_loc; end + + # source://prism//lib/prism/node.rb#12724 + def set_newline_flag(newline_marked); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12801 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12811 + def type; end + end +end + +# This represents an error that was encountered during parsing. +# +# source://prism//lib/prism/parse_result.rb#317 +class Prism::ParseError + # Create a new error object with the given message and location. + # + # @return [ParseError] a new instance of ParseError + # + # source://prism//lib/prism/parse_result.rb#325 + def initialize(message, location); end + + # Implement the hash pattern matching interface for ParseError. + # + # source://prism//lib/prism/parse_result.rb#331 + def deconstruct_keys(keys); end + + # Returns a string representation of this error. + # + # source://prism//lib/prism/parse_result.rb#336 + def inspect; end + + # A Location object representing the location of this error in the source. + # + # source://prism//lib/prism/parse_result.rb#322 + sig { returns(Prism::Location) } + def location; end + + # The message associated with this error. + # + # source://prism//lib/prism/parse_result.rb#319 + sig { returns(String) } + def message; end +end + +# This represents the result of a call to ::parse or ::parse_file. It contains +# the AST, any comments that were encounters, and any errors that were +# encountered. +# +# source://prism//lib/prism/parse_result.rb#369 +class Prism::ParseResult + # Create a new parse result object with the given values. + # + # @return [ParseResult] a new instance of ParseResult + # + # source://prism//lib/prism/parse_result.rb#391 + def initialize(value, comments, magic_comments, errors, warnings, source); end + + # Attach the list of comments to their respective locations in the tree. + # + # source://prism//lib/prism/parse_result/comments.rb#173 + def attach_comments!; end + + # The list of comments that were encountered during parsing. + # + # source://prism//lib/prism/parse_result.rb#376 + sig { returns(T::Array[Prism::Comment]) } + def comments; end + + # Implement the hash pattern matching interface for ParseResult. + # + # source://prism//lib/prism/parse_result.rb#401 + def deconstruct_keys(keys); end + + # The list of errors that were generated during parsing. + # + # source://prism//lib/prism/parse_result.rb#382 + sig { returns(T::Array[Prism::ParseError]) } + def errors; end + + # Returns true if there were errors during parsing and false if there were + # not. + # + # @return [Boolean] + # + # source://prism//lib/prism/parse_result.rb#413 + def failure?; end + + # The list of magic comments that were encountered during parsing. + # + # source://prism//lib/prism/parse_result.rb#379 + def magic_comments; end + + # Walk the tree and mark nodes that are on a new line. + # + # source://prism//lib/prism/parse_result/newlines.rb#60 + def mark_newlines!; end + + # A Source instance that represents the source code that was parsed. + # + # source://prism//lib/prism/parse_result.rb#388 + sig { returns(Prism::Source) } + def source; end + + # Returns true if there were no errors during parsing and false if there + # were. + # + # @return [Boolean] + # + # source://prism//lib/prism/parse_result.rb#407 + def success?; end + + # The value that was generated by parsing. Normally this holds the AST, but + # it can sometimes how a list of tokens or other results passed back from + # the parser. + # + # source://prism//lib/prism/parse_result.rb#373 + sig { returns(Prism::ProgramNode) } + def value; end + + # The list of warnings that were generated during parsing. + # + # source://prism//lib/prism/parse_result.rb#385 + sig { returns(T::Array[Prism::ParseWarning]) } + def warnings; end +end + +# When we've parsed the source, we have both the syntax tree and the list of +# comments that we found in the source. This class is responsible for +# walking the tree and finding the nearest location to attach each comment. +# +# It does this by first finding the nearest locations to each comment. +# Locations can either come from nodes directly or from location fields on +# nodes. For example, a `ClassNode` has an overall location encompassing the +# entire class, but it also has a location for the `class` keyword. +# +# Once the nearest locations are found, it determines which one to attach +# to. If it's a trailing comment (a comment on the same line as other source +# code), it will favor attaching to the nearest location that occurs before +# the comment. Otherwise it will favor attaching to the nearest location +# that is after the comment. +# +# source://prism//lib/prism/parse_result/comments.rb#19 +class Prism::ParseResult::Comments + # Create a new Comments object that will attach comments to the given + # parse result. + # + # @return [Comments] a new instance of Comments + # + # source://prism//lib/prism/parse_result/comments.rb#78 + def initialize(parse_result); end + + # Attach the comments to their respective locations in the tree by + # mutating the parse result. + # + # source://prism//lib/prism/parse_result/comments.rb#84 + def attach!; end + + # The parse result that we are attaching comments to. + # + # source://prism//lib/prism/parse_result/comments.rb#74 + def parse_result; end + + private + + # Responsible for finding the nearest targets to the given comment within + # the context of the given encapsulating node. + # + # source://prism//lib/prism/parse_result/comments.rb#103 + def nearest_targets(node, comment); end +end + +# A target for attaching comments that is based on a location field on a +# node. For example, the `end` token of a ClassNode. +# +# source://prism//lib/prism/parse_result/comments.rb#49 +class Prism::ParseResult::Comments::LocationTarget + # @return [LocationTarget] a new instance of LocationTarget + # + # source://prism//lib/prism/parse_result/comments.rb#52 + def initialize(location); end + + # source://prism//lib/prism/parse_result/comments.rb#68 + def <<(comment); end + + # @return [Boolean] + # + # source://prism//lib/prism/parse_result/comments.rb#64 + def encloses?(comment); end + + # source://prism//lib/prism/parse_result/comments.rb#60 + def end_offset; end + + # source://prism//lib/prism/parse_result/comments.rb#50 + def location; end + + # source://prism//lib/prism/parse_result/comments.rb#56 + def start_offset; end +end + +# A target for attaching comments that is based on a specific node's +# location. +# +# source://prism//lib/prism/parse_result/comments.rb#22 +class Prism::ParseResult::Comments::NodeTarget + # @return [NodeTarget] a new instance of NodeTarget + # + # source://prism//lib/prism/parse_result/comments.rb#25 + def initialize(node); end + + # source://prism//lib/prism/parse_result/comments.rb#42 + def <<(comment); end + + # @return [Boolean] + # + # source://prism//lib/prism/parse_result/comments.rb#37 + def encloses?(comment); end + + # source://prism//lib/prism/parse_result/comments.rb#33 + def end_offset; end + + # source://prism//lib/prism/parse_result/comments.rb#23 + def node; end + + # source://prism//lib/prism/parse_result/comments.rb#29 + def start_offset; 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. +# +# source://prism//lib/prism/parse_result/newlines.rb#21 +class Prism::ParseResult::Newlines < ::Prism::Visitor + # Create a new Newlines visitor with the given newline offsets. + # + # @return [Newlines] a new instance of Newlines + # + # source://prism//lib/prism/parse_result/newlines.rb#22 + def initialize(newline_marked); end + + # Permit block/lambda nodes to mark newlines within themselves. + # + # source://prism//lib/prism/parse_result/newlines.rb#27 + def visit_block_node(node); end + + # Mark if/unless nodes as newlines. + # + # source://prism//lib/prism/parse_result/newlines.rb#41 + def visit_if_node(node); end + + # Permit block/lambda nodes to mark newlines within themselves. + # + # source://prism//lib/prism/parse_result/newlines.rb#27 + def visit_lambda_node(node); end + + # Permit statements lists to mark newlines within themselves. + # + # source://prism//lib/prism/parse_result/newlines.rb#49 + def visit_statements_node(node); end + + # Mark if/unless nodes as newlines. + # + # source://prism//lib/prism/parse_result/newlines.rb#41 + def visit_unless_node(node); end +end + +# This represents a warning that was encountered during parsing. +# +# source://prism//lib/prism/parse_result.rb#342 +class Prism::ParseWarning + # Create a new warning object with the given message and location. + # + # @return [ParseWarning] a new instance of ParseWarning + # + # source://prism//lib/prism/parse_result.rb#350 + def initialize(message, location); end + + # Implement the hash pattern matching interface for ParseWarning. + # + # source://prism//lib/prism/parse_result.rb#356 + def deconstruct_keys(keys); end + + # Returns a string representation of this warning. + # + # source://prism//lib/prism/parse_result.rb#361 + def inspect; end + + # A Location object representing the location of this warning in the source. + # + # source://prism//lib/prism/parse_result.rb#347 + sig { returns(Prism::Location) } + def location; end + + # The message associated with this warning. + # + # source://prism//lib/prism/parse_result.rb#344 + sig { returns(String) } + def message; end +end + +# A pattern is an object that wraps a Ruby pattern matching expression. The +# expression would normally be passed to an `in` clause within a `case` +# expression or a rightward assignment expression. For example, in the +# following snippet: +# +# case node +# in ConstantPathNode[ConstantReadNode[name: :Prism], ConstantReadNode[name: :Pattern]] +# end +# +# the pattern is the ConstantPathNode[...] expression. +# +# The pattern gets compiled into an object that responds to #call by running +# the #compile method. This method itself will run back through Prism to +# parse the expression into a tree, then walk the tree to generate the +# necessary callable objects. For example, if you wanted to compile the +# expression above into a callable, you would: +# +# callable = Prism::Pattern.new("ConstantPathNode[ConstantReadNode[name: :Prism], ConstantReadNode[name: :Pattern]]").compile +# callable.call(node) +# +# The callable object returned by #compile is guaranteed to respond to #call +# with a single argument, which is the node to match against. It also is +# guaranteed to respond to #===, which means it itself can be used in a `case` +# expression, as in: +# +# case node +# when callable +# end +# +# If the query given to the initializer cannot be compiled into a valid +# matcher (either because of a syntax error or because it is using syntax we +# do not yet support) then a Prism::Pattern::CompilationError will be +# raised. +# +# source://prism//lib/prism/pattern.rb#37 +class Prism::Pattern + # Create a new pattern with the given query. The query should be a string + # containing a Ruby pattern matching expression. + # + # @return [Pattern] a new instance of Pattern + # + # source://prism//lib/prism/pattern.rb#63 + def initialize(query); end + + # Compile the query into a callable object that can be used to match against + # nodes. + # + # source://prism//lib/prism/pattern.rb#70 + def compile; end + + # The query that this pattern was initialized with. + # + # source://prism//lib/prism/pattern.rb#59 + def query; end + + # Scan the given node and all of its children for nodes that match the + # pattern. If a block is given, it will be called with each node that + # matches the pattern. If no block is given, an enumerator will be returned + # that will yield each node that matches the pattern. + # + # source://prism//lib/prism/pattern.rb#79 + def scan(root); end + + private + + # Shortcut for combining two procs into one that returns true if both return + # true. + # + # source://prism//lib/prism/pattern.rb#95 + def combine_and(left, right); end + + # Shortcut for combining two procs into one that returns true if either + # returns true. + # + # source://prism//lib/prism/pattern.rb#101 + def combine_or(left, right); end + + # in foo | bar + # + # source://prism//lib/prism/pattern.rb#136 + def compile_alternation_pattern_node(node); end + + # in [foo, bar, baz] + # + # source://prism//lib/prism/pattern.rb#111 + def compile_array_pattern_node(node); end + + # in Prism::ConstantReadNode + # + # source://prism//lib/prism/pattern.rb#141 + def compile_constant_path_node(node); end + + # in ConstantReadNode + # in String + # + # source://prism//lib/prism/pattern.rb#153 + def compile_constant_read_node(node); end + + # Raise an error because the given node is not supported. + # + # @raise [CompilationError] + # + # source://prism//lib/prism/pattern.rb#106 + def compile_error(node); end + + # in InstanceVariableReadNode[name: Symbol] + # in { name: Symbol } + # + # source://prism//lib/prism/pattern.rb#171 + def compile_hash_pattern_node(node); end + + # in nil + # + # source://prism//lib/prism/pattern.rb#196 + def compile_nil_node(node); end + + # Compile any kind of node. Dispatch out to the individual compilation + # methods based on the type of node. + # + # source://prism//lib/prism/pattern.rb#225 + def compile_node(node); end + + # in /foo/ + # + # source://prism//lib/prism/pattern.rb#201 + def compile_regular_expression_node(node); end + + # in "" + # in "foo" + # + # source://prism//lib/prism/pattern.rb#209 + def compile_string_node(node); end + + # in :+ + # in :foo + # + # source://prism//lib/prism/pattern.rb#217 + def compile_symbol_node(node); end +end + +# Raised when the query given to a pattern is either invalid Ruby syntax or +# is using syntax that we don't yet support. +# +# source://prism//lib/prism/pattern.rb#42 +class Prism::Pattern::CompilationError < ::StandardError + # Create a new CompilationError with the given representation of the node + # that caused the error. + # + # @return [CompilationError] a new instance of CompilationError + # + # source://prism//lib/prism/pattern.rb#43 + def initialize(repr); end +end + +# Represents the use of the `^` operator for pinning an expression in a +# pattern matching expression. +# +# foo in ^(bar) +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#12822 +class Prism::PinnedExpressionNode < ::Prism::Node + # def initialize: (expression: Node, operator_loc: Location, lparen_loc: Location, rparen_loc: Location, location: Location) -> void + # + # @return [PinnedExpressionNode] a new instance of PinnedExpressionNode + # + # source://prism//lib/prism/node.rb#12835 + sig do + params( + expression: Prism::Node, + operator_loc: Prism::Location, + lparen_loc: Prism::Location, + rparen_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(expression, operator_loc, lparen_loc, rparen_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#12844 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12849 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12859 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12854 + def compact_child_nodes; end + + # def copy: (**params) -> PinnedExpressionNode + # + # source://prism//lib/prism/node.rb#12864 + sig { params(params: T.untyped).returns(Prism::PinnedExpressionNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12849 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#12878 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # attr_reader expression: Node + # + # source://prism//lib/prism/node.rb#12823 + sig { returns(Prism::Node) } + def expression; end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#12898 + def inspect(inspector = T.unsafe(nil)); end + + # def lparen: () -> String + # + # source://prism//lib/prism/node.rb#12888 + sig { returns(String) } + def lparen; end + + # attr_reader lparen_loc: Location + # + # source://prism//lib/prism/node.rb#12829 + sig { returns(Prism::Location) } + def lparen_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#12883 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#12826 + sig { returns(Prism::Location) } + def operator_loc; end + + # def rparen: () -> String + # + # source://prism//lib/prism/node.rb#12893 + sig { returns(String) } + def rparen; end + + # attr_reader rparen_loc: Location + # + # source://prism//lib/prism/node.rb#12832 + sig { returns(Prism::Location) } + def rparen_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12922 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12932 + def type; end + end +end + +# Represents the use of the `^` operator for pinning a variable in a pattern +# matching expression. +# +# foo in ^bar +# ^^^^ +# +# source://prism//lib/prism/node.rb#12943 +class Prism::PinnedVariableNode < ::Prism::Node + # def initialize: (variable: Node, operator_loc: Location, location: Location) -> void + # + # @return [PinnedVariableNode] a new instance of PinnedVariableNode + # + # source://prism//lib/prism/node.rb#12950 + sig { params(variable: Prism::Node, operator_loc: Prism::Location, location: Prism::Location).void } + def initialize(variable, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#12957 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12962 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12972 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12967 + def compact_child_nodes; end + + # def copy: (**params) -> PinnedVariableNode + # + # source://prism//lib/prism/node.rb#12977 + sig { params(params: T.untyped).returns(Prism::PinnedVariableNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12962 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#12989 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#12999 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#12994 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#12947 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13021 + def type; end + + # attr_reader variable: Node + # + # source://prism//lib/prism/node.rb#12944 + sig { returns(Prism::Node) } + def variable; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13031 + def type; end + end +end + +# Represents the use of the `END` keyword. +# +# END { foo } +# ^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#13041 +class Prism::PostExecutionNode < ::Prism::Node + # def initialize: (statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location, location: Location) -> void + # + # @return [PostExecutionNode] a new instance of PostExecutionNode + # + # source://prism//lib/prism/node.rb#13054 + sig do + params( + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(statements, keyword_loc, opening_loc, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#13063 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13068 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#13114 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#13051 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13080 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13073 + def compact_child_nodes; end + + # def copy: (**params) -> PostExecutionNode + # + # source://prism//lib/prism/node.rb#13085 + sig { params(params: T.untyped).returns(Prism::PostExecutionNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13068 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#13099 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#13119 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#13104 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#13045 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#13109 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#13048 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#13042 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13147 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13157 + def type; end + end +end + +# Represents the use of the `BEGIN` keyword. +# +# BEGIN { foo } +# ^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#13167 +class Prism::PreExecutionNode < ::Prism::Node + # def initialize: (statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location, location: Location) -> void + # + # @return [PreExecutionNode] a new instance of PreExecutionNode + # + # source://prism//lib/prism/node.rb#13180 + sig do + params( + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(statements, keyword_loc, opening_loc, closing_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#13189 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13194 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#13240 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#13177 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13206 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13199 + def compact_child_nodes; end + + # def copy: (**params) -> PreExecutionNode + # + # source://prism//lib/prism/node.rb#13211 + sig { params(params: T.untyped).returns(Prism::PreExecutionNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13194 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#13225 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#13245 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#13230 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#13171 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#13235 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#13174 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#13168 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13273 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13283 + def type; end + end +end + +# The top level node of any parse tree. +# +# source://prism//lib/prism/node.rb#13290 +class Prism::ProgramNode < ::Prism::Node + # def initialize: (locals: Array[Symbol], statements: StatementsNode, location: Location) -> void + # + # @return [ProgramNode] a new instance of ProgramNode + # + # source://prism//lib/prism/node.rb#13297 + sig { params(locals: T::Array[Symbol], statements: Prism::StatementsNode, location: Prism::Location).void } + def initialize(locals, statements, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#13304 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13309 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13319 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13314 + def compact_child_nodes; end + + # def copy: (**params) -> ProgramNode + # + # source://prism//lib/prism/node.rb#13324 + sig { params(params: T.untyped).returns(Prism::ProgramNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13309 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#13336 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#13341 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#13291 + sig { returns(T::Array[Symbol]) } + def locals; end + + # attr_reader statements: StatementsNode + # + # source://prism//lib/prism/node.rb#13294 + sig { returns(Prism::StatementsNode) } + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13363 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13373 + def type; end + end +end + +# Flags for range and flip-flop nodes. +# +# source://prism//lib/prism/node.rb#16641 +module Prism::RangeFlags; end + +# ... operator +# +# source://prism//lib/prism/node.rb#16643 +Prism::RangeFlags::EXCLUDE_END = T.let(T.unsafe(nil), Integer) + +# Represents the use of the `..` or `...` operators. +# +# 1..2 +# ^^^^ +# +# c if a =~ /left/ ... b =~ /right/ +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#13386 +class Prism::RangeNode < ::Prism::Node + # def initialize: (left: Node?, right: Node?, operator_loc: Location, flags: Integer, location: Location) -> void + # + # @return [RangeNode] a new instance of RangeNode + # + # source://prism//lib/prism/node.rb#13399 + sig do + params( + left: T.nilable(Prism::Node), + right: T.nilable(Prism::Node), + operator_loc: Prism::Location, + flags: Integer, + location: Prism::Location + ).void + end + def initialize(left, right, operator_loc, flags, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#13408 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13413 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13426 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13418 + def compact_child_nodes; end + + # def copy: (**params) -> RangeNode + # + # source://prism//lib/prism/node.rb#13431 + sig { params(params: T.untyped).returns(Prism::RangeNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13413 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#13445 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def exclude_end?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13455 + sig { returns(T::Boolean) } + def exclude_end?; end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#13460 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader left: Node? + # + # source://prism//lib/prism/node.rb#13387 + sig { returns(T.nilable(Prism::Node)) } + def left; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#13450 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#13393 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader right: Node? + # + # source://prism//lib/prism/node.rb#13390 + sig { returns(T.nilable(Prism::Node)) } + def right; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13494 + def type; end + + private + + # Returns the value of attribute flags. + # + # source://prism//lib/prism/node.rb#13396 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13504 + def type; end + end +end + +# Represents a rational number literal. +# +# 1.0r +# ^^^^ +# +# source://prism//lib/prism/node.rb#13514 +class Prism::RationalNode < ::Prism::Node + # def initialize: (numeric: Node, location: Location) -> void + # + # @return [RationalNode] a new instance of RationalNode + # + # source://prism//lib/prism/node.rb#13518 + sig { params(numeric: Prism::Node, location: Prism::Location).void } + def initialize(numeric, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#13524 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13529 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13539 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13534 + def compact_child_nodes; end + + # def copy: (**params) -> RationalNode + # + # source://prism//lib/prism/node.rb#13544 + sig { params(params: T.untyped).returns(Prism::RationalNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13529 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#13555 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#13560 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader numeric: Node + # + # source://prism//lib/prism/node.rb#13515 + sig { returns(Prism::Node) } + def numeric; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13581 + def type; end + + # Returns the value of the node as a Ruby Rational. + # + # source://prism//lib/prism/node_ext.rb#54 + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13591 + def type; end + end +end + +# Represents the use of the `redo` keyword. +# +# redo +# ^^^^ +# +# source://prism//lib/prism/node.rb#13601 +class Prism::RedoNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [RedoNode] a new instance of RedoNode + # + # source://prism//lib/prism/node.rb#13602 + sig { params(location: Prism::Location).void } + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#13607 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13612 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13622 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13617 + def compact_child_nodes; end + + # def copy: (**params) -> RedoNode + # + # source://prism//lib/prism/node.rb#13627 + sig { params(params: T.untyped).returns(Prism::RedoNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13612 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#13637 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#13642 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13661 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13671 + def type; end + end +end + +# Flags for regular expression and match last line nodes. +# +# source://prism//lib/prism/node.rb#16647 +module Prism::RegularExpressionFlags; end + +# n - forces the ASCII-8BIT encoding +# +# source://prism//lib/prism/node.rb#16664 +Prism::RegularExpressionFlags::ASCII_8BIT = T.let(T.unsafe(nil), Integer) + +# e - forces the EUC-JP encoding +# +# source://prism//lib/prism/node.rb#16661 +Prism::RegularExpressionFlags::EUC_JP = T.let(T.unsafe(nil), Integer) + +# x - ignores whitespace and allows comments in regular expressions +# +# source://prism//lib/prism/node.rb#16652 +Prism::RegularExpressionFlags::EXTENDED = T.let(T.unsafe(nil), Integer) + +# i - ignores the case of characters when matching +# +# source://prism//lib/prism/node.rb#16649 +Prism::RegularExpressionFlags::IGNORE_CASE = T.let(T.unsafe(nil), Integer) + +# m - allows $ to match the end of lines within strings +# +# source://prism//lib/prism/node.rb#16655 +Prism::RegularExpressionFlags::MULTI_LINE = T.let(T.unsafe(nil), Integer) + +# o - only interpolates values into the regular expression once +# +# source://prism//lib/prism/node.rb#16658 +Prism::RegularExpressionFlags::ONCE = T.let(T.unsafe(nil), Integer) + +# u - forces the UTF-8 encoding +# +# source://prism//lib/prism/node.rb#16670 +Prism::RegularExpressionFlags::UTF_8 = T.let(T.unsafe(nil), Integer) + +# s - forces the Windows-31J encoding +# +# source://prism//lib/prism/node.rb#16667 +Prism::RegularExpressionFlags::WINDOWS_31J = T.let(T.unsafe(nil), Integer) + +# Represents a regular expression literal with no interpolation. +# +# /foo/i +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#13681 +class Prism::RegularExpressionNode < ::Prism::Node + include ::Prism::RegularExpressionOptions + + # def initialize: (opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, flags: Integer, location: Location) -> void + # + # @return [RegularExpressionNode] a new instance of RegularExpressionNode + # + # source://prism//lib/prism/node.rb#13697 + sig do + params( + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String, + flags: Integer, + location: Prism::Location + ).void + end + def initialize(opening_loc, content_loc, closing_loc, unescaped, flags, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#13707 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def ascii_8bit?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13787 + sig { returns(T::Boolean) } + def ascii_8bit?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13712 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#13757 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#13688 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13722 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13717 + def compact_child_nodes; end + + # def content: () -> String + # + # source://prism//lib/prism/node.rb#13752 + sig { returns(String) } + def content; end + + # attr_reader content_loc: Location + # + # source://prism//lib/prism/node.rb#13685 + sig { returns(Prism::Location) } + def content_loc; end + + # def copy: (**params) -> RegularExpressionNode + # + # source://prism//lib/prism/node.rb#13727 + sig { params(params: T.untyped).returns(Prism::RegularExpressionNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13712 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#13742 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def euc_jp?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13782 + sig { returns(T::Boolean) } + def euc_jp?; end + + # def extended?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13767 + sig { returns(T::Boolean) } + def extended?; end + + # def ignore_case?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13762 + sig { returns(T::Boolean) } + def ignore_case?; end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#13802 + def inspect(inspector = T.unsafe(nil)); end + + # def multi_line?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13772 + sig { returns(T::Boolean) } + def multi_line?; end + + # def once?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13777 + sig { returns(T::Boolean) } + def once?; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#13747 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#13682 + sig { returns(Prism::Location) } + def opening_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13827 + def type; end + + # attr_reader unescaped: String + # + # source://prism//lib/prism/node.rb#13691 + sig { returns(String) } + def unescaped; end + + # def utf_8?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13797 + sig { returns(T::Boolean) } + def utf_8?; end + + # def windows_31j?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13792 + sig { returns(T::Boolean) } + def windows_31j?; end + + private + + # Returns the value of attribute flags. + # + # source://prism//lib/prism/node.rb#13694 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13837 + def type; end + end +end + +# source://prism//lib/prism/node_ext.rb#6 +module Prism::RegularExpressionOptions + # Returns a numeric value that represents the flags that were used to create + # the regular expression. + # + # source://prism//lib/prism/node_ext.rb#9 + def options; end +end + +# Represents a required keyword parameter to a method, block, or lambda definition. +# +# def a(b: ) +# ^^ +# end +# +# source://prism//lib/prism/node.rb#13848 +class Prism::RequiredKeywordParameterNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, location: Location) -> void + # + # @return [RequiredKeywordParameterNode] a new instance of RequiredKeywordParameterNode + # + # source://prism//lib/prism/node.rb#13855 + sig { params(name: Symbol, name_loc: Prism::Location, location: Prism::Location).void } + def initialize(name, name_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#13862 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13867 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13877 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13872 + def compact_child_nodes; end + + # def copy: (**params) -> RequiredKeywordParameterNode + # + # source://prism//lib/prism/node.rb#13882 + sig { params(params: T.untyped).returns(Prism::RequiredKeywordParameterNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13867 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#13894 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#13899 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#13849 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#13852 + sig { returns(Prism::Location) } + def name_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13920 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13930 + def type; end + end +end + +# Represents a required parameter to a method, block, or lambda definition. +# +# def a(b) +# ^ +# end +# +# source://prism//lib/prism/node.rb#13941 +class Prism::RequiredParameterNode < ::Prism::Node + # def initialize: (name: Symbol, location: Location) -> void + # + # @return [RequiredParameterNode] a new instance of RequiredParameterNode + # + # source://prism//lib/prism/node.rb#13945 + sig { params(name: Symbol, location: Prism::Location).void } + def initialize(name, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#13951 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13956 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13966 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13961 + def compact_child_nodes; end + + # def copy: (**params) -> RequiredParameterNode + # + # source://prism//lib/prism/node.rb#13971 + sig { params(params: T.untyped).returns(Prism::RequiredParameterNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13956 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#13982 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#13987 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#13942 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14007 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14017 + def type; end + end +end + +# Represents an expression modified with a rescue. +# +# foo rescue nil +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#14027 +class Prism::RescueModifierNode < ::Prism::Node + # def initialize: (expression: Node, keyword_loc: Location, rescue_expression: Node, location: Location) -> void + # + # @return [RescueModifierNode] a new instance of RescueModifierNode + # + # source://prism//lib/prism/node.rb#14037 + sig do + params( + expression: Prism::Node, + keyword_loc: Prism::Location, + rescue_expression: Prism::Node, + location: Prism::Location + ).void + end + def initialize(expression, keyword_loc, rescue_expression, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#14045 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14054 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14064 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14059 + def compact_child_nodes; end + + # def copy: (**params) -> RescueModifierNode + # + # source://prism//lib/prism/node.rb#14069 + sig { params(params: T.untyped).returns(Prism::RescueModifierNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14054 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#14082 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # attr_reader expression: Node + # + # source://prism//lib/prism/node.rb#14028 + sig { returns(Prism::Node) } + def expression; end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#14092 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#14087 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#14031 + sig { returns(Prism::Location) } + def keyword_loc; end + + # attr_reader rescue_expression: Node + # + # source://prism//lib/prism/node.rb#14034 + sig { returns(Prism::Node) } + def rescue_expression; end + + # source://prism//lib/prism/node.rb#14049 + def set_newline_flag(newline_marked); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14116 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14126 + def type; end + end +end + +# Represents a rescue statement. +# +# begin +# rescue Foo, *splat, Bar => ex +# foo +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +# end +# +# `Foo, *splat, Bar` are in the `exceptions` field. +# `ex` is in the `exception` field. +# +# source://prism//lib/prism/node.rb#14142 +class Prism::RescueNode < ::Prism::Node + # def initialize: (keyword_loc: Location, exceptions: Array[Node], operator_loc: Location?, reference: Node?, statements: StatementsNode?, consequent: RescueNode?, location: Location) -> void + # + # @return [RescueNode] a new instance of RescueNode + # + # source://prism//lib/prism/node.rb#14161 + sig do + params( + keyword_loc: Prism::Location, + exceptions: T::Array[Prism::Node], + operator_loc: T.nilable(Prism::Location), + reference: T.nilable(Prism::Node), + statements: T.nilable(Prism::StatementsNode), + consequent: T.nilable(Prism::RescueNode), + location: Prism::Location + ).void + end + def initialize(keyword_loc, exceptions, operator_loc, reference, statements, consequent, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#14172 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14177 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14192 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14182 + def compact_child_nodes; end + + # attr_reader consequent: RescueNode? + # + # source://prism//lib/prism/node.rb#14158 + sig { returns(T.nilable(Prism::RescueNode)) } + def consequent; end + + # def copy: (**params) -> RescueNode + # + # source://prism//lib/prism/node.rb#14197 + sig { params(params: T.untyped).returns(Prism::RescueNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14177 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#14213 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # attr_reader exceptions: Array[Node] + # + # source://prism//lib/prism/node.rb#14146 + sig { returns(T::Array[Prism::Node]) } + def exceptions; end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#14228 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#14218 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#14143 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def operator: () -> String? + # + # source://prism//lib/prism/node.rb#14223 + sig { returns(T.nilable(String)) } + def operator; end + + # attr_reader operator_loc: Location? + # + # source://prism//lib/prism/node.rb#14149 + sig { returns(T.nilable(Prism::Location)) } + def operator_loc; end + + # attr_reader reference: Node? + # + # source://prism//lib/prism/node.rb#14152 + sig { returns(T.nilable(Prism::Node)) } + def reference; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#14155 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14268 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14278 + def type; end + end +end + +# Represents a rest parameter to a method, block, or lambda definition. +# +# def a(*b) +# ^^ +# end +# +# source://prism//lib/prism/node.rb#14289 +class Prism::RestParameterNode < ::Prism::Node + # def initialize: (name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location) -> void + # + # @return [RestParameterNode] a new instance of RestParameterNode + # + # source://prism//lib/prism/node.rb#14299 + sig do + params( + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(name, name_loc, operator_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#14307 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14312 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14322 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14317 + def compact_child_nodes; end + + # def copy: (**params) -> RestParameterNode + # + # source://prism//lib/prism/node.rb#14327 + sig { params(params: T.untyped).returns(Prism::RestParameterNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14312 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#14340 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#14350 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol? + # + # source://prism//lib/prism/node.rb#14290 + sig { returns(T.nilable(Symbol)) } + def name; end + + # attr_reader name_loc: Location? + # + # source://prism//lib/prism/node.rb#14293 + sig { returns(T.nilable(Prism::Location)) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#14345 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#14296 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14376 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14386 + def type; end + end +end + +# Represents the use of the `retry` keyword. +# +# retry +# ^^^^^ +# +# source://prism//lib/prism/node.rb#14396 +class Prism::RetryNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [RetryNode] a new instance of RetryNode + # + # source://prism//lib/prism/node.rb#14397 + sig { params(location: Prism::Location).void } + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#14402 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14407 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14417 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14412 + def compact_child_nodes; end + + # def copy: (**params) -> RetryNode + # + # source://prism//lib/prism/node.rb#14422 + sig { params(params: T.untyped).returns(Prism::RetryNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14407 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#14432 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#14437 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14456 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14466 + def type; end + end +end + +# Represents the use of the `return` keyword. +# +# return 1 +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#14476 +class Prism::ReturnNode < ::Prism::Node + # def initialize: (keyword_loc: Location, arguments: ArgumentsNode?, location: Location) -> void + # + # @return [ReturnNode] a new instance of ReturnNode + # + # source://prism//lib/prism/node.rb#14483 + sig do + params( + keyword_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + location: Prism::Location + ).void + end + def initialize(keyword_loc, arguments, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#14490 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#14480 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14495 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14507 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14500 + def compact_child_nodes; end + + # def copy: (**params) -> ReturnNode + # + # source://prism//lib/prism/node.rb#14512 + sig { params(params: T.untyped).returns(Prism::ReturnNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14495 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#14524 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#14534 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#14529 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#14477 + sig { returns(Prism::Location) } + def keyword_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14560 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14570 + def type; end + end +end + +# This class is meant to provide 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. +# +# This class is going to necessarily be slower than the native Ripper API. It +# is meant as a stopgap until developers migrate to using prism. It is also +# meant as a test harness for the prism parser. +# +# source://prism//lib/prism/ripper_compat.rb#13 +class Prism::RipperCompat + # Create a new RipperCompat object with the given source. + # + # @return [RipperCompat] a new instance of RipperCompat + # + # source://prism//lib/prism/ripper_compat.rb#67 + def initialize(source); end + + # The current column number of the parser. + # + # source://prism//lib/prism/ripper_compat.rb#64 + def column; end + + # True if the parser encountered an error during parsing. + # + # @return [Boolean] + # + # source://prism//lib/prism/ripper_compat.rb#79 + def error?; end + + # The current line number of the parser. + # + # source://prism//lib/prism/ripper_compat.rb#61 + def lineno; end + + # Parse the source and return the result. + # + # source://prism//lib/prism/ripper_compat.rb#84 + def parse; end + + # The source that is being parsed. + # + # source://prism//lib/prism/ripper_compat.rb#58 + def source; end + + # This method is responsible for dispatching to the correct visitor method + # based on the type of the node. + # + # source://prism//lib/prism/ripper_compat.rb#94 + def visit(node); end + + # Visit a CallNode node. + # + # source://prism//lib/prism/ripper_compat.rb#99 + def visit_call_node(node); end + + # Visit an IntegerNode node. + # + # source://prism//lib/prism/ripper_compat.rb#114 + def visit_integer_node(node); end + + # Visit a ProgramNode node. + # + # source://prism//lib/prism/ripper_compat.rb#142 + def visit_program_node(node); end + + # Visit a StatementsNode node. + # + # source://prism//lib/prism/ripper_compat.rb#120 + def visit_statements_node(node); end + + # Visit a token found during parsing. + # + # source://prism//lib/prism/ripper_compat.rb#128 + def visit_token(node); end + + private + + # source://prism//lib/prism/ripper_compat.rb#180 + def _dispatch0; end + + # source://prism//lib/prism/ripper_compat.rb#181 + def _dispatch1(_); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def _dispatch2(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#183 + def _dispatch3(_, _, _); end + + # source://prism//lib/prism/ripper_compat.rb#184 + def _dispatch4(_, _, _, _); end + + # source://prism//lib/prism/ripper_compat.rb#185 + def _dispatch5(_, _, _, _, _); end + + # source://prism//lib/prism/ripper_compat.rb#186 + def _dispatch7(_, _, _, _, _, _, _); end + + # This method is responsible for updating lineno and column information + # to reflect the current node. + # + # This method could be drastically improved with some caching on the start + # of every line, but for now it's good enough. + # + # source://prism//lib/prism/ripper_compat.rb#168 + def bounds(location); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_BEGIN(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_CHAR(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_END(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on___end__(_); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_alias(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_alias_error(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_aref(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_aref_field(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_arg_ambiguous(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_arg_paren(_); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_args_add(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_args_add_block(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_args_add_star(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#180 + def on_args_forward; end + + # source://prism//lib/prism/ripper_compat.rb#180 + def on_args_new; end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_array(_); end + + # source://prism//lib/prism/ripper_compat.rb#184 + def on_aryptn(_, _, _, _); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_assign(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_assign_error(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_assoc_new(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_assoc_splat(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_assoclist_from_args(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_backref(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_backtick(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_bare_assoc_hash(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_begin(_); end + + # source://prism//lib/prism/ripper_compat.rb#183 + def on_binary(_, _, _); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_block_var(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_blockarg(_); end + + # source://prism//lib/prism/ripper_compat.rb#184 + def on_bodystmt(_, _, _, _); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_brace_block(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_break(_); end + + # source://prism//lib/prism/ripper_compat.rb#183 + def on_call(_, _, _); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_case(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#183 + def on_class(_, _, _); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_class_name_error(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_comma(_); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_command(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#184 + def on_command_call(_, _, _, _); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_comment(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_const(_); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_const_path_field(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_const_path_ref(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_const_ref(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_cvar(_); end + + # source://prism//lib/prism/ripper_compat.rb#183 + def on_def(_, _, _); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_defined(_); end + + # source://prism//lib/prism/ripper_compat.rb#185 + def on_defs(_, _, _, _, _); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_do_block(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_dot2(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_dot3(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_dyna_symbol(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_else(_); end + + # source://prism//lib/prism/ripper_compat.rb#183 + def on_elsif(_, _, _); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_embdoc(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_embdoc_beg(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_embdoc_end(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_embexpr_beg(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_embexpr_end(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_embvar(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_ensure(_); end + + # source://prism//lib/prism/ripper_compat.rb#180 + def on_excessed_comma; end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_fcall(_); end + + # source://prism//lib/prism/ripper_compat.rb#183 + def on_field(_, _, _); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_float(_); end + + # source://prism//lib/prism/ripper_compat.rb#184 + def on_fndptn(_, _, _, _); end + + # source://prism//lib/prism/ripper_compat.rb#183 + def on_for(_, _, _); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_gvar(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_hash(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_heredoc_beg(_); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_heredoc_dedent(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_heredoc_end(_); end + + # source://prism//lib/prism/ripper_compat.rb#183 + def on_hshptn(_, _, _); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_ident(_); end + + # source://prism//lib/prism/ripper_compat.rb#183 + def on_if(_, _, _); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_if_mod(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#183 + def on_ifop(_, _, _); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_ignored_nl(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_ignored_sp(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_imaginary(_); end + + # source://prism//lib/prism/ripper_compat.rb#183 + def on_in(_, _, _); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_int(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_ivar(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_kw(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_kwrest_param(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_label(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_label_end(_); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_lambda(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_lbrace(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_lbracket(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_lparen(_); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_magic_comment(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_massign(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_method_add_arg(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_method_add_block(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_mlhs_add(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_mlhs_add_post(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_mlhs_add_star(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#180 + def on_mlhs_new; end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_mlhs_paren(_); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_module(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_mrhs_add(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_mrhs_add_star(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#180 + def on_mrhs_new; end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_mrhs_new_from_args(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_next(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_nl(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_nokw_param(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_op(_); end + + # source://prism//lib/prism/ripper_compat.rb#183 + def on_opassign(_, _, _); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_operator_ambiguous(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_param_error(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#186 + def on_params(_, _, _, _, _, _, _); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_paren(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_parse_error(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_period(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_program(_); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_qsymbols_add(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_qsymbols_beg(_); end + + # source://prism//lib/prism/ripper_compat.rb#180 + def on_qsymbols_new; end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_qwords_add(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_qwords_beg(_); end + + # source://prism//lib/prism/ripper_compat.rb#180 + def on_qwords_new; end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_rational(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_rbrace(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_rbracket(_); end + + # source://prism//lib/prism/ripper_compat.rb#180 + def on_redo; end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_regexp_add(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_regexp_beg(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_regexp_end(_); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_regexp_literal(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#180 + def on_regexp_new; end + + # source://prism//lib/prism/ripper_compat.rb#184 + def on_rescue(_, _, _, _); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_rescue_mod(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_rest_param(_); end + + # source://prism//lib/prism/ripper_compat.rb#180 + def on_retry; end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_return(_); end + + # source://prism//lib/prism/ripper_compat.rb#180 + def on_return0; end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_rparen(_); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_sclass(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_semicolon(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_sp(_); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_stmts_add(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#180 + def on_stmts_new; end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_string_add(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_string_concat(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#180 + def on_string_content; end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_string_dvar(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_string_embexpr(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_string_literal(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_super(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_symbeg(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_symbol(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_symbol_literal(_); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_symbols_add(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_symbols_beg(_); end + + # source://prism//lib/prism/ripper_compat.rb#180 + def on_symbols_new; end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_tlambda(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_tlambeg(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_top_const_field(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_top_const_ref(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_tstring_beg(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_tstring_content(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_tstring_end(_); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_unary(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_undef(_); end + + # source://prism//lib/prism/ripper_compat.rb#183 + def on_unless(_, _, _); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_unless_mod(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_until(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_until_mod(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_var_alias(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_var_field(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_var_ref(_); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_vcall(_); end + + # source://prism//lib/prism/ripper_compat.rb#180 + def on_void_stmt; end + + # source://prism//lib/prism/ripper_compat.rb#183 + def on_when(_, _, _); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_while(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_while_mod(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_word_add(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#180 + def on_word_new; end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_words_add(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_words_beg(_); end + + # source://prism//lib/prism/ripper_compat.rb#180 + def on_words_new; end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_words_sep(_); end + + # source://prism//lib/prism/ripper_compat.rb#182 + def on_xstring_add(_, _); end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_xstring_literal(_); end + + # source://prism//lib/prism/ripper_compat.rb#180 + def on_xstring_new; end + + # source://prism//lib/prism/ripper_compat.rb#181 + def on_yield(_); end + + # source://prism//lib/prism/ripper_compat.rb#180 + def on_yield0; end + + # source://prism//lib/prism/ripper_compat.rb#180 + def on_zsuper; end + + # Lazily initialize the parse result. + # + # source://prism//lib/prism/ripper_compat.rb#176 + def result; end + + class << self + # This is a convenience method that runs the SexpBuilderPP subclass parser. + # + # source://prism//lib/prism/ripper_compat.rb#157 + def sexp(source); end + + # This is a convenience method that runs the SexpBuilder subclass parser. + # + # source://prism//lib/prism/ripper_compat.rb#152 + def sexp_raw(source); end + end +end + +# This class mirrors the ::Ripper::SexpBuilder subclass of ::Ripper that +# returns the arrays of [type, *children]. +# +# source://prism//lib/prism/ripper_compat.rb#16 +class Prism::RipperCompat::SexpBuilder < ::Prism::RipperCompat + private + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_BEGIN(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_CHAR(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_END(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on___end__(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_alias(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_alias_error(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_aref(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_aref_field(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_arg_ambiguous(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_arg_paren(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_args_add(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_args_add_block(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_args_add_star(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_args_forward(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_args_new(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_array(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_aryptn(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_assign(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_assign_error(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_assoc_new(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_assoc_splat(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_assoclist_from_args(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_backref(value); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_backtick(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_bare_assoc_hash(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_begin(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_binary(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_block_var(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_blockarg(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_bodystmt(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_brace_block(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_break(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_call(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_case(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_class(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_class_name_error(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_comma(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_command(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_command_call(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_comment(value); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_const(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_const_path_field(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_const_path_ref(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_const_ref(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_cvar(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_def(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_defined(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_defs(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_do_block(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_dot2(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_dot3(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_dyna_symbol(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_else(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_elsif(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_embdoc(value); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_embdoc_beg(value); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_embdoc_end(value); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_embexpr_beg(value); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_embexpr_end(value); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_embvar(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_ensure(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_excessed_comma(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_fcall(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_field(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_float(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_fndptn(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_for(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_gvar(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_hash(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_heredoc_beg(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_heredoc_dedent(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_heredoc_end(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_hshptn(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_ident(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_if(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_if_mod(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_ifop(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_ignored_nl(value); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_ignored_sp(value); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_imaginary(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_in(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_int(value); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_ivar(value); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_kw(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_kwrest_param(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_label(value); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_label_end(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_lambda(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_lbrace(value); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_lbracket(value); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_lparen(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_magic_comment(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_massign(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_method_add_arg(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_method_add_block(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_mlhs_add(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_mlhs_add_post(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_mlhs_add_star(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_mlhs_new(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_mlhs_paren(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_module(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_mrhs_add(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_mrhs_add_star(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_mrhs_new(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_mrhs_new_from_args(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_next(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_nl(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_nokw_param(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_op(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_opassign(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_operator_ambiguous(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_param_error(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_params(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_paren(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_parse_error(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_period(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_program(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_qsymbols_add(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_qsymbols_beg(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_qsymbols_new(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_qwords_add(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_qwords_beg(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_qwords_new(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_rational(value); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_rbrace(value); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_rbracket(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_redo(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_regexp_add(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_regexp_beg(value); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_regexp_end(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_regexp_literal(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_regexp_new(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_rescue(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_rescue_mod(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_rest_param(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_retry(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_return(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_return0(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_rparen(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_sclass(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_semicolon(value); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_sp(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_stmts_add(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_stmts_new(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_string_add(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_string_concat(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_string_content(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_string_dvar(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_string_embexpr(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_string_literal(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_super(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_symbeg(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_symbol(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_symbol_literal(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_symbols_add(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_symbols_beg(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_symbols_new(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_tlambda(value); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_tlambeg(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_top_const_field(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_top_const_ref(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_tstring_beg(value); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_tstring_content(value); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_tstring_end(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_unary(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_undef(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_unless(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_unless_mod(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_until(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_until_mod(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_var_alias(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_var_field(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_var_ref(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_vcall(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_void_stmt(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_when(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_while(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_while_mod(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_word_add(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_word_new(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_words_add(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_words_beg(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_words_new(*args); end + + # source://prism//lib/prism/ripper_compat.rb#26 + def on_words_sep(value); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_xstring_add(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_xstring_literal(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_xstring_new(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_yield(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_yield0(*args); end + + # source://prism//lib/prism/ripper_compat.rb#20 + def on_zsuper(*args); end +end + +# This class mirrors the ::Ripper::SexpBuilderPP subclass of ::Ripper that +# returns the same values as ::Ripper::SexpBuilder except with a couple of +# niceties that flatten linked lists into arrays. +# +# source://prism//lib/prism/ripper_compat.rb#35 +class Prism::RipperCompat::SexpBuilderPP < ::Prism::RipperCompat::SexpBuilder + private + + # source://prism//lib/prism/ripper_compat.rb#38 + def _dispatch_event_new; end + + # source://prism//lib/prism/ripper_compat.rb#42 + def _dispatch_event_push(list, item); end + + # source://prism//lib/prism/ripper_compat.rb#42 + def on_args_add(list, item); end + + # source://prism//lib/prism/ripper_compat.rb#38 + def on_args_new; end + + # source://prism//lib/prism/ripper_compat.rb#42 + def on_mlhs_add(list, item); end + + # source://prism//lib/prism/ripper_compat.rb#38 + def on_mlhs_new; end + + # source://prism//lib/prism/ripper_compat.rb#42 + def on_mrhs_add(list, item); end + + # source://prism//lib/prism/ripper_compat.rb#38 + def on_mrhs_new; end + + # source://prism//lib/prism/ripper_compat.rb#42 + def on_qsymbols_add(list, item); end + + # source://prism//lib/prism/ripper_compat.rb#38 + def on_qsymbols_new; end + + # source://prism//lib/prism/ripper_compat.rb#42 + def on_qwords_add(list, item); end + + # source://prism//lib/prism/ripper_compat.rb#38 + def on_qwords_new; end + + # source://prism//lib/prism/ripper_compat.rb#42 + def on_regexp_add(list, item); end + + # source://prism//lib/prism/ripper_compat.rb#38 + def on_regexp_new; end + + # source://prism//lib/prism/ripper_compat.rb#42 + def on_stmts_add(list, item); end + + # source://prism//lib/prism/ripper_compat.rb#38 + def on_stmts_new; end + + # source://prism//lib/prism/ripper_compat.rb#42 + def on_string_add(list, item); end + + # source://prism//lib/prism/ripper_compat.rb#42 + def on_symbols_add(list, item); end + + # source://prism//lib/prism/ripper_compat.rb#38 + def on_symbols_new; end + + # source://prism//lib/prism/ripper_compat.rb#42 + def on_word_add(list, item); end + + # source://prism//lib/prism/ripper_compat.rb#38 + def on_word_new; end + + # source://prism//lib/prism/ripper_compat.rb#42 + def on_words_add(list, item); end + + # source://prism//lib/prism/ripper_compat.rb#38 + def on_words_new; end + + # source://prism//lib/prism/ripper_compat.rb#42 + def on_xstring_add(list, item); end + + # source://prism//lib/prism/ripper_compat.rb#38 + def on_xstring_new; end +end + +# Represents the `self` keyword. +# +# self +# ^^^^ +# +# source://prism//lib/prism/node.rb#14580 +class Prism::SelfNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [SelfNode] a new instance of SelfNode + # + # source://prism//lib/prism/node.rb#14581 + sig { params(location: Prism::Location).void } + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#14586 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14591 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14601 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14596 + def compact_child_nodes; end + + # def copy: (**params) -> SelfNode + # + # source://prism//lib/prism/node.rb#14606 + sig { params(params: T.untyped).returns(Prism::SelfNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14591 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#14616 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#14621 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14640 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14650 + def type; end + end +end + +# A module responsible for deserializing parse results. +# +# source://prism//lib/prism/serialize.rb#23 +module Prism::Serialize + class << self + # Deserialize the AST represented by the given string into a parse result. + # + # source://prism//lib/prism/serialize.rb#37 + def load(input, serialized); end + + # Deserialize the tokens represented by the given string into a parse + # result. + # + # source://prism//lib/prism/serialize.rb#49 + def load_tokens(source, serialized); end + end +end + +# source://prism//lib/prism/serialize.rb#53 +class Prism::Serialize::Loader + # @return [Loader] a new instance of Loader + # + # source://prism//lib/prism/serialize.rb#58 + def initialize(source, serialized); end + + # Returns the value of attribute constant_pool. + # + # source://prism//lib/prism/serialize.rb#55 + def constant_pool; end + + # Returns the value of attribute constant_pool_offset. + # + # source://prism//lib/prism/serialize.rb#55 + def constant_pool_offset; end + + # Returns the value of attribute encoding. + # + # source://prism//lib/prism/serialize.rb#54 + def encoding; end + + # Returns the value of attribute input. + # + # source://prism//lib/prism/serialize.rb#54 + def input; end + + # Returns the value of attribute io. + # + # source://prism//lib/prism/serialize.rb#54 + def io; end + + # source://prism//lib/prism/serialize.rb#92 + def load_comments; end + + # source://prism//lib/prism/serialize.rb#82 + def load_encoding; end + + # source://prism//lib/prism/serialize.rb#73 + def load_header; end + + # source://prism//lib/prism/serialize.rb#102 + def load_metadata; end + + # source://prism//lib/prism/serialize.rb#134 + def load_nodes; end + + # source://prism//lib/prism/serialize.rb#147 + def load_result; end + + # source://prism//lib/prism/serialize.rb#88 + def load_start_line; end + + # source://prism//lib/prism/serialize.rb#110 + def load_tokens; end + + # source://prism//lib/prism/serialize.rb#123 + def load_tokens_result; end + + # Returns the value of attribute serialized. + # + # source://prism//lib/prism/serialize.rb#54 + def serialized; end + + # Returns the value of attribute source. + # + # source://prism//lib/prism/serialize.rb#55 + def source; end + + # Returns the value of attribute start_line. + # + # source://prism//lib/prism/serialize.rb#56 + def start_line; end + + private + + # source://prism//lib/prism/serialize.rb#205 + def load_constant(index); end + + # source://prism//lib/prism/serialize.rb#181 + def load_embedded_string; end + + # source://prism//lib/prism/serialize.rb#197 + def load_location; end + + # source://prism//lib/prism/serialize.rb#236 + def load_node; end + + # source://prism//lib/prism/serialize.rb#230 + def load_optional_constant; end + + # source://prism//lib/prism/serialize.rb#201 + def load_optional_location; end + + # source://prism//lib/prism/serialize.rb#174 + def load_optional_node; end + + # source://prism//lib/prism/serialize.rb#226 + def load_required_constant; end + + # source://prism//lib/prism/serialize.rb#170 + def load_serialized_length; end + + # source://prism//lib/prism/serialize.rb#185 + def load_string; end + + # variable-length integer using https://en.wikipedia.org/wiki/LEB128 + # This is also what protobuf uses: https://protobuf.dev/programming-guides/encoding/#varints + # + # source://prism//lib/prism/serialize.rb#156 + def load_varint; end +end + +# The major version of prism that we are expecting to find in the serialized +# strings. +# +# source://prism//lib/prism/serialize.rb#26 +Prism::Serialize::MAJOR_VERSION = T.let(T.unsafe(nil), Integer) + +# The minor version of prism that we are expecting to find in the serialized +# strings. +# +# source://prism//lib/prism/serialize.rb#30 +Prism::Serialize::MINOR_VERSION = T.let(T.unsafe(nil), Integer) + +# The patch version of prism that we are expecting to find in the serialized +# strings. +# +# source://prism//lib/prism/serialize.rb#34 +Prism::Serialize::PATCH_VERSION = T.let(T.unsafe(nil), Integer) + +# The token types that can be indexed by their enum values. +# +# source://prism//lib/prism/serialize.rb#1124 +Prism::Serialize::TOKEN_TYPES = T.let(T.unsafe(nil), Array) + +# Represents a singleton class declaration involving the `class` keyword. +# +# class << self end +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#14660 +class Prism::SingletonClassNode < ::Prism::Node + # def initialize: (locals: Array[Symbol], class_keyword_loc: Location, operator_loc: Location, expression: Node, body: Node?, end_keyword_loc: Location, location: Location) -> void + # + # @return [SingletonClassNode] a new instance of SingletonClassNode + # + # source://prism//lib/prism/node.rb#14679 + sig do + params( + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + operator_loc: Prism::Location, + expression: Prism::Node, + body: T.nilable(Prism::Node), + end_keyword_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#14690 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # attr_reader body: Node? + # + # source://prism//lib/prism/node.rb#14673 + sig { returns(T.nilable(Prism::Node)) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14695 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def class_keyword: () -> String + # + # source://prism//lib/prism/node.rb#14734 + sig { returns(String) } + def class_keyword; end + + # attr_reader class_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#14664 + sig { returns(Prism::Location) } + def class_keyword_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14708 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14700 + def compact_child_nodes; end + + # def copy: (**params) -> SingletonClassNode + # + # source://prism//lib/prism/node.rb#14713 + sig { params(params: T.untyped).returns(Prism::SingletonClassNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14695 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#14729 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#14744 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#14676 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + # attr_reader expression: Node + # + # source://prism//lib/prism/node.rb#14670 + sig { returns(Prism::Node) } + def expression; end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#14749 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#14661 + sig { returns(T::Array[Symbol]) } + def locals; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#14739 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#14667 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14780 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14790 + def type; end + end +end + +# This represents a source of Ruby code that has been parsed. It is used in +# conjunction with locations to allow them to resolve line numbers and source +# ranges. +# +# source://prism//lib/prism/parse_result.rb#7 +class Prism::Source + # Create a new source object with the given source code and newline byte + # offsets. If no newline byte offsets are given, they will be computed from + # the source code. + # + # @return [Source] a new instance of Source + # + # source://prism//lib/prism/parse_result.rb#20 + def initialize(source, start_line = T.unsafe(nil), offsets = T.unsafe(nil)); end + + # Return the column number in characters for the given byte offset. + # + # source://prism//lib/prism/parse_result.rb#55 + def character_column(byte_offset); end + + # Return the character offset for the given byte offset. + # + # source://prism//lib/prism/parse_result.rb#50 + def character_offset(byte_offset); end + + # Return the column number for the given byte offset. + # + # source://prism//lib/prism/parse_result.rb#45 + def column(byte_offset); end + + # Binary search through the offsets to find the line number for the given + # byte offset. + # + # source://prism//lib/prism/parse_result.rb#34 + def line(byte_offset); end + + sig { params(value: Integer).returns(Integer) } + def line_offset(value); end + + # Return the byte offset of the start of the line corresponding to the given + # byte offset. + # + # source://prism//lib/prism/parse_result.rb#40 + def line_start(byte_offset); end + + # The list of newline byte offsets in the source code. + # + # source://prism//lib/prism/parse_result.rb#15 + sig { returns(T::Array[Integer]) } + def offsets; end + + # Perform a byteslice on the source code using the given byte offset and + # byte length. + # + # source://prism//lib/prism/parse_result.rb#28 + def slice(byte_offset, length); end + + # The source code that this source object represents. + # + # source://prism//lib/prism/parse_result.rb#9 + sig { returns(String) } + def source; end + + # The line number where this source starts. + # + # source://prism//lib/prism/parse_result.rb#12 + def start_line; end + + # The line number where this source starts. + # + # source://prism//lib/prism/parse_result.rb#12 + def start_line=(_arg0); end + + private + + # Find all of the newlines in the source code and return their byte offsets + # from the start of the string an array. + # + # source://prism//lib/prism/parse_result.rb#83 + def compute_offsets(code); end + + # Binary search through the offsets to find the line number for the given + # byte offset. + # + # source://prism//lib/prism/parse_result.rb#63 + def find_line(byte_offset); end +end + +# Represents the use of the `__ENCODING__` keyword. +# +# __ENCODING__ +# ^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#14800 +class Prism::SourceEncodingNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [SourceEncodingNode] a new instance of SourceEncodingNode + # + # source://prism//lib/prism/node.rb#14801 + sig { params(location: Prism::Location).void } + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#14806 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14811 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14821 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14816 + def compact_child_nodes; end + + # def copy: (**params) -> SourceEncodingNode + # + # source://prism//lib/prism/node.rb#14826 + sig { params(params: T.untyped).returns(Prism::SourceEncodingNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14811 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#14836 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#14841 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14860 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14870 + def type; end + end +end + +# Represents the use of the `__FILE__` keyword. +# +# __FILE__ +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#14880 +class Prism::SourceFileNode < ::Prism::Node + # def initialize: (filepath: String, location: Location) -> void + # + # @return [SourceFileNode] a new instance of SourceFileNode + # + # source://prism//lib/prism/node.rb#14884 + sig { params(filepath: String, location: Prism::Location).void } + def initialize(filepath, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#14890 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14895 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14905 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14900 + def compact_child_nodes; end + + # def copy: (**params) -> SourceFileNode + # + # source://prism//lib/prism/node.rb#14910 + sig { params(params: T.untyped).returns(Prism::SourceFileNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14895 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#14921 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # attr_reader filepath: String + # + # source://prism//lib/prism/node.rb#14881 + sig { returns(String) } + def filepath; end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#14926 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14946 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14956 + def type; end + end +end + +# Represents the use of the `__LINE__` keyword. +# +# __LINE__ +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#14966 +class Prism::SourceLineNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [SourceLineNode] a new instance of SourceLineNode + # + # source://prism//lib/prism/node.rb#14967 + sig { params(location: Prism::Location).void } + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#14972 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14977 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14987 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14982 + def compact_child_nodes; end + + # def copy: (**params) -> SourceLineNode + # + # source://prism//lib/prism/node.rb#14992 + sig { params(params: T.untyped).returns(Prism::SourceLineNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14977 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#15002 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#15007 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15026 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15036 + def type; end + end +end + +# Represents the use of the splat operator. +# +# [*a] +# ^^ +# +# source://prism//lib/prism/node.rb#15046 +class Prism::SplatNode < ::Prism::Node + # def initialize: (operator_loc: Location, expression: Node?, location: Location) -> void + # + # @return [SplatNode] a new instance of SplatNode + # + # source://prism//lib/prism/node.rb#15053 + sig { params(operator_loc: Prism::Location, expression: T.nilable(Prism::Node), location: Prism::Location).void } + def initialize(operator_loc, expression, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#15060 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15065 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15077 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15070 + def compact_child_nodes; end + + # def copy: (**params) -> SplatNode + # + # source://prism//lib/prism/node.rb#15082 + sig { params(params: T.untyped).returns(Prism::SplatNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15065 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#15094 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # attr_reader expression: Node? + # + # source://prism//lib/prism/node.rb#15050 + sig { returns(T.nilable(Prism::Node)) } + def expression; end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#15104 + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#15099 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#15047 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15130 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15140 + def type; end + end +end + +# Represents a set of statements contained within some scope. +# +# foo; bar; baz +# ^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#15150 +class Prism::StatementsNode < ::Prism::Node + # def initialize: (body: Array[Node], location: Location) -> void + # + # @return [StatementsNode] a new instance of StatementsNode + # + # source://prism//lib/prism/node.rb#15154 + sig { params(body: T::Array[Prism::Node], location: Prism::Location).void } + def initialize(body, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#15160 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # attr_reader body: Array[Node] + # + # source://prism//lib/prism/node.rb#15151 + sig { returns(T::Array[Prism::Node]) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15165 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15175 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15170 + def compact_child_nodes; end + + # def copy: (**params) -> StatementsNode + # + # source://prism//lib/prism/node.rb#15180 + sig { params(params: T.untyped).returns(Prism::StatementsNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15165 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#15191 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#15196 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15216 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15226 + def type; end + end +end + +# Flags for string nodes. +# +# source://prism//lib/prism/node.rb#16674 +module Prism::StringFlags; end + +# frozen by virtue of a `frozen_string_literal` comment +# +# source://prism//lib/prism/node.rb#16676 +Prism::StringFlags::FROZEN = T.let(T.unsafe(nil), Integer) + +# Represents a string literal, a string contained within a `%w` list, or +# plain string content within an interpolated string. +# +# "foo" +# ^^^^^ +# +# %w[foo] +# ^^^ +# +# "foo #{bar} baz" +# ^^^^ ^^^^ +# +# source://prism//lib/prism/node.rb#15243 +class Prism::StringNode < ::Prism::Node + # def initialize: (flags: Integer, opening_loc: Location?, content_loc: Location, closing_loc: Location?, unescaped: String, location: Location) -> void + # + # @return [StringNode] a new instance of StringNode + # + # source://prism//lib/prism/node.rb#15259 + sig do + params( + flags: Integer, + opening_loc: T.nilable(Prism::Location), + content_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + unescaped: String, + location: Prism::Location + ).void + end + def initialize(flags, opening_loc, content_loc, closing_loc, unescaped, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#15269 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15274 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#15324 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#15253 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15284 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15279 + def compact_child_nodes; end + + # def content: () -> String + # + # source://prism//lib/prism/node.rb#15319 + sig { returns(String) } + def content; end + + # attr_reader content_loc: Location + # + # source://prism//lib/prism/node.rb#15250 + sig { returns(Prism::Location) } + def content_loc; end + + # def copy: (**params) -> StringNode + # + # source://prism//lib/prism/node.rb#15289 + sig { params(params: T.untyped).returns(Prism::StringNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15274 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#15304 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def frozen?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15309 + sig { returns(T::Boolean) } + def frozen?; end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#15329 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#15314 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#15247 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15354 + def type; end + + # attr_reader unescaped: String + # + # source://prism//lib/prism/node.rb#15256 + sig { returns(String) } + def unescaped; end + + private + + # Returns the value of attribute flags. + # + # source://prism//lib/prism/node.rb#15244 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15364 + def type; end + end +end + +# Represents the use of the `super` keyword with parentheses or arguments. +# +# super() +# ^^^^^^^ +# +# super foo, bar +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#15377 +class Prism::SuperNode < ::Prism::Node + # def initialize: (keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, block: Node?, location: Location) -> void + # + # @return [SuperNode] a new instance of SuperNode + # + # source://prism//lib/prism/node.rb#15393 + sig do + params( + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + rparen_loc: T.nilable(Prism::Location), + block: T.nilable(Prism::Node), + location: Prism::Location + ).void + end + def initialize(keyword_loc, lparen_loc, arguments, rparen_loc, block, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#15403 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#15384 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # attr_reader block: Node? + # + # source://prism//lib/prism/node.rb#15390 + sig { returns(T.nilable(Prism::Node)) } + def block; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15408 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15421 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15413 + def compact_child_nodes; end + + # def copy: (**params) -> SuperNode + # + # source://prism//lib/prism/node.rb#15426 + sig { params(params: T.untyped).returns(Prism::SuperNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15408 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#15441 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#15461 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#15446 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#15378 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def lparen: () -> String? + # + # source://prism//lib/prism/node.rb#15451 + sig { returns(T.nilable(String)) } + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://prism//lib/prism/node.rb#15381 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # def rparen: () -> String? + # + # source://prism//lib/prism/node.rb#15456 + sig { returns(T.nilable(String)) } + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://prism//lib/prism/node.rb#15387 + sig { returns(T.nilable(Prism::Location)) } + def rparen_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15495 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15505 + def type; end + end +end + +# Represents a symbol literal or a symbol contained within a `%i` list. +# +# :foo +# ^^^^ +# +# %i[foo] +# ^^^ +# +# source://prism//lib/prism/node.rb#15518 +class Prism::SymbolNode < ::Prism::Node + # def initialize: (opening_loc: Location?, value_loc: Location?, closing_loc: Location?, unescaped: String, location: Location) -> void + # + # @return [SymbolNode] a new instance of SymbolNode + # + # source://prism//lib/prism/node.rb#15531 + sig do + params( + opening_loc: T.nilable(Prism::Location), + value_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + unescaped: String, + location: Prism::Location + ).void + end + def initialize(opening_loc, value_loc, closing_loc, unescaped, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#15540 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15545 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#15589 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#15525 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15555 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15550 + def compact_child_nodes; end + + # def copy: (**params) -> SymbolNode + # + # source://prism//lib/prism/node.rb#15560 + sig { params(params: T.untyped).returns(Prism::SymbolNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15545 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#15574 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#15594 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#15579 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#15519 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15617 + def type; end + + # attr_reader unescaped: String + # + # source://prism//lib/prism/node.rb#15528 + sig { returns(String) } + def unescaped; end + + # def value: () -> String? + # + # source://prism//lib/prism/node.rb#15584 + sig { returns(T.nilable(String)) } + def value; end + + # attr_reader value_loc: Location? + # + # source://prism//lib/prism/node.rb#15522 + sig { returns(T.nilable(Prism::Location)) } + def value_loc; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15627 + def type; end + end +end + +# This represents a token from the Ruby source. +# +# source://prism//lib/prism/parse_result.rb#419 +class Prism::Token + # Create a new token object with the given type, value, and location. + # + # @return [Token] a new instance of Token + # + # source://prism//lib/prism/parse_result.rb#430 + sig { params(type: T.untyped, value: String, location: Prism::Location).void } + def initialize(type, value, location); end + + # Returns true if the given other token is equal to this token. + # + # source://prism//lib/prism/parse_result.rb#457 + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other); end + + # Implement the hash pattern matching interface for Token. + # + # source://prism//lib/prism/parse_result.rb#437 + sig { params(keys: T.untyped).returns(T.untyped) } + def deconstruct_keys(keys); end + + # A Location object representing the location of this token in the source. + # + # source://prism//lib/prism/parse_result.rb#427 + sig { returns(Prism::Location) } + def location; end + + # Implement the pretty print interface for Token. + # + # source://prism//lib/prism/parse_result.rb#442 + sig { params(q: T.untyped).returns(T.untyped) } + def pretty_print(q); end + + # The type of token that this token is. + # + # source://prism//lib/prism/parse_result.rb#421 + sig { returns(T.untyped) } + def type; end + + # A byteslice of the source that this token represents. + # + # source://prism//lib/prism/parse_result.rb#424 + sig { returns(String) } + def value; end +end + +# Represents the use of the literal `true` keyword. +# +# true +# ^^^^ +# +# source://prism//lib/prism/node.rb#15637 +class Prism::TrueNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [TrueNode] a new instance of TrueNode + # + # source://prism//lib/prism/node.rb#15638 + sig { params(location: Prism::Location).void } + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#15643 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15648 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15658 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15653 + def compact_child_nodes; end + + # def copy: (**params) -> TrueNode + # + # source://prism//lib/prism/node.rb#15663 + sig { params(params: T.untyped).returns(Prism::TrueNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15648 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#15673 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#15678 + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15697 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15707 + def type; end + end +end + +# Represents the use of the `undef` keyword. +# +# undef :foo, :bar, :baz +# ^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#15717 +class Prism::UndefNode < ::Prism::Node + # def initialize: (names: Array[Node], keyword_loc: Location, location: Location) -> void + # + # @return [UndefNode] a new instance of UndefNode + # + # source://prism//lib/prism/node.rb#15724 + sig { params(names: T::Array[Prism::Node], keyword_loc: Prism::Location, location: Prism::Location).void } + def initialize(names, keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#15731 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15736 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15746 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15741 + def compact_child_nodes; end + + # def copy: (**params) -> UndefNode + # + # source://prism//lib/prism/node.rb#15751 + sig { params(params: T.untyped).returns(Prism::UndefNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15736 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#15763 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#15773 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#15768 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#15721 + sig { returns(Prism::Location) } + def keyword_loc; end + + # attr_reader names: Array[Node] + # + # source://prism//lib/prism/node.rb#15718 + sig { returns(T::Array[Prism::Node]) } + def names; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15794 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15804 + def type; end + end +end + +# Represents the use of the `unless` keyword, either in the block form or the modifier form. +# +# bar unless foo +# ^^^^^^^^^^^^^^ +# +# unless foo then bar end +# ^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#15817 +class Prism::UnlessNode < ::Prism::Node + # def initialize: (keyword_loc: Location, predicate: Node, then_keyword_loc: Location?, statements: StatementsNode?, consequent: ElseNode?, end_keyword_loc: Location?, location: Location) -> void + # + # @return [UnlessNode] a new instance of UnlessNode + # + # source://prism//lib/prism/node.rb#15836 + sig do + params( + keyword_loc: Prism::Location, + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + consequent: T.nilable(Prism::ElseNode), + end_keyword_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#15847 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15856 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15870 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15861 + def compact_child_nodes; end + + # attr_reader consequent: ElseNode? + # + # source://prism//lib/prism/node.rb#15830 + sig { returns(T.nilable(Prism::ElseNode)) } + def consequent; end + + # def copy: (**params) -> UnlessNode + # + # source://prism//lib/prism/node.rb#15875 + sig { params(params: T.untyped).returns(Prism::UnlessNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15856 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#15891 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def end_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#15906 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#15833 + sig { returns(T.nilable(Prism::Location)) } + def end_keyword_loc; end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#15911 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#15896 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#15818 + sig { returns(Prism::Location) } + def keyword_loc; end + + # attr_reader predicate: Node + # + # source://prism//lib/prism/node.rb#15821 + sig { returns(Prism::Node) } + def predicate; end + + # source://prism//lib/prism/node.rb#15851 + def set_newline_flag(newline_marked); end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#15827 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # def then_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#15901 + sig { returns(T.nilable(String)) } + def then_keyword; end + + # attr_reader then_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#15824 + sig { returns(T.nilable(Prism::Location)) } + def then_keyword_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15947 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15957 + def type; end + end +end + +# Represents the use of the `until` keyword, either in the block form or the modifier form. +# +# bar until foo +# ^^^^^^^^^^^^^ +# +# until foo do bar end +# ^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#15970 +class Prism::UntilNode < ::Prism::Node + # def initialize: (keyword_loc: Location, closing_loc: Location?, predicate: Node, statements: StatementsNode?, flags: Integer, location: Location) -> void + # + # @return [UntilNode] a new instance of UntilNode + # + # source://prism//lib/prism/node.rb#15986 + sig do + params( + keyword_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + flags: Integer, + location: Prism::Location + ).void + end + def initialize(keyword_loc, closing_loc, predicate, statements, flags, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#15996 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def begin_modifier?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16053 + sig { returns(T::Boolean) } + def begin_modifier?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16005 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#16048 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#15974 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16018 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#16010 + def compact_child_nodes; end + + # def copy: (**params) -> UntilNode + # + # source://prism//lib/prism/node.rb#16023 + sig { params(params: T.untyped).returns(Prism::UntilNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16005 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#16038 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#16058 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#16043 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#15971 + sig { returns(Prism::Location) } + def keyword_loc; end + + # attr_reader predicate: Node + # + # source://prism//lib/prism/node.rb#15977 + sig { returns(Prism::Node) } + def predicate; end + + # source://prism//lib/prism/node.rb#16000 + def set_newline_flag(newline_marked); end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#15980 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16089 + def type; end + + private + + # Returns the value of attribute flags. + # + # source://prism//lib/prism/node.rb#15983 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16099 + def type; end + end +end + +# The version constant is set by reading the result of calling pm_version. +Prism::VERSION = T.let(T.unsafe(nil), String) + +# A visitor is a class that provides a default implementation for every accept +# method defined on the nodes. This means it can walk a tree without the +# caller needing to define any special handling. This allows you to handle a +# subset of the tree, while still walking the whole tree. +# +# For example, to find all of the method calls that call the `foo` method, you +# could write: +# +# class FooCalls < Prism::Visitor +# def visit_call_node(node) +# if node.name == "foo" +# # Do something with the node +# end +# +# # Call super so that the visitor continues walking the tree +# super +# end +# end +# +# source://prism//lib/prism/visitor.rb#51 +class Prism::Visitor < ::Prism::BasicVisitor + # Visit a AliasGlobalVariableNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::AliasGlobalVariableNode).void } + def visit_alias_global_variable_node(node); end + + # Visit a AliasMethodNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::AliasMethodNode).void } + def visit_alias_method_node(node); end + + # Visit a AlternationPatternNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::AlternationPatternNode).void } + def visit_alternation_pattern_node(node); end + + # Visit a AndNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::AndNode).void } + def visit_and_node(node); end + + # Visit a ArgumentsNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ArgumentsNode).void } + def visit_arguments_node(node); end + + # Visit a ArrayNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ArrayNode).void } + def visit_array_node(node); end + + # Visit a ArrayPatternNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ArrayPatternNode).void } + def visit_array_pattern_node(node); end + + # Visit a AssocNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::AssocNode).void } + def visit_assoc_node(node); end + + # Visit a AssocSplatNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::AssocSplatNode).void } + def visit_assoc_splat_node(node); end + + # Visit a BackReferenceReadNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::BackReferenceReadNode).void } + def visit_back_reference_read_node(node); end + + # Visit a BeginNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::BeginNode).void } + def visit_begin_node(node); end + + # Visit a BlockArgumentNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::BlockArgumentNode).void } + def visit_block_argument_node(node); end + + # Visit a BlockLocalVariableNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::BlockLocalVariableNode).void } + def visit_block_local_variable_node(node); end + + # Visit a BlockNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::BlockNode).void } + def visit_block_node(node); end + + # Visit a BlockParameterNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::BlockParameterNode).void } + def visit_block_parameter_node(node); end + + # Visit a BlockParametersNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::BlockParametersNode).void } + def visit_block_parameters_node(node); end + + # Visit a BreakNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::BreakNode).void } + def visit_break_node(node); end + + # Visit a CallAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::CallAndWriteNode).void } + def visit_call_and_write_node(node); end + + # Visit a CallNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::CallNode).void } + def visit_call_node(node); end + + # Visit a CallOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::CallOperatorWriteNode).void } + def visit_call_operator_write_node(node); end + + # Visit a CallOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::CallOrWriteNode).void } + def visit_call_or_write_node(node); end + + # Visit a CapturePatternNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::CapturePatternNode).void } + def visit_capture_pattern_node(node); end + + # Visit a CaseMatchNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::CaseMatchNode).void } + def visit_case_match_node(node); end + + # Visit a CaseNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::CaseNode).void } + def visit_case_node(node); end + + # Visit a ClassNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ClassNode).void } + def visit_class_node(node); end + + # Visit a ClassVariableAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ClassVariableAndWriteNode).void } + def visit_class_variable_and_write_node(node); end + + # Visit a ClassVariableOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ClassVariableOperatorWriteNode).void } + def visit_class_variable_operator_write_node(node); end + + # Visit a ClassVariableOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ClassVariableOrWriteNode).void } + def visit_class_variable_or_write_node(node); end + + # Visit a ClassVariableReadNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ClassVariableReadNode).void } + def visit_class_variable_read_node(node); end + + # Visit a ClassVariableTargetNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ClassVariableTargetNode).void } + def visit_class_variable_target_node(node); end + + # Visit a ClassVariableWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ClassVariableWriteNode).void } + def visit_class_variable_write_node(node); end + + # Visit a ConstantAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ConstantAndWriteNode).void } + def visit_constant_and_write_node(node); end + + # Visit a ConstantOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ConstantOperatorWriteNode).void } + def visit_constant_operator_write_node(node); end + + # Visit a ConstantOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ConstantOrWriteNode).void } + def visit_constant_or_write_node(node); end + + # Visit a ConstantPathAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ConstantPathAndWriteNode).void } + def visit_constant_path_and_write_node(node); end + + # Visit a ConstantPathNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ConstantPathNode).void } + def visit_constant_path_node(node); end + + # Visit a ConstantPathOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ConstantPathOperatorWriteNode).void } + def visit_constant_path_operator_write_node(node); end + + # Visit a ConstantPathOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ConstantPathOrWriteNode).void } + def visit_constant_path_or_write_node(node); end + + # Visit a ConstantPathTargetNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ConstantPathTargetNode).void } + def visit_constant_path_target_node(node); end + + # Visit a ConstantPathWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ConstantPathWriteNode).void } + def visit_constant_path_write_node(node); end + + # Visit a ConstantReadNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ConstantReadNode).void } + def visit_constant_read_node(node); end + + # Visit a ConstantTargetNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ConstantTargetNode).void } + def visit_constant_target_node(node); end + + # Visit a ConstantWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ConstantWriteNode).void } + def visit_constant_write_node(node); end + + # Visit a DefNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::DefNode).void } + def visit_def_node(node); end + + # Visit a DefinedNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::DefinedNode).void } + def visit_defined_node(node); end + + # Visit a ElseNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ElseNode).void } + def visit_else_node(node); end + + # Visit a EmbeddedStatementsNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::EmbeddedStatementsNode).void } + def visit_embedded_statements_node(node); end + + # Visit a EmbeddedVariableNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::EmbeddedVariableNode).void } + def visit_embedded_variable_node(node); end + + # Visit a EnsureNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::EnsureNode).void } + def visit_ensure_node(node); end + + # Visit a FalseNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::FalseNode).void } + def visit_false_node(node); end + + # Visit a FindPatternNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::FindPatternNode).void } + def visit_find_pattern_node(node); end + + # Visit a FlipFlopNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::FlipFlopNode).void } + def visit_flip_flop_node(node); end + + # Visit a FloatNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::FloatNode).void } + def visit_float_node(node); end + + # Visit a ForNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ForNode).void } + def visit_for_node(node); end + + # Visit a ForwardingArgumentsNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ForwardingArgumentsNode).void } + def visit_forwarding_arguments_node(node); end + + # Visit a ForwardingParameterNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ForwardingParameterNode).void } + def visit_forwarding_parameter_node(node); end + + # Visit a ForwardingSuperNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ForwardingSuperNode).void } + def visit_forwarding_super_node(node); end + + # Visit a GlobalVariableAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::GlobalVariableAndWriteNode).void } + def visit_global_variable_and_write_node(node); end + + # Visit a GlobalVariableOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::GlobalVariableOperatorWriteNode).void } + def visit_global_variable_operator_write_node(node); end + + # Visit a GlobalVariableOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::GlobalVariableOrWriteNode).void } + def visit_global_variable_or_write_node(node); end + + # Visit a GlobalVariableReadNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::GlobalVariableReadNode).void } + def visit_global_variable_read_node(node); end + + # Visit a GlobalVariableTargetNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::GlobalVariableTargetNode).void } + def visit_global_variable_target_node(node); end + + # Visit a GlobalVariableWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::GlobalVariableWriteNode).void } + def visit_global_variable_write_node(node); end + + # Visit a HashNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::HashNode).void } + def visit_hash_node(node); end + + # Visit a HashPatternNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::HashPatternNode).void } + def visit_hash_pattern_node(node); end + + # Visit a IfNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::IfNode).void } + def visit_if_node(node); end + + # Visit a ImaginaryNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ImaginaryNode).void } + def visit_imaginary_node(node); end + + # Visit a ImplicitNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ImplicitNode).void } + def visit_implicit_node(node); end + + # Visit a InNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::InNode).void } + def visit_in_node(node); end + + # Visit a IndexAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::IndexAndWriteNode).void } + def visit_index_and_write_node(node); end + + # Visit a IndexOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::IndexOperatorWriteNode).void } + def visit_index_operator_write_node(node); end + + # Visit a IndexOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::IndexOrWriteNode).void } + def visit_index_or_write_node(node); end + + # Visit a InstanceVariableAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::InstanceVariableAndWriteNode).void } + def visit_instance_variable_and_write_node(node); end + + # Visit a InstanceVariableOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::InstanceVariableOperatorWriteNode).void } + def visit_instance_variable_operator_write_node(node); end + + # Visit a InstanceVariableOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::InstanceVariableOrWriteNode).void } + def visit_instance_variable_or_write_node(node); end + + # Visit a InstanceVariableReadNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::InstanceVariableReadNode).void } + def visit_instance_variable_read_node(node); end + + # Visit a InstanceVariableTargetNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::InstanceVariableTargetNode).void } + def visit_instance_variable_target_node(node); end + + # Visit a InstanceVariableWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::InstanceVariableWriteNode).void } + def visit_instance_variable_write_node(node); end + + # Visit a IntegerNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::IntegerNode).void } + def visit_integer_node(node); end + + # Visit a InterpolatedMatchLastLineNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::InterpolatedMatchLastLineNode).void } + def visit_interpolated_match_last_line_node(node); end + + # Visit a InterpolatedRegularExpressionNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::InterpolatedRegularExpressionNode).void } + def visit_interpolated_regular_expression_node(node); end + + # Visit a InterpolatedStringNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::InterpolatedStringNode).void } + def visit_interpolated_string_node(node); end + + # Visit a InterpolatedSymbolNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::InterpolatedSymbolNode).void } + def visit_interpolated_symbol_node(node); end + + # Visit a InterpolatedXStringNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::InterpolatedXStringNode).void } + def visit_interpolated_x_string_node(node); end + + # Visit a KeywordHashNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::KeywordHashNode).void } + def visit_keyword_hash_node(node); end + + # Visit a KeywordRestParameterNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::KeywordRestParameterNode).void } + def visit_keyword_rest_parameter_node(node); end + + # Visit a LambdaNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::LambdaNode).void } + def visit_lambda_node(node); end + + # Visit a LocalVariableAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::LocalVariableAndWriteNode).void } + def visit_local_variable_and_write_node(node); end + + # Visit a LocalVariableOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::LocalVariableOperatorWriteNode).void } + def visit_local_variable_operator_write_node(node); end + + # Visit a LocalVariableOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::LocalVariableOrWriteNode).void } + def visit_local_variable_or_write_node(node); end + + # Visit a LocalVariableReadNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::LocalVariableReadNode).void } + def visit_local_variable_read_node(node); end + + # Visit a LocalVariableTargetNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::LocalVariableTargetNode).void } + def visit_local_variable_target_node(node); end + + # Visit a LocalVariableWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::LocalVariableWriteNode).void } + def visit_local_variable_write_node(node); end + + # Visit a MatchLastLineNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::MatchLastLineNode).void } + def visit_match_last_line_node(node); end + + # Visit a MatchPredicateNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::MatchPredicateNode).void } + def visit_match_predicate_node(node); end + + # Visit a MatchRequiredNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::MatchRequiredNode).void } + def visit_match_required_node(node); end + + # Visit a MatchWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::MatchWriteNode).void } + def visit_match_write_node(node); end + + # Visit a MissingNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::MissingNode).void } + def visit_missing_node(node); end + + # Visit a ModuleNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ModuleNode).void } + def visit_module_node(node); end + + # Visit a MultiTargetNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::MultiTargetNode).void } + def visit_multi_target_node(node); end + + # Visit a MultiWriteNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::MultiWriteNode).void } + def visit_multi_write_node(node); end + + # Visit a NextNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::NextNode).void } + def visit_next_node(node); end + + # Visit a NilNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::NilNode).void } + def visit_nil_node(node); end + + # Visit a NoKeywordsParameterNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::NoKeywordsParameterNode).void } + def visit_no_keywords_parameter_node(node); end + + # Visit a NumberedReferenceReadNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::NumberedReferenceReadNode).void } + def visit_numbered_reference_read_node(node); end + + # Visit a OptionalKeywordParameterNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::OptionalKeywordParameterNode).void } + def visit_optional_keyword_parameter_node(node); end + + # Visit a OptionalParameterNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::OptionalParameterNode).void } + def visit_optional_parameter_node(node); end + + # Visit a OrNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::OrNode).void } + def visit_or_node(node); end + + # Visit a ParametersNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ParametersNode).void } + def visit_parameters_node(node); end + + # Visit a ParenthesesNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ParenthesesNode).void } + def visit_parentheses_node(node); end + + # Visit a PinnedExpressionNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::PinnedExpressionNode).void } + def visit_pinned_expression_node(node); end + + # Visit a PinnedVariableNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::PinnedVariableNode).void } + def visit_pinned_variable_node(node); end + + # Visit a PostExecutionNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::PostExecutionNode).void } + def visit_post_execution_node(node); end + + # Visit a PreExecutionNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::PreExecutionNode).void } + def visit_pre_execution_node(node); end + + # Visit a ProgramNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ProgramNode).void } + def visit_program_node(node); end + + # Visit a RangeNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::RangeNode).void } + def visit_range_node(node); end + + # Visit a RationalNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::RationalNode).void } + def visit_rational_node(node); end + + # Visit a RedoNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::RedoNode).void } + def visit_redo_node(node); end + + # Visit a RegularExpressionNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::RegularExpressionNode).void } + def visit_regular_expression_node(node); end + + # Visit a RequiredKeywordParameterNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::RequiredKeywordParameterNode).void } + def visit_required_keyword_parameter_node(node); end + + # Visit a RequiredParameterNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::RequiredParameterNode).void } + def visit_required_parameter_node(node); end + + # Visit a RescueModifierNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::RescueModifierNode).void } + def visit_rescue_modifier_node(node); end + + # Visit a RescueNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::RescueNode).void } + def visit_rescue_node(node); end + + # Visit a RestParameterNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::RestParameterNode).void } + def visit_rest_parameter_node(node); end + + # Visit a RetryNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::RetryNode).void } + def visit_retry_node(node); end + + # Visit a ReturnNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ReturnNode).void } + def visit_return_node(node); end + + # Visit a SelfNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::SelfNode).void } + def visit_self_node(node); end + + # Visit a SingletonClassNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::SingletonClassNode).void } + def visit_singleton_class_node(node); end + + # Visit a SourceEncodingNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::SourceEncodingNode).void } + def visit_source_encoding_node(node); end + + # Visit a SourceFileNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::SourceFileNode).void } + def visit_source_file_node(node); end + + # Visit a SourceLineNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::SourceLineNode).void } + def visit_source_line_node(node); end + + # Visit a SplatNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::SplatNode).void } + def visit_splat_node(node); end + + # Visit a StatementsNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::StatementsNode).void } + def visit_statements_node(node); end + + # Visit a StringNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::StringNode).void } + def visit_string_node(node); end + + # Visit a SuperNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::SuperNode).void } + def visit_super_node(node); end + + # Visit a SymbolNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::SymbolNode).void } + def visit_symbol_node(node); end + + # Visit a TrueNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::TrueNode).void } + def visit_true_node(node); end + + # Visit a UndefNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::UndefNode).void } + def visit_undef_node(node); end + + # Visit a UnlessNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::UnlessNode).void } + def visit_unless_node(node); end + + # Visit a UntilNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::UntilNode).void } + def visit_until_node(node); end + + # Visit a WhenNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::WhenNode).void } + def visit_when_node(node); end + + # Visit a WhileNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::WhileNode).void } + def visit_while_node(node); end + + # Visit a XStringNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::XStringNode).void } + def visit_x_string_node(node); end + + # Visit a YieldNode node + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::YieldNode).void } + def visit_yield_node(node); end +end + +# Represents the use of the `when` keyword within a case statement. +# +# case true +# when true +# ^^^^^^^^^ +# end +# +# source://prism//lib/prism/node.rb#16111 +class Prism::WhenNode < ::Prism::Node + # def initialize: (keyword_loc: Location, conditions: Array[Node], statements: StatementsNode?, location: Location) -> void + # + # @return [WhenNode] a new instance of WhenNode + # + # source://prism//lib/prism/node.rb#16121 + sig do + params( + keyword_loc: Prism::Location, + conditions: T::Array[Prism::Node], + statements: T.nilable(Prism::StatementsNode), + location: Prism::Location + ).void + end + def initialize(keyword_loc, conditions, statements, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#16129 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16134 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16147 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#16139 + def compact_child_nodes; end + + # attr_reader conditions: Array[Node] + # + # source://prism//lib/prism/node.rb#16115 + sig { returns(T::Array[Prism::Node]) } + def conditions; end + + # def copy: (**params) -> WhenNode + # + # source://prism//lib/prism/node.rb#16152 + sig { params(params: T.untyped).returns(Prism::WhenNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16134 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#16165 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#16175 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#16170 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#16112 + sig { returns(Prism::Location) } + def keyword_loc; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#16118 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16202 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16212 + def type; end + end +end + +# Represents the use of the `while` keyword, either in the block form or the modifier form. +# +# bar while foo +# ^^^^^^^^^^^^^ +# +# while foo do bar end +# ^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#16225 +class Prism::WhileNode < ::Prism::Node + # def initialize: (keyword_loc: Location, closing_loc: Location?, predicate: Node, statements: StatementsNode?, flags: Integer, location: Location) -> void + # + # @return [WhileNode] a new instance of WhileNode + # + # source://prism//lib/prism/node.rb#16241 + sig do + params( + keyword_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + flags: Integer, + location: Prism::Location + ).void + end + def initialize(keyword_loc, closing_loc, predicate, statements, flags, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#16251 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def begin_modifier?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16308 + sig { returns(T::Boolean) } + def begin_modifier?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16260 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#16303 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#16229 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16273 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#16265 + def compact_child_nodes; end + + # def copy: (**params) -> WhileNode + # + # source://prism//lib/prism/node.rb#16278 + sig { params(params: T.untyped).returns(Prism::WhileNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16260 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#16293 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#16313 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#16298 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#16226 + sig { returns(Prism::Location) } + def keyword_loc; end + + # attr_reader predicate: Node + # + # source://prism//lib/prism/node.rb#16232 + sig { returns(Prism::Node) } + def predicate; end + + # source://prism//lib/prism/node.rb#16255 + def set_newline_flag(newline_marked); end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#16235 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16344 + def type; end + + private + + # Returns the value of attribute flags. + # + # source://prism//lib/prism/node.rb#16238 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16354 + def type; end + end +end + +# Represents an xstring literal with no interpolation. +# +# `foo` +# ^^^^^ +# +# source://prism//lib/prism/node.rb#16364 +class Prism::XStringNode < ::Prism::Node + # def initialize: (opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location) -> void + # + # @return [XStringNode] a new instance of XStringNode + # + # source://prism//lib/prism/node.rb#16377 + sig do + params( + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String, + location: Prism::Location + ).void + end + def initialize(opening_loc, content_loc, closing_loc, unescaped, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#16386 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16391 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#16435 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#16371 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16401 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#16396 + def compact_child_nodes; end + + # def content: () -> String + # + # source://prism//lib/prism/node.rb#16430 + sig { returns(String) } + def content; end + + # attr_reader content_loc: Location + # + # source://prism//lib/prism/node.rb#16368 + sig { returns(Prism::Location) } + def content_loc; end + + # def copy: (**params) -> XStringNode + # + # source://prism//lib/prism/node.rb#16406 + sig { params(params: T.untyped).returns(Prism::XStringNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16391 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#16420 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#16440 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#16425 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#16365 + sig { returns(Prism::Location) } + def opening_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16463 + def type; end + + # attr_reader unescaped: String + # + # source://prism//lib/prism/node.rb#16374 + sig { returns(String) } + def unescaped; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16473 + def type; end + end +end + +# Represents the use of the `yield` keyword. +# +# yield 1 +# ^^^^^^^ +# +# source://prism//lib/prism/node.rb#16483 +class Prism::YieldNode < ::Prism::Node + # def initialize: (keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, location: Location) -> void + # + # @return [YieldNode] a new instance of YieldNode + # + # source://prism//lib/prism/node.rb#16496 + sig do + params( + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + rparen_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(keyword_loc, lparen_loc, arguments, rparen_loc, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#16505 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#16490 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16510 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16522 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#16515 + def compact_child_nodes; end + + # def copy: (**params) -> YieldNode + # + # source://prism//lib/prism/node.rb#16527 + sig { params(params: T.untyped).returns(Prism::YieldNode) } + def copy(**params); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16510 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # + # source://prism//lib/prism/node.rb#16541 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end + def deconstruct_keys(keys); end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#16561 + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#16546 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#16484 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def lparen: () -> String? + # + # source://prism//lib/prism/node.rb#16551 + sig { returns(T.nilable(String)) } + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://prism//lib/prism/node.rb#16487 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # def rparen: () -> String? + # + # source://prism//lib/prism/node.rb#16556 + sig { returns(T.nilable(String)) } + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://prism//lib/prism/node.rb#16493 + sig { returns(T.nilable(Prism::Location)) } + def rparen_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16589 + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16599 + def type; end + end +end diff --git a/Library/Homebrew/sorbet/rbi/gems/pry@0.14.2.rbi b/Library/Homebrew/sorbet/rbi/gems/pry@0.14.2.rbi index 159b3f812c7a1a..fce6b9d79c3ef5 100644 --- a/Library/Homebrew/sorbet/rbi/gems/pry@0.14.2.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/pry@0.14.2.rbi @@ -4,418 +4,2026 @@ # This is an autogenerated file for types exported from the `pry` gem. # Please instead update this file by running `bin/tapioca gem pry`. -::APPLE_GEM_HOME = T.let(T.unsafe(nil), String) -::RUBY19 = T.let(T.unsafe(nil), TrueClass) -::RUBY_FRAMEWORK = T.let(T.unsafe(nil), TrueClass) -::RUBY_FRAMEWORK_VERSION = T.let(T.unsafe(nil), String) - +# source://pry//lib/pry/core_extensions.rb#115 class BasicObject + # Return a binding object for the receiver. + # + # The `self` of the binding is set to the current object, and it contains no + # local variables. + # + # The default definee (http://yugui.jp/articles/846) is set such that new + # methods defined will be added to the singleton class of the BasicObject. + # + # @return [Binding] + # + # source://pry//lib/pry/core_extensions.rb#125 def __binding__; end end +# source://pry//lib/pry/core_extensions.rb#24 class Object < ::BasicObject - include ::ActiveSupport::ToJsonWithActiveSupportEncoder include ::ActiveSupport::ForkTracker::CoreExt - include ::ActiveSupport::ForkTracker::CoreExtPrivate include ::Kernel - include ::JSON::Ext::Generator::GeneratorMethods::Object include ::PP::ObjectMixin - include ::ActiveSupport::Dependencies::Loadable - include ::ActiveSupport::Tryable + # Return a binding object for the receiver. + # + # The `self` of the binding is set to the current object, and it contains no + # local variables. + # + # The default definee (http://yugui.jp/articles/846) is set such that: + # + # * If `self` is a class or module, then new methods created in the binding + # will be defined in that class or module (as in `class Foo; end`). + # * If `self` is a normal object, then new methods created in the binding will + # be defined on its singleton class (as in `class << self; end`). + # * If `self` doesn't have a real singleton class (i.e. it is a Fixnum, Float, + # Symbol, nil, true, or false), then new methods will be created on the + # object's class (as in `self.class.class_eval{ }`) + # + # Newly created constants, including classes and modules, will also be added + # to the default definee. + # + # @return [Binding] + # + # source://pry//lib/pry/core_extensions.rb#70 def __binding__; end + + # Start a Pry REPL on self. + # + # If `self` is a Binding then that will be used to evaluate expressions; + # otherwise a new binding will be created. + # + # @example With a binding + # binding.pry + # @example On any object + # "dummy".pry + # @example With options + # def my_method + # binding.pry :quiet => true + # end + # my_method() + # @param object [Object] the object or binding to pry + # (__deprecated__, use `object.pry`) + # @param hash [Hash] the options hash + # @see Pry.start + # + # source://pry//lib/pry/core_extensions.rb#43 def pry(object = T.unsafe(nil), hash = T.unsafe(nil)); end end +# source://pry//lib/pry/version.rb#3 class Pry extend ::Forwardable extend ::Pry::Forwardable + # Create a new {Pry} instance. + # + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param options [Hash] + # @return [Pry] a new instance of Pry + # + # source://pry//lib/pry/pry_instance.rb#81 def initialize(options = T.unsafe(nil)); end + # Add a sticky local to this Pry instance. + # A sticky local is a local that persists between all bindings in a session. + # + # @param name [Symbol] The name of the sticky local. + # @yield The block that defines the content of the local. The local + # will be refreshed at each tick of the repl loop. + # + # source://pry//lib/pry/pry_instance.rb#212 def add_sticky_local(name, &block); end + + # Returns the value of attribute backtrace. + # + # source://pry//lib/pry/pry_instance.rb#35 def backtrace; end + + # Sets the attribute backtrace + # + # @param value the value to set the attribute backtrace to. + # + # source://pry//lib/pry/pry_instance.rb#35 def backtrace=(_arg0); end + + # Returns the value of attribute binding_stack. + # + # source://pry//lib/pry/pry_instance.rb#32 def binding_stack; end + + # Sets the attribute binding_stack + # + # @param value the value to set the attribute binding_stack to. + # + # source://pry//lib/pry/pry_instance.rb#32 def binding_stack=(_arg0); end - def color(*args, &block); end - def color=(*args, &block); end - def commands(*args, &block); end - def commands=(*args, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def color(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def color=(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def commands(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def commands=(*args, **_arg1, &block); end + + # Generate completions. + # + # @param str [String] What the user has typed so far + # @return [Array] Possible completions + # + # source://pry//lib/pry/pry_instance.rb#145 def complete(str); end + + # Returns the value of attribute config. + # + # source://pry//lib/pry/pry_instance.rb#50 def config; end + + # The currently active `Binding`. + # + # @return [Binding] The currently active `Binding` for the session. + # + # source://pry//lib/pry/pry_instance.rb#124 def current_binding; end + + # The currently active `Binding`. + # support previous API + # + # @return [Binding] The currently active `Binding` for the session. + # + # source://pry//lib/pry/pry_instance.rb#124 def current_context; end + + # Returns the value of attribute custom_completions. + # + # source://pry//lib/pry/pry_instance.rb#33 def custom_completions; end + + # Sets the attribute custom_completions + # + # @param value the value to set the attribute custom_completions to. + # + # source://pry//lib/pry/pry_instance.rb#33 def custom_completions=(_arg0); end - def editor(*args, &block); end - def editor=(*args, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def editor(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def editor=(*args, **_arg1, &block); end + + # Pass a line of input to Pry. + # + # This is the equivalent of `Binding#eval` but with extra Pry! + # + # In particular: + # 1. Pry commands will be executed immediately if the line matches. + # 2. Partial lines of input will be queued up until a complete expression has + # been accepted. + # 3. Output is written to `#output` in pretty colours, not returned. + # + # Once this method has raised an exception or returned false, this instance + # is no longer usable. {#exit_value} will return the session's breakout + # value if applicable. + # + # @option options + # @param line [String?] The line of input; `nil` if the user types `` + # @param options [Hash] a customizable set of options + # @raise [Exception] If the user uses the `raise-up` command, this method + # will raise that exception. + # @return [Boolean] Is Pry ready to accept more input? + # + # source://pry//lib/pry/pry_instance.rb#255 def eval(line, options = T.unsafe(nil)); end + + # Returns the value of attribute eval_string. + # + # source://pry//lib/pry/pry_instance.rb#34 def eval_string; end + + # Sets the attribute eval_string + # + # @param value the value to set the attribute eval_string to. + # + # source://pry//lib/pry/pry_instance.rb#34 def eval_string=(_arg0); end + + # source://pry//lib/pry/pry_instance.rb#286 def evaluate_ruby(code); end - def exception_handler(*args, &block); end - def exception_handler=(*args, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def exception_handler(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def exception_handler=(*args, **_arg1, &block); end + + # Execute the specified hook. + # If executing a hook raises an exception, we log that and then continue sucessfully. + # To debug such errors, use the global variable $pry_hook_error, which is set as a + # result. + # + # @param name [Symbol] The hook name to execute + # @param args [*Object] The arguments to pass to the hook + # @return [Object, Exception] The return value of the hook or the exception raised + # + # source://pry//lib/pry/pry_instance.rb#394 def exec_hook(name, *args, &block); end + + # Returns the value of attribute exit_value. + # + # source://pry//lib/pry/pry_instance.rb#42 def exit_value; end - def extra_sticky_locals(*args, &block); end - def extra_sticky_locals=(*args, &block); end - def hooks(*args, &block); end - def hooks=(*args, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def extra_sticky_locals(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def extra_sticky_locals=(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def hooks(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def hooks=(*args, **_arg1, &block); end + + # Injects a local variable into the provided binding. + # + # @param name [String] The name of the local to inject. + # @param value [Object] The value to set the local to. + # @param binding [Binding] The binding to set the local on. + # @return [Object] The value the local was set to. + # + # source://pry//lib/pry/pry_instance.rb#173 def inject_local(name, value, binding); end + + # Inject all the sticky locals into the current binding. + # + # source://pry//lib/pry/pry_instance.rb#201 def inject_sticky_locals!; end - def input(*args, &block); end - def input=(*args, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def input(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def input=(*args, **_arg1, &block); end + + # @since v0.12.0 + # + # source://pry//lib/pry/pry_instance.rb#45 def input_ring; end + + # Returns the value of attribute last_dir. + # + # source://pry//lib/pry/pry_instance.rb#39 def last_dir; end + + # Sets the attribute last_dir + # + # @param value the value to set the attribute last_dir to. + # + # source://pry//lib/pry/pry_instance.rb#39 def last_dir=(_arg0); end + + # Returns the value of attribute last_exception. + # + # source://pry//lib/pry/pry_instance.rb#41 def last_exception; end + + # Set the last exception for a session. + # + # @param exception [Exception] The last exception. + # + # source://pry//lib/pry/pry_instance.rb#418 def last_exception=(exception); end + + # Returns the value of attribute last_file. + # + # source://pry//lib/pry/pry_instance.rb#38 def last_file; end + + # Sets the attribute last_file + # + # @param value the value to set the attribute last_file to. + # + # source://pry//lib/pry/pry_instance.rb#38 def last_file=(_arg0); end + + # Returns the value of attribute last_result. + # + # source://pry//lib/pry/pry_instance.rb#37 def last_result; end + + # Sets the attribute last_result + # + # @param value the value to set the attribute last_result to. + # + # source://pry//lib/pry/pry_instance.rb#37 def last_result=(_arg0); end + + # @return [Boolean] True if the last result is an exception that was raised, + # as opposed to simply an instance of Exception (like the result of + # Exception.new) + # + # source://pry//lib/pry/pry_instance.rb#440 def last_result_is_exception?; end + + # @return [Integer] The maximum amount of objects remembered by the inp and + # out arrays. Defaults to 100. + # + # source://pry//lib/pry/pry_instance.rb#190 def memory_size; end + + # source://pry//lib/pry/pry_instance.rb#195 def memory_size=(size); end + + # Returns an output device + # + # @example + # pry_instance.output.puts "ohai!" + # + # source://pry//lib/pry/pry_instance.rb#538 def output; end - def output=(*args, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def output=(*args, **_arg1, &block); end + + # @since v0.12.0 + # + # source://pry//lib/pry/pry_instance.rb#48 def output_ring; end + + # Returns the currently configured pager + # + # @example + # pry_instance.pager.page text + # + # source://pry//lib/pry/pry_instance.rb#530 def pager; end - def pager=(*args, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def pager=(*args, **_arg1, &block); end + + # Pops the current prompt off of the prompt stack. If the prompt you are + # popping is the last prompt, it will not be popped. Use this to restore the + # previous prompt. + # + # @example + # pry = Pry.new(prompt: Pry::Prompt[:my_prompt1]) + # pry.push_prompt(Pry::Prompt[:my_prompt2]) + # pry.pop_prompt # => prompt2 + # pry.pop_prompt # => prompt1 + # pry.pop_prompt # => prompt1 + # @return [Pry::Prompt] the prompt being popped + # + # source://pry//lib/pry/pry_instance.rb#522 def pop_prompt; end - def print(*args, &block); end - def print=(*args, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def print(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def print=(*args, **_arg1, &block); end + + # If the given line is a valid command, process it in the context of the + # current `eval_string` and binding. + # + # @param val [String] The line to process. + # @return [Boolean] `true` if `val` is a command, `false` otherwise + # + # source://pry//lib/pry/pry_instance.rb#325 def process_command(val); end + + # Same as process_command, but outputs exceptions to `#output` instead of + # raising. + # + # @param val [String] The line to process. + # @return [Boolean] `true` if `val` is a command, `false` otherwise + # + # source://pry//lib/pry/pry_instance.rb#360 def process_command_safely(val); end + + # This is the prompt at the top of the prompt stack. + # + # @return [Pry::Prompt] the current prompt + # + # source://pry//lib/pry/pry_instance.rb#101 def prompt; end + + # Sets the Pry prompt. + # + # @param new_prompt [Pry::Prompt] + # @return [void] + # + # source://pry//lib/pry/pry_instance.rb#108 def prompt=(new_prompt); end + + # Push a binding for the given object onto the stack. If this instance is + # currently stopped, mark it as usable again. + # + # source://pry//lib/pry/pry_instance.rb#131 def push_binding(object); end + + # Initialize this instance by pushing its initial context into the binding + # stack. If no target is given, start at the top level. + # + # source://pry//lib/pry/pry_instance.rb#118 def push_initial_binding(target = T.unsafe(nil)); end + + # Pushes the current prompt onto a stack that it can be restored from later. + # Use this if you wish to temporarily change the prompt. + # + # @example + # push_prompt(Pry::Prompt[:my_prompt]) + # @param new_prompt [Pry::Prompt] + # @return [Pry::Prompt] new_prompt + # + # source://pry//lib/pry/pry_instance.rb#506 def push_prompt(new_prompt); end + + # Convenience accessor for the `quiet` config key. + # + # @return [Boolean] + # + # source://pry//lib/pry/pry_instance.rb#592 def quiet?; end + + # source://pry//lib/pry/pry_instance.rb#582 def raise_up(*args); end + + # source://pry//lib/pry/pry_instance.rb#586 def raise_up!(*args); end + + # Raise an exception out of Pry. + # + # See Kernel#raise for documentation of parameters. + # See rb_make_exception for the inbuilt implementation. + # + # This is necessary so that the raise-up command can tell the + # difference between an exception the user has decided to raise, + # and a mistake in specifying that exception. + # + # (i.e. raise-up RunThymeError.new should not be the same as + # raise-up NameError, "unititialized constant RunThymeError") + # + # @raise [TypeError] + # + # source://pry//lib/pry/pry_instance.rb#554 def raise_up_common(force, *args); end + + # Potentially deprecated. Use `Pry::REPL.new(pry, :target => target).start` + # (If nested sessions are going to exist, this method is fine, but a goal is + # to come up with an alternative to nested sessions altogether.) + # + # source://pry//lib/pry/pry_instance.rb#282 def repl(target = T.unsafe(nil)); end + + # Reset the current eval string. If the user has entered part of a multiline + # expression, this discards that input. + # + # source://pry//lib/pry/pry_instance.rb#231 def reset_eval_string; end + + # Run the specified command. + # + # @example + # pry_instance.run_command("ls -m") + # @param val [String] The command (and its params) to execute. + # @return [Pry::Command::VOID_VALUE] + # + # source://pry//lib/pry/pry_instance.rb#375 def run_command(val); end + + # Returns the appropriate prompt to use. + # + # @return [String] The prompt. + # + # source://pry//lib/pry/pry_instance.rb#453 def select_prompt; end + + # Set the last result of an eval. + # This method should not need to be invoked directly. + # + # @param result [Object] The result. + # @param code [String] The code that was run. + # + # source://pry//lib/pry/pry_instance.rb#409 def set_last_result(result, code = T.unsafe(nil)); end + + # Whether the print proc should be invoked. + # Currently only invoked if the output is not suppressed. + # + # @return [Boolean] Whether the print proc should be invoked. + # + # source://pry//lib/pry/pry_instance.rb#447 def should_print?; end + + # Output the result or pass to an exception handler (if result is an exception). + # + # source://pry//lib/pry/pry_instance.rb#298 def show_result(result); end + + # source://pry//lib/pry/pry_instance.rb#216 def sticky_locals; end + + # Returns the value of attribute suppress_output. + # + # source://pry//lib/pry/pry_instance.rb#36 def suppress_output; end + + # Sets the attribute suppress_output + # + # @param value the value to set the attribute suppress_output to. + # + # source://pry//lib/pry/pry_instance.rb#36 def suppress_output=(_arg0); end + + # Update Pry's internal state after evalling code. + # This method should not need to be invoked directly. + # + # @param code [String] The code we just eval'd + # + # source://pry//lib/pry/pry_instance.rb#428 def update_input_history(code); end private + # Force `eval_string` into the encoding of `val`. [Issue #284] + # + # source://pry//lib/pry/pry_instance.rb#680 def ensure_correct_encoding!(val); end + + # source://pry//lib/pry/pry_instance.rb#688 def generate_prompt(prompt_proc, conf); end + + # source://pry//lib/pry/pry_instance.rb#598 def handle_line(line, options); end + + # the array that the prompt stack is stored in + # + # source://pry//lib/pry/pry_instance.rb#697 def prompt_stack; end class << self + # Convert the given object into an instance of `Pry::Code`, if it isn't + # already one. + # + # @param obj [Code, Method, UnboundMethod, Proc, Pry::Method, String, Array, IO] + # + # source://pry//lib/pry/code.rb#12 def Code(obj); end + + # If the given object is a `Pry::Method`, return it unaltered. If it's + # anything else, return it wrapped in a `Pry::Method` instance. + # + # source://pry//lib/pry/method.rb#9 def Method(obj); end + + # If the given object is a `Pry::WrappedModule`, return it unaltered. If it's + # anything else, return it wrapped in a `Pry::WrappedModule` instance. + # + # source://pry//lib/pry/wrapped_module.rb#7 def WrappedModule(obj); end + + # source://pry//lib/pry/pry_class.rb#294 def auto_resize!; end + + # Return a `Binding` object for `target` or return `target` if it is + # already a `Binding`. + # In the case where `target` is top-level then return `TOPLEVEL_BINDING` + # + # @param target [Object] The object to get a `Binding` object for. + # @return [Binding] The `Binding` object. + # + # source://pry//lib/pry/pry_class.rb#347 def binding_for(target); end + + # Returns the value of attribute cli. + # + # source://pry//lib/pry/pry_class.rb#22 def cli; end + + # Sets the attribute cli + # + # @param value the value to set the attribute cli to. + # + # source://pry//lib/pry/pry_class.rb#22 def cli=(_arg0); end - def color(*args, &block); end - def color=(*args, &block); end - def commands(*args, &block); end - def commands=(*args, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def color(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def color=(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def commands(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def commands=(*args, **_arg1, &block); end + + # Returns the value of attribute config. + # + # source://pry//lib/pry/pry_class.rb#25 def config; end + + # Sets the attribute config + # + # @param value the value to set the attribute config to. + # + # source://pry//lib/pry/pry_class.rb#25 def config=(_arg0); end + + # @example + # Pry.configure do |config| + # config.eager_load! # optional + # config.input = # .. + # config.foo = 2 + # end + # @yield [config] Yields a block with {Pry.config} as its argument. + # + # source://pry//lib/pry/pry_class.rb#46 def configure; end + + # source://pry//lib/pry/pry_class.rb#380 def critical_section; end + + # @return [Pry::Config] Returns a value store for an instance of Pry running on the current thread. + # + # source://pry//lib/pry/pry_class.rb#63 def current; end + + # Returns the value of attribute current_line. + # + # source://pry//lib/pry/pry_class.rb#19 def current_line; end + + # Sets the attribute current_line + # + # @param value the value to set the attribute current_line to. + # + # source://pry//lib/pry/pry_class.rb#19 def current_line=(_arg0); end + + # Returns the value of attribute custom_completions. + # + # source://pry//lib/pry/pry_class.rb#18 def custom_completions; end + + # Sets the attribute custom_completions + # + # @param value the value to set the attribute custom_completions to. + # + # source://pry//lib/pry/pry_class.rb#18 def custom_completions=(_arg0); end - def editor(*args, &block); end - def editor=(*args, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def editor(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def editor=(*args, **_arg1, &block); end + + # Returns the value of attribute eval_path. + # + # source://pry//lib/pry/pry_class.rb#21 def eval_path; end + + # Sets the attribute eval_path + # + # @param value the value to set the attribute eval_path to. + # + # source://pry//lib/pry/pry_class.rb#21 def eval_path=(_arg0); end - def exception_handler(*args, &block); end - def exception_handler=(*args, &block); end - def extra_sticky_locals(*args, &block); end - def extra_sticky_locals=(*args, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def exception_handler(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def exception_handler=(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def extra_sticky_locals(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def extra_sticky_locals=(*args, **_arg1, &block); end + + # source://pry//lib/pry/pry_class.rb#139 def final_session_setup; end - def history(*args, &block); end - def history=(*args, &block); end - def hooks(*args, &block); end - def hooks=(*args, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def history(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def history=(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def hooks(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def hooks=(*args, **_arg1, &block); end + + # @return [Boolean] + # + # source://pry//lib/pry/pry_class.rb#375 def in_critical_section?; end + + # Basic initialization. + # + # source://pry//lib/pry/pry_class.rb#338 def init; end + + # @return [Boolean] Whether this is the first time a Pry session has + # been started since loading the Pry class. + # + # source://pry//lib/pry/pry_class.rb#257 def initial_session?; end + + # Do basic setup for initial session including: loading pryrc, plugins, + # requires, and history. + # + # source://pry//lib/pry/pry_class.rb#129 def initial_session_setup; end - def input(*args, &block); end - def input=(*args, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def input(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def input=(*args, **_arg1, &block); end + + # Returns the value of attribute last_internal_error. + # + # source://pry//lib/pry/pry_class.rb#24 def last_internal_error; end + + # Sets the attribute last_internal_error + # + # @param value the value to set the attribute last_internal_error to. + # + # source://pry//lib/pry/pry_class.rb#24 def last_internal_error=(_arg0); end + + # Returns the value of attribute line_buffer. + # + # source://pry//lib/pry/pry_class.rb#20 def line_buffer; end + + # Sets the attribute line_buffer + # + # @param value the value to set the attribute line_buffer to. + # + # source://pry//lib/pry/pry_class.rb#20 def line_buffer=(_arg0); end + + # Load the given file in the context of `Pry.toplevel_binding` + # + # @param file [String] The unexpanded file path. + # + # source://pry//lib/pry/pry_class.rb#69 def load_file_at_toplevel(file); end + + # Execute the file through the REPL loop, non-interactively. + # + # @param file_name [String] File name to load through the REPL. + # + # source://pry//lib/pry/pry_class.rb#202 def load_file_through_repl(file_name); end + + # Load Readline history if required. + # + # source://pry//lib/pry/pry_class.rb#251 def load_history; end + + # Load RC files if appropriate This method can also be used to reload the + # files if they have changed. + # + # source://pry//lib/pry/pry_class.rb#77 def load_rc_files; end + + # Load any Ruby files specified with the -r flag on the command line. + # + # source://pry//lib/pry/pry_class.rb#101 def load_requires; end + + # Trap interrupts on jruby, and make them behave like MRI so we can + # catch them. + # + # source://pry//lib/pry/pry_class.rb#109 def load_traps; end + + # source://pry//lib/pry/pry_class.rb#113 def load_win32console; end + + # @return [main] returns the special instance of Object, "main". + # + # source://pry//lib/pry/pry_class.rb#55 def main; end - def memory_size(*args, &block); end - def memory_size=(*args, &block); end - def output(*args, &block); end - def output=(*args, &block); end - def pager(*args, &block); end - def pager=(*args, &block); end - def print(*args, &block); end - def print=(*args, &block); end - def prompt(*args, &block); end - def prompt=(*args, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def memory_size(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def memory_size=(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def output(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def output=(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def pager(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def pager=(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def print(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def print=(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def prompt(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def prompt=(*args, **_arg1, &block); end + + # Returns the value of attribute quiet. + # + # source://pry//lib/pry/pry_class.rb#23 def quiet; end + + # Sets the attribute quiet + # + # @param value the value to set the attribute quiet to. + # + # source://pry//lib/pry/pry_class.rb#23 def quiet=(_arg0); end + + # Load the local RC file (./.pryrc) + # + # source://pry//lib/pry/pry_class.rb#86 def rc_files_to_load; end + + # Expand a file to its canonical name (following symlinks as appropriate) + # + # source://pry//lib/pry/pry_class.rb#94 def real_path_to(file); end + + # Set all the configurable options back to their default values + # + # source://pry//lib/pry/pry_class.rb#326 def reset_defaults; end + + # Run a Pry command from outside a session. The commands available are + # those referenced by `Pry.config.commands` (the default command set). + # + # @example Run under Pry class, returning only public methods. + # Pry.run_command "ls -m", :target => Pry + # @example Run at top-level with no output. + # Pry.run_command "ls" + # @example Display command output. + # Pry.run_command "ls -av", :show_output => true + # @option options + # @option options + # @param command_string [String] The Pry command (including arguments, + # if any). + # @param options [Hash] Optional named parameters. + # @return [nil] + # + # source://pry//lib/pry/pry_class.rb#277 def run_command(command_string, options = T.unsafe(nil)); end + + # Start a Pry REPL. + # This method also loads `pryrc` as necessary the first time it is invoked. + # + # @example + # Pry.start(Object.new, :input => MyInput.new) + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param target [Object, Binding] The receiver of the Pry session + # @param options [Hash] + # + # source://pry//lib/pry/pry_class.rb#156 def start(target = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://pry//lib/pry/pry_class.rb#354 def toplevel_binding; end + + # Sets the attribute toplevel_binding + # + # @param value the value to set the attribute toplevel_binding to. + # + # source://pry//lib/pry/pry_class.rb#372 def toplevel_binding=(_arg0); end + + # An inspector that clips the output to `max_length` chars. + # In case of > `max_length` chars the `# notation is used. + # + # @option options + # @option options + # @param obj [Object] The object to view. + # @param options [Hash] + # @return [String] The string representation of `obj`. + # + # source://pry//lib/pry/pry_class.rb#225 def view_clip(obj, options = T.unsafe(nil)); end private + # @return [Boolean] + # + # source://pry//lib/pry/pry_class.rb#388 def mutex_available?; end end end +# @return [Array] Code of the method used when implementing Pry's +# __binding__, along with line indication to be used with instance_eval (and +# friends). +# @see Object#__binding__ +# +# source://pry//lib/pry/core_extensions.rb#9 Pry::BINDING_METHOD_IMPL = T.let(T.unsafe(nil), Array) +# source://pry//lib/pry/basic_object.rb#4 class Pry::BasicObject < ::BasicObject include ::Kernel + include ::ActiveSupport::ForkTracker::CoreExt + include ::ActiveSupport::ForkTracker::CoreExtPrivate end +# source://pry//lib/pry/basic_object.rb#6 Pry::BasicObject::Dir = Dir + +# source://pry//lib/pry/basic_object.rb#6 Pry::BasicObject::ENV = T.let(T.unsafe(nil), Object) + +# source://pry//lib/pry/basic_object.rb#6 Pry::BasicObject::File = File + +# source://pry//lib/pry/basic_object.rb#6 Pry::BasicObject::Kernel = Kernel + +# source://pry//lib/pry/basic_object.rb#6 Pry::BasicObject::LoadError = LoadError + +# source://pry//lib/pry/basic_object.rb#6 Pry::BasicObject::Pry = Pry +# A super-class for Commands that are created with a single block. +# +# This class ensures that the block is called with the correct number of +# arguments and the right context. +# +# Create subclasses using {Pry::CommandSet#command}. +# +# source://pry//lib/pry/block_command.rb#13 class Pry::BlockCommand < ::Pry::Command + # Call the block that was registered with this command. + # + # @param args [Array] The arguments passed + # @return [Object] The return value of the block + # + # source://pry//lib/pry/block_command.rb#14 def call(*args); end + + # source://pry//lib/pry/block_command.rb#18 def help; end end +# Manage the processing of command line options +# +# source://pry//lib/pry/cli.rb#7 class Pry::CLI class << self + # Add a block responsible for processing parsed options. + # + # source://pry//lib/pry/cli.rb#39 def add_option_processor(&block); end + + # Add another set of CLI options (a Pry::Slop block) + # + # source://pry//lib/pry/cli.rb#24 def add_options(&block); end + + # @return [Array] The input array of strings to process + # as CLI options. + # + # source://pry//lib/pry/cli.rb#21 def input_args; end + + # @return [Array] The input array of strings to process + # as CLI options. + # + # source://pry//lib/pry/cli.rb#21 def input_args=(_arg0); end + + # @return [Array] The Procs that process the parsed options. Plugins can + # utilize this facility in order to add and process their own Pry + # options. + # + # source://pry//lib/pry/cli.rb#17 def option_processors; end + + # @return [Array] The Procs that process the parsed options. Plugins can + # utilize this facility in order to add and process their own Pry + # options. + # + # source://pry//lib/pry/cli.rb#17 def option_processors=(_arg0); end + + # @return [Proc] The Proc defining the valid command line options. + # + # source://pry//lib/pry/cli.rb#12 def options; end + + # @return [Proc] The Proc defining the valid command line options. + # + # source://pry//lib/pry/cli.rb#12 def options=(_arg0); end + + # source://pry//lib/pry/cli.rb#52 def parse_options(args = T.unsafe(nil)); end + + # Clear `options` and `option_processors` + # + # source://pry//lib/pry/cli.rb#47 def reset; end + + # source://pry//lib/pry/cli.rb#90 def start(opts); end end end +# source://pry//lib/pry/cli.rb#8 class Pry::CLI::NoOptionsError < ::StandardError; end +# A super-class of Commands with structure. +# +# This class implements the bare-minimum functionality that a command should +# have, namely a --help switch, and then delegates actual processing to its +# subclasses. +# +# Create subclasses using {Pry::CommandSet#create_command}, and override the +# `options(opt)` method to set up an instance of Pry::Slop, and the `process` +# method to actually run the command. If necessary, you can also override +# `setup` which will be called before `options`, for example to require any +# gems your command needs to run, or to set up state. +# +# source://pry//lib/pry/class_command.rb#15 class Pry::ClassCommand < ::Pry::Command + # Returns the value of attribute args. + # + # source://pry//lib/pry/class_command.rb#64 def args; end + + # Sets the attribute args + # + # @param value the value to set the attribute args to. + # + # source://pry//lib/pry/class_command.rb#64 def args=(_arg0); end + + # Set up `opts` and `args`, and then call `process`. + # + # This method will display help if necessary. + # + # @param args [Array] The arguments passed + # @return [Object] The return value of `process` or VOID_VALUE + # + # source://pry//lib/pry/class_command.rb#72 def call(*args); end + + # Generate shell completions + # + # @param search [String] The line typed so far + # @return [Array] the words to complete + # + # source://pry//lib/pry/class_command.rb#105 def complete(search); end + + # Return the help generated by Pry::Slop for this command. + # + # source://pry//lib/pry/class_command.rb#87 def help; end + + # A method to setup Pry::Slop so it can parse the options your command expects. + # + # method, as it may be called by Pry at any time for introspection reasons. + # If you need to set up default values, use `setup` instead. + # + # @example + # def options(opt) + # opt.banner "Gists methods or classes" + # opt.on(:c, :class, "gist a class") do + # @action = :class + # end + # end + # @note Please don't do anything side-effecty in the main part of this + # + # source://pry//lib/pry/class_command.rb#171 def options(opt); end + + # Returns the value of attribute opts. + # + # source://pry//lib/pry/class_command.rb#63 def opts; end + + # Sets the attribute opts + # + # @param value the value to set the attribute opts to. + # + # source://pry//lib/pry/class_command.rb#63 def opts=(_arg0); end + + # The actual body of your command should go here. + # + # The `opts` mehod can be called to get the options that Pry::Slop has passed, + # and `args` gives the remaining, unparsed arguments. + # + # The return value of this method is discarded unless the command was + # created with `:keep_retval => true`, in which case it is returned to the + # repl. + # + # @example + # def process + # if opts.present?(:class) + # gist_class + # else + # gist_method + # end + # end + # @raise [CommandError] + # + # source://pry//lib/pry/class_command.rb#190 def process; end + + # A method called just before `options(opt)` as part of `call`. + # + # This method can be used to set up any context your command needs to run, + # for example requiring gems, or setting default values for options. + # + # @example + # def setup + # require 'gist' + # @action = :method + # end + # + # source://pry//lib/pry/class_command.rb#121 def setup; end + + # Return an instance of Pry::Slop that can parse either subcommands or the + # options that this command accepts. + # + # source://pry//lib/pry/class_command.rb#93 def slop; end + + # A method to setup Pry::Slop commands so it can parse the subcommands your + # command expects. If you need to set up default values, use `setup` + # instead. + # + # @example A minimal example + # def subcommands(cmd) + # cmd.command :download do |opt| + # description 'Downloads a content from a server' + # + # opt.on :verbose, 'Use verbose output' + # + # run do |options, arguments| + # ContentDownloader.download(options, arguments) + # end + # end + # end + # @example Define the invokation block anywhere you want + # def subcommands(cmd) + # cmd.command :download do |opt| + # description 'Downloads a content from a server' + # + # opt.on :verbose, 'Use verbose output' + # end + # end + # + # def process + # # Perform calculations... + # opts.fetch_command(:download).run do |options, arguments| + # ContentDownloader.download(options, arguments) + # end + # # More calculations... + # end + # + # source://pry//lib/pry/class_command.rb#156 def subcommands(cmd); end class << self + # source://pry//lib/pry/class_command.rb#29 def doc; end + + # source://pry//lib/pry/class_command.rb#37 def file; end + + # Ensure that subclasses inherit the options, description and + # match from a ClassCommand super class. + # + # source://pry//lib/pry/class_command.rb#19 def inherited(klass); end + + # source://pry//lib/pry/class_command.rb#42 def line; end + + # source://pry//lib/pry/class_command.rb#25 def source; end + + # source://pry//lib/pry/class_command.rb#37 def source_file; end + + # source://pry//lib/pry/class_command.rb#42 def source_line; end + + # source://pry//lib/pry/class_command.rb#33 def source_location; end private + # The object used to extract the source for the command. + # + # This should be a `Pry::Method(block)` for a command made with `create_command` + # and a `Pry::WrappedModule(self)` for a command that's a standard class. + # + # @return [Pry::WrappedModule, Pry::Method] + # + # source://pry//lib/pry/class_command.rb#54 def source_object; end end end +# `Pry::Code` is a class that encapsulates lines of source code and their +# line numbers and formats them for terminal output. It can read from a file +# or method definition or be instantiated with a `String` or an `Array`. +# +# In general, the formatting methods in `Code` return a new `Code` object +# which will format the text as specified when `#to_s` is called. This allows +# arbitrary chaining of formatting methods without mutating the original +# object. +# +# source://pry//lib/pry/code.rb#32 class Pry::Code extend ::MethodSource::CodeHelpers + # Instantiate a `Code` object containing code from the given `Array`, + # `String`, or `IO`. The first line will be line 1 unless specified + # otherwise. If you need non-contiguous line numbers, you can create an + # empty `Code` object and then use `#push` to insert the lines. + # + # @param lines [Array, String, IO] + # @param start_line [Integer?] + # @param code_type [Symbol?] + # @return [Code] a new instance of Code + # + # source://pry//lib/pry/code.rb#87 def initialize(lines = T.unsafe(nil), start_line = T.unsafe(nil), code_type = T.unsafe(nil)); end + # Append the given line. +lineno+ is one more than the last existing + # line, unless specified otherwise. + # + # @param line [String] + # @return [void] + # + # source://pry//lib/pry/code.rb#102 def <<(line); end + + # Two `Code` objects are equal if they contain the same lines with the same + # numbers. Otherwise, call `to_s` and `chomp` and compare as Strings. + # + # @param other [Code, Object] + # @return [Boolean] + # + # source://pry//lib/pry/code.rb#325 def ==(other); end + + # Remove all lines except for the +lines+ after and excluding +lineno+. + # + # @param lineno [Integer] + # @param lines [Integer] + # @return [Code] + # + # source://pry//lib/pry/code.rb#195 def after(lineno, lines = T.unsafe(nil)); end + + # Remove all lines except for the +lines+ on either side of and including + # +lineno+. + # + # @param lineno [Integer] + # @param lines [Integer] + # @return [Code] + # + # source://pry//lib/pry/code.rb#182 def around(lineno, lines = T.unsafe(nil)); end + + # Remove all lines except for the +lines+ up to and excluding +lineno+. + # + # @param lineno [Integer] + # @param lines [Integer] + # @return [Code] + # + # source://pry//lib/pry/code.rb#168 def before(lineno, lines = T.unsafe(nil)); end + + # Remove all lines that aren't in the given range, expressed either as a + # `Range` object or a first and last line number (inclusive). Negative + # indices count from the end of the array of lines. + # + # @param start_line [Range, Integer] + # @param end_line [Integer?] + # @return [Code] + # + # source://pry//lib/pry/code.rb#135 def between(start_line, end_line = T.unsafe(nil)); end + + # @return [Symbol] The type of code stored in this wrapper. + # + # source://pry//lib/pry/code.rb#77 def code_type; end + + # @return [Symbol] The type of code stored in this wrapper. + # + # source://pry//lib/pry/code.rb#77 def code_type=(_arg0); end + + # Get the comment that describes the expression on the given line number. + # + # @param line_number [Integer] (1-based) + # @return [String] the code. + # + # source://pry//lib/pry/code.rb#286 def comment_describing(line_number); end + + # Get the multiline expression that starts on the given line number. + # + # @param line_number [Integer] (1-based) + # @return [String] the code. + # + # source://pry//lib/pry/code.rb#294 def expression_at(line_number, consume = T.unsafe(nil)); end + + # Remove all lines that don't match the given `pattern`. + # + # @param pattern [Regexp] + # @return [Code] + # + # source://pry//lib/pry/code.rb#207 def grep(pattern); end + + # @return [String] a (possibly highlighted) copy of the source code. + # + # source://pry//lib/pry/code.rb#263 def highlighted; end + + # Return the number of lines stored. + # + # @return [Integer] + # + # source://pry//lib/pry/code.rb#316 def length; end + + # @return [Integer] the number of digits in the last line. + # + # source://pry//lib/pry/code.rb#252 def max_lineno_width; end + + # Forward any missing methods to the output of `#to_s`. + # + # source://pry//lib/pry/code.rb#335 def method_missing(method_name, *args, &block); end + + # Get the (approximate) Module.nesting at the give line number. + # + # @param line_number [Integer] line number starting from 1 + # @return [Array] a list of open modules. + # + # source://pry//lib/pry/code.rb#302 def nesting_at(line_number); end + + # Writes a formatted representation (based on the configuration of the + # object) to the given output, which must respond to `#<<`. + # + # source://pry//lib/pry/code.rb#269 def print_to_output(output, color = T.unsafe(nil)); end + + # Append the given line. +lineno+ is one more than the last existing + # line, unless specified otherwise. + # + # @param line [String] + # @return [void] + # + # source://pry//lib/pry/code.rb#102 def push(line); end + + # Return an unformatted String of the code. + # + # @return [String] + # + # source://pry//lib/pry/code.rb#309 def raw; end + + # Filter the lines using the given block. + # + # @return [Code] + # @yield [LOC] + # + # source://pry//lib/pry/code.rb#122 def reject(&block); end + + # Filter the lines using the given block. + # + # @return [Code] + # @yield [LOC] + # + # source://pry//lib/pry/code.rb#112 def select(&block); end + + # Take `num_lines` from `start_line`, forward or backwards. + # + # @param start_line [Integer] + # @param num_lines [Integer] + # @return [Code] + # + # source://pry//lib/pry/code.rb#150 def take_lines(start_line, num_lines); end + + # @return [String] a formatted representation (based on the configuration of + # the object). + # + # source://pry//lib/pry/code.rb#258 def to_s; end + + # Format output with the specified number of spaces in front of every line, + # unless `spaces` is falsy. + # + # @param spaces [Integer?] + # @return [Code] + # + # source://pry//lib/pry/code.rb#244 def with_indentation(spaces = T.unsafe(nil)); end + + # Format output with line numbers next to it, unless `y_n` is falsy. + # + # @param y_n [Boolean?] + # @return [Code] + # + # source://pry//lib/pry/code.rb#221 def with_line_numbers(y_n = T.unsafe(nil)); end + + # Format output with a marker next to the given +lineno+, unless +lineno+ is + # falsy. + # + # @param lineno [Integer?] + # @return [Code] + # + # source://pry//lib/pry/code.rb#232 def with_marker(lineno = T.unsafe(nil)); end protected + # An abstraction of the `dup.instance_eval` pattern used throughout this + # class. + # + # source://pry//lib/pry/code.rb#353 def alter(&block); end private + # Check whether String responds to missing methods. + # + # @return [Boolean] + # + # source://pry//lib/pry/code.rb#345 def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end class << self + # Instantiate a `Code` object containing code loaded from a file or + # Pry's line buffer. + # + # @param filename [String] The name of a file, or "(pry)". + # @param code_type [Symbol] The type of code the file contains. + # @return [Code] + # + # source://pry//lib/pry/code.rb#42 def from_file(filename, code_type = T.unsafe(nil)); end + + # Instantiate a `Code` object containing code extracted from a + # `::Method`, `UnboundMethod`, `Proc`, or `Pry::Method` object. + # + # @param meth [::Method, UnboundMethod, Proc, Pry::Method] The method + # object. + # @param start_line [Integer, nil] The line number to start on, or nil to + # use the method's original line numbers. + # @return [Code] + # + # source://pry//lib/pry/code.rb#55 def from_method(meth, start_line = T.unsafe(nil)); end + + # Attempt to extract the source code for module (or class) `mod`. + # + # @param mod [Module, Class] The module (or class) of interest. + # @param candidate_rank [Integer] The module candidate (by rank) + # to use (see `Pry::WrappedModule::Candidate` for more information). + # @param start_line [Integer, nil] The line number to start on, or nil to + # use the method's original line numbers. + # @return [Code] + # + # source://pry//lib/pry/code.rb#69 def from_module(mod, candidate_rank = T.unsafe(nil), start_line = T.unsafe(nil)); end end end +# Represents a range of lines in a code listing. +# +# @api private +# +# source://pry//lib/pry/code/code_range.rb#8 class Pry::Code::CodeRange + # @api private + # @param start_line [Integer] + # @param end_line [Integer?] + # @return [CodeRange] a new instance of CodeRange + # + # source://pry//lib/pry/code/code_range.rb#11 def initialize(start_line, end_line = T.unsafe(nil)); end + # @api private + # @param lines [Array] + # @return [Range] + # + # source://pry//lib/pry/code/code_range.rb#19 def indices_range(lines); end private + # @api private + # + # source://pry//lib/pry/code/code_range.rb#27 def end_line; end + + # @api private + # @return [Integer] + # + # source://pry//lib/pry/code/code_range.rb#57 def find_end_index(lines); end + + # @api private + # @return [Integer] + # + # source://pry//lib/pry/code/code_range.rb#50 def find_start_index(lines); end + + # If `end_line` is equal to `nil`, then calculate it from the first + # parameter, `start_line`. Otherwise, leave it as it is. + # + # @api private + # @return [void] + # + # source://pry//lib/pry/code/code_range.rb#32 def force_set_end_line; end + + # Finds indices of `start_line` and `end_line` in the given Array of + # +lines+. + # + # @api private + # @param lines [Array] + # @return [Array] + # + # source://pry//lib/pry/code/code_range.rb#45 def indices(lines); end + + # For example, if the range is 4..10, then `start_line` would be equal to + # 4 and `end_line` to 10. + # + # @api private + # @return [void] + # + # source://pry//lib/pry/code/code_range.rb#66 def set_end_line_from_range; end + + # @api private + # + # source://pry//lib/pry/code/code_range.rb#25 def start_line; end end +# Represents a line of code (which may, in fact, contain multiple lines if +# the entirety was eval'd as a single unit following the `edit` command). +# +# A line of code is a tuple, which consists of a line and a line number. A +# `LOC` object's state (namely, the line parameter) can be changed via +# instance methods. `Pry::Code` heavily uses this class. +# +# @api private +# @example +# loc = LOC.new("def example\n :example\nend", 1) +# puts loc.line +# def example +# :example +# end +# #=> nil +# +# loc.indent(3) +# loc.line #=> " def example\n :example\nend" +# +# source://pry//lib/pry/code/loc.rb#23 class Pry::Code::LOC + # @api private + # @param line [String] The line of code. + # @param lineno [Integer] The position of the +line+. + # @return [LOC] a new instance of LOC + # + # source://pry//lib/pry/code/loc.rb#29 def initialize(line, lineno); end + # @api private + # @return [Boolean] + # + # source://pry//lib/pry/code/loc.rb#34 def ==(other); end + + # Prepends the line number `lineno` to the `line`. + # + # @api private + # @param max_width [Integer] + # @return [void] + # + # source://pry//lib/pry/code/loc.rb#64 def add_line_number(max_width = T.unsafe(nil), color = T.unsafe(nil)); end + + # Prepends a marker "=>" or an empty marker to the +line+. + # + # @api private + # @param marker_lineno [Integer] If it is equal to the `lineno`, then + # prepend a hashrocket. Otherwise, an empty marker. + # @return [void] + # + # source://pry//lib/pry/code/loc.rb#81 def add_marker(marker_lineno); end + + # Paints the `line` of code. + # + # @api private + # @param code_type [Symbol] + # @return [void] + # + # source://pry//lib/pry/code/loc.rb#56 def colorize(code_type); end + + # @api private + # + # source://pry//lib/pry/code/loc.rb#38 def dup; end + + # @api private + # + # source://pry//lib/pry/code/loc.rb#98 def handle_multiline_entries_from_edit_command(line, max_width); end + + # Indents the `line` with +distance+ spaces. + # + # @api private + # @param distance [Integer] + # @return [void] + # + # source://pry//lib/pry/code/loc.rb#94 def indent(distance); end + + # @api private + # @return [String] + # + # source://pry//lib/pry/code/loc.rb#43 def line; end + + # @api private + # @return [Integer] + # + # source://pry//lib/pry/code/loc.rb#48 def lineno; end + + # @api private + # @return [Array] + # + # source://pry//lib/pry/code/loc.rb#25 def tuple; end end +# source://pry//lib/pry/code/code_file.rb#6 class Pry::CodeFile + # @param filename [String] The name of a file with code to be detected + # @param code_type [Symbol] The type of code the `filename` contains + # @return [CodeFile] a new instance of CodeFile + # + # source://pry//lib/pry/code/code_file.rb#41 def initialize(filename, code_type = T.unsafe(nil)); end + # @return [String] The code contained in the current `@filename`. + # + # source://pry//lib/pry/code/code_file.rb#47 def code; end + + # @return [Symbol] The type of code stored in this wrapper. + # + # source://pry//lib/pry/code/code_file.rb#37 def code_type; end private + # @raise [MethodSource::SourceNotFoundError] if the `filename` is not + # readable for some reason. + # @return [String] absolute path for the given `filename`. + # + # source://pry//lib/pry/code/code_file.rb#64 def abs_path; end + + # @return [Array] All the paths that contain code that Pry can use for its + # API's. Skips directories. + # + # source://pry//lib/pry/code/code_file.rb#80 def code_path; end + + # @return [String] + # + # source://pry//lib/pry/code/code_file.rb#110 def from_load_path; end + + # @return [String] + # + # source://pry//lib/pry/code/code_file.rb#105 def from_pry_init_pwd; end + + # @return [String] + # + # source://pry//lib/pry/code/code_file.rb#100 def from_pwd; end + + # @param path [String] + # @return [Boolean] if the path, with or without the default ext, + # is a readable file then `true`, otherwise `false`. + # + # source://pry//lib/pry/code/code_file.rb#73 def readable?(path); end + + # @param filename [String] + # @param default [Symbol] (:unknown) the file type to assume if none could be + # detected. + # @return [Symbol, nil] The SyntaxHighlighter type of a file from its + # extension, or `nil` if `:unknown`. + # + # source://pry//lib/pry/code/code_file.rb#89 def type_from_filename(filename, default = T.unsafe(nil)); end end +# source://pry//lib/pry/code/code_file.rb#7 Pry::CodeFile::DEFAULT_EXT = T.let(T.unsafe(nil), String) + +# List of all supported languages. +# +# @return [Hash] +# +# source://pry//lib/pry/code/code_file.rb#11 Pry::CodeFile::EXTENSIONS = T.let(T.unsafe(nil), Hash) + +# source://pry//lib/pry/code/code_file.rb#28 Pry::CodeFile::FILES = T.let(T.unsafe(nil), Hash) + +# Store the current working directory. This allows show-source etc. to work if +# your process has changed directory since boot. [Issue #675] +# +# source://pry//lib/pry/code/code_file.rb#34 Pry::CodeFile::INITIAL_PWD = T.let(T.unsafe(nil), String) +# This class is responsible for taking a string (identifying a +# command/class/method/etc) and returning the relevant type of object. +# For example, if the user looks up "show-source" then a +# `Pry::Command` will be returned. Alternatively, if the user passes in "Pry#repl" then +# a `Pry::Method` object will be returned. +# +# The `CodeObject.lookup` method is responsible for 1. figuring out what kind of +# object the user wants (applying precedence rules in doing so -- i.e methods +# get precedence over commands with the same name) and 2. Returning +# the appropriate object. If the user fails to provide a string +# identifer for the object (i.e they pass in `nil` or "") then the +# object looked up will be the 'current method' or 'current class' +# associated with the Binding. +# +# TODO: This class is a clusterfuck. We need a much more robust +# concept of what a "Code Object" really is. Currently +# commands/classes/candidates/methods and so on just share a very +# ill-defined interface. +# +# source://pry//lib/pry/code_object.rb#22 class Pry::CodeObject include ::Pry::Helpers::OptionsHelpers include ::Pry::Helpers::CommandHelpers + # @return [CodeObject] a new instance of CodeObject + # + # source://pry//lib/pry/code_object.rb#82 def initialize(str, pry_instance, options = T.unsafe(nil)); end + # TODO: just make it so find_command_by_match_or_listing doesn't raise? + # + # source://pry//lib/pry/code_object.rb#94 def command_lookup; end + + # lookup variables and constants and `self` that are not modules + # + # source://pry//lib/pry/code_object.rb#118 def default_lookup; end + + # when no paramter is given (i.e CodeObject.lookup(nil)), then we + # lookup the 'current object' from the binding. + # + # source://pry//lib/pry/code_object.rb#102 def empty_lookup; end + + # source://pry//lib/pry/code_object.rb#136 def method_or_class_lookup; end + + # Returns the value of attribute pry_instance. + # + # source://pry//lib/pry/code_object.rb#79 def pry_instance; end + + # Sets the attribute pry_instance + # + # @param value the value to set the attribute pry_instance to. + # + # source://pry//lib/pry/code_object.rb#79 def pry_instance=(_arg0); end + + # Returns the value of attribute str. + # + # source://pry//lib/pry/code_object.rb#77 def str; end + + # Sets the attribute str + # + # @param value the value to set the attribute str to. + # + # source://pry//lib/pry/code_object.rb#77 def str=(_arg0); end + + # Returns the value of attribute super_level. + # + # source://pry//lib/pry/code_object.rb#80 def super_level; end + + # Sets the attribute super_level + # + # @param value the value to set the attribute super_level to. + # + # source://pry//lib/pry/code_object.rb#80 def super_level=(_arg0); end + + # Returns the value of attribute target. + # + # source://pry//lib/pry/code_object.rb#78 def target; end + + # Sets the attribute target + # + # @param value the value to set the attribute target to. + # + # source://pry//lib/pry/code_object.rb#78 def target=(_arg0); end private + # Returns true if `str` looks like a method, i.e Klass#method + # We need to consider this case because method lookups should fall + # through to the `method_or_class_lookup()` method but a + # defined?() on a "Klass#method` string will see the `#` as a + # comment and only evaluate the `Klass` part. + # + # @param str [String] + # @return [Boolean] Whether the string looks like an instance method. + # + # source://pry//lib/pry/code_object.rb#163 def looks_like_an_instance_method?(str); end + + # grab the nth (`super_level`) super of `obj + # + # @param obj [Object] + # @param super_level [Fixnum] How far up the super chain to ascend. + # @raise [Pry::CommandError] + # + # source://pry//lib/pry/code_object.rb#188 def lookup_super(obj, super_level); end + + # We use this method to decide whether code is safe to eval. Method's are + # generally not, but everything else is. + # TODO: is just checking != "method" enough?? + # TODO: see duplication of this method in Pry::WrappedModule + # + # @param str [String] The string to lookup + # @return [Boolean] + # + # source://pry//lib/pry/code_object.rb#173 def safe_to_evaluate?(str); end + + # @return [Boolean] + # + # source://pry//lib/pry/code_object.rb#152 def sourcable_object?(obj); end + + # source://pry//lib/pry/code_object.rb#181 def target_self; end class << self + # source://pry//lib/pry/code_object.rb#69 def lookup(str, pry_instance, options = T.unsafe(nil)); end end end +# source://pry//lib/pry/code_object.rb#23 module Pry::CodeObject::Helpers + # @return [Boolean] + # + # source://pry//lib/pry/code_object.rb#30 def c_method?; end + + # @note If a module defined by C was extended with a lot of methods written + # in Ruby, this method would fail. + # @return [Boolean] `true` if this module was defined by means of the C API, + # `false` if it's a Ruby module. + # + # source://pry//lib/pry/code_object.rb#46 def c_module?; end + + # @return [Boolean] + # + # source://pry//lib/pry/code_object.rb#38 def command?; end + + # @return [Boolean] + # + # source://pry//lib/pry/code_object.rb#34 def module_with_yard_docs?; end + + # we need this helper as some Pry::Method objects can wrap Procs + # + # @return [Boolean] + # + # source://pry//lib/pry/code_object.rb#26 def real_method_object?; end end +# PP subclass for streaming inspect output in color. +# +# source://pry//lib/pry/color_printer.rb#8 class Pry::ColorPrinter < ::PP + # source://pry//lib/pry/color_printer.rb#25 def pp(object); end + + # source://pry//lib/pry/color_printer.rb#37 def text(str, max_width = T.unsafe(nil)); end private + # source://pry//lib/pry/color_printer.rb#49 def highlight_object_literal(object_literal); end + + # source://pry//lib/pry/color_printer.rb#55 def inspect_object(object); end class << self + # source://pry//lib/pry/color_printer.rb#11 def default(_output, value, pry_instance); end + + # source://pry//lib/pry/color_printer.rb#18 def pp(obj, output = T.unsafe(nil), max_width = T.unsafe(nil)); end end end +# N.B. using a regular expresion here so that "raise-up 'foo'" does the right thing. +# +# source://pry//lib/pry/command.rb#11 class Pry::Command include ::Pry::Helpers::BaseHelpers include ::Pry::Helpers::OptionsHelpers @@ -424,121 +2032,553 @@ class Pry::Command extend ::Pry::Helpers::DocumentationHelpers extend ::Pry::CodeObject::Helpers + # Instantiate a command, in preparation for calling it. + # + # @param context [Hash] The runtime context to use with this command. + # @return [Command] a new instance of Command + # + # source://pry//lib/pry/command.rb#230 def initialize(context = T.unsafe(nil)); end + # source://pry//lib/pry/command.rb#292 def _pry_; end + + # Sets the attribute pry_instance + # + # @param value the value to set the attribute pry_instance to. + # + # source://pry//lib/pry/command.rb#217 def _pry_=(_arg0); end + + # Returns the value of attribute arg_string. + # + # source://pry//lib/pry/command.rb#213 def arg_string; end + + # Sets the attribute arg_string + # + # @param value the value to set the attribute arg_string to. + # + # source://pry//lib/pry/command.rb#213 def arg_string=(_arg0); end + + # source://pry//lib/pry/command.rb#253 def block; end + + # Returns the value of attribute captures. + # + # source://pry//lib/pry/command.rb#211 def captures; end + + # Sets the attribute captures + # + # @param value the value to set the attribute captures to. + # + # source://pry//lib/pry/command.rb#211 def captures=(_arg0); end + + # Display a warning if a command collides with a local/method in + # the current scope. + # + # source://pry//lib/pry/command.rb#329 def check_for_command_collision(command_match, arg_string); end + + # The block we pass *into* a command so long as `:takes_block` is + # not equal to `false` + # + # @example + # my-command | do + # puts "block content" + # end + # + # source://pry//lib/pry/command.rb#226 def command_block; end + + # The block we pass *into* a command so long as `:takes_block` is + # not equal to `false` + # + # @example + # my-command | do + # puts "block content" + # end + # + # source://pry//lib/pry/command.rb#226 def command_block=(_arg0); end + + # source://pry//lib/pry/command.rb#261 def command_name; end + + # source://pry//lib/pry/command.rb#257 def command_options; end + + # Returns the value of attribute command_set. + # + # source://pry//lib/pry/command.rb#215 def command_set; end + + # Sets the attribute command_set + # + # @param value the value to set the attribute command_set to. + # + # source://pry//lib/pry/command.rb#215 def command_set=(_arg0); end + + # source://pry//lib/pry/command.rb#284 def commands; end + + # Generate completions for this command + # + # @param _search [String] The line typed so far + # @return [Array] Completion words + # + # source://pry//lib/pry/command.rb#411 def complete(_search); end + + # Returns the value of attribute context. + # + # source://pry//lib/pry/command.rb#214 def context; end + + # Sets the attribute context + # + # @param value the value to set the attribute context to. + # + # source://pry//lib/pry/command.rb#214 def context=(_arg0); end + + # source://pry//lib/pry/command.rb#249 def description; end + + # Returns the value of attribute eval_string. + # + # source://pry//lib/pry/command.rb#212 def eval_string; end + + # Sets the attribute eval_string + # + # @param value the value to set the attribute eval_string to. + # + # source://pry//lib/pry/command.rb#212 def eval_string=(_arg0); end + + # Returns the value of attribute hooks. + # + # source://pry//lib/pry/command.rb#216 def hooks; end + + # Sets the attribute hooks + # + # @param value the value to set the attribute hooks to. + # + # source://pry//lib/pry/command.rb#216 def hooks=(_arg0); end + + # Revaluate the string (str) and perform interpolation. + # + # @param str [String] The string to reevaluate with interpolation. + # @return [String] The reevaluated string with interpolations + # applied (if any). + # + # source://pry//lib/pry/command.rb#318 def interpolate_string(str); end + + # source://pry//lib/pry/command.rb#245 def match; end + + # Make those properties accessible to instances + # + # source://pry//lib/pry/command.rb#241 def name; end + + # Properties of one execution of a command (passed by {Pry#run_command} as a hash of + # context and expanded in `#initialize` + # + # source://pry//lib/pry/command.rb#209 def output; end + + # Properties of one execution of a command (passed by {Pry#run_command} as a hash of + # context and expanded in `#initialize` + # + # source://pry//lib/pry/command.rb#209 def output=(_arg0); end + + # Process a line that Command.matches? this command. + # + # @param line [String] The line to process + # @return [Object, Command::VOID_VALUE] + # + # source://pry//lib/pry/command.rb#394 def process_line(line); end + + # Returns the value of attribute pry_instance. + # + # source://pry//lib/pry/command.rb#217 def pry_instance; end + + # Sets the attribute pry_instance + # + # @param value the value to set the attribute pry_instance to. + # + # source://pry//lib/pry/command.rb#217 def pry_instance=(_arg0); end + + # Run a command from another command. + # + # @example + # run "show-input" + # @example + # run ".ls" + # @example + # run "amend-line", "5", 'puts "hello world"' + # @param command_string [String] The string that invokes the command + # @param args [Array] Further arguments to pass to the command + # + # source://pry//lib/pry/command.rb#278 def run(command_string, *args); end + + # source://pry//lib/pry/command.rb#265 def source; end + + # @example + # state.my_state = "my state" # this will not conflict with any + # # `state.my_state` used in another command. + # @return [Hash] Pry commands can store arbitrary state + # here. This state persists between subsequent command invocations. + # All state saved here is unique to the command, it does not + # need to be namespaced. + # + # source://pry//lib/pry/command.rb#309 def state; end + + # Returns the value of attribute target. + # + # source://pry//lib/pry/command.rb#210 def target; end + + # Sets the attribute target + # + # @param value the value to set the attribute target to. + # + # source://pry//lib/pry/command.rb#210 def target=(_arg0); end + + # @return [Object] The value of `self` inside the `target` binding. + # + # source://pry//lib/pry/command.rb#298 def target_self; end + + # Extract necessary information from a line that Command.matches? this + # command. + # + # Returns an array of four elements: + # + # ``` + # [String] the portion of the line that matched with the Command match + # [String] a string of all the arguments (i.e. everything but the match) + # [Array] the captures caught by the command_regex + # [Array] the arguments obtained by splitting the arg_string + # ``` + # + # @param val [String] The line of input + # @return [Array] + # + # source://pry//lib/pry/command.rb#356 def tokenize(val); end + + # source://pry//lib/pry/command.rb#288 def void; end private + # source://pry//lib/pry/command.rb#485 def after_hooks; end + + # source://pry//lib/pry/command.rb#481 def before_hooks; end + + # Run the command with the given `args`. + # + # This is a public wrapper around `#call` which ensures all preconditions + # are met. + # + # @param args [Array] The arguments to pass to this command. + # @return [Object] The return value of the `#call` method, or + # {Command::VOID_VALUE}. + # + # source://pry//lib/pry/command.rb#425 def call_safely(*args); end + + # Run the `#call` method and all the registered hooks. + # + # @param args [Array] The arguments to `#call` + # @return [Object] The return value from `#call` + # + # source://pry//lib/pry/command.rb#492 def call_with_hooks(*args); end + + # source://pry//lib/pry/command.rb#476 def find_hooks(event); end + + # Normalize method arguments according to its arity. + # + # @param method [Integer] + # @param args [Array] + # @return [Array] a (possibly shorter) array of the arguments to pass + # + # source://pry//lib/pry/command.rb#509 def normalize_method_args(method, args); end + + # Pass a block argument to a command. + # + # @param arg_string [String] The arguments (as a string) passed to the command. + # We inspect these for a '| do' or a '| {' and if we find it we use it + # to start a block input sequence. Once we have a complete + # block, we save it to an accessor that can be retrieved from the command context. + # Note that if we find the '| do' or '| {' we delete this and the + # elements following it from `arg_string`. + # + # source://pry//lib/pry/command.rb#451 def pass_block(arg_string); end + + # source://pry//lib/pry/command.rb#436 def use_unpatched_symbol; end class << self + # Define or get the command's banner + # + # source://pry//lib/pry/command.rb#61 def banner(arg = T.unsafe(nil)); end + + # source://pry//lib/pry/command.rb#66 def block; end + + # Sets the attribute block + # + # @param value the value to set the attribute block to. + # + # source://pry//lib/pry/command.rb#30 def block=(_arg0); end + + # source://pry//lib/pry/command.rb#109 def command_name; end + + # Define or get the command's options + # + # source://pry//lib/pry/command.rb#51 def command_options(arg = T.unsafe(nil)); end + + # Sets the attribute command_options + # + # @param value the value to set the attribute command_options to. + # + # source://pry//lib/pry/command.rb#32 def command_options=(_arg0); end + + # source://pry//lib/pry/command.rb#165 def command_regex; end + + # source://pry//lib/pry/command.rb#172 def convert_to_regex(obj); end + + # source://pry//lib/pry/command.rb#89 def default_options(match); end + + # Define or get the command's description + # + # source://pry//lib/pry/command.rb#45 def description(arg = T.unsafe(nil)); end + + # Sets the attribute description + # + # @param value the value to set the attribute description to. + # + # source://pry//lib/pry/command.rb#31 def description=(_arg0); end + + # source://pry//lib/pry/command.rb#75 def doc; end + + # source://pry//lib/pry/command.rb#79 def file; end + + # The group in which the command should be displayed in "help" output. + # This is usually auto-generated from directory naming, but it can be + # manually overridden if necessary. + # Group should not be changed once it is initialized. + # + # source://pry//lib/pry/command.rb#185 def group(name = T.unsafe(nil)); end + + # source://pry//lib/pry/command.rb#105 def inspect; end + + # source://pry//lib/pry/command.rb#84 def line; end + + # source://pry//lib/pry/command.rb#35 def match(arg = T.unsafe(nil)); end + + # Sets the attribute match + # + # @param value the value to set the attribute match to. + # + # source://pry//lib/pry/command.rb#33 def match=(_arg0); end + + # How well does this command match the given line? + # + # Higher scores are better because they imply that this command matches + # the line more closely. + # + # The score is calculated by taking the number of characters at the start + # of the string that are used only to identify the command, not as part of + # the arguments. + # + # @example + # /\.(.*)/.match_score(".foo") #=> 1 + # /\.*(.*)/.match_score("...foo") #=> 3 + # 'hi'.match_score("hi there") #=> 2 + # @param val [String] A line input at the REPL + # @return [Fixnum] + # + # source://pry//lib/pry/command.rb#153 def match_score(val); end + + # Should this command be called for the given line? + # + # @param val [String] A line input at the REPL + # @return [Boolean] + # + # source://pry//lib/pry/command.rb#133 def matches?(val); end + + # source://pry//lib/pry/command.rb#101 def name; end + + # Define or get the command's options + # backward compatibility + # + # source://pry//lib/pry/command.rb#51 def options(arg = T.unsafe(nil)); end + + # Sets the attribute command_options + # + # @param value the value to set the attribute command_options to. + # + # source://pry//lib/pry/command.rb#32 def options=(_arg0); end + + # source://pry//lib/pry/command.rb#70 def source; end + + # source://pry//lib/pry/command.rb#79 def source_file; end + + # source://pry//lib/pry/command.rb#84 def source_line; end + + # source://pry//lib/pry/command.rb#202 def state; end + + # Create a new command with the given properties. + # + # @param match [String, Regex] The thing that triggers this command + # @param description [String] The description to appear in `help` + # @param options [Hash] Behavioral options (see {Pry::CommandSet#command}) + # @param helpers [Module] A module of helper functions to be included. + # @return [Class] (a subclass of {Pry::Command}) + # @yield optional, used for BlockCommands + # + # source://pry//lib/pry/command.rb#120 def subclass(match, description, options, helpers, &block); end end end +# source://pry//lib/pry/commands/amend_line.rb#5 class Pry::Command::AmendLine < ::Pry::ClassCommand + # @raise [CommandError] + # + # source://pry//lib/pry/commands/amend_line.rb#22 def process; end private + # @return [String] A new string with the amendments applied to it. + # + # source://pry//lib/pry/commands/amend_line.rb#33 def amend_input; end + + # source://pry//lib/pry/commands/amend_line.rb#47 def delete_from_array(array, range); end + + # source://pry//lib/pry/commands/amend_line.rb#51 def insert_into_array(array, range); end + + # @return [Fixnum] The number of lines currently in `eval_string` (the + # input buffer) + # + # source://pry//lib/pry/commands/amend_line.rb#62 def line_count; end + + # The lines (or line) that will be modified by the `amend-line`. + # + # @return [Range, Fixnum] The lines or line. + # + # source://pry//lib/pry/commands/amend_line.rb#90 def line_range; end + + # source://pry//lib/pry/commands/amend_line.rb#56 def replace_in_array(array, range); end + + # Returns the (one-indexed) start and end lines given by the user. + # The lines in this range will be affected by the `amend-line`. + # Returns `nil` if no lines were specified by the user. + # + # @return [Array, nil] + # + # source://pry//lib/pry/commands/amend_line.rb#70 def start_and_end_line_number; end + + # Takes two numbers that are 1-indexed, and returns a range (or + # number) that is 0-indexed. 1-indexed means the first element is + # indentified by 1 rather than by 0 (as is the case for Ruby arrays). + # + # @param start_line_number [Fixnum] One-indexed number. + # @param end_line_number [Fixnum] One-indexed number. + # @return [Range] The zero-indexed range. + # + # source://pry//lib/pry/commands/amend_line.rb#83 def zero_indexed_range_from_one_indexed_numbers(start_line_number, end_line_number); end end +# source://pry//lib/pry/commands/bang.rb#5 class Pry::Command::Bang < ::Pry::ClassCommand + # source://pry//lib/pry/commands/bang.rb#16 def process; end end +# source://pry//lib/pry/commands/bang_pry.rb#5 class Pry::Command::BangPry < ::Pry::ClassCommand + # source://pry//lib/pry/commands/bang_pry.rb#14 def process; end end +# source://pry//lib/pry/commands/cat.rb#5 class Pry::Command::Cat < ::Pry::ClassCommand + # source://pry//lib/pry/commands/cat.rb#53 def complete(search); end + + # source://pry//lib/pry/commands/cat.rb#57 def load_path_completions; end + + # source://pry//lib/pry/commands/cat.rb#23 def options(opt); end + + # source://pry//lib/pry/commands/cat.rb#38 def process; end end +# source://pry//lib/pry/commands/cat/abstract_formatter.rb#6 class Pry::Command::Cat::AbstractFormatter include ::Pry::Helpers::OptionsHelpers include ::Pry::Helpers::CommandHelpers @@ -546,1372 +2586,4606 @@ class Pry::Command::Cat::AbstractFormatter private + # source://pry//lib/pry/commands/cat/abstract_formatter.rb#26 def between_lines; end + + # source://pry//lib/pry/commands/cat/abstract_formatter.rb#18 def code_type; end + + # source://pry//lib/pry/commands/cat/abstract_formatter.rb#12 def decorate(content); end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/cat/abstract_formatter.rb#22 def use_line_numbers?; end end +# source://pry//lib/pry/commands/cat/exception_formatter.rb#6 class Pry::Command::Cat::ExceptionFormatter < ::Pry::Command::Cat::AbstractFormatter include ::Pry::Helpers::Text + # @return [ExceptionFormatter] a new instance of ExceptionFormatter + # + # source://pry//lib/pry/commands/cat/exception_formatter.rb#12 def initialize(exception, pry_instance, opts); end + # Returns the value of attribute ex. + # + # source://pry//lib/pry/commands/cat/exception_formatter.rb#7 def ex; end + + # source://pry//lib/pry/commands/cat/exception_formatter.rb#18 def format; end + + # Returns the value of attribute opts. + # + # source://pry//lib/pry/commands/cat/exception_formatter.rb#8 def opts; end + + # Returns the value of attribute pry_instance. + # + # source://pry//lib/pry/commands/cat/exception_formatter.rb#9 def pry_instance; end private + # source://pry//lib/pry/commands/cat/exception_formatter.rb#56 def backtrace_file; end + + # source://pry//lib/pry/commands/cat/exception_formatter.rb#37 def backtrace_level; end + + # source://pry//lib/pry/commands/cat/exception_formatter.rb#60 def backtrace_line; end + + # @raise [CommandError] + # + # source://pry//lib/pry/commands/cat/exception_formatter.rb#64 def check_for_errors; end + + # source://pry//lib/pry/commands/cat/exception_formatter.rb#33 def code_window_size; end + + # source://pry//lib/pry/commands/cat/exception_formatter.rb#78 def header; end + + # source://pry//lib/pry/commands/cat/exception_formatter.rb#52 def increment_backtrace_level; end + + # source://pry//lib/pry/commands/cat/exception_formatter.rb#71 def start_and_end_line_for_code_window; end end +# source://pry//lib/pry/commands/cat/file_formatter.rb#6 class Pry::Command::Cat::FileFormatter < ::Pry::Command::Cat::AbstractFormatter + # @return [FileFormatter] a new instance of FileFormatter + # + # source://pry//lib/pry/commands/cat/file_formatter.rb#11 def initialize(file_with_embedded_line, pry_instance, opts); end + # source://pry//lib/pry/commands/cat/file_formatter.rb#27 def file_and_line; end + + # Returns the value of attribute file_with_embedded_line. + # + # source://pry//lib/pry/commands/cat/file_formatter.rb#7 def file_with_embedded_line; end + + # source://pry//lib/pry/commands/cat/file_formatter.rb#22 def format; end + + # Returns the value of attribute opts. + # + # source://pry//lib/pry/commands/cat/file_formatter.rb#8 def opts; end + + # Returns the value of attribute pry_instance. + # + # source://pry//lib/pry/commands/cat/file_formatter.rb#9 def pry_instance; end private + # source://pry//lib/pry/commands/cat/file_formatter.rb#55 def code_type; end + + # source://pry//lib/pry/commands/cat/file_formatter.rb#43 def code_window_size; end + + # source://pry//lib/pry/commands/cat/file_formatter.rb#47 def decorate(content); end + + # source://pry//lib/pry/commands/cat/file_formatter.rb#59 def detect_code_type_from_file(file_name); end + + # source://pry//lib/pry/commands/cat/file_formatter.rb#35 def file_name; end + + # source://pry//lib/pry/commands/cat/file_formatter.rb#39 def line_number; end end +# source://pry//lib/pry/commands/cat/input_expression_formatter.rb#6 class Pry::Command::Cat::InputExpressionFormatter < ::Pry::Command::Cat::AbstractFormatter + # @return [InputExpressionFormatter] a new instance of InputExpressionFormatter + # + # source://pry//lib/pry/commands/cat/input_expression_formatter.rb#10 def initialize(input_expressions, opts); end + # @raise [CommandError] + # + # source://pry//lib/pry/commands/cat/input_expression_formatter.rb#15 def format; end + + # Returns the value of attribute input_expressions. + # + # source://pry//lib/pry/commands/cat/input_expression_formatter.rb#7 def input_expressions; end + + # Sets the attribute input_expressions + # + # @param value the value to set the attribute input_expressions to. + # + # source://pry//lib/pry/commands/cat/input_expression_formatter.rb#7 def input_expressions=(_arg0); end + + # Returns the value of attribute opts. + # + # source://pry//lib/pry/commands/cat/input_expression_formatter.rb#8 def opts; end + + # Sets the attribute opts + # + # @param value the value to set the attribute opts to. + # + # source://pry//lib/pry/commands/cat/input_expression_formatter.rb#8 def opts=(_arg0); end private + # source://pry//lib/pry/commands/cat/input_expression_formatter.rb#42 def normalized_expression_range; end + + # source://pry//lib/pry/commands/cat/input_expression_formatter.rb#37 def numbered_input_items; end + + # source://pry//lib/pry/commands/cat/input_expression_formatter.rb#33 def selected_input_items; end end +# source://pry//lib/pry/commands/cd.rb#5 class Pry::Command::Cd < ::Pry::ClassCommand + # source://pry//lib/pry/commands/cd.rb#25 def process; end end +# source://pry//lib/pry/commands/change_inspector.rb#5 class Pry::Command::ChangeInspector < ::Pry::ClassCommand + # source://pry//lib/pry/commands/change_inspector.rb#17 def process(inspector); end private + # source://pry//lib/pry/commands/change_inspector.rb#28 def inspector_map; end end +# source://pry//lib/pry/commands/change_prompt.rb#5 class Pry::Command::ChangePrompt < ::Pry::ClassCommand + # source://pry//lib/pry/commands/change_prompt.rb#16 def options(opt); end + + # source://pry//lib/pry/commands/change_prompt.rb#20 def process(prompt); end private + # source://pry//lib/pry/commands/change_prompt.rb#38 def change_prompt(prompt); end + + # source://pry//lib/pry/commands/change_prompt.rb#30 def list_prompts; end end +# source://pry//lib/pry/commands/clear_screen.rb#5 class Pry::Command::ClearScreen < ::Pry::ClassCommand + # source://pry//lib/pry/commands/clear_screen.rb#10 def process; end end +# source://pry//lib/pry/commands/code_collector.rb#5 class Pry::Command::CodeCollector include ::Pry::Helpers::OptionsHelpers include ::Pry::Helpers::CommandHelpers + # @return [CodeCollector] a new instance of CodeCollector + # + # source://pry//lib/pry/commands/code_collector.rb#23 def initialize(args, opts, pry_instance); end + # Returns the value of attribute args. + # + # source://pry//lib/pry/commands/code_collector.rb#8 def args; end + + # The code object + # + # @return [Pry::WrappedModule, Pry::Method, Pry::Command] + # + # source://pry//lib/pry/commands/code_collector.rb#86 def code_object; end + + # The content (i.e code/docs) for the selected object. + # If the user provided a bare code object, it returns the source. + # If the user provided the `-i` or `-o` switches, it returns the + # selected input/output lines joined as a string. If the user used + # `-d CODE_OBJECT` it returns the docs for that code object. + # + # @return [String] + # + # source://pry//lib/pry/commands/code_collector.rb#60 def content; end + + # The name of the explicitly given file (if any). + # + # source://pry//lib/pry/commands/code_collector.rb#13 def file; end + + # The name of the explicitly given file (if any). + # + # source://pry//lib/pry/commands/code_collector.rb#13 def file=(_arg0); end + + # The line range passed to `--lines`, converted to a 0-indexed range. + # + # source://pry//lib/pry/commands/code_collector.rb#123 def line_range; end + + # Name of the object argument + # + # source://pry//lib/pry/commands/code_collector.rb#128 def obj_name; end + + # Returns the value of attribute opts. + # + # source://pry//lib/pry/commands/code_collector.rb#9 def opts; end + + # The selected `pry_instance.input_ring` as a string, as specified by + # the `-i` switch. + # + # @return [String] + # + # source://pry//lib/pry/commands/code_collector.rb#116 def pry_input_content; end + + # Returns the value of attribute pry_instance. + # + # source://pry//lib/pry/commands/code_collector.rb#10 def pry_instance; end + + # The selected `pry_instance.output_ring` as a string, as specified by + # the `-o` switch. + # + # @return [String] + # + # source://pry//lib/pry/commands/code_collector.rb#104 def pry_output_content; end + + # Given a string and a range, return the `range` lines of that + # string. + # + # @param content [String] + # @param range [Range, Fixnum] + # @return [String] The string restricted to the given range + # + # source://pry//lib/pry/commands/code_collector.rb#96 def restrict_to_lines(content, range); end private + # @return [Boolean] + # + # source://pry//lib/pry/commands/code_collector.rb#134 def bad_option_combination?; end + + # source://pry//lib/pry/commands/code_collector.rb#153 def code_object_doc; end + + # source://pry//lib/pry/commands/code_collector.rb#157 def code_object_source_or_file; end + + # source://pry//lib/pry/commands/code_collector.rb#175 def convert_to_range(range); end + + # @raise [CommandError] + # + # source://pry//lib/pry/commands/code_collector.rb#171 def could_not_locate(name); end + + # source://pry//lib/pry/commands/code_collector.rb#161 def file_content; end + + # source://pry//lib/pry/commands/code_collector.rb#139 def pry_array_content_as_string(array, ranges); end class << self + # Add the `--lines`, `-o`, `-i`, `-s`, `-d` options. + # + # source://pry//lib/pry/commands/code_collector.rb#30 def inject_options(opt); end + + # Returns the value of attribute input_expression_ranges. + # + # source://pry//lib/pry/commands/code_collector.rb#16 def input_expression_ranges; end + + # Sets the attribute input_expression_ranges + # + # @param value the value to set the attribute input_expression_ranges to. + # + # source://pry//lib/pry/commands/code_collector.rb#16 def input_expression_ranges=(_arg0); end + + # Returns the value of attribute output_result_ranges. + # + # source://pry//lib/pry/commands/code_collector.rb#17 def output_result_ranges; end + + # Sets the attribute output_result_ranges + # + # @param value the value to set the attribute output_result_ranges to. + # + # source://pry//lib/pry/commands/code_collector.rb#17 def output_result_ranges=(_arg0); end end end +# source://pry//lib/pry/commands/disable_pry.rb#5 class Pry::Command::DisablePry < ::Pry::ClassCommand + # source://pry//lib/pry/commands/disable_pry.rb#23 def process; end end +# source://pry//lib/pry/commands/edit.rb#5 class Pry::Command::Edit < ::Pry::ClassCommand + # source://pry//lib/pry/commands/edit.rb#89 def apply_runtime_patch; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/edit.rb#172 def bad_option_combination?; end + + # source://pry//lib/pry/commands/edit.rb#152 def code_object; end + + # @raise [CommandError] + # + # source://pry//lib/pry/commands/edit.rb#105 def ensure_file_name_is_valid(file_name); end + + # source://pry//lib/pry/commands/edit.rb#119 def file_and_line; end + + # source://pry//lib/pry/commands/edit.rb#115 def file_and_line_for_current_exception; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/edit.rb#78 def file_based_exception?; end + + # source://pry//lib/pry/commands/edit.rb#135 def file_edit; end + + # source://pry//lib/pry/commands/edit.rb#148 def filename_argument; end + + # source://pry//lib/pry/commands/edit.rb#203 def initial_temp_file_content; end + + # source://pry//lib/pry/commands/edit.rb#180 def input_expression; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/edit.rb#195 def never_reload?; end + + # source://pry//lib/pry/commands/edit.rb#25 def options(opt); end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/edit.rb#168 def patch_exception?; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/edit.rb#163 def previously_patched?(code_object); end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/edit.rb#215 def probably_a_file?(str); end + + # source://pry//lib/pry/commands/edit.rb#46 def process; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/edit.rb#158 def pry_method?(code_object); end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/edit.rb#199 def reload?(file_name = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/edit.rb#191 def reloadable?; end + + # source://pry//lib/pry/commands/edit.rb#69 def repl_edit; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/edit.rb#64 def repl_edit?; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/edit.rb#82 def runtime_patch?; end end +# source://pry//lib/pry/commands/edit/exception_patcher.rb#6 class Pry::Command::Edit::ExceptionPatcher + # @return [ExceptionPatcher] a new instance of ExceptionPatcher + # + # source://pry//lib/pry/commands/edit/exception_patcher.rb#11 def initialize(pry_instance, state, exception_file_and_line); end + # Returns the value of attribute file_and_line. + # + # source://pry//lib/pry/commands/edit/exception_patcher.rb#9 def file_and_line; end + + # Sets the attribute file_and_line + # + # @param value the value to set the attribute file_and_line to. + # + # source://pry//lib/pry/commands/edit/exception_patcher.rb#9 def file_and_line=(_arg0); end + + # perform the patch + # + # source://pry//lib/pry/commands/edit/exception_patcher.rb#18 def perform_patch; end + + # Returns the value of attribute pry_instance. + # + # source://pry//lib/pry/commands/edit/exception_patcher.rb#7 def pry_instance; end + + # Sets the attribute pry_instance + # + # @param value the value to set the attribute pry_instance to. + # + # source://pry//lib/pry/commands/edit/exception_patcher.rb#7 def pry_instance=(_arg0); end + + # Returns the value of attribute state. + # + # source://pry//lib/pry/commands/edit/exception_patcher.rb#8 def state; end + + # Sets the attribute state + # + # @param value the value to set the attribute state to. + # + # source://pry//lib/pry/commands/edit/exception_patcher.rb#8 def state=(_arg0); end end +# source://pry//lib/pry/commands/edit/file_and_line_locator.rb#6 module Pry::Command::Edit::FileAndLineLocator class << self + # source://pry//lib/pry/commands/edit/file_and_line_locator.rb#8 def from_binding(target); end + + # source://pry//lib/pry/commands/edit/file_and_line_locator.rb#16 def from_code_object(code_object, filename_argument); end + + # @raise [CommandError] + # + # source://pry//lib/pry/commands/edit/file_and_line_locator.rb#24 def from_exception(exception, backtrace_level); end + + # when file and line are passed as a single arg, e.g my_file.rb:30 + # + # source://pry//lib/pry/commands/edit/file_and_line_locator.rb#38 def from_filename_argument(filename_argument); end end end +# source://pry//lib/pry/commands/exit.rb#5 class Pry::Command::Exit < ::Pry::ClassCommand + # source://pry//lib/pry/commands/exit.rb#25 def process; end + + # source://pry//lib/pry/commands/exit.rb#34 def process_pop_and_return; end end +# source://pry//lib/pry/commands/exit_all.rb#5 class Pry::Command::ExitAll < ::Pry::ClassCommand + # source://pry//lib/pry/commands/exit_all.rb#18 def process; end end +# source://pry//lib/pry/commands/exit_program.rb#5 class Pry::Command::ExitProgram < ::Pry::ClassCommand + # source://pry//lib/pry/commands/exit_program.rb#18 def process; end end +# source://pry//lib/pry/commands/find_method.rb#5 class Pry::Command::FindMethod < ::Pry::ClassCommand extend ::Pry::Helpers::BaseHelpers + # source://pry//lib/pry/commands/find_method.rb#31 def options(opt); end + + # source://pry//lib/pry/commands/find_method.rb#36 def process; end private + # Return the matched lines of method source if `-c` is given or "" + # if `-c` was not given + # + # source://pry//lib/pry/commands/find_method.rb#100 def additional_info(header, method); end + + # Search for all methods who's implementation matches the given regex + # within a namespace. + # + # @param namespace [Module] The namespace to search + # @return [Array] + # + # source://pry//lib/pry/commands/find_method.rb#186 def content_search(namespace); end + + # source://pry//lib/pry/commands/find_method.rb#108 def matched_method_lines(header, method); end + + # Search for all methods with a name that matches the given regex + # within a namespace. + # + # @param namespace [Module] The namespace to search + # @return [Array] + # + # source://pry//lib/pry/commands/find_method.rb#174 def name_search(namespace); end + + # @return [Regexp] The pattern to search for. + # + # source://pry//lib/pry/commands/find_method.rb#48 def pattern; end + + # pretty-print a list of matching methods. + # + # @param matches [Array] + # + # source://pry//lib/pry/commands/find_method.rb#80 def print_matches(matches); end + + # Print matched methods for a class + # + # source://pry//lib/pry/commands/find_method.rb#90 def print_matches_for_class(klass, grouped); end + + # Run the given block against every constant in the provided namespace. + # + # @param klass [Module] The namespace in which to start the search. + # @param done [Hash] The namespaces we've already visited (private) + # @yieldparam klass Each class/module in the namespace. + # + # source://pry//lib/pry/commands/find_method.rb#120 def recurse_namespace(klass, done = T.unsafe(nil), &block); end + + # Gather all the methods in a namespace that pass the given block. + # + # @param namespace [Module] The namespace in which to search. + # @return [Array] + # @yieldparam method [Method] The method to test + # @yieldreturn [Boolean] + # + # source://pry//lib/pry/commands/find_method.rb#150 def search_all_methods(namespace); end + + # The class to search for methods. + # We only search classes, so if the search object is an + # instance, return its class. If no search object is given + # search `target_self`. + # + # source://pry//lib/pry/commands/find_method.rb#67 def search_class; end + + # Output the result of the search. + # + # @param matches [Array] + # + # source://pry//lib/pry/commands/find_method.rb#55 def show_search_results(matches); end end +# source://pry//lib/pry/commands/fix_indent.rb#5 class Pry::Command::FixIndent < ::Pry::ClassCommand + # source://pry//lib/pry/commands/fix_indent.rb#15 def process; end end +# source://pry//lib/pry/commands/help.rb#5 class Pry::Command::Help < ::Pry::ClassCommand + # Get a hash of available commands grouped by the "group" name. + # + # source://pry//lib/pry/commands/help.rb#29 def command_groups; end + + # Display help for an individual command. + # + # @param command [Pry::Command] + # + # source://pry//lib/pry/commands/help.rb#125 def display_command(command); end + + # Display help for a searched item, filtered by group + # + # @param search [String] The string to search for. + # @raise [CommandError] + # + # source://pry//lib/pry/commands/help.rb#111 def display_filtered_commands(search); end + + # Display help for a searched item, filtered first by group + # and if that fails, filtered by command name. + # + # @param search [String] The string to search for. + # + # source://pry//lib/pry/commands/help.rb#98 def display_filtered_search_results(search); end + + # Display the index view, with headings and short descriptions per command. + # + # @param groups [Hash>] + # + # source://pry//lib/pry/commands/help.rb#44 def display_index(groups); end + + # Display help for an individual command or group. + # + # @param search [String] The string to search for. + # + # source://pry//lib/pry/commands/help.rb#86 def display_search(search); end + + # source://pry//lib/pry/commands/help.rb#159 def group_sort_key(group_name); end + + # Given a group name and an array of commands, + # return the help string for those commands. + # + # @param name [String] The group name. + # @param commands [Array] + # @return [String] The generated help string. + # + # source://pry//lib/pry/commands/help.rb#62 def help_text_for_commands(name, commands); end + + # Clean search terms to make it easier to search group names + # + # @param key [String] + # @return [String] + # + # source://pry//lib/pry/commands/help.rb#155 def normalize(key); end + + # source://pry//lib/pry/commands/help.rb#33 def process; end + + # Find a subset of a hash that matches the user's search term. + # + # If there's an exact match a Hash of one element will be returned, + # otherwise a sub-Hash with every key that matches the search will + # be returned. + # + # @param search [String] the search term + # @param hash [Hash] the hash to search + # + # source://pry//lib/pry/commands/help.rb#137 def search_hash(search, hash); end + + # Sort an array of commands by their `listing` name. + # + # @param commands [Array] The commands to sort + # @return [Array] commands sorted by listing name. + # + # source://pry//lib/pry/commands/help.rb#79 def sorted_commands(commands); end + + # @param groups [Hash] + # @return [Array] An array of sorted group names. + # + # source://pry//lib/pry/commands/help.rb#71 def sorted_group_names(groups); end + + # We only want to show commands that have descriptions, so that the + # easter eggs don't show up. + # + # source://pry//lib/pry/commands/help.rb#20 def visible_commands; end end +# source://pry//lib/pry/commands/hist.rb#5 class Pry::Command::Hist < ::Pry::ClassCommand + # source://pry//lib/pry/commands/hist.rb#25 def options(opt); end + + # source://pry//lib/pry/commands/hist.rb#43 def process; end private + # Checks +replay_sequence+ for the presence of neighboring replay calls. + # + # @example + # [1] pry(main)> hist --show 46894 + # 46894: hist --replay 46675..46677 + # [2] pry(main)> hist --show 46675..46677 + # 46675: 1+1 + # 46676: a = 100 + # 46677: hist --tail + # [3] pry(main)> hist --replay 46894 + # Error: Replay index 46894 points out to another replay call: + # `hist -r 46675..46677` + # [4] pry(main)> + # @param replay_sequence [String] The sequence of commands to be replayed + # (per saltum) + # @raise [Pry::CommandError] If +replay_sequence+ contains another + # "hist --replay" call + # @return [Boolean] `false` if +replay_sequence+ does not contain another + # "hist --replay" call + # + # source://pry//lib/pry/commands/hist.rb#143 def check_for_juxtaposed_replay(replay_sequence); end + + # Finds history depending on the given switch. + # + # @return [Pry::Code] if it finds `--all` (or `-a`) switch, returns all + # entries in history. Without the switch returns only the entries from the + # current Pry session. + # + # source://pry//lib/pry/commands/hist.rb#168 def find_history; end + + # source://pry//lib/pry/commands/hist.rb#105 def process_clear; end + + # source://pry//lib/pry/commands/hist.rb#78 def process_display; end + + # source://pry//lib/pry/commands/hist.rb#110 def process_replay; end + + # source://pry//lib/pry/commands/hist.rb#86 def process_save; end end +# source://pry//lib/pry/commands/import_set.rb#5 class Pry::Command::ImportSet < ::Pry::ClassCommand + # TODO: resolve unused parameter. + # + # @raise [CommandError] + # + # source://pry//lib/pry/commands/import_set.rb#17 def process(_command_set_name); end end +# source://pry//lib/pry/commands/jump_to.rb#5 class Pry::Command::JumpTo < ::Pry::ClassCommand + # source://pry//lib/pry/commands/jump_to.rb#14 def process(break_level); end end +# source://pry//lib/pry/commands/list_inspectors.rb#5 class Pry::Command::ListInspectors < ::Pry::ClassCommand + # source://pry//lib/pry/commands/list_inspectors.rb#16 def process; end private + # source://pry//lib/pry/commands/list_inspectors.rb#28 def inspector_map; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/list_inspectors.rb#36 def selected_inspector?(inspector); end + + # source://pry//lib/pry/commands/list_inspectors.rb#32 def selected_text; end end +# source://pry//lib/pry/commands/ls/jruby_hacks.rb#5 class Pry::Command::Ls < ::Pry::ClassCommand + # Exclude -q, -v and --grep because they, + # don't specify what the user wants to see. + # + # @return [Boolean] + # + # source://pry//lib/pry/commands/ls.rb#85 def no_user_opts?; end + + # source://pry//lib/pry/commands/ls.rb#52 def options(opt); end + + # source://pry//lib/pry/commands/ls.rb#90 def process; end private + # source://pry//lib/pry/commands/ls.rb#106 def error_list; end + + # source://pry//lib/pry/commands/ls.rb#126 def raise_errors_if_arguments_are_weird; end end +# source://pry//lib/pry/commands/ls/constants.rb#6 class Pry::Command::Ls::Constants < ::Pry::Command::Ls::Formatter include ::Pry::Command::Ls::Interrogatable + # @return [Constants] a new instance of Constants + # + # source://pry//lib/pry/commands/ls/constants.rb#14 def initialize(interrogatee, no_user_opts, opts, pry_instance); end + # @return [Boolean] + # + # source://pry//lib/pry/commands/ls/constants.rb#23 def correct_opts?; end + + # source://pry//lib/pry/commands/ls/constants.rb#27 def output_self; end private + # source://pry//lib/pry/commands/ls/constants.rb#39 def format(mod, constants); end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/ls/constants.rb#35 def show_deprecated_constants?; end end +# source://pry//lib/pry/commands/ls/constants.rb#7 Pry::Command::Ls::Constants::DEPRECATED_CONSTANTS = T.let(T.unsafe(nil), Array) + +# source://pry//lib/pry/commands/ls.rb#6 Pry::Command::Ls::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) +# source://pry//lib/pry/commands/ls/formatter.rb#6 class Pry::Command::Ls::Formatter + # @return [Formatter] a new instance of Formatter + # + # source://pry//lib/pry/commands/ls/formatter.rb#10 def initialize(pry_instance); end + # Sets the attribute grep + # + # @param value the value to set the attribute grep to. + # + # source://pry//lib/pry/commands/ls/formatter.rb#7 def grep=(_arg0); end + + # Returns the value of attribute pry_instance. + # + # source://pry//lib/pry/commands/ls/formatter.rb#8 def pry_instance; end + + # source://pry//lib/pry/commands/ls/formatter.rb#16 def write_out; end private + # source://pry//lib/pry/commands/ls/formatter.rb#24 def color(type, str); end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/ls/formatter.rb#41 def correct_opts?; end + + # source://pry//lib/pry/commands/ls/formatter.rb#37 def format_value(value); end + + # source://pry//lib/pry/commands/ls/formatter.rb#49 def grep; end + + # Add a new section to the output. + # Outputs nothing if the section would be empty. + # + # source://pry//lib/pry/commands/ls/formatter.rb#30 def output_section(heading, body); end + + # @raise [NotImplementedError] + # + # source://pry//lib/pry/commands/ls/formatter.rb#45 def output_self; end end +# source://pry//lib/pry/commands/ls/globals.rb#7 class Pry::Command::Ls::Globals < ::Pry::Command::Ls::Formatter + # @return [Globals] a new instance of Globals + # + # source://pry//lib/pry/commands/ls/globals.rb#24 def initialize(opts, pry_instance); end + # source://pry//lib/pry/commands/ls/globals.rb#29 def output_self; end private + # source://pry//lib/pry/commands/ls/globals.rb#36 def format(globals); end end +# Taken from "puts global_variables.inspect". +# +# source://pry//lib/pry/commands/ls/globals.rb#8 Pry::Command::Ls::Globals::BUILTIN_GLOBALS = T.let(T.unsafe(nil), Array) + +# `$SAFE` and `$?` are thread-local, the exception stuff only works in a +# rescue clause, everything else is basically a local variable with a `$` +# in its name. +# +# source://pry//lib/pry/commands/ls/globals.rb#19 Pry::Command::Ls::Globals::PSEUDO_GLOBALS = T.let(T.unsafe(nil), Array) +# source://pry//lib/pry/commands/ls/grep.rb#6 class Pry::Command::Ls::Grep + # @return [Grep] a new instance of Grep + # + # source://pry//lib/pry/commands/ls/grep.rb#7 def initialize(grep_regexp); end + # source://pry//lib/pry/commands/ls/grep.rb#11 def regexp; end end +# source://pry//lib/pry/commands/ls/instance_vars.rb#6 class Pry::Command::Ls::InstanceVars < ::Pry::Command::Ls::Formatter include ::Pry::Command::Ls::Interrogatable + # @return [InstanceVars] a new instance of InstanceVars + # + # source://pry//lib/pry/commands/ls/instance_vars.rb#9 def initialize(interrogatee, no_user_opts, opts, pry_instance); end + # @return [Boolean] + # + # source://pry//lib/pry/commands/ls/instance_vars.rb#16 def correct_opts?; end + + # source://pry//lib/pry/commands/ls/instance_vars.rb#20 def output_self; end private + # source://pry//lib/pry/commands/ls/instance_vars.rb#34 def format(type, vars); end end +# source://pry//lib/pry/commands/ls/interrogatable.rb#6 module Pry::Command::Ls::Interrogatable private + # source://pry//lib/pry/commands/ls/interrogatable.rb#13 def interrogatee_mod; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/ls/interrogatable.rb#9 def interrogating_a_module?; end end +# source://pry//lib/pry/commands/ls/jruby_hacks.rb#6 module Pry::Command::Ls::JRubyHacks private + # When removing jruby aliases, we want to keep the alias that is + # "least rubbish" according to this metric. + # + # source://pry//lib/pry/commands/ls/jruby_hacks.rb#40 def rubbishness(name); end + + # JRuby creates lots of aliases for methods imported from java in an attempt + # to make life easier for ruby programmers. (e.g. getFooBar becomes + # get_foo_bar and foo_bar, and maybe foo_bar? if it returns a Boolean). The + # full transformations are in the assignAliases method of: + # https://github.com/jruby/jruby/blob/master/src/org/jruby/javasupport/JavaClass.java + # + # This has the unfortunate side-effect of making the output of ls even more + # incredibly verbose than it normally would be for these objects; and so we + # filter out all but the nicest of these aliases here. + # + # TODO: This is a little bit vague, better heuristics could be used. + # JRuby also has a lot of scala-specific logic, which we don't copy. + # + # source://pry//lib/pry/commands/ls/jruby_hacks.rb#21 def trim_jruby_aliases(methods); end end +# source://pry//lib/pry/commands/ls/local_names.rb#6 class Pry::Command::Ls::LocalNames < ::Pry::Command::Ls::Formatter + # @return [LocalNames] a new instance of LocalNames + # + # source://pry//lib/pry/commands/ls/local_names.rb#7 def initialize(no_user_opts, args, pry_instance); end + # @return [Boolean] + # + # source://pry//lib/pry/commands/ls/local_names.rb#14 def correct_opts?; end + + # source://pry//lib/pry/commands/ls/local_names.rb#18 def output_self; end private + # source://pry//lib/pry/commands/ls/local_names.rb#25 def format(locals); end end +# source://pry//lib/pry/commands/ls/local_vars.rb#6 class Pry::Command::Ls::LocalVars < ::Pry::Command::Ls::Formatter + # @return [LocalVars] a new instance of LocalVars + # + # source://pry//lib/pry/commands/ls/local_vars.rb#7 def initialize(opts, pry_instance); end + # source://pry//lib/pry/commands/ls/local_vars.rb#13 def output_self; end private + # source://pry//lib/pry/commands/ls/local_vars.rb#34 def colorized_assignment_style(lhs, rhs, desired_width = T.unsafe(nil)); end + + # source://pry//lib/pry/commands/ls/local_vars.rb#25 def format(name_value_pairs); end end +# source://pry//lib/pry/commands/ls/ls_entity.rb#6 class Pry::Command::Ls::LsEntity + # @return [LsEntity] a new instance of LsEntity + # + # source://pry//lib/pry/commands/ls/ls_entity.rb#9 def initialize(opts); end + # source://pry//lib/pry/commands/ls/ls_entity.rb#18 def entities_table; end + + # Returns the value of attribute pry_instance. + # + # source://pry//lib/pry/commands/ls/ls_entity.rb#7 def pry_instance; end private + # source://pry//lib/pry/commands/ls/ls_entity.rb#32 def constants; end + + # source://pry//lib/pry/commands/ls/ls_entity.rb#56 def entities; end + + # source://pry//lib/pry/commands/ls/ls_entity.rb#28 def globals; end + + # source://pry//lib/pry/commands/ls/ls_entity.rb#24 def grep(entity); end + + # source://pry//lib/pry/commands/ls/ls_entity.rb#44 def instance_vars; end + + # source://pry//lib/pry/commands/ls/ls_entity.rb#48 def local_names; end + + # source://pry//lib/pry/commands/ls/ls_entity.rb#52 def local_vars; end + + # source://pry//lib/pry/commands/ls/ls_entity.rb#36 def methods; end + + # source://pry//lib/pry/commands/ls/ls_entity.rb#40 def self_methods; end end +# source://pry//lib/pry/commands/ls/methods.rb#6 class Pry::Command::Ls::Methods < ::Pry::Command::Ls::Formatter include ::Pry::Command::Ls::Interrogatable include ::Pry::Command::Ls::JRubyHacks include ::Pry::Command::Ls::MethodsHelper + # @return [Methods] a new instance of Methods + # + # source://pry//lib/pry/commands/ls/methods.rb#10 def initialize(interrogatee, no_user_opts, opts, pry_instance); end + # source://pry//lib/pry/commands/ls/methods.rb#22 def output_self; end private + # Get a lambda that can be used with `take_while` to prevent over-eager + # traversal of the Object's ancestry graph. + # + # source://pry//lib/pry/commands/ls/methods.rb#41 def below_ceiling; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/ls/methods.rb#35 def correct_opts?; end end +# source://pry//lib/pry/commands/ls/methods_helper.rb#6 module Pry::Command::Ls::MethodsHelper include ::Pry::Command::Ls::JRubyHacks private + # Get all the methods that we'll want to output. + # + # source://pry//lib/pry/commands/ls/methods_helper.rb#12 def all_methods(instance_methods = T.unsafe(nil)); end + + # source://pry//lib/pry/commands/ls/methods_helper.rb#34 def format(methods); end + + # source://pry//lib/pry/commands/ls/methods_helper.rb#26 def resolution_order; end end +# source://pry//lib/pry/commands/ls/self_methods.rb#6 class Pry::Command::Ls::SelfMethods < ::Pry::Command::Ls::Formatter include ::Pry::Command::Ls::Interrogatable include ::Pry::Command::Ls::JRubyHacks include ::Pry::Command::Ls::MethodsHelper + # @return [SelfMethods] a new instance of SelfMethods + # + # source://pry//lib/pry/commands/ls/self_methods.rb#10 def initialize(interrogatee, no_user_opts, opts, pry_instance); end + # source://pry//lib/pry/commands/ls/self_methods.rb#18 def output_self; end private + # @return [Boolean] + # + # source://pry//lib/pry/commands/ls/self_methods.rb#28 def correct_opts?; end end +# source://pry//lib/pry/commands/nesting.rb#5 class Pry::Command::Nesting < ::Pry::ClassCommand + # source://pry//lib/pry/commands/nesting.rb#14 def process; end end +# source://pry//lib/pry/commands/play.rb#5 class Pry::Command::Play < ::Pry::ClassCommand + # source://pry//lib/pry/commands/play.rb#74 def code_object; end + + # source://pry//lib/pry/commands/play.rb#82 def content; end + + # source://pry//lib/pry/commands/play.rb#60 def content_after_options; end + + # source://pry//lib/pry/commands/play.rb#70 def content_at_expression; end + + # The file to play from when no code object is specified. + # e.g `play --lines 4..10` + # + # source://pry//lib/pry/commands/play.rb#92 def default_file; end + + # source://pry//lib/pry/commands/play.rb#102 def file_content; end + + # source://pry//lib/pry/commands/play.rb#29 def options(opt); end + + # source://pry//lib/pry/commands/play.rb#48 def perform_play; end + + # source://pry//lib/pry/commands/play.rb#41 def process; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/play.rb#78 def should_use_default_file?; end + + # source://pry//lib/pry/commands/play.rb#53 def show_input; end end +# source://pry//lib/pry/commands/pry_backtrace.rb#5 class Pry::Command::PryBacktrace < ::Pry::ClassCommand + # source://pry//lib/pry/commands/pry_backtrace.rb#22 def process; end end +# source://pry//lib/pry/commands/raise_up.rb#6 class Pry::Command::RaiseUp < ::Pry::ClassCommand + # source://pry//lib/pry/commands/raise_up.rb#27 def process; end end +# source://pry//lib/pry/commands/reload_code.rb#5 class Pry::Command::ReloadCode < ::Pry::ClassCommand + # source://pry//lib/pry/commands/reload_code.rb#20 def process; end private + # @raise [CommandError] + # + # source://pry//lib/pry/commands/reload_code.rb#58 def check_for_reloadability(code_object, identifier); end + + # source://pry//lib/pry/commands/reload_code.rb#32 def current_file; end + + # source://pry//lib/pry/commands/reload_code.rb#42 def reload_current_file; end + + # source://pry//lib/pry/commands/reload_code.rb#51 def reload_object(identifier); end end +# source://pry//lib/pry/commands/reset.rb#5 class Pry::Command::Reset < ::Pry::ClassCommand + # source://pry//lib/pry/commands/reset.rb#14 def process; end end +# source://pry//lib/pry/commands/ri.rb#7 class Pry::Command::Ri < ::Pry::ClassCommand + # source://pry//lib/pry/commands/ri.rb#21 def process(spec); end end +# source://pry//lib/pry/commands/save_file.rb#5 class Pry::Command::SaveFile < ::Pry::ClassCommand + # source://pry//lib/pry/commands/save_file.rb#50 def display_content; end + + # source://pry//lib/pry/commands/save_file.rb#39 def file_name; end + + # source://pry//lib/pry/commands/save_file.rb#56 def mode; end + + # source://pry//lib/pry/commands/save_file.rb#21 def options(opt); end + + # @raise [CommandError] + # + # source://pry//lib/pry/commands/save_file.rb#28 def process; end + + # source://pry//lib/pry/commands/save_file.rb#43 def save_file; end end +# source://pry//lib/pry/commands/shell_command.rb#5 class Pry::Command::ShellCommand < ::Pry::ClassCommand + # source://pry//lib/pry/commands/shell_command.rb#21 def process(cmd); end private + # source://pry//lib/pry/commands/shell_command.rb#50 def cd_path_env; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/shell_command.rb#54 def cd_path_exists?; end + + # source://pry//lib/pry/commands/shell_command.rb#36 def parse_destination(dest); end + + # source://pry//lib/pry/commands/shell_command.rb#58 def path_from_cd_path(dest); end + + # source://pry//lib/pry/commands/shell_command.rb#43 def process_cd(dest); end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/shell_command.rb#68 def special_case_path?(dest); end end +# source://pry//lib/pry/commands/shell_mode.rb#5 class Pry::Command::ShellMode < ::Pry::ClassCommand + # source://pry//lib/pry/commands/shell_mode.rb#14 def process; end end +# source://pry//lib/pry/commands/show_doc.rb#5 class Pry::Command::ShowDoc < ::Pry::Command::ShowInfo include ::Pry::Helpers::DocumentationHelpers + # The docs for code_object prepared for display. + # + # source://pry//lib/pry/commands/show_doc.rb#35 def content_for(code_object); end + + # Return docs for the code_object, adjusting for whether the code_object + # has yard docs available, in which case it returns those. + # (note we only have to check yard docs for modules since they can + # have multiple docs, but methods can only be doc'd once so we + # dont need to check them) + # + # source://pry//lib/pry/commands/show_doc.rb#64 def docs_for(code_object); end + + # Which sections to include in the 'header', can toggle: :owner, + # :signature and visibility. + # + # source://pry//lib/pry/commands/show_doc.rb#76 def header_options; end + + # source://pry//lib/pry/commands/show_doc.rb#24 def process; end + + # process the markup (if necessary) and apply colors + # + # source://pry//lib/pry/commands/show_doc.rb#44 def render_doc_markup_for(code_object); end + + # figure out start line of docs by back-calculating based on + # number of lines in the comment and the start line of the code_object + # + # @return [Fixnum] start line of docs + # + # source://pry//lib/pry/commands/show_doc.rb#83 def start_line_for(code_object); end end +# source://pry//lib/pry/commands/show_info.rb#5 class Pry::Command::ShowInfo < ::Pry::ClassCommand extend ::Pry::Helpers::BaseHelpers + # @return [ShowInfo] a new instance of ShowInfo + # + # source://pry//lib/pry/commands/show_info.rb#10 def initialize(*_arg0); end + # source://pry//lib/pry/commands/show_info.rb#127 def code_object_header(code_object, line_num); end + + # This method checks whether the `code_object` is a WrappedModule, if it + # is, then it returns the first candidate (monkeypatch) with accessible + # source (or docs). If `code_object` is not a WrappedModule (i.e a method + # or a command) then the `code_object` itself is just returned. + # + # @raise [CommandError] + # @return [Pry::WrappedModule, Pry::Method, Pry::Command] + # + # source://pry//lib/pry/commands/show_info.rb#61 def code_object_with_accessible_source(code_object); end + + # source://pry//lib/pry/commands/show_info.rb#213 def complete(input); end + + # source://pry//lib/pry/commands/show_info.rb#77 def content_and_header_for_code_object(code_object); end + + # source://pry//lib/pry/commands/show_info.rb#81 def content_and_headers_for_all_module_candidates(mod); end + + # takes into account possible yard docs, and returns yard_file / yard_line + # Also adjusts for start line of comments (using start_line_for), which it + # has to infer by subtracting number of lines of comment from start line + # of code_object + # + # source://pry//lib/pry/commands/show_info.rb#205 def file_and_line_for(code_object); end + + # Generate a header (meta-data information) for all the code + # object types: methods, modules, commands, procs... + # + # source://pry//lib/pry/commands/show_info.rb#106 def header(code_object); end + + # source://pry//lib/pry/commands/show_info.rb#173 def header_options; end + + # source://pry//lib/pry/commands/show_info.rb#142 def method_header(code_object, line_num); end + + # source://pry//lib/pry/commands/show_info.rb#165 def method_sections(code_object); end + + # source://pry//lib/pry/commands/show_info.rb#151 def module_header(code_object, line_num); end + + # source://pry//lib/pry/commands/show_info.rb#100 def no_definition_message; end + + # source://pry//lib/pry/commands/show_info.rb#185 def obj_name; end + + # source://pry//lib/pry/commands/show_info.rb#16 def options(opt); end + + # @raise [CommandError] + # + # source://pry//lib/pry/commands/show_info.rb#26 def process; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/show_info.rb#181 def show_all_modules?(code_object); end + + # source://pry//lib/pry/commands/show_info.rb#193 def start_line_for(code_object); end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/show_info.rb#189 def use_line_numbers?; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/show_info.rb#73 def valid_superclass?(code_object); end end +# source://pry//lib/pry/commands/show_input.rb#5 class Pry::Command::ShowInput < ::Pry::ClassCommand + # source://pry//lib/pry/commands/show_input.rb#15 def process; end end +# source://pry//lib/pry/commands/show_source.rb#5 class Pry::Command::ShowSource < ::Pry::Command::ShowInfo include ::Pry::Helpers::DocumentationHelpers + # The source for code_object prepared for display. + # + # source://pry//lib/pry/commands/show_source.rb#48 def content_for(code_object); end + + # Return docs for the code_object, adjusting for whether the code_object + # has yard docs available, in which case it returns those. + # (note we only have to check yard docs for modules since they can + # have multiple docs, but methods can only be doc'd once so we + # dont need to check them) + # + # source://pry//lib/pry/commands/show_source.rb#86 def docs_for(code_object); end + + # Which sections to include in the 'header', can toggle: :owner, + # :signature and visibility. + # + # source://pry//lib/pry/commands/show_source.rb#98 def header_options; end + + # source://pry//lib/pry/commands/show_source.rb#31 def options(opt); end + + # source://pry//lib/pry/commands/show_source.rb#38 def process; end + + # process the markup (if necessary) and apply colors + # + # source://pry//lib/pry/commands/show_source.rb#66 def render_doc_markup_for(code_object); end + + # figure out start line of docs by back-calculating based on + # number of lines in the comment and the start line of the code_object + # + # @return [Fixnum] start line of docs + # + # source://pry//lib/pry/commands/show_source.rb#105 def start_line_for(code_object); end end +# source://pry//lib/pry/commands/stat.rb#5 class Pry::Command::Stat < ::Pry::ClassCommand + # source://pry//lib/pry/commands/stat.rb#19 def options(opt); end + + # source://pry//lib/pry/commands/stat.rb#23 def process; end end +# source://pry//lib/pry/commands/switch_to.rb#5 class Pry::Command::SwitchTo < ::Pry::ClassCommand + # source://pry//lib/pry/commands/switch_to.rb#14 def process(selection); end end +# source://pry//lib/pry/commands/toggle_color.rb#5 class Pry::Command::ToggleColor < ::Pry::ClassCommand + # source://pry//lib/pry/commands/toggle_color.rb#21 def color_toggle; end + + # source://pry//lib/pry/commands/toggle_color.rb#16 def process; end end +# represents a void return value for a command +# +# source://pry//lib/pry/command.rb#20 Pry::Command::VOID_VALUE = T.let(T.unsafe(nil), Object) +# source://pry//lib/pry/commands/pry_version.rb#5 class Pry::Command::Version < ::Pry::ClassCommand + # source://pry//lib/pry/commands/pry_version.rb#14 def process; end end +# source://pry//lib/pry/commands/watch_expression.rb#5 class Pry::Command::WatchExpression < ::Pry::ClassCommand + # source://pry//lib/pry/commands/watch_expression.rb#31 def options(opt); end + + # source://pry//lib/pry/commands/watch_expression.rb#42 def process; end private + # TODO: fix arguments. + # https://github.com/pry/pry/commit/b031df2f2f5850ee6e9018f33d35f3485a9b0423 + # + # source://pry//lib/pry/commands/watch_expression.rb#93 def add_expression(_arguments); end + + # source://pry//lib/pry/commands/watch_expression.rb#98 def add_hook; end + + # source://pry//lib/pry/commands/watch_expression.rb#59 def delete(index); end + + # source://pry//lib/pry/commands/watch_expression.rb#84 def eval_and_print_changed(output); end + + # source://pry//lib/pry/commands/watch_expression.rb#55 def expressions; end + + # source://pry//lib/pry/commands/watch_expression.rb#69 def list; end end +# source://pry//lib/pry/commands/watch_expression/expression.rb#6 class Pry::Command::WatchExpression::Expression + # @return [Expression] a new instance of Expression + # + # source://pry//lib/pry/commands/watch_expression/expression.rb#9 def initialize(pry_instance, target, source); end + # Has the value of the expression changed? + # + # We use the pretty-printed string represenation to detect differences + # as this avoids problems with dup (causes too many differences) and == + # (causes too few) + # + # @return [Boolean] + # + # source://pry//lib/pry/commands/watch_expression/expression.rb#29 def changed?; end + + # source://pry//lib/pry/commands/watch_expression/expression.rb#15 def eval!; end + + # Returns the value of attribute previous_value. + # + # source://pry//lib/pry/commands/watch_expression/expression.rb#7 def previous_value; end + + # Returns the value of attribute pry_instance. + # + # source://pry//lib/pry/commands/watch_expression/expression.rb#7 def pry_instance; end + + # Returns the value of attribute source. + # + # source://pry//lib/pry/commands/watch_expression/expression.rb#7 def source; end + + # Returns the value of attribute target. + # + # source://pry//lib/pry/commands/watch_expression/expression.rb#7 def target; end + + # source://pry//lib/pry/commands/watch_expression/expression.rb#20 def to_s; end + + # Returns the value of attribute value. + # + # source://pry//lib/pry/commands/watch_expression/expression.rb#7 def value; end private + # source://pry//lib/pry/commands/watch_expression/expression.rb#35 def target_eval(target, source); end end +# source://pry//lib/pry/commands/whereami.rb#7 class Pry::Command::Whereami < ::Pry::ClassCommand + # @return [Whereami] a new instance of Whereami + # + # source://pry//lib/pry/commands/whereami.rb#8 def initialize(*_arg0); end + # @return [Boolean] + # + # source://pry//lib/pry/commands/whereami.rb#83 def bad_option_combination?; end + + # source://pry//lib/pry/commands/whereami.rb#63 def code; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/whereami.rb#77 def code?; end + + # source://pry//lib/pry/commands/whereami.rb#88 def location; end + + # source://pry//lib/pry/commands/whereami.rb#55 def options(opt); end + + # source://pry//lib/pry/commands/whereami.rb#92 def process; end + + # source://pry//lib/pry/commands/whereami.rb#44 def setup; end private + # source://pry//lib/pry/commands/whereami.rb#171 def class_code; end + + # source://pry//lib/pry/commands/whereami.rb#152 def code_window; end + + # source://pry//lib/pry/commands/whereami.rb#144 def default_code; end + + # source://pry//lib/pry/commands/whereami.rb#185 def expand_path(filename); end + + # source://pry//lib/pry/commands/whereami.rb#132 def handle_internal_binding; end + + # source://pry//lib/pry/commands/whereami.rb#124 def marker; end + + # source://pry//lib/pry/commands/whereami.rb#156 def method_code; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/whereami.rb#116 def nothing_to_do?; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/whereami.rb#140 def small_method?; end + + # This either returns the `target_self` + # or it returns the class of `target_self` if `target_self` is not a class. + # + # @return [Pry::WrappedModule] + # + # source://pry//lib/pry/commands/whereami.rb#165 def target_class; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/whereami.rb#128 def top_level?; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/whereami.rb#120 def use_line_numbers?; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/whereami.rb#180 def valid_method?; end + + # source://pry//lib/pry/commands/whereami.rb#192 def window_size; end class << self + # Returns the value of attribute method_size_cutoff. + # + # source://pry//lib/pry/commands/whereami.rb#15 def method_size_cutoff; end + + # Sets the attribute method_size_cutoff + # + # @param value the value to set the attribute method_size_cutoff to. + # + # source://pry//lib/pry/commands/whereami.rb#15 def method_size_cutoff=(_arg0); end end end +# source://pry//lib/pry/commands/wtf.rb#5 class Pry::Command::Wtf < ::Pry::ClassCommand + # source://pry//lib/pry/commands/wtf.rb#27 def options(opt); end + + # source://pry//lib/pry/commands/wtf.rb#32 def process; end private + # source://pry//lib/pry/commands/wtf.rb#64 def format_backtrace(backtrace); end + + # source://pry//lib/pry/commands/wtf.rb#60 def format_header(title, exception); end + + # source://pry//lib/pry/commands/wtf.rb#83 def read_line(file, line); end + + # source://pry//lib/pry/commands/wtf.rb#76 def trim_backtrace(backtrace); end + + # source://pry//lib/pry/commands/wtf.rb#48 def unwind_exceptions; end end +# source://pry//lib/pry/commands/wtf.rb#25 Pry::Command::Wtf::RUBY_FRAME_PATTERN = T.let(T.unsafe(nil), Regexp) + +# CommandErrors are caught by the REPL loop and displayed to the user. They +# indicate an exceptional condition that's fatal to the current command. +# +# source://pry//lib/pry/exceptions.rb#68 class Pry::CommandError < ::StandardError; end +# This class is used to create sets of commands. Commands can be imported from +# different sets, aliased, removed, etc. +# +# source://pry//lib/pry/command_set.rb#12 class Pry::CommandSet include ::Enumerable include ::Pry::Helpers::BaseHelpers + # @param imported_sets [Array] Sets which will be imported automatically + # @return [CommandSet] a new instance of CommandSet + # @yield Optional block run to define commands + # + # source://pry//lib/pry/command_set.rb#20 def initialize(*imported_sets, &block); end + # Find a command that matches the given line + # + # @param pattern [String] The line that might be a command invocation + # @return [Pry::Command, nil] + # + # source://pry//lib/pry/command_set.rb#275 def [](pattern); end + + # Re-assign the command found at _pattern_ with _command_. + # + # @example + # Pry.config.commands["help"] = MyHelpCommand + # @param pattern [Regexp, String] The command to add or replace(found at _pattern_). + # @param command [Pry::Command] The command to add. + # @return [Pry::Command] Returns the new command (matched with "pattern".) + # + # source://pry//lib/pry/command_set.rb#298 def []=(pattern, command); end + + # Add a command to set. + # + # @param command [Command] a subclass of Pry::Command. + # + # source://pry//lib/pry/command_set.rb#324 def add_command(command); end + + # Aliases a command + # + # @example Creating an alias for `ls -M` + # Pry.config.commands.alias_command "lM", "ls -M" + # @example Pass explicit description (overriding default). + # Pry.config.commands.alias_command "lM", "ls -M", :desc => "cutiepie" + # @param match [String, Regex] The match of the alias (can be a regex). + # @param action [String] The action to be performed (typically + # another command). + # @param options [Hash] The optional configuration parameters, + # accepts the same as the `command` method, but also allows the + # command description to be passed this way too as `:desc` + # + # source://pry//lib/pry/command_set.rb#190 def alias_command(match, action, options = T.unsafe(nil)); end + + # Defines a new Pry command. + # + # @example + # MyCommands = Pry::CommandSet.new do + # command "greet", "Greet somebody" do |name| + # puts "Good afternoon #{name.capitalize}!" + # end + # end + # + # # From pry: + # # pry(main)> pry_instance.commands = MyCommands + # # pry(main)> greet john + # # Good afternoon John! + # # pry(main)> help greet + # # Greet somebody + # @example Regexp command + # MyCommands = Pry::CommandSet.new do + # command( + # /number-(\d+)/, "number-N regex command", :listing => "number" + # ) do |num, name| + # puts "hello #{name}, nice number: #{num}" + # end + # end + # + # # From pry: + # # pry(main)> pry_instance.commands = MyCommands + # # pry(main)> number-10 john + # # hello john, nice number: 10 + # # pry(main)> help number + # # number-N regex command + # @option options + # @option options + # @option options + # @option options + # @option options + # @param match [String, Regexp] The start of invocations of this command. + # @param description [String] A description of the command. + # @param options [Hash] The optional configuration parameters. + # @yield The action to perform. The parameters in the block + # determines the parameters the command will receive. All + # parameters passed into the block will be strings. Successive + # command parameters are separated by whitespace at the Pry prompt. + # + # source://pry//lib/pry/command_set.rb#78 def block_command(match, description = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # Defines a new Pry command. + # + # @example + # MyCommands = Pry::CommandSet.new do + # command "greet", "Greet somebody" do |name| + # puts "Good afternoon #{name.capitalize}!" + # end + # end + # + # # From pry: + # # pry(main)> pry_instance.commands = MyCommands + # # pry(main)> greet john + # # Good afternoon John! + # # pry(main)> help greet + # # Greet somebody + # @example Regexp command + # MyCommands = Pry::CommandSet.new do + # command( + # /number-(\d+)/, "number-N regex command", :listing => "number" + # ) do |num, name| + # puts "hello #{name}, nice number: #{num}" + # end + # end + # + # # From pry: + # # pry(main)> pry_instance.commands = MyCommands + # # pry(main)> number-10 john + # # hello john, nice number: 10 + # # pry(main)> help number + # # number-N regex command + # @option options + # @option options + # @option options + # @option options + # @option options + # @param match [String, Regexp] The start of invocations of this command. + # @param description [String] A description of the command. + # @param options [Hash] The optional configuration parameters. + # @yield The action to perform. The parameters in the block + # determines the parameters the command will receive. All + # parameters passed into the block will be strings. Successive + # command parameters are separated by whitespace at the Pry prompt. + # + # source://pry//lib/pry/command_set.rb#78 def command(match, description = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # Generate completions for the user's search. + # + # @param search [String] The line to search for + # @param context [Hash] The context to create the command with + # @return [Array] + # + # source://pry//lib/pry/command_set.rb#365 def complete(search, context = T.unsafe(nil)); end + + # Defines a new Pry command class. + # + # @example + # Pry::Commands.create_command "echo", "echo's the input", :shellwords => false do + # def options(opt) + # opt.banner "Usage: echo [-u | -d] " + # opt.on :u, :upcase, "ensure the output is all upper-case" + # opt.on :d, :downcase, "ensure the output is all lower-case" + # end + # + # def process + # if opts.present?(:u) && opts.present?(:d) + # raise Pry::CommandError, "-u and -d makes no sense" + # end + # result = args.join(" ") + # result.downcase! if opts.present?(:downcase) + # result.upcase! if opts.present?(:upcase) + # output.puts result + # end + # end + # @param match [String, Regexp] The start of invocations of this command. + # @param description [String] A description of the command. + # @param options [Hash] The optional configuration parameters, see {#command} + # @yield The class body's definition. + # + # source://pry//lib/pry/command_set.rb#117 def create_command(match, description = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # Removes some commands from the set + # + # @param searches [Array] the matches or listings of the commands + # to remove + # + # source://pry//lib/pry/command_set.rb#138 def delete(*searches); end + + # Sets or gets the description for a command (replacing the old + # description). Returns current description if no description + # parameter provided. + # + # @example Setting + # MyCommands = Pry::CommandSet.new do + # desc "help", "help description" + # end + # @example Getting + # Pry.config.commands.desc "amend-line" + # @param search [String, Regexp] The command match. + # @param description [String?] (nil) The command description. + # + # source://pry//lib/pry/command_set.rb#253 def desc(search, description = T.unsafe(nil)); end + + # source://pry//lib/pry/command_set.rb#131 def each(&block); end + + # Find a command that matches the given line + # + # @param pattern [String] The line that might be a command invocation + # @return [Pry::Command, nil] + # + # source://pry//lib/pry/command_set.rb#275 def find_command(pattern); end + + # @param match_or_listing [String, Regexp] The match or listing of a command. + # of the command to retrieve. + # @return [Command] The command object matched. + # + # source://pry//lib/pry/command_set.rb#173 def find_command_by_match_or_listing(match_or_listing); end + + # Find the command that the user might be trying to refer to. + # + # @param search [String] The user's search. + # @return [Pry::Command?] + # + # source://pry//lib/pry/command_set.rb#331 def find_command_for_help(search); end + + # Returns the value of attribute helper_module. + # + # source://pry//lib/pry/command_set.rb#15 def helper_module; end + + # Imports all the commands from one or more sets. + # + # @param sets [Array] Command sets, all of the commands of which + # will be imported. + # @return [Pry::CommandSet] Returns the reciever (a command set). + # + # source://pry//lib/pry/command_set.rb#149 def import(*sets); end + + # Imports some commands from a set + # + # @param set [CommandSet] Set to import commands from + # @param matches [Array] Commands to import + # @return [Pry::CommandSet] Returns the reciever (a command set). + # + # source://pry//lib/pry/command_set.rb#161 def import_from(set, *matches); end + + # @return [Array] The list of commands provided by the command set. + # + # source://pry//lib/pry/command_set.rb#262 def keys; end + + # @return [Array] The list of commands provided by the command set. + # + # source://pry//lib/pry/command_set.rb#262 def list_commands; end + + # Process the given line to see whether it needs executing as a command. + # + # @param val [String] The line to execute + # @param context [Hash] The context to execute the commands with + # @return [CommandSet::Result] + # + # source://pry//lib/pry/command_set.rb#351 def process_line(val, context = T.unsafe(nil)); end + + # Rename a command. Accepts either match or listing for the search. + # + # @example Renaming the `ls` command and changing its description. + # Pry.config.commands.rename "dir", "ls", :description => "DOS friendly ls" + # @param new_match [String, Regexp] The new match for the command. + # @param search [String, Regexp] The command's current match or listing. + # @param options [Hash] The optional configuration parameters, + # accepts the same as the `command` method, but also allows the + # command description to be passed this way too. + # + # source://pry//lib/pry/command_set.rb#227 def rename_command(new_match, search, options = T.unsafe(nil)); end + + # source://pry//lib/pry/command_set.rb#267 def to_h; end + + # source://pry//lib/pry/command_set.rb#267 def to_hash; end + + # Is the given line a command invocation? + # + # @param val [String] + # @return [Boolean] + # + # source://pry//lib/pry/command_set.rb#343 def valid_command?(val); end private + # Defines helpers methods for this command sets. + # Those helpers are only defined in this command set. + # + # @example + # helpers do + # def hello + # puts "Hello!" + # end + # + # include OtherModule + # end + # @yield A block defining helper methods + # + # source://pry//lib/pry/command_set.rb#390 def helpers(&block); end end +# CommandState is a data structure to hold per-command state. +# +# Pry commands can store arbitrary state here. This state persists between +# subsequent command invocations. All state saved here is unique to the +# command. +# +# @api private +# @since v0.13.0 +# +# source://pry//lib/pry/command_state.rb#14 class Pry::CommandState + # @api private + # @return [CommandState] a new instance of CommandState + # @since v0.13.0 + # + # source://pry//lib/pry/command_state.rb#19 def initialize; end + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/command_state.rb#27 def reset(command_name); end + + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/command_state.rb#23 def state_for(command_name); end class << self + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/command_state.rb#15 def default; end end end +# source://pry//lib/pry.rb#35 Pry::Commands = T.let(T.unsafe(nil), Pry::CommandSet) +# @api private +# +# source://pry//lib/pry/config/attributable.rb#4 class Pry::Config extend ::Pry::Config::Attributable + # @api private + # @return [Config] a new instance of Config + # + # source://pry//lib/pry/config.rb#154 def initialize; end + # @api private + # + # source://pry//lib/pry/config.rb#234 def [](attr); end + + # @api private + # + # source://pry//lib/pry/config.rb#230 def []=(attr, value); end + + # @api private + # @return [Boolean] + # + # source://pry//lib/pry/config/attributable.rb#13 def auto_indent; end + + # source://pry//lib/pry/config/attributable.rb#18 def auto_indent=(_arg0); end + + # @api private + # @return [Boolean] whether or not display a warning when a command name + # collides with a method/local in the current context. + # + # source://pry//lib/pry/config/attributable.rb#13 def collision_warning; end + + # source://pry//lib/pry/config/attributable.rb#18 def collision_warning=(_arg0); end + + # @api private + # @return [Boolean] + # + # source://pry//lib/pry/config/attributable.rb#13 def color; end + + # source://pry//lib/pry/config/attributable.rb#18 def color=(_arg0); end + + # @api private + # @return [Proc] + # + # source://pry//lib/pry/config/attributable.rb#13 def command_completions; end + + # source://pry//lib/pry/config/attributable.rb#18 def command_completions=(_arg0); end + + # A string that must precede all commands. For example, if is is + # set to "%", the "cd" command must be invoked as "%cd"). + # + # @api private + # @return [String] + # + # source://pry//lib/pry/config/attributable.rb#13 def command_prefix; end + + # source://pry//lib/pry/config/attributable.rb#18 def command_prefix=(_arg0); end + + # @api private + # @return [Pry::CommandSet] + # + # source://pry//lib/pry/config/attributable.rb#13 def commands; end + + # source://pry//lib/pry/config/attributable.rb#18 def commands=(_arg0); end + + # @api private + # @return [#build_completion_proc] a completer to use + # + # source://pry//lib/pry/config/attributable.rb#13 def completer; end + + # source://pry//lib/pry/config/attributable.rb#18 def completer=(_arg0); end + + # @api private + # + # source://pry//lib/pry/config.rb#259 def control_d_handler; end + + # @api private + # + # source://pry//lib/pry/config.rb#260 def control_d_handler=(value); end + + # @api private + # @return [Boolean] + # + # source://pry//lib/pry/config/attributable.rb#13 def correct_indent; end + + # source://pry//lib/pry/config/attributable.rb#18 def correct_indent=(_arg0); end + + # @api private + # @return [Integer] The number of lines of context to show before and after + # exceptions + # + # source://pry//lib/pry/config/attributable.rb#13 def default_window_size; end + + # source://pry//lib/pry/config/attributable.rb#18 def default_window_size=(_arg0); end + + # @api private + # @return [Boolean] whether to disable edit-method's auto-reloading behavior + # + # source://pry//lib/pry/config/attributable.rb#13 def disable_auto_reload; end + + # source://pry//lib/pry/config/attributable.rb#18 def disable_auto_reload=(_arg0); end + + # If it is a String, then that String is used as the shell + # command to invoke the editor. + # + # If it responds to #call is callable then `file`, `line`, and `reloading` + # are passed to it. `reloading` indicates whether Pry will be reloading code + # after the shell command returns. All parameters are optional. + # + # @api private + # @return [String, #call] + # + # source://pry//lib/pry/config/attributable.rb#13 def editor; end + + # source://pry//lib/pry/config/attributable.rb#18 def editor=(_arg0); end + + # @api private + # @return [Proc] the printer for exceptions + # + # source://pry//lib/pry/config/attributable.rb#13 def exception_handler; end + + # source://pry//lib/pry/config/attributable.rb#18 def exception_handler=(_arg0); end + + # @api private + # @deprecated + # @return [Array] Exception that Pry shouldn't rescue + # + # source://pry//lib/pry/config/attributable.rb#13 def exception_whitelist; end + + # source://pry//lib/pry/config/attributable.rb#18 def exception_whitelist=(_arg0); end + + # @api private + # @return [String] a line of code to execute in context before the session + # starts + # + # source://pry//lib/pry/config/attributable.rb#13 def exec_string; end + + # source://pry//lib/pry/config/attributable.rb#18 def exec_string=(_arg0); end + + # @api private + # @return [Hash{Symbol=>Proc}] + # + # source://pry//lib/pry/config/attributable.rb#13 def extra_sticky_locals; end + + # source://pry//lib/pry/config/attributable.rb#18 def extra_sticky_locals=(_arg0); end + + # @api private + # @return [Proc] + # + # source://pry//lib/pry/config/attributable.rb#13 def file_completions; end + + # source://pry//lib/pry/config/attributable.rb#18 def file_completions=(_arg0); end + + # @api private + # @return [Pry::History] + # + # source://pry//lib/pry/config/attributable.rb#13 def history; end + + # source://pry//lib/pry/config/attributable.rb#18 def history=(_arg0); end + + # @api private + # @return [String] + # + # source://pry//lib/pry/config/attributable.rb#13 def history_file; end + + # source://pry//lib/pry/config/attributable.rb#18 def history_file=(_arg0); end + + # @api private + # @return [Array] + # + # source://pry//lib/pry/config/attributable.rb#13 def history_ignorelist; end + + # source://pry//lib/pry/config/attributable.rb#18 def history_ignorelist=(_arg0); end + + # @api private + # @return [Boolean] + # + # source://pry//lib/pry/config/attributable.rb#13 def history_load; end + + # source://pry//lib/pry/config/attributable.rb#18 def history_load=(_arg0); end + + # @api private + # @return [Boolean] + # + # source://pry//lib/pry/config/attributable.rb#13 def history_save; end + + # source://pry//lib/pry/config/attributable.rb#18 def history_save=(_arg0); end + + # @api private + # @return [Pry::Hooks] + # + # source://pry//lib/pry/config/attributable.rb#13 def hooks; end + + # source://pry//lib/pry/config/attributable.rb#18 def hooks=(_arg0); end + + # @api private + # @return [IO, #readline] he object from which Pry retrieves its lines of + # input + # + # source://pry//lib/pry/config/attributable.rb#13 def input; end + + # source://pry//lib/pry/config/attributable.rb#18 def input=(_arg0); end + + # @api private + # @return [Hash] + # + # source://pry//lib/pry/config/attributable.rb#13 def ls; end + + # source://pry//lib/pry/config/attributable.rb#18 def ls=(_arg0); end + + # @api private + # @return [Integer] how many input/output lines to keep in memory + # + # source://pry//lib/pry/config/attributable.rb#13 def memory_size; end + + # source://pry//lib/pry/config/attributable.rb#18 def memory_size=(_arg0); end + + # @api private + # + # source://pry//lib/pry/config.rb#226 def merge(config_hash); end + + # @api private + # + # source://pry//lib/pry/config.rb#221 def merge!(config_hash); end + + # @api private + # + # source://pry//lib/pry/config.rb#239 def method_missing(method_name, *args, &_block); end + + # @api private + # @return [IO, #puts] where Pry should output results provided by {input} + # + # source://pry//lib/pry/config/attributable.rb#13 def output; end + + # source://pry//lib/pry/config/attributable.rb#18 def output=(_arg0); end + + # @api private + # @return [String] + # + # source://pry//lib/pry/config/attributable.rb#13 def output_prefix; end + + # source://pry//lib/pry/config/attributable.rb#18 def output_prefix=(_arg0); end + + # @api private + # @return [Boolean] + # + # source://pry//lib/pry/config/attributable.rb#13 def pager; end + + # source://pry//lib/pry/config/attributable.rb#18 def pager=(_arg0); end + + # @api private + # @return [Proc] the printer for Ruby expressions (not commands) + # + # source://pry//lib/pry/config/attributable.rb#13 def print; end + + # source://pry//lib/pry/config/attributable.rb#18 def print=(_arg0); end + + # @api private + # @return [Pry::Prompt] + # + # source://pry//lib/pry/config/attributable.rb#13 def prompt; end + + # source://pry//lib/pry/config/attributable.rb#18 def prompt=(_arg0); end + + # @api private + # @return [String] The display name that is part of the prompt + # + # source://pry//lib/pry/config/attributable.rb#13 def prompt_name; end + + # source://pry//lib/pry/config/attributable.rb#18 def prompt_name=(_arg0); end + + # @api private + # @return [Array] the list of objects that are known to have a + # 1-line #inspect output suitable for prompt + # + # source://pry//lib/pry/config/attributable.rb#13 def prompt_safe_contexts; end + + # source://pry//lib/pry/config/attributable.rb#18 def prompt_safe_contexts=(_arg0); end + + # @api private + # @return [Boolean] suppresses whereami output on `binding.pry` + # + # source://pry//lib/pry/config/attributable.rb#13 def quiet; end + + # source://pry//lib/pry/config/attributable.rb#18 def quiet=(_arg0); end + + # @api private + # @return [String] + # @since v0.13.0 + # + # source://pry//lib/pry/config/attributable.rb#13 def rc_file; end + + # source://pry//lib/pry/config/attributable.rb#18 def rc_file=(_arg0); end + + # @api private + # @return [Array] Ruby files to be required + # + # source://pry//lib/pry/config/attributable.rb#13 def requires; end + + # source://pry//lib/pry/config/attributable.rb#18 def requires=(_arg0); end + + # @api private + # @return [Boolean] whether the local ./.pryrc should be loaded + # + # source://pry//lib/pry/config/attributable.rb#13 def should_load_local_rc; end + + # source://pry//lib/pry/config/attributable.rb#18 def should_load_local_rc=(_arg0); end + + # @api private + # @return [Boolean] whether the global ~/.pryrc should be loaded + # + # source://pry//lib/pry/config/attributable.rb#13 def should_load_rc; end + + # source://pry//lib/pry/config/attributable.rb#18 def should_load_rc=(_arg0); end + + # @api private + # @return [Boolean] whether to load files specified with the -r flag + # + # source://pry//lib/pry/config/attributable.rb#13 def should_load_requires; end + + # source://pry//lib/pry/config/attributable.rb#18 def should_load_requires=(_arg0); end + + # Whether Pry should trap SIGINT and cause it to raise an Interrupt + # exception. This is only useful on JRuby, MRI does this for us. + # + # @api private + # @return [Boolean] + # + # source://pry//lib/pry/config/attributable.rb#13 def should_trap_interrupts; end + + # source://pry//lib/pry/config/attributable.rb#18 def should_trap_interrupts=(_arg0); end + + # @api private + # @return [Proc] The proc that runs system commands + # + # source://pry//lib/pry/config/attributable.rb#13 def system; end + + # source://pry//lib/pry/config/attributable.rb#18 def system=(_arg0); end + + # @api private + # @return [Array] Exception that Pry shouldn't rescue + # + # source://pry//lib/pry/config/attributable.rb#13 def unrescued_exceptions; end + + # source://pry//lib/pry/config/attributable.rb#18 def unrescued_exceptions=(_arg0); end + + # @api private + # @return [Boolean] displays a warning about experience improvement on + # Windows + # + # source://pry//lib/pry/config/attributable.rb#13 def windows_console_warning; end + + # source://pry//lib/pry/config/attributable.rb#18 def windows_console_warning=(_arg0); end private + # @api private + # + # source://pry//lib/pry/config.rb#303 def default_rc_file; end + + # @api private + # + # source://pry//lib/pry/config.rb#254 def initialize_dup(other); end + + # @api private + # + # source://pry//lib/pry/config.rb#289 def lazy_readline; end + + # @api private + # @return [Boolean] + # + # source://pry//lib/pry/config.rb#250 def respond_to_missing?(method_name, include_all = T.unsafe(nil)); end end +# Attributable provides the ability to create "attribute" +# accessors. Attribute accessors create a standard "attr_writer" and a +# customised "attr_reader". This reader is Proc-aware (lazy). +# +# @api private +# @since v0.13.0 +# +# source://pry//lib/pry/config/attributable.rb#11 module Pry::Config::Attributable + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/config/attributable.rb#12 def attribute(attr_name); end end +# LazyValue is a Proc (block) wrapper. It is meant to be used as a +# configuration value. Subsequent `#call` calls always evaluate the given +# block. +# +# @api private +# @example +# num = 19 +# value = Pry::Config::LazyValue.new { num += 1 } +# value.foo # => 20 +# value.foo # => 21 +# value.foo # => 22 +# @see Pry::Config::MemoizedValue +# @since v0.13.0 +# +# source://pry//lib/pry/config/lazy_value.rb#19 class Pry::Config::LazyValue + # @api private + # @return [LazyValue] a new instance of LazyValue + # @since v0.13.0 + # + # source://pry//lib/pry/config/lazy_value.rb#20 def initialize(&block); end + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/config/lazy_value.rb#24 def call; end end +# MemoizedValue is a Proc (block) wrapper. It is meant to be used as a +# configuration value. Subsequent `#call` calls return the same memoized +# result. +# +# @api private +# @example +# num = 19 +# value = Pry::Config::MemoizedValue.new { num += 1 } +# value.call # => 20 +# value.call # => 20 +# value.call # => 20 +# @see Pry::Config::LazyValue +# @since v0.13.0 +# +# source://pry//lib/pry/config/memoized_value.rb#19 class Pry::Config::MemoizedValue + # @api private + # @return [MemoizedValue] a new instance of MemoizedValue + # @since v0.13.0 + # + # source://pry//lib/pry/config/memoized_value.rb#20 def initialize(&block); end + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/config/memoized_value.rb#26 def call; end end +# Value holds a value for the given attribute and decides how it should +# be read. Procs get called, other values are returned as is. +# +# @api private +# @since v0.13.0 +# +# source://pry//lib/pry/config/value.rb#10 class Pry::Config::Value + # @api private + # @return [Value] a new instance of Value + # @since v0.13.0 + # + # source://pry//lib/pry/config/value.rb#11 def initialize(value); end + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/config/value.rb#15 def call; end end +# @api private +# @since v0.13.0 +# +# source://pry//lib/pry/control_d_handler.rb#6 module Pry::ControlDHandler class << self + # Deal with the ^D key being pressed. Different behaviour in different + # cases: + # 1. In an expression behave like `!` command. + # 2. At top-level session behave like `exit` command. + # 3. In a nested session behave like `cd ..`. + # + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/control_d_handler.rb#12 def default(pry_instance); end end end +# source://pry//lib/pry/pry_instance.rb#59 Pry::EMPTY_COMPLETIONS = T.let(T.unsafe(nil), Array) +# source://pry//lib/pry/editor.rb#6 class Pry::Editor include ::Pry::Helpers::OptionsHelpers include ::Pry::Helpers::CommandHelpers + # @return [Editor] a new instance of Editor + # + # source://pry//lib/pry/editor.rb#27 def initialize(pry_instance); end + # Generate the string that's used to start the editor. This includes + # all the flags we want as well as the file and line number we + # want to open at. + # + # source://pry//lib/pry/editor.rb#60 def build_editor_invocation_string(file, line, blocking); end + + # source://pry//lib/pry/editor.rb#31 def edit_tempfile_with_content(initial_content, line = T.unsafe(nil)); end + + # source://pry//lib/pry/editor.rb#41 def invoke_editor(file, line, blocking = T.unsafe(nil)); end + + # Returns the value of attribute pry_instance. + # + # source://pry//lib/pry/editor.rb#25 def pry_instance; end private + # Some editors that run outside the terminal allow you to control whether or + # not to block the process from which they were launched (in this case, Pry). + # For those editors, return the flag that produces the desired behavior. + # + # source://pry//lib/pry/editor.rb#100 def blocking_flag_for_editor(blocking); end + + # Get the name of the binary that Pry.config.editor points to. + # + # This is useful for deciding which flags we pass to the editor as + # we can just use the program's name and ignore any absolute paths. + # + # @example + # Pry.config.editor="/home/conrad/bin/textmate -w" + # editor_name + # # => textmate + # + # source://pry//lib/pry/editor.rb#153 def editor_name; end + + # Start the editor running, using the calculated invocation string + # + # source://pry//lib/pry/editor.rb#76 def open_editor(editor_invocation); end + + # We need JRuby specific code here cos just shelling out using + # system() appears to be pretty broken :/ + # + # source://pry//lib/pry/editor.rb#89 def open_editor_on_jruby(editor_invocation); end + + # Return the syntax for a given editor for starting the editor + # and moving to a particular line within that file + # + # source://pry//lib/pry/editor.rb#115 def start_line_syntax_for_editor(file_name, line_number); end class << self + # source://pry//lib/pry/editor.rb#7 def default; end end end +# Env is a helper module to work with environment variables. +# +# @api private +# @since v0.13.0 +# +# source://pry//lib/pry/env.rb#8 module Pry::Env class << self + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/env.rb#9 def [](key); end end end +# @api private +# @since v0.13.0 +# +# source://pry//lib/pry/exception_handler.rb#6 module Pry::ExceptionHandler class << self + # Will only show the first line of the backtrace. + # + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/exception_handler.rb#9 def handle_exception(output, exception, _pry_instance); end private + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/exception_handler.rb#37 def cause_text(cause); end + + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/exception_handler.rb#32 def exception_text(exception); end + + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/exception_handler.rb#19 def standard_error_text_for(exception); end end end +# source://pry//lib/pry/forwardable.rb#4 module Pry::Forwardable include ::Forwardable + # Since Ruby 2.4, Forwardable will print a warning when + # calling a method that is private on a delegate, and + # in the future it could be an error: https://bugs.ruby-lang.org/issues/12782#note-3 + # + # That's why we revert to a custom implementation for delegating one + # private method to another. + # + # source://pry//lib/pry/forwardable.rb#16 def def_private_delegators(target, *private_delegates); end end +# When we try to get a binding for an object, we try to define a method on +# that Object's singleton class. This doesn't work for "frozen" Object's, and +# the exception is just a vanilla RuntimeError. +# +# source://pry//lib/pry/exceptions.rb#56 module Pry::FrozenObjectException class << self + # source://pry//lib/pry/exceptions.rb#57 def ===(exception); end end end -Pry::HAS_SAFE_LEVEL = T.let(T.unsafe(nil), TrueClass) +# @return [Boolean] true if this Ruby supports safe levels and tainting, +# to guard against using deprecated or unsupported features +# +# source://pry//lib/pry/pry_class.rb#11 +Pry::HAS_SAFE_LEVEL = T.let(T.unsafe(nil), FalseClass) +# source://pry//lib/pry/helpers/base_helpers.rb#4 module Pry::Helpers class << self + # source://pry//lib/pry/helpers/table.rb#27 def tablify(things, line_length, pry_instance = T.unsafe(nil)); end + + # source://pry//lib/pry/helpers/table.rb#5 def tablify_or_one_line(heading, things, pry_instance = T.unsafe(nil)); end + + # source://pry//lib/pry/helpers/table.rb#16 def tablify_to_screen_width(things, options, pry_instance = T.unsafe(nil)); end end end +# source://pry//lib/pry/helpers/base_helpers.rb#5 module Pry::Helpers::BaseHelpers extend ::Pry::Helpers::BaseHelpers + # source://pry//lib/pry/helpers/base_helpers.rb#43 def colorize_code(code); end + + # source://pry//lib/pry/helpers/base_helpers.rb#27 def find_command(name, set = T.unsafe(nil)); end + + # formatting + # + # source://pry//lib/pry/helpers/base_helpers.rb#54 def heading(text); end + + # source://pry//lib/pry/helpers/base_helpers.rb#47 def highlight(string, regexp, highlight_color = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://pry//lib/pry/helpers/base_helpers.rb#34 def not_a_real_file?(file); end + + # Acts like send but ignores any methods defined below Object or Class in the + # inheritance hierarchy. + # This is required to introspect methods on objects like Net::HTTP::Get that + # have overridden the `method` method. + # + # source://pry//lib/pry/helpers/base_helpers.rb#22 def safe_send(obj, method, *args, &block); end + + # source://pry//lib/pry/helpers/base_helpers.rb#8 def silence_warnings; end + + # Send the given text through the best available pager (if Pry.config.pager is + # enabled). Infers where to send the output if used as a mixin. + # DEPRECATED. + # + # source://pry//lib/pry/helpers/base_helpers.rb#62 def stagger_output(text, _out = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://pry//lib/pry/helpers/base_helpers.rb#38 def use_ansi_codes?; end end +# source://pry//lib/pry/helpers/command_helpers.rb#7 module Pry::Helpers::CommandHelpers include ::Pry::Helpers::OptionsHelpers extend ::Pry::Helpers::OptionsHelpers extend ::Pry::Helpers::CommandHelpers + # source://pry//lib/pry/helpers/command_helpers.rb#115 def absolute_index_number(line_number, array_length); end + + # source://pry//lib/pry/helpers/command_helpers.rb#123 def absolute_index_range(range_or_number, array_length); end + + # source://pry//lib/pry/helpers/command_helpers.rb#31 def get_method_or_raise(method_name, context, opts = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://pry//lib/pry/helpers/command_helpers.rb#21 def internal_binding?(context); end + + # source://pry//lib/pry/helpers/command_helpers.rb#97 def one_index_number(line_number); end + + # convert a 1-index range to a 0-indexed one + # + # source://pry//lib/pry/helpers/command_helpers.rb#102 def one_index_range(range); end + + # source://pry//lib/pry/helpers/command_helpers.rb#106 def one_index_range_or_number(range_or_number); end + + # Restrict a string to the given range of lines (1-indexed) + # + # @param content [String] The string. + # @param lines [Range, Integer] The line(s) to restrict it to. + # @return [String] The resulting string. + # + # source://pry//lib/pry/helpers/command_helpers.rb#92 def restrict_to_lines(content, lines); end + + # source://pry//lib/pry/helpers/command_helpers.rb#135 def set_file_and_dir_locals(file_name, pry = T.unsafe(nil), ctx = T.unsafe(nil)); end + + # Open a temp file and yield it to the block, closing it after + # + # @return [String] The path of the temp file + # + # source://pry//lib/pry/helpers/command_helpers.rb#14 def temp_file(ext = T.unsafe(nil)); end + + # Remove any common leading whitespace from every line in `text`. This + # can be used to make a HEREDOC line up with the left margin, without + # sacrificing the indentation level of the source code. + # + # @example + # opt.banner(unindent(<<-USAGE)) + # Lorem ipsum dolor sit amet, consectetur adipisicing elit, + # sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. + # "Ut enim ad minim veniam." + # USAGE + # @param dirty_text [String] The text from which to remove indentation + # @return [String] the text with indentation stripped + # + # source://pry//lib/pry/helpers/command_helpers.rb#68 def unindent(dirty_text, left_padding = T.unsafe(nil)); end end +# This class contains methods useful for extracting +# documentation from methods and classes. +# +# source://pry//lib/pry/helpers/documentation_helpers.rb#7 module Pry::Helpers::DocumentationHelpers private + # Given a string that makes up a comment in a source-code file parse out the content + # that the user is intended to read. (i.e. without leading indentation, #-characters + # or shebangs) + # + # @param comment [String] + # @return [String] + # + # source://pry//lib/pry/helpers/documentation_helpers.rb#67 def get_comment_content(comment); end + + # source://pry//lib/pry/helpers/documentation_helpers.rb#51 def process_comment_markup(comment); end + + # source://pry//lib/pry/helpers/documentation_helpers.rb#15 def process_rdoc(comment); end + + # source://pry//lib/pry/helpers/documentation_helpers.rb#45 def process_yardoc(comment); end + + # source://pry//lib/pry/helpers/documentation_helpers.rb#30 def process_yardoc_tag(comment, tag); end + + # @param code [String] + # @return [String] + # + # source://pry//lib/pry/helpers/documentation_helpers.rb#57 def strip_comments_from_c_code(code); end + + # @param text [String] + # @return [String] + # + # source://pry//lib/pry/helpers/documentation_helpers.rb#79 def strip_leading_whitespace(text); end class << self + # Given a string that makes up a comment in a source-code file parse out the content + # that the user is intended to read. (i.e. without leading indentation, #-characters + # or shebangs) + # + # @param comment [String] + # @return [String] + # + # source://pry//lib/pry/helpers/documentation_helpers.rb#67 def get_comment_content(comment); end + + # source://pry//lib/pry/helpers/documentation_helpers.rb#51 def process_comment_markup(comment); end + + # source://pry//lib/pry/helpers/documentation_helpers.rb#15 def process_rdoc(comment); end + + # source://pry//lib/pry/helpers/documentation_helpers.rb#45 def process_yardoc(comment); end + + # source://pry//lib/pry/helpers/documentation_helpers.rb#30 def process_yardoc_tag(comment, tag); end + + # @param code [String] + # @return [String] + # + # source://pry//lib/pry/helpers/documentation_helpers.rb#57 def strip_comments_from_c_code(code); end + + # @param text [String] + # @return [String] + # + # source://pry//lib/pry/helpers/documentation_helpers.rb#79 def strip_leading_whitespace(text); end end end +# source://pry//lib/pry/helpers/documentation_helpers.rb#8 Pry::Helpers::DocumentationHelpers::YARD_TAGS = T.let(T.unsafe(nil), Array) +# source://pry//lib/pry/helpers/options_helpers.rb#5 module Pry::Helpers::OptionsHelpers private + # Get the method object parsed by the slop instance + # + # source://pry//lib/pry/helpers/options_helpers.rb#23 def method_object; end + + # Add method options to the Pry::Slop instance + # + # source://pry//lib/pry/helpers/options_helpers.rb#9 def method_options(opt); end class << self + # Get the method object parsed by the slop instance + # + # source://pry//lib/pry/helpers/options_helpers.rb#23 def method_object; end + + # Add method options to the Pry::Slop instance + # + # source://pry//lib/pry/helpers/options_helpers.rb#9 def method_options(opt); end end end +# Contains methods for querying the platform that Pry is running on +# +# @api public +# @since v0.12.0 +# +# source://pry//lib/pry/helpers/platform.rb#10 module Pry::Helpers::Platform class << self + # @api public + # @return [Boolean] + # @since v0.12.0 + # + # source://pry//lib/pry/helpers/platform.rb#35 def jruby?; end + + # @api public + # @return [Boolean] + # @since v0.12.0 + # + # source://pry//lib/pry/helpers/platform.rb#40 def jruby_19?; end + + # @api public + # @return [Boolean] + # @since v0.12.0 + # + # source://pry//lib/pry/helpers/platform.rb#17 def linux?; end + + # @api public + # @return [Boolean] + # @since v0.12.0 + # + # source://pry//lib/pry/helpers/platform.rb#12 def mac_osx?; end + + # @api public + # @return [Boolean] + # @since v0.12.0 + # + # source://pry//lib/pry/helpers/platform.rb#45 def mri?; end + + # @api public + # @return [Boolean] + # @since v0.12.0 + # + # source://pry//lib/pry/helpers/platform.rb#50 def mri_2?; end + + # @api public + # @return [Boolean] true when Pry is running on Windows with ANSI support, + # false otherwise + # @since v0.12.0 + # + # source://pry//lib/pry/helpers/platform.rb#23 def windows?; end + + # @api public + # @return [Boolean] + # @since v0.12.0 + # + # source://pry//lib/pry/helpers/platform.rb#28 def windows_ansi?; end end end +# source://pry//lib/pry/helpers/table.rb#35 class Pry::Helpers::Table + # @return [Table] a new instance of Table + # + # source://pry//lib/pry/helpers/table.rb#37 def initialize(items, args, pry_instance = T.unsafe(nil)); end + # source://pry//lib/pry/helpers/table.rb#81 def ==(other); end + + # Returns the value of attribute column_count. + # + # source://pry//lib/pry/helpers/table.rb#36 def column_count; end + + # source://pry//lib/pry/helpers/table.rb#68 def column_count=(count); end + + # source://pry//lib/pry/helpers/table.rb#77 def columns; end + + # @return [Boolean] + # + # source://pry//lib/pry/helpers/table.rb#73 def fits_on_line?(line_length); end + + # Returns the value of attribute items. + # + # source://pry//lib/pry/helpers/table.rb#36 def items; end + + # source://pry//lib/pry/helpers/table.rb#62 def items=(items); end + + # source://pry//lib/pry/helpers/table.rb#47 def rows_to_s(style = T.unsafe(nil)); end + + # source://pry//lib/pry/helpers/table.rb#85 def to_a; end + + # source://pry//lib/pry/helpers/table.rb#43 def to_s; end private + # source://pry//lib/pry/helpers/table.rb#91 def _max_width(things); end + + # source://pry//lib/pry/helpers/table.rb#95 def _rebuild_colorless_cache; end + + # source://pry//lib/pry/helpers/table.rb#116 def _recall_color_for(thing); end + + # source://pry//lib/pry/helpers/table.rb#105 def _recolumn; end end +# The methods defined on {Text} are available to custom commands via +# {Pry::Command#text}. +# +# source://pry//lib/pry/helpers/text.rb#7 module Pry::Helpers::Text extend ::Pry::Helpers::Text + # source://pry//lib/pry/helpers/text.rb#23 def black(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def black_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def black_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def black_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def black_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def black_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def black_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def black_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def black_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def black_on_yellow(text); end + + # source://pry//lib/pry/helpers/text.rb#23 def blue(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def blue_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def blue_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def blue_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def blue_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def blue_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def blue_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def blue_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def blue_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def blue_on_yellow(text); end + + # Returns _text_ as bold text for use on a terminal. + # + # @param text [String, #to_s] + # @return [String] _text_ + # + # source://pry//lib/pry/helpers/text.rb#54 def bold(text); end + + # source://pry//lib/pry/helpers/text.rb#27 def bright_black(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_black_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_black_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_black_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_black_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_black_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_black_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_black_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_black_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_black_on_yellow(text); end + + # source://pry//lib/pry/helpers/text.rb#27 def bright_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_blue_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_blue_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_blue_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_blue_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_blue_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_blue_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_blue_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_blue_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_blue_on_yellow(text); end + + # source://pry//lib/pry/helpers/text.rb#27 def bright_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_cyan_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_cyan_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_cyan_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_cyan_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_cyan_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_cyan_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_cyan_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_cyan_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_cyan_on_yellow(text); end + + # source://pry//lib/pry/helpers/text.rb#27 def bright_green(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_green_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_green_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_green_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_green_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_green_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_green_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_green_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_green_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_green_on_yellow(text); end + + # source://pry//lib/pry/helpers/text.rb#27 def bright_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_magenta_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_magenta_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_magenta_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_magenta_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_magenta_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_magenta_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_magenta_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_magenta_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_magenta_on_yellow(text); end + + # source://pry//lib/pry/helpers/text.rb#27 def bright_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_purple_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_purple_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_purple_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_purple_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_purple_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_purple_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_purple_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_purple_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_purple_on_yellow(text); end + + # source://pry//lib/pry/helpers/text.rb#27 def bright_red(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_red_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_red_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_red_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_red_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_red_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_red_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_red_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_red_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_red_on_yellow(text); end + + # source://pry//lib/pry/helpers/text.rb#27 def bright_white(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_white_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_white_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_white_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_white_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_white_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_white_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_white_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_white_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_white_on_yellow(text); end + + # source://pry//lib/pry/helpers/text.rb#27 def bright_yellow(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_yellow_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_yellow_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_yellow_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_yellow_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_yellow_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_yellow_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_yellow_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_yellow_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#36 def bright_yellow_on_yellow(text); end + + # source://pry//lib/pry/helpers/text.rb#23 def cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def cyan_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def cyan_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def cyan_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def cyan_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def cyan_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def cyan_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def cyan_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def cyan_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def cyan_on_yellow(text); end + + # Returns `text` in the default foreground colour. + # Use this instead of "black" or "white" when you mean absence of colour. + # + # @param text [String, #to_s] + # @return [String] + # + # source://pry//lib/pry/helpers/text.rb#63 def default(text); end + + # source://pry//lib/pry/helpers/text.rb#23 def green(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def green_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def green_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def green_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def green_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def green_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def green_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def green_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def green_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def green_on_yellow(text); end + + # Returns _text_ indented by _chars_ spaces. + # + # @param text [String] + # @param chars [Fixnum] + # + # source://pry//lib/pry/helpers/text.rb#113 def indent(text, chars); end + + # source://pry//lib/pry/helpers/text.rb#23 def magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def magenta_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def magenta_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def magenta_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def magenta_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def magenta_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def magenta_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def magenta_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def magenta_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def magenta_on_yellow(text); end + + # @return [void] + # @yield Yields a block with color turned off. + # + # source://pry//lib/pry/helpers/text.rb#73 def no_color; end + + # @return [void] + # @yield Yields a block with paging turned off. + # + # source://pry//lib/pry/helpers/text.rb#87 def no_pager; end + + # source://pry//lib/pry/helpers/text.rb#23 def purple(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def purple_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def purple_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def purple_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def purple_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def purple_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def purple_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def purple_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def purple_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def purple_on_yellow(text); end + + # source://pry//lib/pry/helpers/text.rb#23 def red(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def red_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def red_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def red_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def red_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def red_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def red_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def red_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def red_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def red_on_yellow(text); end + + # Remove any color codes from _text_. + # + # @param text [String, #to_s] + # @return [String] _text_ stripped of any color codes. + # + # source://pry//lib/pry/helpers/text.rb#46 def strip_color(text); end + + # source://pry//lib/pry/helpers/text.rb#23 def white(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def white_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def white_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def white_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def white_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def white_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def white_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def white_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def white_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def white_on_yellow(text); end + + # Returns _text_ in a numbered list, beginning at _offset_. + # + # @param text [#each_line] + # @param offset [Fixnum] + # @return [String] + # + # source://pry//lib/pry/helpers/text.rb#100 def with_line_numbers(text, offset, color = T.unsafe(nil)); end + + # source://pry//lib/pry/helpers/text.rb#23 def yellow(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def yellow_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def yellow_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def yellow_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def yellow_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def yellow_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def yellow_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def yellow_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def yellow_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#32 def yellow_on_yellow(text); end end +# source://pry//lib/pry/helpers/text.rb#10 Pry::Helpers::Text::COLORS = T.let(T.unsafe(nil), Hash) +# The History class is responsible for maintaining the user's input history, +# both internally and within Readline. +# +# source://pry//lib/pry/history.rb#6 class Pry::History + # @return [History] a new instance of History + # + # source://pry//lib/pry/history.rb#29 def initialize(options = T.unsafe(nil)); end + # Add a line to the input history, ignoring blank and duplicate lines. + # + # @param line [String] + # @return [String] The same line that was passed in + # + # source://pry//lib/pry/history.rb#53 def <<(line); end + + # Clear this session's history. This won't affect the contents of the + # history file. + # + # source://pry//lib/pry/history.rb#74 def clear; end + + # Filter the history with the histignore options + # + # @return [Array] An array containing all the lines that are not + # included in the histignore. + # + # source://pry//lib/pry/history.rb#95 def filter(history); end + + # @return [Integer] total number of lines, including original lines + # + # source://pry//lib/pry/history.rb#27 def history_line_count; end + + # Load the input history using `History.loader`. + # + # @return [Integer] The number of lines loaded + # + # source://pry//lib/pry/history.rb#40 def load; end + + # Returns the value of attribute loader. + # + # source://pry//lib/pry/history.rb#21 def loader; end + + # Sets the attribute loader + # + # @param value the value to set the attribute loader to. + # + # source://pry//lib/pry/history.rb#21 def loader=(_arg0); end + + # @return [Fixnum] Number of lines in history when Pry first loaded. + # + # source://pry//lib/pry/history.rb#24 def original_lines; end + + # Add a line to the input history, ignoring blank and duplicate lines. + # + # @param line [String] + # @return [String] The same line that was passed in + # + # source://pry//lib/pry/history.rb#53 def push(line); end + + # Returns the value of attribute saver. + # + # source://pry//lib/pry/history.rb#21 def saver; end + + # Sets the attribute saver + # + # @param value the value to set the attribute saver to. + # + # source://pry//lib/pry/history.rb#21 def saver=(_arg0); end + + # @return [Fixnum] The number of lines in history from just this session. + # + # source://pry//lib/pry/history.rb#81 def session_line_count; end + + # Return an Array containing all stored history. + # + # @return [Array] An Array containing all lines of history loaded + # or entered by the user in the current session. + # + # source://pry//lib/pry/history.rb#88 def to_a; end private + # The history file, opened for appending. + # + # source://pry//lib/pry/history.rb#127 def history_file; end + + # source://pry//lib/pry/history.rb#143 def history_file_path; end + + # @return [Boolean] + # + # source://pry//lib/pry/history.rb#147 def invalid_readline_line?(line); end + + # The default loader. Yields lines from `Pry.config.history_file`. + # + # source://pry//lib/pry/history.rb#113 def read_from_file; end + + # The default saver. Appends the given line to `Pry.config.history_file`. + # + # source://pry//lib/pry/history.rb#122 def save_to_file(line); end + + # Check if the line match any option in the histignore + # [Pry.config.history_ignorelist] + # + # @return [Boolean] a boolean that notifies if the line was found in the + # histignore array. + # + # source://pry//lib/pry/history.rb#105 def should_ignore?(line); end class << self + # source://pry//lib/pry/history.rb#7 def default_file; end end end +# Implements a hooks system for Pry. A hook is a callable that is associated +# with an event. A number of events are currently provided by Pry, these +# include: `:when_started`, `:before_session`, `:after_session`. A hook must +# have a name, and is connected with an event by the `Pry::Hooks#add_hook` +# method. +# +# @example Adding a hook for the `:before_session` event. +# Pry.config.hooks.add_hook(:before_session, :say_hi) do +# puts "hello" +# end +# +# source://pry//lib/pry/hooks.rb#14 class Pry::Hooks + # @return [Hooks] a new instance of Hooks + # + # source://pry//lib/pry/hooks.rb#25 def initialize; end + # Add a new hook to be executed for the `event_name` event. + # + # @param event_name [Symbol] The name of the event. + # @param hook_name [Symbol] The name of the hook. + # @param callable [#call] The callable. + # @raise [ArgumentError] + # @return [Pry:Hooks] The receiver. + # @yield The block to use as the callable (if no `callable` provided). + # + # source://pry//lib/pry/hooks.rb#81 def add_hook(event_name, hook_name, callable = T.unsafe(nil), &block); end + + # Clear all hooks functions for a given event. + # + # @param event_name [String] The name of the event. + # @return [void] + # + # source://pry//lib/pry/hooks.rb#165 def clear_event_hooks(event_name); end + + # @param event_name [Symbol] The name of the event. + # @param hook_name [Symbol] The name of the hook. + # to delete. + # @return [#call] The deleted hook. + # + # source://pry//lib/pry/hooks.rb#147 def delete_hook(event_name, hook_name); end + + # source://pry//lib/pry/hooks.rb#39 def errors; end + + # Execute the list of hooks for the `event_name` event. + # + # @param event_name [Symbol] The name of the event. + # @param args [Array] The arguments to pass to each hook function. + # @return [Object] The return value of the last executed hook. + # + # source://pry//lib/pry/hooks.rb#108 def exec_hook(event_name, *args, &block); end + + # @param event_name [Symbol] The name of the event. + # @param hook_name [Symbol] The name of the hook + # @return [#call] a specific hook for a given event. + # + # source://pry//lib/pry/hooks.rb#128 def get_hook(event_name, hook_name); end + + # `add_hook`/`delete_hook` for that. + # + # @note Modifying the returned hash does not alter the hooks, use + # @param event_name [Symbol] The name of the event. + # @return [Hash] The hash of hook names / hook functions. + # + # source://pry//lib/pry/hooks.rb#139 def get_hooks(event_name); end + + # @param event_name [Symbol] The name of the event. + # @return [Fixnum] The number of hook functions for `event_name`. + # + # source://pry//lib/pry/hooks.rb#121 def hook_count(event_name); end + + # @param event_name [Symbol] Name of the event. + # @param hook_name [Symbol] Name of the hook. + # @return [Boolean] Whether the hook by the name `hook_name`. + # + # source://pry//lib/pry/hooks.rb#172 def hook_exists?(event_name, hook_name); end + + # @example + # hooks = Pry::Hooks.new.add_hook(:before_session, :say_hi) { puts "hi!" } + # Pry::Hooks.new.merge(hooks) + # @param other [Pry::Hooks] The `Pry::Hooks` instance to merge + # @return [Pry::Hooks] a new `Pry::Hooks` instance containing a merge of the + # contents of two `Pry:Hooks` instances. + # + # source://pry//lib/pry/hooks.rb#69 def merge(other); end + + # Destructively merge the contents of two `Pry:Hooks` instances. + # + # @param other [Pry::Hooks] The `Pry::Hooks` instance to merge + # @return [Pry:Hooks] The receiver. + # @see #merge + # + # source://pry//lib/pry/hooks.rb#48 def merge!(other); end protected + # Returns the value of attribute hooks. + # + # source://pry//lib/pry/hooks.rb#178 def hooks; end private + # Ensure that duplicates have their @hooks object. + # + # source://pry//lib/pry/hooks.rb#30 def initialize_copy(_orig); end class << self + # source://pry//lib/pry/hooks.rb#15 def default; end end end +# Pry::Indent is a class that can be used to indent a number of lines +# containing Ruby code similar as to how IRB does it (but better). The class +# works by tokenizing a string using CodeRay and then looping over those +# tokens. Based on the tokens in a line of code that line (or the next one) +# will be indented or un-indented by correctly. +# +# source://pry//lib/pry/indent.rb#11 class Pry::Indent include ::Pry::Helpers::BaseHelpers + # @return [Indent] a new instance of Indent + # + # source://pry//lib/pry/indent.rb#104 def initialize(pry_instance = T.unsafe(nil)); end + # Return a string which, when printed, will rewrite the previous line with + # the correct indentation. Mostly useful for fixing 'end'. + # + # @param prompt [String] The user's prompt + # @param code [String] The code the user just typed in + # @param overhang [Integer] The number of characters to erase afterwards (the + # the difference in length between the old line and the new one) + # @return [String] correctly indented line + # + # source://pry//lib/pry/indent.rb#393 def correct_indentation(prompt, code, overhang = T.unsafe(nil)); end + + # Get the indentation for the start of the next line. + # + # This is what's used between the prompt and the cursor in pry. + # + # @return String The correct number of spaces + # + # source://pry//lib/pry/indent.rb#181 def current_prefix; end + + # If the code just before an "if" or "while" token on a line looks like the + # end of a statement, then we want to treat that "if" as a singleline, not + # multiline statement. + # + # @return [Boolean] + # + # source://pry//lib/pry/indent.rb#264 def end_of_statement?(last_token, last_kind); end + + # Are we currently in the middle of a string literal. + # + # This is used to determine whether to re-indent a given line, we mustn't + # re-indent within string literals because to do so would actually change + # the value of the String! + # + # @return [Boolean] Boolean + # + # source://pry//lib/pry/indent.rb#275 def in_string?; end + + # Indents a string and returns it. This string can either be a single line + # or multiple ones. + # + # @example + # str = <] + # + # source://pry//lib/pry/indent.rb#376 def module_nesting; end + + # All the open delimiters, in the order that they first appeared. + # + # @return [String] + # + # source://pry//lib/pry/indent.rb#312 def open_delimiters; end + + # Return a string which restores the CodeRay string status to the correct value by + # opening HEREDOCs and strings. + # + # @return String + # + # source://pry//lib/pry/indent.rb#320 def open_delimiters_line; end + + # reset internal state + # + # source://pry//lib/pry/indent.rb#110 def reset; end + + # @return [Array] The stack of open tokens. + # + # source://pry//lib/pry/indent.rb#21 def stack; end + + # Given a string of Ruby code, use CodeRay to export the tokens. + # + # @param string [String] The Ruby to lex + # @return [Array] An Array of pairs of [token_value, token_type] + # + # source://pry//lib/pry/indent.rb#283 def tokenize(string); end + + # Update the internal state about what kind of strings are open. + # + # Most of the complication here comes from the fact that HEREDOCs can be + # nested. For normal strings (which can't be nested) we assume that CodeRay + # correctly pairs open-and-close delimiters so we don't bother checking what + # they are. + # + # @param token [String] The token (of type :delimiter) + # + # source://pry//lib/pry/indent.rb#297 def track_delimiter(token); end + + # Update the internal state relating to module nesting. + # + # It's responsible for adding to the @module_nesting array, which looks + # something like: + # + # [ ["class", "Foo"], ["module", "Bar::Baz"], ["class <<", "self"] ] + # + # A nil value in the @module_nesting array happens in two places: either + # when @awaiting_class is true and we're still waiting for the string to + # fill that space, or when a parse was rejected. + # + # At the moment this function is quite restricted about what formats it will + # parse, for example we disallow expressions after the class keyword. This + # could maybe be improved in the future. + # + # @param token [String] a token from Coderay + # @param kind [Symbol] the kind of that token + # + # source://pry//lib/pry/indent.rb#341 def track_module_nesting(token, kind); end + + # Update the internal state relating to module nesting on 'end'. + # + # If the current 'end' pairs up with a class or a module then we should + # pop an array off of @module_nesting + # + # @param token [String] a token from Coderay + # @param kind [Symbol] the kind of that token + # + # source://pry//lib/pry/indent.rb#366 def track_module_nesting_end(token, kind = T.unsafe(nil)); end class << self + # Clean the indentation of a fragment of ruby. + # + # @param str [String] + # @return [String] + # + # source://pry//lib/pry/indent.rb#82 def indent(str); end + + # Get the module nesting at the given point in the given string. + # + # NOTE If the line specified contains a method definition, then the nesting + # at the start of the method definition is used. Otherwise the nesting from + # the end of the line is used. + # + # @param str [String] The ruby code to analyze + # @param line_number [Fixnum] The line number (starting from 1) + # @return [Array] + # + # source://pry//lib/pry/indent.rb#95 def nesting_at(str, line_number); end end end +# Collection of token types that should be ignored. Without this list +# keywords such as "class" inside strings would cause the code to be +# indented incorrectly. +# +# :pre_constant and :preserved_constant are the CodeRay 0.9.8 and 1.0.0 +# classifications of "true", "false", and "nil". +# +# source://pry//lib/pry/indent.rb#60 Pry::Indent::IGNORE_TOKENS = T.let(T.unsafe(nil), Array) + +# Collection of tokens that should appear dedented even though they +# don't affect the surrounding code. +# +# source://pry//lib/pry/indent.rb#76 Pry::Indent::MIDWAY_TOKENS = T.let(T.unsafe(nil), Array) + +# Hash containing all the tokens that should increase the indentation +# level. The keys of this hash are open tokens, the values the matching +# tokens that should prevent a line from being indented if they appear on +# the same line. +# +# source://pry//lib/pry/indent.rb#30 Pry::Indent::OPEN_TOKENS = T.let(T.unsafe(nil), Hash) + +# Which tokens can be followed by an optional "do" keyword. +# +# source://pry//lib/pry/indent.rb#52 Pry::Indent::OPTIONAL_DO_TOKENS = T.let(T.unsafe(nil), Array) + +# Which tokens can either be open tokens, or appear as modifiers on +# a single-line. +# +# source://pry//lib/pry/indent.rb#49 Pry::Indent::SINGLELINE_TOKENS = T.let(T.unsafe(nil), Array) + +# The amount of spaces to insert for each indent level. +# +# source://pry//lib/pry/indent.rb#24 Pry::Indent::SPACES = T.let(T.unsafe(nil), String) + +# Tokens that indicate the end of a statement (i.e. that, if they appear +# directly before an "if" indicates that that if applies to the same line, +# not the next line) +# +# :reserved and :keywords are the CodeRay 0.9.8 and 1.0.0 respectively +# classifications of "super", "next", "return", etc. +# +# source://pry//lib/pry/indent.rb#69 Pry::Indent::STATEMENT_END_TOKENS = T.let(T.unsafe(nil), Array) + +# Raised if {#module_nesting} would not work. +# +# source://pry//lib/pry/indent.rb#15 class Pry::Indent::UnparseableNestingError < ::StandardError; end +# source://pry//lib/pry/input_completer.rb#6 class Pry::InputCompleter + # @return [InputCompleter] a new instance of InputCompleter + # + # source://pry//lib/pry/input_completer.rb#42 def initialize(input, pry = T.unsafe(nil)); end + # build_path seperates the input into two parts: path and input. + # input is the partial string that should be completed + # path is a proc that takes an input and builds a full path. + # + # source://pry//lib/pry/input_completer.rb#240 def build_path(input); end + + # Return a new completion proc for use by Readline. + # + # source://pry//lib/pry/input_completer.rb#56 def call(str, options = T.unsafe(nil)); end + + # source://pry//lib/pry/input_completer.rb#255 def ignored_modules; end + + # source://pry//lib/pry/input_completer.rb#229 def select_message(path, receiver, message, candidates); end end +# source://pry//lib/pry/input_completer.rb#8 Pry::InputCompleter::ARRAY_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://pry//lib/pry/input_completer.rb#15 Pry::InputCompleter::CONSTANT_OR_METHOD_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://pry//lib/pry/input_completer.rb#14 Pry::InputCompleter::CONSTANT_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://pry//lib/pry/input_completer.rb#17 Pry::InputCompleter::GLOBALVARIABLE_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://pry//lib/pry/input_completer.rb#16 Pry::InputCompleter::HEX_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://pry//lib/pry/input_completer.rb#7 Pry::InputCompleter::NUMERIC_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://pry//lib/pry/input_completer.rb#12 Pry::InputCompleter::PROC_OR_HASH_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://pry//lib/pry/input_completer.rb#11 Pry::InputCompleter::REGEX_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://pry//lib/pry/input_completer.rb#20 Pry::InputCompleter::RESERVED_WORDS = T.let(T.unsafe(nil), Array) + +# source://pry//lib/pry/input_completer.rb#10 Pry::InputCompleter::SYMBOL_METHOD_CALL_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://pry//lib/pry/input_completer.rb#9 Pry::InputCompleter::SYMBOL_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://pry//lib/pry/input_completer.rb#13 Pry::InputCompleter::TOPLEVEL_LOOKUP_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://pry//lib/pry/input_completer.rb#18 Pry::InputCompleter::VARIABLE_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://pry//lib/pry/input_completer.rb#40 Pry::InputCompleter::WORD_ESCAPE_STR = T.let(T.unsafe(nil), String) +# There is one InputLock per input (such as STDIN) as two REPLs on the same +# input makes things delirious. InputLock serializes accesses to the input so +# that threads to not conflict with each other. The latest thread to request +# ownership of the input wins. +# +# source://pry//lib/pry/input_lock.rb#8 class Pry::InputLock + # @return [InputLock] a new instance of InputLock + # + # source://pry//lib/pry/input_lock.rb#29 def initialize; end + # Adds ourselves to the ownership list. The last one in the list may access + # the input through interruptible_region(). + # + # source://pry//lib/pry/input_lock.rb#38 def __with_ownership; end + + # source://pry//lib/pry/input_lock.rb#81 def enter_interruptible_region; end + + # source://pry//lib/pry/input_lock.rb#108 def interruptible_region; end + + # source://pry//lib/pry/input_lock.rb#95 def leave_interruptible_region; end + + # source://pry//lib/pry/input_lock.rb#75 def with_ownership(&block); end class << self + # source://pry//lib/pry/input_lock.rb#19 def for(input); end + + # Returns the value of attribute global_lock. + # + # source://pry//lib/pry/input_lock.rb#13 def global_lock; end + + # Sets the attribute global_lock + # + # @param value the value to set the attribute global_lock to. + # + # source://pry//lib/pry/input_lock.rb#13 def global_lock=(_arg0); end + + # Returns the value of attribute input_locks. + # + # source://pry//lib/pry/input_lock.rb#12 def input_locks; end + + # Sets the attribute input_locks + # + # @param value the value to set the attribute input_locks to. + # + # source://pry//lib/pry/input_lock.rb#12 def input_locks=(_arg0); end end end +# source://pry//lib/pry/input_lock.rb#9 class Pry::InputLock::Interrupt < ::Exception; end + +# source://pry//lib/pry/inspector.rb#4 class Pry::Inspector; end + +# source://pry//lib/pry/inspector.rb#5 Pry::Inspector::MAP = T.let(T.unsafe(nil), Hash) + +# source://pry//lib/pry/pry_class.rb#7 Pry::LOCAL_RC_FILE = T.let(T.unsafe(nil), String) +# source://pry//lib/pry/last_exception.rb#12 class Pry::LastException < ::BasicObject + # @return [LastException] a new instance of LastException + # + # source://pry//lib/pry/last_exception.rb#15 def initialize(exception); end + # Returns the value of attribute bt_index. + # + # source://pry//lib/pry/last_exception.rb#13 def bt_index; end + + # Sets the attribute bt_index + # + # @param value the value to set the attribute bt_index to. + # + # source://pry//lib/pry/last_exception.rb#13 def bt_index=(_arg0); end + + # source://pry//lib/pry/last_exception.rb#52 def bt_source_location_for(index); end + + # @return [String] returns the path to a file for the current backtrace. see {#bt_index}. + # + # source://pry//lib/pry/last_exception.rb#37 def file; end + + # source://pry//lib/pry/last_exception.rb#57 def inc_bt_index; end + + # @return [Fixnum] returns the line for the current backtrace. see {#bt_index}. + # + # source://pry//lib/pry/last_exception.rb#43 def line; end + + # source://pry//lib/pry/last_exception.rb#21 def method_missing(name, *args, &block); end + + # @return [Exception] returns the wrapped exception + # + # source://pry//lib/pry/last_exception.rb#48 def wrapped_exception; end private + # @return [Boolean] + # + # source://pry//lib/pry/last_exception.rb#29 def respond_to_missing?(name, include_all = T.unsafe(nil)); end end +# This class wraps the normal `Method` and `UnboundMethod` classes +# to provide extra functionality useful to Pry. +# +# source://pry//lib/pry/method.rb#20 class Pry::Method include ::Pry::Helpers::BaseHelpers include ::Pry::Helpers::DocumentationHelpers @@ -1920,580 +7194,2879 @@ class Pry::Method extend ::Forwardable extend ::Pry::Forwardable + # A new instance of `Pry::Method` wrapping the given `::Method`, + # `UnboundMethod`, or `Proc`. + # + # @param method [::Method, UnboundMethod, Proc] + # @param known_info [Hash] Can be used to pre-cache expensive to compute stuff. + # @return [Pry::Method] + # + # source://pry//lib/pry/method.rb#263 def initialize(method, known_info = T.unsafe(nil)); end + # @return [Boolean] + # + # source://pry//lib/pry/method.rb#483 def ==(other); end + + # @return [Boolean] Is the method definitely an alias? + # + # source://pry//lib/pry/method.rb#478 def alias?; end + + # @return [Array] All known aliases for the method. + # + # source://pry//lib/pry/method.rb#461 def aliases; end + + # @return [Boolean] Whether the method is bound. + # + # source://pry//lib/pry/method.rb#446 def bound_method?; end + + # source://pry//lib/pry/method.rb#515 def comment; end + + # @return [String, nil] The documentation for the method, or `nil` if it's + # unavailable. + # + # source://pry//lib/pry/method.rb#329 def doc; end + + # @return [Boolean] Was the method defined outside a source file? + # + # source://pry//lib/pry/method.rb#436 def dynamically_defined?; end + + # @param klass [Class] + # @return [Boolean] + # + # source://pry//lib/pry/method.rb#491 def is_a?(klass); end + + # @param klass [Class] + # @return [Boolean] + # + # source://pry//lib/pry/method.rb#491 def kind_of?(klass); end + + # Delegate any unknown calls to the wrapped method. + # + # source://pry//lib/pry/method.rb#503 def method_missing(method_name, *args, &block); end + + # Get the name of the method as a String, regardless of the underlying + # Method#name type. + # + # @return [String] + # + # source://pry//lib/pry/method.rb#272 def name; end + + # Get the name of the method including the class on which it was defined. + # + # @example + # method(:puts).method_name + # => "Kernel.puts" + # @return [String] + # + # source://pry//lib/pry/method.rb#299 def name_with_owner; end + + # @return [String, nil] The original name the method was defined under, + # before any aliasing, or `nil` if it can't be determined. + # + # source://pry//lib/pry/method.rb#429 def original_name; end - def owner(*args, &block); end - def parameters(*args, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def owner(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def parameters(*args, **_arg1, &block); end + + # @return [Boolean] Was the method defined within the Pry REPL? + # + # source://pry//lib/pry/method.rb#456 def pry_method?; end - def receiver(*args, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def receiver(*args, **_arg1, &block); end + + # Update the live copy of the method's source. + # + # source://pry//lib/pry/method.rb#314 def redefine(source); end + + # @param method_name [String, Symbol] + # @return [Boolean] + # + # source://pry//lib/pry/method.rb#498 def respond_to?(method_name, include_all = T.unsafe(nil)); end + + # @return [String] A representation of the method's signature, including its + # name and parameters. Optional and "rest" parameters are marked with `*` + # and block parameters with `&`. Keyword arguments are shown with `:` + # If the parameter names are unavailable, they're given numbered names instead. + # Paraphrased from `awesome_print` gem. + # + # source://pry//lib/pry/method.rb#391 def signature; end + + # @return [Boolean] Whether the method is a singleton method. + # + # source://pry//lib/pry/method.rb#451 def singleton_method?; end + + # @return [String, nil] The source code of the method, or `nil` if it's unavailable. + # + # source://pry//lib/pry/method.rb#304 def source; end + + # Can we get the source code for this method? + # + # @return [Boolean] + # + # source://pry//lib/pry/method.rb#321 def source?; end + + # @return [String, nil] The name of the file the method is defined in, or + # `nil` if the filename is unavailable. + # + # source://pry//lib/pry/method.rb#348 def source_file; end + + # @return [Fixnum, nil] The line of code in `source_file` which begins + # the method's definition, or `nil` if that information is unavailable. + # + # source://pry//lib/pry/method.rb#361 def source_line; end + + # @return [Range, nil] The range of lines in `source_file` which contain + # the method's definition, or `nil` if that information is unavailable. + # + # source://pry//lib/pry/method.rb#367 def source_range; end + + # @return [Symbol] The source type of the method. The options are + # `:ruby` for Ruby methods or `:c` for methods written in C. + # + # source://pry//lib/pry/method.rb#342 def source_type; end + + # @return [Pry::Method, nil] The wrapped method that is called when you + # use "super" in the body of this method. + # + # source://pry//lib/pry/method.rb#417 def super(times = T.unsafe(nil)); end + + # @return [Boolean] Whether the method is unbound. + # + # source://pry//lib/pry/method.rb#441 def unbound_method?; end + + # Is the method undefined? (aka `Disowned`) + # + # @return [Boolean] false + # + # source://pry//lib/pry/method.rb#290 def undefined?; end + + # @return [Symbol] The visibility of the method. May be `:public`, + # `:protected`, or `:private`. + # + # source://pry//lib/pry/method.rb#373 def visibility; end + + # Get underlying object wrapped by this Pry::Method instance + # + # @return [Method, UnboundMethod, Proc] + # + # source://pry//lib/pry/method.rb#284 def wrapped; end + + # Get the owner of the method as a Pry::Module + # + # @return [Pry::Module] + # + # source://pry//lib/pry/method.rb#278 def wrapped_owner; end private + # source://pry//lib/pry/method.rb#578 def c_source; end + + # @param first_ln [String] The first line of a method definition. + # @return [String, nil] + # + # source://pry//lib/pry/method.rb#564 def method_name_from_first_line(first_ln); end + + # @raise [CommandError] when the method can't be found or `pry-doc` isn't installed. + # @return [YARD::CodeObjects::MethodObject] + # + # source://pry//lib/pry/method.rb#523 def pry_doc_info; end + + # @return [Boolean] + # + # source://pry//lib/pry/method.rb#511 def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end + + # source://pry//lib/pry/method.rb#583 def ruby_source; end + + # @param ancestors [Class, Module] The ancestors to investigate + # @return [Method] The unwrapped super-method + # + # source://pry//lib/pry/method.rb#543 def super_using_ancestors(ancestors, times = T.unsafe(nil)); end class << self + # Get all of the instance methods of a `Class` or `Module` + # + # @param klass [Class, Module] + # @param include_super [Boolean] Whether to include methods from ancestors. + # @return [Array[Pry::Method]] + # + # source://pry//lib/pry/method.rb#161 def all_from_class(klass, include_super = T.unsafe(nil)); end + + # Get all of the methods on an `Object` + # + # @param obj [Object] + # @param include_super [Boolean] indicates whether or not to include methods from ancestors. + # @return [Array[Pry::Method]] + # + # source://pry//lib/pry/method.rb#184 def all_from_obj(obj, include_super = T.unsafe(nil)); end + + # Given a `Binding`, try to extract the `::Method` it originated from and + # use it to instantiate a `Pry::Method`. Return `nil` if this isn't + # possible. + # + # @param binding [Binding] + # @return [Pry::Method, nil] + # + # source://pry//lib/pry/method.rb#77 def from_binding(binding); end + + # Given a `Class` or `Module` and the name of a method, try to + # instantiate a `Pry::Method` containing the instance method of + # that name. Return `nil` if no such method exists. + # + # @param klass [Class, Module] + # @param name [String] + # @param target [Binding] The binding where the method is looked up. + # @return [Pry::Method, nil] + # + # source://pry//lib/pry/method.rb#136 def from_class(klass, name, target = T.unsafe(nil)); end + + # Given a `Class` or `Module` and the name of a method, try to + # instantiate a `Pry::Method` containing the instance method of + # that name. Return `nil` if no such method exists. + # + # @param klass [Class, Module] + # @param name [String] + # @param target [Binding] The binding where the method is looked up. + # @return [Pry::Method, nil] + # + # source://pry//lib/pry/method.rb#136 def from_module(klass, name, target = T.unsafe(nil)); end + + # Given an object and the name of a method, try to instantiate + # a `Pry::Method` containing the method of that name bound to + # that object. Return `nil` if no such method exists. + # + # @param obj [Object] + # @param name [String] + # @param target [Binding] The binding where the method is looked up. + # @return [Pry::Method, nil] + # + # source://pry//lib/pry/method.rb#151 def from_obj(obj, name, target = T.unsafe(nil)); end + + # Given a string representing a method name and optionally a binding to + # search in, find and return the requested method wrapped in a + # `Pry::Method` instance. + # + # @option options + # @option options + # @param name [String] The name of the method to retrieve. + # @param target [Binding] The context in which to search for the method. + # @param options [Hash] + # @return [Pry::Method, nil] A `Pry::Method` instance containing the + # requested method, or `nil` if name is `nil` or no method could be + # located matching the parameters. + # + # source://pry//lib/pry/method.rb#43 def from_str(name, target = T.unsafe(nil), options = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://pry//lib/pry/method.rb#227 def instance_method_definition?(name, definition_line); end + + # Get every `Class` and `Module`, in order, that will be checked when looking + # for methods on instances of the given `Class` or `Module`. + # This does not treat singleton classes of classes specially. + # + # @param klass [Class, Module] + # @return [Array[Class, Module]] + # + # source://pry//lib/pry/method.rb#210 def instance_resolution_order(klass); end + + # In order to support 2.0 Refinements we need to look up methods + # inside the relevant Binding. + # + # @param obj [Object] The owner/receiver of the method. + # @param method_name [Symbol] The name of the method. + # @param method_type [Symbol] The type of method: :method or :instance_method + # @param target [Binding] The binding where the method is looked up. + # @return [Method, UnboundMethod] The 'refined' method object. + # + # source://pry//lib/pry/method.rb#114 def lookup_method_via_binding(obj, method_name, method_type, target = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://pry//lib/pry/method.rb#215 def method_definition?(name, definition_line); end + + # Get every `Class` and `Module`, in order, that will be checked when looking + # for an instance method to call on this object. + # + # @param obj [Object] + # @return [Array[Class, Module]] + # + # source://pry//lib/pry/method.rb#192 def resolution_order(obj); end + + # source://pry//lib/pry/method.rb#247 def singleton_class_of(obj); end + + # Get the singleton classes of superclasses that could define methods on + # the given class object, and any modules they include. + # If a module is included at multiple points in the ancestry, only + # the lowest copy will be returned. + # + # source://pry//lib/pry/method.rb#238 def singleton_class_resolution_order(klass); end + + # @return [Boolean] + # + # source://pry//lib/pry/method.rb#220 def singleton_method_definition?(name, definition_line); end end end +# A Disowned Method is one that's been removed from the class on which it was defined. +# +# e.g. +# class C +# def foo +# C.send(:undefine_method, :foo) +# Pry::Method.from_binding(binding) +# end +# end +# +# In this case we assume that the "owner" is the singleton class of the receiver. +# +# This occurs mainly in Sinatra applications. +# +# source://pry//lib/pry/method/disowned.rb#18 class Pry::Method::Disowned < ::Pry::Method + # Create a new Disowned method. + # + # @param receiver [Object] + # @param method_name [String] + # @return [Disowned] a new instance of Disowned + # + # source://pry//lib/pry/method/disowned.rb#25 def initialize(receiver, method_name); end + # Raise a more useful error message instead of trying to forward to nil. + # + # source://pry//lib/pry/method/disowned.rb#52 def method_missing(method_name, *args, &block); end + + # Returns the value of attribute name. + # + # source://pry//lib/pry/method/disowned.rb#19 def name; end + + # Get the hypothesized owner of the method. + # + # @return [Object] + # + # source://pry//lib/pry/method/disowned.rb#46 def owner; end + + # Returns the value of attribute receiver. + # + # source://pry//lib/pry/method/disowned.rb#19 def receiver; end + + # Can we get the source for this method? + # + # @return [Boolean] false + # + # source://pry//lib/pry/method/disowned.rb#39 def source?; end + + # Is the method undefined? (aka `Disowned`) + # + # @return [Boolean] true + # + # source://pry//lib/pry/method/disowned.rb#33 def undefined?; end private + # @return [Boolean] + # + # source://pry//lib/pry/method/disowned.rb#62 def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end end +# source://pry//lib/pry/method/patcher.rb#5 class Pry::Method::Patcher + # @return [Patcher] a new instance of Patcher + # + # source://pry//lib/pry/method/patcher.rb#12 def initialize(method); end + # Returns the value of attribute method. + # + # source://pry//lib/pry/method/patcher.rb#6 def method; end + + # Sets the attribute method + # + # @param value the value to set the attribute method to. + # + # source://pry//lib/pry/method/patcher.rb#6 def method=(_arg0); end + + # perform the patch + # + # source://pry//lib/pry/method/patcher.rb#21 def patch_in_ram(source); end private + # source://pry//lib/pry/method/patcher.rb#38 def cache_key; end + + # Update the definition line so that it can be eval'd directly on the Method's + # owner instead of from the original context. + # + # In particular this takes `def self.foo` and turns it into `def foo` so that we + # don't end up creating the method on the singleton class of the singleton class + # by accident. + # + # This is necessarily done by String manipulation because we can't find out what + # syntax is needed for the argument list by ruby-level introspection. + # + # @param line [String] The original definition line. e.g. def self.foo(bar, baz=1) + # @return [String] The new definition line. e.g. def foo(bar, baz=1) + # + # source://pry//lib/pry/method/patcher.rb#78 def definition_for_owner(line); end + + # source://pry//lib/pry/method/patcher.rb#33 def redefine(source); end + + # Run some code ensuring that at the end target#meth_name will not have changed. + # + # When we're redefining aliased methods we will overwrite the method at the + # unaliased name (so that super continues to work). By wrapping that code in a + # transation we make that not happen, which means that alias_method_chains, etc. + # continue to work. + # + # source://pry//lib/pry/method/patcher.rb#49 def with_method_transaction; end + + # Apply wrap_for_owner and wrap_for_nesting successively to `source` + # + # @param source [String] + # @return [String] The wrapped source. + # + # source://pry//lib/pry/method/patcher.rb#91 def wrap(source); end + + # Update the new source code to have the correct Module.nesting. + # + # This method uses syntactic analysis of the original source file to determine + # the new nesting, so that we can tell the difference between: + # + # class A; def self.b; end; end + # class << A; def b; end; end + # + # The resulting code should be evaluated in the TOPLEVEL_BINDING. + # + # @param source [String] The source to wrap. + # @return [String] + # + # source://pry//lib/pry/method/patcher.rb#122 def wrap_for_nesting(source); end + + # Update the source code so that when it has the right owner when eval'd. + # + # This (combined with definition_for_owner) is backup for the case that + # wrap_for_nesting fails, to ensure that the method will stil be defined in + # the correct place. + # + # @param source [String] The source to wrap + # @return [String] + # + # source://pry//lib/pry/method/patcher.rb#103 def wrap_for_owner(source); end class << self + # source://pry//lib/pry/method/patcher.rb#16 def code_for(filename); end end end +# This class is responsible for locating the *real* `Pry::Method` +# object captured by a binding. +# +# Given a `Binding` from inside a method and a 'seed' Pry::Method object, +# there are primarily two situations where the seed method doesn't match +# the Binding: +# 1. The Pry::Method is from a subclass +# 2. The Pry::Method represents a method of the same name while the original +# was renamed to something else. For 1. we search vertically up the +# inheritance chain, and for 2. we search laterally along the object's +# method table. +# +# When we locate the method that matches the Binding we wrap it in +# Pry::Method and return it, or return nil if we fail. +# +# source://pry//lib/pry/method/weird_method_locator.rb#19 class Pry::Method::WeirdMethodLocator + # @param method [Pry::Method] The seed method. + # @param target [Binding] The Binding that captures the method + # we want to locate. + # @return [WeirdMethodLocator] a new instance of WeirdMethodLocator + # + # source://pry//lib/pry/method/weird_method_locator.rb#55 def initialize(method, target); end + # @return [Pry::Method, nil] The Pry::Method that matches the + # given binding. + # + # source://pry//lib/pry/method/weird_method_locator.rb#62 def find_method; end + + # @return [Boolean] Whether the Pry::Method is unrecoverable + # This usually happens when the method captured by the Binding + # has been subsequently deleted. + # + # source://pry//lib/pry/method/weird_method_locator.rb#69 def lost_method?; end + + # Returns the value of attribute method. + # + # source://pry//lib/pry/method/weird_method_locator.rb#49 def method; end + + # Sets the attribute method + # + # @param value the value to set the attribute method to. + # + # source://pry//lib/pry/method/weird_method_locator.rb#49 def method=(_arg0); end + + # Returns the value of attribute target. + # + # source://pry//lib/pry/method/weird_method_locator.rb#50 def target; end + + # Sets the attribute target + # + # @param value the value to set the attribute target to. + # + # source://pry//lib/pry/method/weird_method_locator.rb#50 def target=(_arg0); end private + # source://pry//lib/pry/method/weird_method_locator.rb#215 def all_methods_for(obj); end + + # source://pry//lib/pry/method/weird_method_locator.rb#167 def expanded_source_location(source_location); end + + # it's possible in some cases that the method we find by this approach is + # a sub-method of the one we're currently in, consider: + # + # class A; def b; binding.pry; end; end + # class B < A; def b; super; end; end + # + # Given that we can normally find the source_range of methods, and that we + # know which __FILE__ and __LINE__ the binding is at, we can hope to + # disambiguate these cases. + # + # This obviously won't work if the source is unavaiable for some reason, + # or if both methods have the same __FILE__ and __LINE__. + # + # @return [Pry::Method, nil] The Pry::Method representing the + # superclass method. + # + # source://pry//lib/pry/method/weird_method_locator.rb#131 def find_method_in_superclass; end + + # This is the case where the name of a method has changed + # (via alias_method) so we locate the Method object for the + # renamed method. + # + # @return [Pry::Method, nil] The Pry::Method representing the + # renamed method + # + # source://pry//lib/pry/method/weird_method_locator.rb#156 def find_renamed_method; end + + # source://pry//lib/pry/method/weird_method_locator.rb#197 def index_to_line_number(index); end + + # source://pry//lib/pry/method/weird_method_locator.rb#206 def lines_for_file(file); end + + # @return [Boolean] + # + # source://pry//lib/pry/method/weird_method_locator.rb#80 def normal_method?(method); end + + # @return [Boolean] + # + # source://pry//lib/pry/method/weird_method_locator.rb#106 def pry_file?; end + + # Use static analysis to locate the start of the method definition. + # We have the `__FILE__` and `__LINE__` from the binding and the + # original name of the method so we search up until we find a + # def/define_method, etc defining a method of the appropriate name. + # + # @return [Array] The `source_location` of the + # renamed method + # + # source://pry//lib/pry/method/weird_method_locator.rb#184 def renamed_method_source_location; end + + # @return [Boolean] + # + # source://pry//lib/pry/method/weird_method_locator.rb#75 def skip_superclass_search?; end + + # source://pry//lib/pry/method/weird_method_locator.rb#88 def target_file; end + + # source://pry//lib/pry/method/weird_method_locator.rb#98 def target_line; end + + # source://pry//lib/pry/method/weird_method_locator.rb#84 def target_self; end + + # @return [Boolean] + # + # source://pry//lib/pry/method/weird_method_locator.rb#202 def valid_file?(file); end class << self + # Whether the given method object matches the associated binding. + # If the method object does not match the binding, then it's + # most likely not the method captured by the binding, and we + # must commence a search. + # + # @param method [Pry::Method] + # @param binding [Binding] + # @return [Boolean] + # + # source://pry//lib/pry/method/weird_method_locator.rb#29 def normal_method?(method, binding); end + + # @return [Boolean] + # + # source://pry//lib/pry/method/weird_method_locator.rb#44 def weird_method?(method, binding); end end end +# source://pry//lib/pry/exceptions.rb#69 class Pry::MethodNotFound < ::Pry::CommandError; end +# source://pry//lib/pry/command_set.rb#4 class Pry::NoCommandError < ::StandardError + # @return [NoCommandError] a new instance of NoCommandError + # + # source://pry//lib/pry/command_set.rb#5 def initialize(match, owner); end end +# `ObjectPath` implements the resolution of "object paths", which are strings +# that are similar to filesystem paths but meant for traversing Ruby objects. +# Examples of valid object paths include: +# +# x +# @foo/@bar +# "string"/upcase +# Pry/Method +# +# Object paths are mostly relevant in the context of the `cd` command. +# +# @see https://github.com/pry/pry/wiki/State-navigation +# +# source://pry//lib/pry/object_path.rb#17 class Pry::ObjectPath + # @param path_string [String] The object path expressed as a string. + # @param current_stack [Array] The current state of the binding + # stack. + # @return [ObjectPath] a new instance of ObjectPath + # + # source://pry//lib/pry/object_path.rb#23 def initialize(path_string, current_stack); end + # @return [Array] a new stack resulting from applying the given + # path to the current stack. + # + # source://pry//lib/pry/object_path.rb#30 def resolve; end private + # @return [Boolean] + # + # source://pry//lib/pry/object_path.rb#74 def complete?(segment); end + + # source://pry//lib/pry/object_path.rb#78 def handle_failure(context, err); end end +# source://pry//lib/pry/object_path.rb#18 Pry::ObjectPath::SPECIAL_TERMS = T.let(T.unsafe(nil), Array) + +# indicates obsolete API +# +# source://pry//lib/pry/exceptions.rb#72 class Pry::ObsoleteError < ::StandardError; end +# source://pry//lib/pry/output.rb#4 class Pry::Output + # @return [Output] a new instance of Output + # + # source://pry//lib/pry/output.rb#10 def initialize(pry_instance); end + # source://pry//lib/pry/output.rb#28 def <<(*objs); end + + # source://pry//lib/pry/output.rb#53 def decolorize_maybe(str); end + + # Return a screen height or the default if that fails. + # + # source://pry//lib/pry/output.rb#74 def height; end + + # source://pry//lib/pry/output.rb#41 def method_missing(method_name, *args, &block); end + + # source://pry//lib/pry/output.rb#28 def print(*objs); end + + # Returns the value of attribute pry_instance. + # + # source://pry//lib/pry/output.rb#8 def pry_instance; end + + # source://pry//lib/pry/output.rb#15 def puts(*objs); end + + # @return [Array] a pair of [rows, columns] which gives the size of + # the window. If the window size cannot be determined, the default value. + # + # source://pry//lib/pry/output.rb#61 def size; end + + # @return [Boolean] + # + # source://pry//lib/pry/output.rb#37 def tty?; end + + # Return a screen width or the default if that fails. + # + # source://pry//lib/pry/output.rb#69 def width; end + + # source://pry//lib/pry/output.rb#28 def write(*objs); end private + # source://pry//lib/pry/output.rb#80 def actual_screen_size; end + + # source://pry//lib/pry/output.rb#125 def ansicon_env_size; end + + # source://pry//lib/pry/output.rb#109 def env_size; end + + # source://pry//lib/pry/output.rb#92 def io_console_size; end + + # @return [Boolean] + # + # source://pry//lib/pry/output.rb#132 def nonzero_column?(size); end + + # source://pry//lib/pry/output.rb#114 def readline_size; end + + # @return [Boolean] + # + # source://pry//lib/pry/output.rb#49 def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end end +# @return [Array] default terminal screen size [rows, cols] +# +# source://pry//lib/pry/output.rb#6 Pry::Output::DEFAULT_SIZE = T.let(T.unsafe(nil), Array) +# source://pry//lib/pry/pager.rb#7 class Pry::Pager + # @return [Pager] a new instance of Pager + # + # source://pry//lib/pry/pager.rb#13 def initialize(pry_instance); end + # Yields a pager object (`NullPager`, `SimplePager`, or `SystemPager`). + # All pagers accept output with `#puts`, `#print`, `#write`, and `#<<`. + # + # source://pry//lib/pry/pager.rb#33 def open; end + + # Send the given text through the best available pager (if + # `Pry.config.pager` is enabled). If you want to send text through in + # chunks as you generate it, use `open` to get a writable object + # instead. + # + # @param text [String] Text to run through a pager. + # + # source://pry//lib/pry/pager.rb#25 def page(text); end + + # Returns the value of attribute pry_instance. + # + # source://pry//lib/pry/pager.rb#11 def pry_instance; end private + # Return an instance of the "best" available pager class -- + # `SystemPager` if possible, `SimplePager` if `SystemPager` isn't + # available, and `NullPager` if the user has disabled paging. All + # pagers accept output with `#puts`, `#print`, `#write`, and `#<<`. You + # must call `#close` when you're done writing output to a pager, and + # you must rescue `Pry::Pager::StopPaging`. These requirements can be + # avoided by using `.open` instead. + # + # source://pry//lib/pry/pager.rb#56 def best_available; end + + # @return [Boolean] + # + # source://pry//lib/pry/pager.rb#43 def enabled?; end + + # Returns the value of attribute output. + # + # source://pry//lib/pry/pager.rb#47 def output; end end +# `NullPager` is a "pager" that actually just prints all output as it +# comes in. Used when `Pry.config.pager` is false. +# +# source://pry//lib/pry/pager.rb#68 class Pry::Pager::NullPager + # @return [NullPager] a new instance of NullPager + # + # source://pry//lib/pry/pager.rb#69 def initialize(out); end + # source://pry//lib/pry/pager.rb#77 def <<(str); end + + # source://pry//lib/pry/pager.rb#86 def close; end + + # source://pry//lib/pry/pager.rb#77 def print(str); end + + # source://pry//lib/pry/pager.rb#73 def puts(str); end + + # source://pry//lib/pry/pager.rb#82 def write(str); end private + # source://pry//lib/pry/pager.rb#90 def height; end + + # source://pry//lib/pry/pager.rb#94 def width; end end +# `PageTracker` tracks output to determine whether it's likely to take +# up a whole page. This doesn't need to be super precise, but we can +# use it for `SimplePager` and to avoid invoking the system pager +# unnecessarily. +# +# One simplifying assumption is that we don't need `#page?` to return +# `true` on the basis of an incomplete line. Long lines should be +# counted as multiple lines, but we don't have to transition from +# `false` to `true` until we see a newline. +# +# source://pry//lib/pry/pager.rb#213 class Pry::Pager::PageTracker + # @return [PageTracker] a new instance of PageTracker + # + # source://pry//lib/pry/pager.rb#214 def initialize(rows, cols); end + # @return [Boolean] + # + # source://pry//lib/pry/pager.rb#231 def page?; end + + # source://pry//lib/pry/pager.rb#220 def record(str); end + + # source://pry//lib/pry/pager.rb#235 def reset; end private + # Approximation of the printable length of a given line, without the + # newline and without ANSI color codes. + # + # source://pry//lib/pry/pager.rb#244 def line_length(line); end end +# `SimplePager` is a straightforward pure-Ruby pager. We use it on +# JRuby and when we can't find a usable external pager. +# +# source://pry//lib/pry/pager.rb#101 class Pry::Pager::SimplePager < ::Pry::Pager::NullPager + # @return [SimplePager] a new instance of SimplePager + # + # source://pry//lib/pry/pager.rb#102 def initialize(*_arg0); end + # source://pry//lib/pry/pager.rb#107 def write(str); end end +# source://pry//lib/pry/pager.rb#8 class Pry::Pager::StopPaging < ::StandardError; end +# `SystemPager` buffers output until we're pretty sure it's at least a +# page long, then invokes an external pager and starts streaming output +# to it. If `#close` is called before then, it just prints out the +# buffered content. +# +# source://pry//lib/pry/pager.rb#129 class Pry::Pager::SystemPager < ::Pry::Pager::NullPager + # @return [SystemPager] a new instance of SystemPager + # + # source://pry//lib/pry/pager.rb#161 def initialize(*_arg0); end + # source://pry//lib/pry/pager.rb#181 def close; end + + # source://pry//lib/pry/pager.rb#168 def write(str); end private + # @return [Boolean] + # + # source://pry//lib/pry/pager.rb#195 def invoked_pager?; end + + # source://pry//lib/pry/pager.rb#199 def pager; end + + # source://pry//lib/pry/pager.rb#191 def write_to_pager(text); end class << self + # @return [Boolean] + # + # source://pry//lib/pry/pager.rb#142 def available?; end + + # source://pry//lib/pry/pager.rb#130 def default_pager; end end end +# Prompt represents the Pry prompt, which can be used with Readline-like +# libraries. It defines a few default prompts (default prompt, simple prompt, +# etc) and also provides an API for adding and implementing custom prompts. +# +# @api public +# @example Registering a new Pry prompt +# Pry::Prompt.add( +# :ipython, +# 'IPython-like prompt', [':', '...:'] +# ) do |_context, _nesting, pry_instance, sep| +# sep == ':' ? "In [#{pry_instance.input_ring.count}]: " : ' ...: ' +# end +# +# # Produces: +# # In [3]: def foo +# # ...: puts 'foo' +# # ...: end +# # => :foo +# # In [4]: +# @example Manually instantiating the Prompt class +# prompt_procs = [ +# proc { '#{rand(1)}>" }, +# proc { "#{('a'..'z').to_a.sample}*" } +# ] +# prompt = Pry::Prompt.new( +# :random, +# 'Random number or letter prompt.', +# prompt_procs +# ) +# prompt.wait_proc.call(...) #=> +# prompt.incomplete_proc.call(...) +# @since v0.11.0 +# +# source://pry//lib/pry/prompt.rb#38 class Pry::Prompt + # @api public + # @param name [String] + # @param description [String] + # @param prompt_procs [Array] + # @return [Prompt] a new instance of Prompt + # @since v0.11.0 + # + # source://pry//lib/pry/prompt.rb#117 def initialize(name, description, prompt_procs); end + # @api public + # @deprecated Use a `Pry::Prompt` instance directly + # @since v0.11.0 + # + # source://pry//lib/pry/prompt.rb#135 def [](key); end + + # @api public + # @return [String] + # @since v0.11.0 + # + # source://pry//lib/pry/prompt.rb#108 def description; end + + # @api public + # @return [Proc] the proc which builds the prompt when in the middle of an + # expression such as open method, etc. (`*`) + # @since v0.11.0 + # + # source://pry//lib/pry/prompt.rb#130 def incomplete_proc; end + + # @api public + # @return [String] + # @since v0.11.0 + # + # source://pry//lib/pry/prompt.rb#105 def name; end + + # @api public + # @return [Array] the array of procs that hold + # `[wait_proc, incomplete_proc]` + # @since v0.11.0 + # + # source://pry//lib/pry/prompt.rb#112 def prompt_procs; end + + # @api public + # @return [Proc] the proc which builds the wait prompt (`>`) + # @since v0.11.0 + # + # source://pry//lib/pry/prompt.rb#124 def wait_proc; end class << self + # Retrieves a prompt. + # + # @api public + # @example + # Prompt[:my_prompt] + # @param name [Symbol] The name of the prompt you want to access + # @return [Hash{Symbol=>Object}] + # @since v0.12.0 + # + # source://pry//lib/pry/prompt.rb#52 def [](name); end + + # Adds a new prompt to the prompt hash. + # + # @api public + # @param name [Symbol] + # @param description [String] + # @param separators [Array] The separators to differentiate + # between prompt modes (default mode and class/method definition mode). + # The Array *must* have a size of 2. + # @raise [ArgumentError] if the size of `separators` is not 2 + # @raise [ArgumentError] if `prompt_name` is already occupied + # @return [nil] + # @since v0.12.0 + # @yield [context, nesting, pry_instance, sep] + # @yieldparam context [Object] the context where Pry is currently in + # @yieldparam nesting [Integer] whether the context is nested + # @yieldparam pry_instance [Pry] the Pry instance + # @yieldparam separator [String] separator string + # + # source://pry//lib/pry/prompt.rb#79 def add(name, description = T.unsafe(nil), separators = T.unsafe(nil)); end + + # @api public + # @note Use this for read-only operations + # @return [Hash{Symbol=>Hash}] the duplicate of the internal prompts hash + # @since v0.12.0 + # + # source://pry//lib/pry/prompt.rb#59 def all; end end end +# source://pry//lib/pry/repl.rb#4 class Pry::REPL extend ::Forwardable extend ::Pry::Forwardable + # Create an instance of {REPL} wrapping the given {Pry}. + # + # @option options + # @param pry [Pry] The instance of {Pry} that this {REPL} will control. + # @param options [Hash] Options for this {REPL} instance. + # @return [REPL] a new instance of REPL + # + # source://pry//lib/pry/repl.rb#22 def initialize(pry, options = T.unsafe(nil)); end - def input(*args, &block); end - def output(*args, &block); end + # source://forwardable/1.3.2/forwardable.rb#229 + def input(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def output(*args, **_arg1, &block); end + + # @return [Pry] The instance of {Pry} that the user is controlling. + # + # source://pry//lib/pry/repl.rb#9 def pry; end + + # @return [Pry] The instance of {Pry} that the user is controlling. + # + # source://pry//lib/pry/repl.rb#9 def pry=(_arg0); end + + # Start the read-eval-print loop. + # + # @raise [Exception] If the session throws `:raise_up`, raise the exception + # thrown with it. + # @return [Object?] If the session throws `:breakout`, return the value + # thrown with it. + # + # source://pry//lib/pry/repl.rb#36 def start; end private + # Calculates correct overhang for current line. Supports vi Readline + # mode and its indicators such as "(ins)" or "(cmd)". + # + # @note This doesn't calculate overhang for Readline's emacs mode with an + # indicator because emacs is the default mode and it doesn't use + # indicators in 99% of cases. + # @return [Integer] + # + # source://pry//lib/pry/repl.rb#237 def calculate_overhang(current_prompt, original_val, indented_val); end + + # @return [Boolean] + # + # source://pry//lib/pry/repl.rb#205 def coolline_available?; end + + # Clean up after the repl session. + # + # @return [void] + # + # source://pry//lib/pry/repl.rb#84 def epilogue; end + + # Manage switching of input objects on encountering `EOFError`s. + # + # @return [Object] Whatever the given block returns. + # @return [:no_more_input] Indicates that no more input can be read. + # + # source://pry//lib/pry/repl.rb#127 def handle_read_errors; end + + # source://pry//lib/pry/repl.rb#195 def input_readline(*args); end + + # If `$stdout` is not a tty, it's probably a pipe. + # + # @example + # # `piping?` returns `false` + # % pry + # [1] pry(main) + # + # # `piping?` returns `true` + # % pry | tee log + # @return [Boolean] + # + # source://pry//lib/pry/repl.rb#217 def piping?; end + + # Set up the repl session. + # + # @return [void] + # + # source://pry//lib/pry/repl.rb#47 def prologue; end + + # Read a line of input from the user. + # + # @return [String] The line entered by the user. + # @return [nil] On ``. + # @return [:control_c] On ``. + # @return [:no_more_input] On EOF. + # + # source://pry//lib/pry/repl.rb#93 def read; end + + # Returns the next line of input to be sent to the {Pry} instance. + # + # @param current_prompt [String] The prompt to use for input. + # @return [String?] The next line of input, or `nil` on . + # + # source://pry//lib/pry/repl.rb#169 def read_line(current_prompt); end + + # @return [Boolean] + # + # source://pry//lib/pry/repl.rb#201 def readline_available?; end + + # The actual read-eval-print loop. + # + # The {REPL} instance is responsible for reading and looping, whereas the + # {Pry} instance is responsible for evaluating user input and printing + # return values and command output. + # + # @raise [Exception] If the session throws `:raise_up`, raise the exception + # thrown with it. + # @return [Object?] If the session throws `:breakout`, return the value + # thrown with it. + # + # source://pry//lib/pry/repl.rb#66 def repl; end + + # @return [void] + # + # source://pry//lib/pry/repl.rb#224 def set_readline_output; end class << self + # Instantiate a new {Pry} instance with the given options, then start a + # {REPL} instance wrapping it. + # + # @option options + # @param options [Hash] a customizable set of options + # + # source://pry//lib/pry/repl.rb#14 def start(options); end end end +# A class to manage the loading of files through the REPL loop. +# This is an interesting trick as it processes your file as if it +# was user input in an interactive session. As a result, all Pry +# commands are available, and they are executed non-interactively. Furthermore +# the session becomes interactive when the repl loop processes a +# 'make-interactive' command in the file. The session also becomes +# interactive when an exception is encountered, enabling you to fix +# the error before returning to non-interactive processing with the +# 'make-non-interactive' command. +# +# source://pry//lib/pry/repl_file_loader.rb#14 class Pry::REPLFileLoader + # @return [REPLFileLoader] a new instance of REPLFileLoader + # + # source://pry//lib/pry/repl_file_loader.rb#15 def initialize(file_name); end + # Define a few extra commands useful for flipping back & forth + # between interactive/non-interactive modes + # + # source://pry//lib/pry/repl_file_loader.rb#59 def define_additional_commands; end + + # Switch to interactive mode, i.e take input from the user + # and use the regular print and exception handlers. + # + # @param pry_instance [Pry] the Pry instance to make interactive. + # + # source://pry//lib/pry/repl_file_loader.rb#26 def interactive_mode(pry_instance); end + + # Actually load the file through the REPL by setting file content + # as the REPL input stream. + # + # source://pry//lib/pry/repl_file_loader.rb#75 def load; end + + # Switch to non-interactive mode. Essentially + # this means there is no result output + # and that the session becomes interactive when an exception is encountered. + # + # @param pry_instance [Pry] the Pry instance to make non-interactive. + # + # source://pry//lib/pry/repl_file_loader.rb#37 def non_interactive_mode(pry_instance, content); end end +# As a REPL, we often want to catch any unexpected exceptions that may have +# been raised; however we don't want to go overboard and prevent the user +# from exiting Pry when they want to. +# +# source://pry//lib/pry/exceptions.rb#7 module Pry::RescuableException class << self + # source://pry//lib/pry/exceptions.rb#8 def ===(exception); end end end +# Wraps the return result of process_commands, indicates if the +# result IS a command and what kind of command (e.g void) +# +# source://pry//lib/pry/command_set.rb#397 class Pry::Result + # @return [Result] a new instance of Result + # + # source://pry//lib/pry/command_set.rb#400 def initialize(is_command, retval = T.unsafe(nil)); end + # Is the result a command? + # + # @return [Boolean] + # + # source://pry//lib/pry/command_set.rb#407 def command?; end + + # Returns the value of attribute retval. + # + # source://pry//lib/pry/command_set.rb#398 def retval; end + + # Is the result a command and if it is, is it a void command? + # (one that does not return a value) + # + # @return [Boolean] + # + # source://pry//lib/pry/command_set.rb#414 def void_command?; end end +# A ring is a thread-safe fixed-capacity array to which you can only add +# elements. Older entries are overwritten as you add new elements, so that the +# ring can never contain more than `max_size` elemens. +# +# @api public +# @example +# ring = Pry::Ring.new(3) +# ring << 1 << 2 << 3 +# ring.to_a #=> [1, 2, 3] +# ring << 4 +# ring.to_a #=> [2, 3, 4] +# +# ring[0] #=> 2 +# ring[-1] #=> 4 +# ring.clear +# ring[0] #=> nil +# @since v0.12.0 +# +# source://pry//lib/pry/ring.rb#22 class Pry::Ring + # @api public + # @param max_size [Integer] Maximum buffer size. The buffer will start + # overwriting elements once its reaches its maximum capacity + # @return [Ring] a new instance of Ring + # @since v0.12.0 + # + # source://pry//lib/pry/ring.rb#33 def initialize(max_size); end + # Push `value` to the current index. + # + # @api public + # @param value [Object] + # @return [self] + # @since v0.12.0 + # + # source://pry//lib/pry/ring.rb#43 def <<(value); end + + # Read the value stored at `index`. + # + # @api public + # @param index [Integer, Range] The element (if Integer) or elements + # (if Range) associated with `index` + # @return [Object, Array, nil] element(s) at `index`, `nil` if none + # exist + # @since v0.12.0 + # + # source://pry//lib/pry/ring.rb#57 def [](index); end + + # Clear the buffer and reset count. + # + # @api public + # @return [void] + # @since v0.12.0 + # + # source://pry//lib/pry/ring.rb#75 def clear; end + + # @api public + # @return [Integer] how many objects were added during the lifetime of the + # ring + # @since v0.12.0 + # + # source://pry//lib/pry/ring.rb#28 def count; end + + # @api public + # @return [Integer] maximum buffer size + # @since v0.12.0 + # + # source://pry//lib/pry/ring.rb#24 def max_size; end + + # @api public + # @return [Integer] how many objects were added during the lifetime of the + # ring + # @since v0.12.0 + # + # source://pry//lib/pry/ring.rb#28 def size; end + + # @api public + # @return [Array] the buffer as unwinded array + # @since v0.12.0 + # + # source://pry//lib/pry/ring.rb#67 def to_a; end private + # @api public + # @since v0.12.0 + # + # source://pry//lib/pry/ring.rb#84 def transpose_buffer_tail; end end +# source://pry//lib/pry/slop.rb#5 class Pry::Slop include ::Enumerable + # Create a new instance of Slop and optionally build options via a block. + # + # config - A Hash of configuration options. + # block - An optional block used to specify options. + # + # @return [Slop] a new instance of Slop + # + # source://pry//lib/pry/slop.rb#127 def initialize(config = T.unsafe(nil), &block); end + # Fetch an options argument value. + # + # key - The Symbol or String option short or long flag. + # + # Returns the Object value for this option, or nil. + # + # source://pry//lib/pry/slop.rb#278 def [](key); end + + # Add a callback. + # + # label - The Symbol identifier to attach this callback. + # + # Returns nothing. + # + # source://pry//lib/pry/slop.rb#398 def add_callback(label, &block); end + + # Get or set the banner. + # + # banner - The String to set the banner. + # + # Returns the banner String. + # + # source://pry//lib/pry/slop.rb#168 def banner(banner = T.unsafe(nil)); end + + # Set the banner. + # + # banner - The String to set the banner. + # + # source://pry//lib/pry/slop.rb#159 def banner=(banner); end + + # Add a new command. + # + # command - The Symbol or String used to identify this command. + # options - A Hash of configuration options (see Slop::new) + # + # Returns a new instance of Slop mapped to this command. + # + # source://pry//lib/pry/slop.rb#196 def command(command, options = T.unsafe(nil), &block); end + + # The Hash of configuration options for this Slop instance. + # + # source://pry//lib/pry/slop.rb#118 def config; end + + # Get or set the description (used for commands). + # + # desc - The String to set the description. + # + # Returns the description String. + # + # source://pry//lib/pry/slop.rb#185 def description(desc = T.unsafe(nil)); end + + # Set the description (used for commands). + # + # desc - The String to set the description. + # + # source://pry//lib/pry/slop.rb#176 def description=(desc); end + + # Enumerable interface. Yields each Slop::Option. + # + # source://pry//lib/pry/slop.rb#297 def each(&block); end + + # Fetch a Slop object associated with this command. + # + # command - The String or Symbol name of the command. + # + # Examples: + # + # opts.command :foo do + # on :v, :verbose, 'Enable verbose mode' + # end + # + # # ruby run.rb foo -v + # opts.fetch_command(:foo).verbose? #=> true + # + # source://pry//lib/pry/slop.rb#389 def fetch_command(command); end + + # Fetch a Slop::Option object. + # + # key - The Symbol or String option key. + # + # Examples: + # + # opts.on(:foo, 'Something fooey', :argument => :optional) + # opt = opts.fetch_option(:foo) + # opt.class #=> Slop::Option + # opt.accepts_optional_argument? #=> true + # + # Returns an Option or nil if none were found. + # + # source://pry//lib/pry/slop.rb#373 def fetch_option(key); end + + # Fetch an options argument value. + # + # key - The Symbol or String option short or long flag. + # + # Returns the Object value for this option, or nil. + # + # source://pry//lib/pry/slop.rb#278 def get(key); end + + # Print a handy Slop help string. + # + # Returns the banner followed by available option help strings. + # + # source://pry//lib/pry/slop.rb#416 def help; end + + # Fetch a list of options which were missing from the parsed list. + # + # Examples: + # + # opts = Slop.new do + # on :n, :name= + # on :p, :password= + # end + # + # opts.parse %w[ --name Lee ] + # opts.missing #=> ['password'] + # + # Returns an Array of Strings representing missing options. + # + # source://pry//lib/pry/slop.rb#357 def missing; end + + # Add an Option. + # + # objects - An Array with an optional Hash as the last element. + # + # Examples: + # + # on '-u', '--username=', 'Your username' + # on :v, :verbose, 'Enable verbose mode' + # + # Returns the created instance of Slop::Option. + # + # source://pry//lib/pry/slop.rb#265 def on(*objects, &block); end + + # Add an Option. + # + # objects - An Array with an optional Hash as the last element. + # + # Examples: + # + # on '-u', '--username=', 'Your username' + # on :v, :verbose, 'Enable verbose mode' + # + # Returns the created instance of Slop::Option. + # + # source://pry//lib/pry/slop.rb#265 def opt(*objects, &block); end + + # Add an Option. + # + # objects - An Array with an optional Hash as the last element. + # + # Examples: + # + # on '-u', '--username=', 'Your username' + # on :v, :verbose, 'Enable verbose mode' + # + # Returns the created instance of Slop::Option. + # + # source://pry//lib/pry/slop.rb#265 def option(*objects, &block); end + + # The Array of Slop::Option objects tied to this Slop instance. + # + # source://pry//lib/pry/slop.rb#121 def options; end + + # Parse a list of items, executing and gathering options along the way. + # + # items - The Array of items to extract options from (default: ARGV). + # block - An optional block which when used will yield non options. + # + # Returns an Array of original items. + # + # source://pry//lib/pry/slop.rb#206 def parse(items = T.unsafe(nil), &block); end + + # Parse a list of items, executing and gathering options along the way. + # unlike parse() this method will remove any options and option arguments + # from the original Array. + # + # items - The Array of items to extract options from (default: ARGV). + # block - An optional block which when used will yield non options. + # + # Returns an Array of original items with options removed. + # + # source://pry//lib/pry/slop.rb#219 def parse!(items = T.unsafe(nil), &block); end + + # Check for an options presence. + # + # Examples: + # + # opts.parse %w( --foo ) + # opts.present?(:foo) #=> true + # opts.present?(:bar) #=> false + # + # Returns true if all of the keys are present in the parsed arguments. + # + # @return [Boolean] + # + # source://pry//lib/pry/slop.rb#333 def present?(*keys); end + + # Specify code to be executed when these options are parsed. + # + # callable - An object responding to a call method. + # + # yields - The instance of Slop parsing these options + # An Array of unparsed arguments + # + # Example: + # + # Slop.parse do + # on :v, :verbose + # + # run do |opts, args| + # puts "Arguments: #{args.inspect}" if opts.verbose? + # end + # end + # + # @raise [ArgumentError] + # + # source://pry//lib/pry/slop.rb#317 def run(callable = T.unsafe(nil), &block); end + + # Add string separators between options. + # + # text - The String text to print. + # + # source://pry//lib/pry/slop.rb#405 def separator(text); end + + # Is strict mode enabled? + # + # Returns true if strict mode is enabled, false otherwise. + # + # @return [Boolean] + # + # source://pry//lib/pry/slop.rb#152 def strict?; end + + # Returns a new Hash with option flags as keys and option values as values. + # + # include_commands - If true, merge options from all sub-commands. + # + # source://pry//lib/pry/slop.rb#287 def to_h(include_commands = T.unsafe(nil)); end + + # Returns a new Hash with option flags as keys and option values as values. + # + # include_commands - If true, merge options from all sub-commands. + # + # source://pry//lib/pry/slop.rb#287 def to_hash(include_commands = T.unsafe(nil)); end + + # Print a handy Slop help string. + # + # Returns the banner followed by available option help strings. + # + # source://pry//lib/pry/slop.rb#416 def to_s; end private + # Autocreate an option on the fly. See the :autocreate Slop config option. + # + # items - The Array of items we're parsing. + # index - The current Integer index for the item we're processing. + # + # Returns nothing. + # + # source://pry//lib/pry/slop.rb#590 def autocreate(items, index); end + + # Build an option from a list of objects. + # + # objects - An Array of objects used to build this option. + # + # Returns a new instance of Slop::Option. + # + # source://pry//lib/pry/slop.rb#606 def build_option(objects, &block); end + + # Remove any leading -- characters from a string. + # + # object - The Object we want to cast to a String and clean. + # + # Returns the newly cleaned String with leading -- characters removed. + # + # source://pry//lib/pry/slop.rb#659 def clean(object); end + + # source://pry//lib/pry/slop.rb#663 def commands_to_help; end + + # Execute a `-abc` type option where a, b and c are all options. This + # method is only executed if the multiple_switches argument is true. + # + # option - The first Option object. + # argument - The argument to this option. (Split into multiple Options). + # index - The index of the current item being processed. + # + # Returns nothing. + # + # source://pry//lib/pry/slop.rb#552 def execute_multiple_switches(option, argument, index); end + + # Execute an option, firing off callbacks and assigning arguments. + # + # option - The Slop::Option object found by #process_item. + # argument - The argument Object to assign to this option. + # index - The current Integer index of the object we're processing. + # item - The optional String item we're processing. + # + # Returns nothing. + # + # source://pry//lib/pry/slop.rb#519 def execute_option(option, argument, index, item = T.unsafe(nil)); end + + # Extract the long flag from an item. + # + # objects - The Array of objects passed from #build_option. + # config - The Hash of configuration options built in #build_option. + # + # source://pry//lib/pry/slop.rb#644 def extract_long_flag(objects, config); end + + # Extract an option from a flag. + # + # flag - The flag key used to extract an option. + # + # Returns an Array of [option, argument]. + # + # source://pry//lib/pry/slop.rb#567 def extract_option(flag); end + + # Extract the short flag from an item. + # + # objects - The Array of objects passed from #build_option. + # config - The Hash of configuration options built in #build_option. + # + # source://pry//lib/pry/slop.rb#626 def extract_short_flag(objects, config); end + + # Convenience method for present?(:option). + # + # Examples: + # + # opts.parse %( --verbose ) + # opts.verbose? #=> true + # opts.other? #=> false + # + # Returns true if this option is present. If this method does not end + # with a ? character it will instead call super(). + # + # source://pry//lib/pry/slop.rb#454 def method_missing(method, *args, &block); end + + # Process a list item, figure out if it's an option, execute any + # callbacks, assign any option arguments, and do some sanity checks. + # + # items - The Array of items to process. + # index - The current Integer index of the item we want to process. + # block - An optional block which when passed will yield non options. + # + # Returns nothing. + # + # source://pry//lib/pry/slop.rb#472 def process_item(items, index, &block); end + + # Override this method so we can check if an option? method exists. + # + # Returns true if this option key exists in our list of options. + # + # @return [Boolean] + # + # source://pry//lib/pry/slop.rb#340 def respond_to_missing?(method_name, include_all = T.unsafe(nil)); end class << self + # Build a Slop object from a option specification. + # + # This allows you to design your options via a simple String rather + # than programatically. Do note though that with this method, you're + # unable to pass any advanced options to the on() method when creating + # options. + # + # string - The optspec String + # config - A Hash of configuration options to pass to Slop.new + # + # Examples: + # + # opts = Slop.optspec(<<-SPEC) + # ruby foo.rb [options] + # --- + # n,name= Your name + # a,age= Your age + # A,auth Sign in with auth + # p,passcode= Your secret pass code + # SPEC + # + # opts.fetch_option(:name).description #=> "Your name" + # + # Returns a new instance of Slop. + # + # source://pry//lib/pry/slop.rb#97 def optspec(string, config = T.unsafe(nil)); end + + # items - The Array of items to extract options from (default: ARGV). + # config - The Hash of configuration options to send to Slop.new(). + # block - An optional block used to add options. + # + # Examples: + # + # Slop.parse(ARGV, :help => true) do + # on '-n', '--name', 'Your username', :argument => true + # end + # + # Returns a new instance of Slop. + # + # source://pry//lib/pry/slop.rb#54 def parse(items = T.unsafe(nil), config = T.unsafe(nil), &block); end + + # items - The Array of items to extract options from (default: ARGV). + # config - The Hash of configuration options to send to Slop.new(). + # block - An optional block used to add options. + # + # Returns a new instance of Slop. + # + # source://pry//lib/pry/slop.rb#63 def parse!(items = T.unsafe(nil), config = T.unsafe(nil), &block); end end end +# source://pry//lib/pry/slop/commands.rb#5 class Pry::Slop::Commands include ::Enumerable + # Create a new instance of Slop::Commands and optionally build + # Slop instances via a block. Any configuration options used in + # this method will be the default configuration options sent to + # each Slop object created. + # + # config - An optional configuration Hash. + # block - Optional block used to define commands. + # + # Examples: + # + # commands = Slop::Commands.new do + # on :new do + # on '-o', '--outdir=', 'The output directory' + # on '-v', '--verbose', 'Enable verbose mode' + # end + # + # on :generate do + # on '--assets', 'Generate assets', :default => true + # end + # + # global do + # on '-D', '--debug', 'Enable debug mode', :default => false + # end + # end + # + # commands[:new].class #=> Slop + # commands.parse + # + # @return [Commands] a new instance of Commands + # + # source://pry//lib/pry/slop/commands.rb#39 def initialize(config = T.unsafe(nil), &block); end + # Fetch the instance of Slop tied to a command. + # + # key - The String or Symbol key used to locate this command. + # + # Returns the Slop instance if this key is found, nil otherwise. + # + # source://pry//lib/pry/slop/commands.rb#100 def [](key); end + + # Returns the value of attribute arguments. + # + # source://pry//lib/pry/slop/commands.rb#8 def arguments; end + + # Optionally set the banner for this command help output. + # + # banner - The String text to set the banner. + # + # Returns the String banner if one is set. + # + # source://pry//lib/pry/slop/commands.rb#59 def banner(banner = T.unsafe(nil)); end + + # Sets the attribute banner + # + # @param value the value to set the attribute banner to. + # + # source://pry//lib/pry/slop/commands.rb#9 def banner=(_arg0); end + + # Returns the value of attribute commands. + # + # source://pry//lib/pry/slop/commands.rb#8 def commands; end + + # Returns the value of attribute config. + # + # source://pry//lib/pry/slop/commands.rb#8 def config; end + + # Add a Slop instance used when no other commands exist. + # + # config - A Hash of configuration options to pass to Slop. + # block - An optional block used to pass options to Slop. + # + # Returns the newly created Slop instance mapped to default. + # + # source://pry//lib/pry/slop/commands.rb#81 def default(config = T.unsafe(nil), &block); end + + # Enumerable interface. + # + # source://pry//lib/pry/slop/commands.rb#119 def each(&block); end + + # Fetch the instance of Slop tied to a command. + # + # key - The String or Symbol key used to locate this command. + # + # Returns the Slop instance if this key is found, nil otherwise. + # + # source://pry//lib/pry/slop/commands.rb#100 def get(key); end + + # Add a global Slop instance. + # + # config - A Hash of configuration options to pass to Slop. + # block - An optional block used to pass options to Slop. + # + # Returns the newly created Slop instance mapped to global. + # + # source://pry//lib/pry/slop/commands.rb#91 def global(config = T.unsafe(nil), &block); end + + # Returns the help String. + # + # source://pry//lib/pry/slop/commands.rb#158 def help; end + + # Returns the inspection String. + # + # source://pry//lib/pry/slop/commands.rb#170 def inspect; end + + # Add a Slop instance for a specific command. + # + # command - A String or Symbol key used to identify this command. + # config - A Hash of configuration options to pass to Slop. + # block - An optional block used to pass options to Slop. + # + # Returns the newly created Slop instance mapped to command. + # + # source://pry//lib/pry/slop/commands.rb#71 def on(command, config = T.unsafe(nil), &block); end + + # Parse a list of items. + # + # items - The Array of items to parse. + # + # Returns the original Array of items. + # + # source://pry//lib/pry/slop/commands.rb#128 def parse(items = T.unsafe(nil)); end + + # Parse a list of items, removing any options or option arguments found. + # + # items - The Array of items to parse. + # + # Returns the original Array of items with options removed. + # + # source://pry//lib/pry/slop/commands.rb#138 def parse!(items = T.unsafe(nil)); end + + # Check for a command presence. + # + # Examples: + # + # cmds.parse %w( foo ) + # cmds.present?(:foo) #=> true + # cmds.present?(:bar) #=> false + # + # Returns true if the given key is present in the parsed arguments. + # + # @return [Boolean] + # + # source://pry//lib/pry/slop/commands.rb#114 def present?(key); end + + # Returns a nested Hash with Slop options and values. See Slop#to_hash. + # + # source://pry//lib/pry/slop/commands.rb#153 def to_hash; end + + # Returns the help String. + # + # source://pry//lib/pry/slop/commands.rb#158 def to_s; end private + # Returns nothing. + # + # source://pry//lib/pry/slop/commands.rb#177 def execute_arguments!(items); end + + # Returns nothing. + # + # source://pry//lib/pry/slop/commands.rb#183 def execute_global_opts!(items); end end +# Returns a default Hash of configuration options this Slop instance uses. +# +# source://pry//lib/pry/slop.rb#30 Pry::Slop::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# The main Error class, all Exception classes inherit from this class. +# +# source://pry//lib/pry/slop.rb#12 class Pry::Slop::Error < ::StandardError; end + +# Raised when an argument does not match its intended match constraint. +# +# source://pry//lib/pry/slop.rb#21 class Pry::Slop::InvalidArgumentError < ::Pry::Slop::Error; end + +# Raised when an invalid command is found and the strict flag is enabled. +# +# source://pry//lib/pry/slop.rb#27 class Pry::Slop::InvalidCommandError < ::Pry::Slop::Error; end + +# Raised when an invalid option is found and the strict flag is enabled. +# +# source://pry//lib/pry/slop.rb#24 class Pry::Slop::InvalidOptionError < ::Pry::Slop::Error; end + +# Raised when an option argument is expected but none are given. +# +# source://pry//lib/pry/slop.rb#15 class Pry::Slop::MissingArgumentError < ::Pry::Slop::Error; end + +# Raised when an option is expected/required but not present. +# +# source://pry//lib/pry/slop.rb#18 class Pry::Slop::MissingOptionError < ::Pry::Slop::Error; end +# source://pry//lib/pry/slop/option.rb#5 class Pry::Slop::Option + # Incapsulate internal option information, mainly used to store + # option specific configuration data, most of the meat of this + # class is found in the #value method. + # + # slop - The instance of Slop tied to this Option. + # short - The String or Symbol short flag. + # long - The String or Symbol long flag. + # description - The String description text. + # config - A Hash of configuration options. + # block - An optional block used as a callback. + # + # @return [Option] a new instance of Option + # + # source://pry//lib/pry/slop/option.rb#35 def initialize(slop, short, long, description, config = T.unsafe(nil), &block); end + # Returns true if this option accepts an optional argument. + # + # @return [Boolean] + # + # source://pry//lib/pry/slop/option.rb#72 def accepts_optional_argument?; end + + # Returns the value of attribute argument_in_value. + # + # source://pry//lib/pry/slop/option.rb#23 def argument_in_value; end + + # Sets the attribute argument_in_value + # + # @param value the value to set the attribute argument_in_value to. + # + # source://pry//lib/pry/slop/option.rb#23 def argument_in_value=(_arg0); end + + # Call this options callback if one exists, and it responds to call(). + # + # Returns nothing. + # + # source://pry//lib/pry/slop/option.rb#84 def call(*objects); end + + # Returns the value of attribute config. + # + # source://pry//lib/pry/slop/option.rb#22 def config; end + + # Returns the value of attribute count. + # + # source://pry//lib/pry/slop/option.rb#23 def count; end + + # Sets the attribute count + # + # @param value the value to set the attribute count to. + # + # source://pry//lib/pry/slop/option.rb#23 def count=(_arg0); end + + # Returns the value of attribute description. + # + # source://pry//lib/pry/slop/option.rb#22 def description; end + + # Returns true if this option expects an argument. + # + # @return [Boolean] + # + # source://pry//lib/pry/slop/option.rb#67 def expects_argument?; end + + # Returns the help String for this option. + # + # source://pry//lib/pry/slop/option.rb#124 def help; end + + # Returns the String inspection text. + # + # source://pry//lib/pry/slop/option.rb#143 def inspect; end + + # Returns the String flag of this option. Preferring the long flag. + # + # source://pry//lib/pry/slop/option.rb#77 def key; end + + # Returns the value of attribute long. + # + # source://pry//lib/pry/slop/option.rb#22 def long; end + + # Returns the value of attribute short. + # + # source://pry//lib/pry/slop/option.rb#22 def short; end + + # Returns the help String for this option. + # + # source://pry//lib/pry/slop/option.rb#124 def to_s; end + + # Returns the value of attribute types. + # + # source://pry//lib/pry/slop/option.rb#22 def types; end + + # Fetch the argument value for this option. + # + # Returns the Object once any type conversions have taken place. + # + # source://pry//lib/pry/slop/option.rb#108 def value; end + + # Set the new argument value for this option. + # + # We use this setter method to handle concatenating lists. That is, + # when an array type is specified and used more than once, values from + # both options will be grouped together and flattened into a single array. + # + # source://pry//lib/pry/slop/option.rb#93 def value=(new_value); end private + # Convert an object to a Float if possible. + # + # value - The Object we want to convert to a float. + # + # Returns the Float value if possible to convert, else a zero. + # + # source://pry//lib/pry/slop/option.rb#173 def value_to_float(value); end + + # Convert an object to an Integer if possible. + # + # value - The Object we want to convert to an integer. + # + # Returns the Integer value if possible to convert, else a zero. + # + # source://pry//lib/pry/slop/option.rb#156 def value_to_integer(value); end + + # Convert an object to a Range if possible. + # + # value - The Object we want to convert to a range. + # + # Returns the Range value if one could be found, else the original object. + # + # source://pry//lib/pry/slop/option.rb#190 def value_to_range(value); end end +# The default Hash of configuration options this class uses. +# +# source://pry//lib/pry/slop/option.rb#7 Pry::Slop::Option::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# source://pry//lib/pry/slop.rb#9 Pry::Slop::VERSION = T.let(T.unsafe(nil), String) +# @api private +# @since v0.13.0 +# +# source://pry//lib/pry/syntax_highlighter.rb#8 class Pry::SyntaxHighlighter class << self + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/syntax_highlighter.rb#9 def highlight(code, language = T.unsafe(nil)); end + + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/syntax_highlighter.rb#17 def keyword_token_color; end + + # Sets comment token to blue (black by default), so it's more legible. + # + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/syntax_highlighter.rb#22 def overwrite_coderay_comment_token!; end + + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/syntax_highlighter.rb#13 def tokenize(code, language = T.unsafe(nil)); end end end +# @api private +# @since v0.13.0 +# +# source://pry//lib/pry/system_command_handler.rb#6 module Pry::SystemCommandHandler class << self + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/system_command_handler.rb#8 def default(output, command, _pry_instance); end end end +# Catches SecurityErrors if $SAFE is set +# +# source://pry//lib/pry/exceptions.rb#28 module Pry::TooSafeException class << self + # source://pry//lib/pry/exceptions.rb#29 def ===(exception); end end end +# An Exception Tag (cf. Exceptional Ruby) that instructs Pry to show the error +# in a more user-friendly manner. This should be used when the exception +# happens within Pry itself as a direct consequence of the user typing +# something wrong. +# +# This allows us to distinguish between the user typing: +# +# pry(main)> def ) +# SyntaxError: unexpected ) +# +# pry(main)> method_that_evals("def )") +# SyntaxError: (eval):1: syntax error, unexpected ')' +# from ./a.rb:2 in `eval' +# +# source://pry//lib/pry/exceptions.rb#51 module Pry::UserError; end + +# source://pry//lib/pry/version.rb#4 Pry::VERSION = T.let(T.unsafe(nil), String) +# @api private +# @since v0.13.0 +# +# source://pry//lib/pry/warning.rb#6 module Pry::Warning class << self + # Prints a warning message with exact file and line location, similar to how + # Ruby's -W prints warnings. + # + # @api private + # @param message [String] + # @return [void] + # @since v0.13.0 + # + # source://pry//lib/pry/warning.rb#12 def warn(message); end end end +# source://pry//lib/pry/wrapped_module.rb#16 class Pry::WrappedModule include ::Pry::Helpers::BaseHelpers include ::Pry::CodeObject::Helpers + # @param mod [Module] + # @raise [ArgumentError] if the argument is not a `Module` + # @return [WrappedModule] a new instance of WrappedModule + # + # source://pry//lib/pry/wrapped_module.rb#56 def initialize(mod); end + # Return a candidate for this module of specified rank. A `rank` + # of 0 is equivalent to the 'primary candidate', which is the + # module definition with the highest number of methods. A `rank` + # of 1 is the module definition with the second highest number of + # methods, and so on. Module candidates are necessary as modules + # can be reopened multiple times and in multiple places in Ruby, + # the candidate API gives you access to the module definition + # representing each of those reopenings. + # + # @param rank [Fixnum] + # @raise [Pry::CommandError] If the `rank` is out of range. That + # is greater than `number_of_candidates - 1`. + # @return [Pry::WrappedModule::Candidate] + # + # source://pry//lib/pry/wrapped_module.rb#239 def candidate(rank); end + + # @return [Array] + # + # source://pry//lib/pry/wrapped_module.rb#250 def candidates; end + + # Is this strictly a class? + # + # @return [Boolean] + # + # source://pry//lib/pry/wrapped_module.rb#126 def class?; end + + # Returns an array of the names of the constants accessible in the wrapped + # module. This avoids the problem of accidentally calling the singleton + # method `Module.constants`. + # + # @param inherit [Boolean] Include the names of constants from included + # modules? + # + # source://pry//lib/pry/wrapped_module.rb#76 def constants(inherit = T.unsafe(nil)); end + + # Returns documentation for the module. + # This documentation is for the primary candidate, if + # you would like documentation for other candidates use + # `WrappedModule#candidate` to select the candidate you're + # interested in. + # + # @raise [Pry::CommandError] If documentation cannot be found. + # @return [String] The documentation for the module. + # + # source://pry//lib/pry/wrapped_module.rb#195 def doc; end + + # @return [String, nil] The associated file for the module (i.e + # the primary candidate: highest ranked monkeypatch). + # + # source://pry//lib/pry/wrapped_module.rb#176 def file; end + + # @return [Fixnum, nil] The associated line for the module (i.e + # the primary candidate: highest ranked monkeypatch). + # + # source://pry//lib/pry/wrapped_module.rb#183 def line; end + + # Forward method invocations to the wrapped module + # + # source://pry//lib/pry/wrapped_module.rb#150 def method_missing(method_name, *args, &block); end + + # The prefix that would appear before methods defined on this class. + # + # i.e. the "String." or "String#" in String.new and String#initialize. + # + # @return String + # + # source://pry//lib/pry/wrapped_module.rb#85 def method_prefix; end + + # Is this strictly a module? (does not match classes) + # + # @return [Boolean] + # + # source://pry//lib/pry/wrapped_module.rb#120 def module?; end + + # The name of the Module if it has one, otherwise #. + # + # @return [String] + # + # source://pry//lib/pry/wrapped_module.rb#100 def nonblank_name; end + + # @return [Fixnum] The number of candidate definitions for the + # current module. + # + # source://pry//lib/pry/wrapped_module.rb#245 def number_of_candidates; end + + # Is this a singleton class? + # + # @return [Boolean] + # + # source://pry//lib/pry/wrapped_module.rb#110 def singleton_class?; end + + # Get the instance associated with this singleton class. + # + # @raise ArgumentError: tried to get instance of non singleton class + # @return [Object] + # + # source://pry//lib/pry/wrapped_module.rb#135 def singleton_instance; end + + # Returns the source for the module. + # This source is for the primary candidate, if + # you would like source for other candidates use + # `WrappedModule#candidate` to select the candidate you're + # interested in. + # + # @raise [Pry::CommandError] If source cannot be found. + # @return [String] The source for the module. + # + # source://pry//lib/pry/wrapped_module.rb#206 def source; end + + # @return [String, nil] The associated file for the module (i.e + # the primary candidate: highest ranked monkeypatch). + # + # source://pry//lib/pry/wrapped_module.rb#176 def source_file; end + + # @return [Fixnum, nil] The associated line for the module (i.e + # the primary candidate: highest ranked monkeypatch). + # + # source://pry//lib/pry/wrapped_module.rb#183 def source_line; end + + # Retrieve the source location of a module. Return value is in same + # format as Method#source_location. If the source location + # cannot be found this method returns `nil`. + # + # @return [Array, nil] The source location of the + # module (or class), or `nil` if no source location found. + # + # source://pry//lib/pry/wrapped_module.rb#168 def source_location; end + + # @param times [Fixnum] How far to travel up the ancestor chain. + # @return [Pry::WrappedModule, nil] The wrapped module that is the + # superclass. + # When `self` is a `Module` then return the + # nth ancestor, otherwise (in the case of classes) return the + # nth ancestor that is a class. + # + # source://pry//lib/pry/wrapped_module.rb#270 def super(times = T.unsafe(nil)); end + + # Returns the value of attribute wrapped. + # + # source://pry//lib/pry/wrapped_module.rb#20 def wrapped; end + + # @return [String] Return the YARD docs for this module. + # + # source://pry//lib/pry/wrapped_module.rb#223 def yard_doc; end + + # @return [Boolean] Whether YARD docs are available for this module. + # + # source://pry//lib/pry/wrapped_module.rb#260 def yard_docs?; end + + # @return [String] Return the associated file for the + # module from YARD, if one exists. + # + # source://pry//lib/pry/wrapped_module.rb#212 def yard_file; end + + # @return [Fixnum] Return the associated line for the + # module from YARD, if one exists. + # + # source://pry//lib/pry/wrapped_module.rb#218 def yard_line; end private + # Return all methods (instance methods and class methods) for a + # given module. + # + # @return [Array] + # + # source://pry//lib/pry/wrapped_module.rb#347 def all_methods_for(mod); end + + # We only want methods that have a non-nil `source_location`. We also + # skip some spooky internal methods. + # + # @return [Array] + # + # source://pry//lib/pry/wrapped_module.rb#329 def all_relevant_methods_for(mod); end + + # A helper method. + # + # source://pry//lib/pry/wrapped_module.rb#310 def all_source_locations_by_popularity; end + + # memoized lines for file + # + # source://pry//lib/pry/wrapped_module.rb#371 def lines_for_file(file); end + + # @return [Array>] The array of `Pry::Method` objects, + # there are two associated with each candidate. The first is the 'base + # method' for a candidate and it serves as the start point for + # the search in uncovering the module definition. The second is + # the last method defined for that candidate and it is used to + # speed up source code extraction. + # + # source://pry//lib/pry/wrapped_module.rb#302 def method_candidates; end + + # Detect methods that are defined with `def_delegator` from the Forwardable + # module. We want to reject these methods as they screw up module + # extraction since the `source_location` for such methods points at forwardable.rb + # TODO: make this more robust as valid user-defined files called + # forwardable.rb are also skipped. + # + # @return [Boolean] + # + # source://pry//lib/pry/wrapped_module.rb#366 def method_defined_by_forwardable_module?(method); end + + # @return [Boolean] + # + # source://pry//lib/pry/wrapped_module.rb#351 def nested_module?(parent, name); end + + # @return [Pry::WrappedModule::Candidate] The candidate with the + # highest rank, that is the 'monkey patch' of this module with the + # highest number of methods, which contains a source code line that + # defines the module. It is considered the 'canonical' definition + # for the module. In the absense of a suitable candidate, the + # candidate of rank 0 will be returned, or a CommandError raised if + # there are no candidates at all. + # + # source://pry//lib/pry/wrapped_module.rb#292 def primary_candidate; end + + # @return [Boolean] + # + # source://pry//lib/pry/wrapped_module.rb#158 def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end class << self + # Convert a string to a module. + # + # @example + # Pry::WrappedModule.from_str("Pry::Code") + # @param mod_name [String] + # @param target [Binding] The binding where the lookup takes place. + # @return [Module, nil] The module or `nil` (if conversion failed). + # + # source://pry//lib/pry/wrapped_module.rb#29 def from_str(mod_name, target = T.unsafe(nil)); end private + # We use this method to decide whether code is safe to eval. Method's are + # generally not, but everything else is. + # TODO: is just checking != "method" enough?? + # TODO: see duplication of this method in Pry::CodeObject + # + # @param str [String] The string to lookup. + # @param target [Binding] Where the lookup takes place. + # @return [Boolean] + # + # source://pry//lib/pry/wrapped_module.rb#45 def safe_to_evaluate?(str, target); end end end +# This class represents a single candidate for a module/class definition. +# It provides access to the source, documentation, line and file +# for a monkeypatch (reopening) of a class/module. +# +# source://pry//lib/pry/wrapped_module/candidate.rb#8 class Pry::WrappedModule::Candidate include ::Pry::Helpers::DocumentationHelpers include ::Pry::CodeObject::Helpers extend ::Forwardable extend ::Pry::Forwardable + # @param wrapper [Pry::WrappedModule] The associated + # `Pry::WrappedModule` instance that owns the candidates. + # @param rank [Fixnum] The rank of the candidate to + # retrieve. Passing 0 returns 'primary candidate' (the candidate with largest + # number of methods), passing 1 retrieves candidate with + # second largest number of methods, and so on, up to + # `Pry::WrappedModule#number_of_candidates() - 1` + # @raise [Pry::CommandError] If `rank` is out of bounds. + # @return [Candidate] a new instance of Candidate + # + # source://pry//lib/pry/wrapped_module/candidate.rb#38 def initialize(wrapper, rank); end - def class?(*args, &block); end + # source://forwardable/1.3.2/forwardable.rb#229 + def class?(*args, **_arg1, &block); end + + # @raise [Pry::CommandError] If documentation cannot be found. + # @return [String] The documentation for the candidate. + # + # source://pry//lib/pry/wrapped_module/candidate.rb#70 def doc; end + + # @return [String] The file where the module definition is located. + # + # source://pry//lib/pry/wrapped_module/candidate.rb#14 def file; end + + # @return [Fixnum] The line where the module definition is located. + # + # source://pry//lib/pry/wrapped_module/candidate.rb#18 def line; end - def module?(*args, &block); end - def nonblank_name(*args, &block); end - def number_of_candidates(*args, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def module?(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def nonblank_name(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def number_of_candidates(*args, **_arg1, &block); end + + # @raise [Pry::CommandError] If source code cannot be found. + # @return [String] The source for the candidate, i.e the + # complete module/class definition. + # + # source://pry//lib/pry/wrapped_module/candidate.rb#59 def source; end + + # @return [String] The file where the module definition is located. + # + # source://pry//lib/pry/wrapped_module/candidate.rb#14 def source_file; end + + # @return [Fixnum] The line where the module definition is located. + # + # source://pry//lib/pry/wrapped_module/candidate.rb#18 def source_line; end + + # @return [Array, nil] A `[String, Fixnum]` pair representing the + # source location (file and line) for the candidate or `nil` + # if no source location found. + # + # source://pry//lib/pry/wrapped_module/candidate.rb#79 def source_location; end - def wrapped(*args, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def wrapped(*args, **_arg1, &block); end private + # Locate the first line of the module definition. + # + # @param file [String] The file that contains the module + # definition (somewhere). + # @param line [Fixnum] The module definition should appear + # before this line (if it exists). + # @return [Fixnum] The line where the module is defined. This + # line number is one-indexed. + # + # source://pry//lib/pry/wrapped_module/candidate.rb#99 def first_line_of_module_definition(file, line); end + + # This method is used by `Candidate#source_location` as a + # starting point for the search for the candidate's definition. + # + # @return [Array] The source location of the base method used to + # calculate the source location of the candidate. + # + # source://pry//lib/pry/wrapped_module/candidate.rb#116 def first_method_source_location; end + + # @return [Array] The source location of the last method in this + # candidate's module definition. + # + # source://pry//lib/pry/wrapped_module/candidate.rb#122 def last_method_source_location; end + + # source://pry//lib/pry/forwardable.rb#18 def lines_for_file(*a, &b); end + + # source://pry//lib/pry/forwardable.rb#18 def method_candidates(*a, &b); end + + # @return [Boolean] + # + # source://pry//lib/pry/wrapped_module/candidate.rb#104 def module_definition_first_line?(line); end + + # source://pry//lib/pry/forwardable.rb#18 def name(*a, &b); end + + # Return the number of lines between the start of the class definition and + # the start of the last method. We use this value so we can quickly grab + # these lines from the file (without having to check each intervening line + # for validity, which is expensive) speeding up source extraction. + # + # @return [Integer] number of lines. + # + # source://pry//lib/pry/wrapped_module/candidate.rb#132 def number_of_lines_in_first_chunk; end + + # source://pry//lib/pry/forwardable.rb#18 def yard_docs?(*a, &b); end end diff --git a/Library/Homebrew/sorbet/rbi/gems/public_suffix@5.0.4.rbi b/Library/Homebrew/sorbet/rbi/gems/public_suffix@5.0.4.rbi index 6973c1b0c08e58..49c81c106bc69c 100644 --- a/Library/Homebrew/sorbet/rbi/gems/public_suffix@5.0.4.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/public_suffix@5.0.4.rbi @@ -4,142 +4,932 @@ # This is an autogenerated file for types exported from the `public_suffix` gem. # Please instead update this file by running `bin/tapioca gem public_suffix`. +# PublicSuffix is a Ruby domain name parser based on the Public Suffix List. +# +# The [Public Suffix List](https://publicsuffix.org) is a cross-vendor initiative +# to provide an accurate list of domain name suffixes. +# +# The Public Suffix List is an initiative of the Mozilla Project, +# but is maintained as a community resource. It is available for use in any software, +# but was originally created to meet the needs of browser manufacturers. +# +# source://public_suffix//lib/public_suffix/domain.rb#9 module PublicSuffix class << self + # private + # + # source://public_suffix//lib/public_suffix.rb#149 def decompose(name, rule); end + + # Attempt to parse the name and returns the domain, if valid. + # + # This method doesn't raise. Instead, it returns nil if the domain is not valid for whatever reason. + # + # @param name [#to_s] The domain name or fully qualified domain name to parse. + # @param list [PublicSuffix::List] The rule list to search, defaults to the default {PublicSuffix::List} + # @param ignore_private [Boolean] + # @return [String] + # + # source://public_suffix//lib/public_suffix.rb#140 def domain(name, **options); end + + # Pretend we know how to deal with user input. + # + # source://public_suffix//lib/public_suffix.rb#164 def normalize(name); end + + # Parses +name+ and returns the {PublicSuffix::Domain} instance. + # + # @example Parse a valid domain + # PublicSuffix.parse("google.com") + # # => # + # @example Parse a valid subdomain + # PublicSuffix.parse("www.google.com") + # # => # + # @example Parse a fully qualified domain + # PublicSuffix.parse("google.com.") + # # => # + # @example Parse a fully qualified domain (subdomain) + # PublicSuffix.parse("www.google.com.") + # # => # + # @example Parse an invalid (unlisted) domain + # PublicSuffix.parse("x.yz") + # # => # + # @example Parse an invalid (unlisted) domain with strict checking (without applying the default * rule) + # PublicSuffix.parse("x.yz", default_rule: nil) + # # => PublicSuffix::DomainInvalid: `x.yz` is not a valid domain + # @example Parse an URL (not supported, only domains) + # PublicSuffix.parse("http://www.google.com") + # # => PublicSuffix::DomainInvalid: http://www.google.com is not expected to contain a scheme + # @param name [#to_s] The domain name or fully qualified domain name to parse. + # @param list [PublicSuffix::List] The rule list to search, defaults to the default {PublicSuffix::List} + # @param ignore_private [Boolean] + # @raise [PublicSuffix::DomainInvalid] If domain is not a valid domain. + # @raise [PublicSuffix::DomainNotAllowed] If a rule for +domain+ is found, but the rule doesn't allow +domain+. + # @return [PublicSuffix::Domain] + # + # source://public_suffix//lib/public_suffix.rb#67 def parse(name, list: T.unsafe(nil), default_rule: T.unsafe(nil), ignore_private: T.unsafe(nil)); end + + # Checks whether +domain+ is assigned and allowed, without actually parsing it. + # + # This method doesn't care whether domain is a domain or subdomain. + # The validation is performed using the default {PublicSuffix::List}. + # + # @example Validate a valid domain + # PublicSuffix.valid?("example.com") + # # => true + # @example Validate a valid subdomain + # PublicSuffix.valid?("www.example.com") + # # => true + # @example Validate a not-listed domain + # PublicSuffix.valid?("example.tldnotlisted") + # # => true + # @example Validate a not-listed domain with strict checking (without applying the default * rule) + # PublicSuffix.valid?("example.tldnotlisted") + # # => true + # PublicSuffix.valid?("example.tldnotlisted", default_rule: nil) + # # => false + # @example Validate a fully qualified domain + # PublicSuffix.valid?("google.com.") + # # => true + # PublicSuffix.valid?("www.google.com.") + # # => true + # @example Check an URL (which is not a valid domain) + # PublicSuffix.valid?("http://www.example.com") + # # => false + # @param name [#to_s] The domain name or fully qualified domain name to validate. + # @param ignore_private [Boolean] + # @return [Boolean] + # + # source://public_suffix//lib/public_suffix.rb#123 def valid?(name, list: T.unsafe(nil), default_rule: T.unsafe(nil), ignore_private: T.unsafe(nil)); end end end +# source://public_suffix//lib/public_suffix.rb#26 PublicSuffix::BANG = T.let(T.unsafe(nil), String) + +# source://public_suffix//lib/public_suffix.rb#25 PublicSuffix::DOT = T.let(T.unsafe(nil), String) +# Domain represents a domain name, composed by a TLD, SLD and TRD. +# +# source://public_suffix//lib/public_suffix/domain.rb#12 class PublicSuffix::Domain + # Creates and returns a new {PublicSuffix::Domain} instance. + # + # @example Initialize with a TLD and SLD + # PublicSuffix::Domain.new("com", "example") + # # => # + # @example Initialize with a TLD + # PublicSuffix::Domain.new("com") + # # => # + # @example Initialize with a TLD, SLD and TRD + # PublicSuffix::Domain.new("com", "example", "wwww") + # # => # + # @overload initialize + # @overload initialize + # @overload initialize + # @return [Domain] a new instance of Domain + # @yield [self] Yields on self. + # @yieldparam self [PublicSuffix::Domain] The newly creates instance + # + # source://public_suffix//lib/public_suffix/domain.rb#65 def initialize(*args); end + # Returns a domain-like representation of this object + # if the object is a {#domain?}, nil otherwise. + # + # PublicSuffix::Domain.new("com").domain + # # => nil + # + # PublicSuffix::Domain.new("com", "google").domain + # # => "google.com" + # + # PublicSuffix::Domain.new("com", "google", "www").domain + # # => "www.google.com" + # + # This method doesn't validate the input. It handles the domain + # as a valid domain name and simply applies the necessary transformations. + # + # This method returns a FQD, not just the domain part. + # To get the domain part, use #sld (aka second level domain). + # + # PublicSuffix::Domain.new("com", "google", "www").domain + # # => "google.com" + # + # PublicSuffix::Domain.new("com", "google", "www").sld + # # => "google" + # + # @return [String] + # @see #domain? + # @see #subdomain + # + # source://public_suffix//lib/public_suffix/domain.rb#137 def domain; end + + # Checks whether self looks like a domain. + # + # This method doesn't actually validate the domain. + # It only checks whether the instance contains + # a value for the {#tld} and {#sld} attributes. + # + # @example + # + # PublicSuffix::Domain.new("com").domain? + # # => false + # + # PublicSuffix::Domain.new("com", "google").domain? + # # => true + # + # PublicSuffix::Domain.new("com", "google", "www").domain? + # # => true + # + # # This is an invalid domain, but returns true + # # because this method doesn't validate the content. + # PublicSuffix::Domain.new("com", nil).domain? + # # => true + # @return [Boolean] + # @see #subdomain? + # + # source://public_suffix//lib/public_suffix/domain.rb#198 def domain?; end + + # Returns the full domain name. + # + # @example Gets the domain name of a domain + # PublicSuffix::Domain.new("com", "google").name + # # => "google.com" + # @example Gets the domain name of a subdomain + # PublicSuffix::Domain.new("com", "google", "www").name + # # => "www.google.com" + # @return [String] + # + # source://public_suffix//lib/public_suffix/domain.rb#105 def name; end + + # Returns the value of attribute sld. + # + # source://public_suffix//lib/public_suffix/domain.rb#33 def sld; end + + # Returns a subdomain-like representation of this object + # if the object is a {#subdomain?}, nil otherwise. + # + # PublicSuffix::Domain.new("com").subdomain + # # => nil + # + # PublicSuffix::Domain.new("com", "google").subdomain + # # => nil + # + # PublicSuffix::Domain.new("com", "google", "www").subdomain + # # => "www.google.com" + # + # This method doesn't validate the input. It handles the domain + # as a valid domain name and simply applies the necessary transformations. + # + # This method returns a FQD, not just the subdomain part. + # To get the subdomain part, use #trd (aka third level domain). + # + # PublicSuffix::Domain.new("com", "google", "www").subdomain + # # => "www.google.com" + # + # PublicSuffix::Domain.new("com", "google", "www").trd + # # => "www" + # + # @return [String] + # @see #subdomain? + # @see #domain + # + # source://public_suffix//lib/public_suffix/domain.rb#169 def subdomain; end + + # Checks whether self looks like a subdomain. + # + # This method doesn't actually validate the subdomain. + # It only checks whether the instance contains + # a value for the {#tld}, {#sld} and {#trd} attributes. + # If you also want to validate the domain, + # use {#valid_subdomain?} instead. + # + # @example + # + # PublicSuffix::Domain.new("com").subdomain? + # # => false + # + # PublicSuffix::Domain.new("com", "google").subdomain? + # # => false + # + # PublicSuffix::Domain.new("com", "google", "www").subdomain? + # # => true + # + # # This is an invalid domain, but returns true + # # because this method doesn't validate the content. + # PublicSuffix::Domain.new("com", "example", nil).subdomain? + # # => true + # @return [Boolean] + # @see #domain? + # + # source://public_suffix//lib/public_suffix/domain.rb#229 def subdomain?; end + + # Returns the value of attribute tld. + # + # source://public_suffix//lib/public_suffix/domain.rb#33 def tld; end + + # Returns an array containing the domain parts. + # + # @example + # + # PublicSuffix::Domain.new("google.com").to_a + # # => [nil, "google", "com"] + # + # PublicSuffix::Domain.new("www.google.com").to_a + # # => [nil, "google", "com"] + # @return [Array] + # + # source://public_suffix//lib/public_suffix/domain.rb#89 def to_a; end + + # Returns a string representation of this object. + # + # @return [String] + # + # source://public_suffix//lib/public_suffix/domain.rb#73 def to_s; end + + # Returns the value of attribute trd. + # + # source://public_suffix//lib/public_suffix/domain.rb#33 def trd; end class << self + # Splits a string into the labels, that is the dot-separated parts. + # + # The input is not validated, but it is assumed to be a valid domain name. + # + # @example + # + # name_to_labels('example.com') + # # => ['example', 'com'] + # + # name_to_labels('example.co.uk') + # # => ['example', 'co', 'uk'] + # @param name [String, #to_s] The domain name to split. + # @return [Array] + # + # source://public_suffix//lib/public_suffix/domain.rb#28 def name_to_labels(name); end end end +# Raised when trying to parse an invalid name. +# A name is considered invalid when no rule is found in the definition list. +# +# @example +# +# PublicSuffix.parse("nic.test") +# # => PublicSuffix::DomainInvalid +# +# PublicSuffix.parse("http://www.nic.it") +# # => PublicSuffix::DomainInvalid +# +# source://public_suffix//lib/public_suffix/errors.rb#25 class PublicSuffix::DomainInvalid < ::PublicSuffix::Error; end + +# Raised when trying to parse a name that matches a suffix. +# +# @example +# +# PublicSuffix.parse("nic.do") +# # => PublicSuffix::DomainNotAllowed +# +# PublicSuffix.parse("www.nic.do") +# # => PublicSuffix::Domain +# +# source://public_suffix//lib/public_suffix/errors.rb#38 class PublicSuffix::DomainNotAllowed < ::PublicSuffix::DomainInvalid; end + +# source://public_suffix//lib/public_suffix/errors.rb#11 class PublicSuffix::Error < ::StandardError; end +# A {PublicSuffix::List} is a collection of one +# or more {PublicSuffix::Rule}. +# +# Given a {PublicSuffix::List}, +# you can add or remove {PublicSuffix::Rule}, +# iterate all items in the list or search for the first rule +# which matches a specific domain name. +# +# # Create a new list +# list = PublicSuffix::List.new +# +# # Push two rules to the list +# list << PublicSuffix::Rule.factory("it") +# list << PublicSuffix::Rule.factory("com") +# +# # Get the size of the list +# list.size +# # => 2 +# +# # Search for the rule matching given domain +# list.find("example.com") +# # => # +# list.find("example.org") +# # => nil +# +# You can create as many {PublicSuffix::List} you want. +# The {PublicSuffix::List.default} rule list is used +# to tokenize and validate a domain. +# +# source://public_suffix//lib/public_suffix/list.rb#40 class PublicSuffix::List + # Initializes an empty {PublicSuffix::List}. + # + # @return [List] a new instance of List + # @yield [self] Yields on self. + # @yieldparam self [PublicSuffix::List] The newly created instance. + # + # source://public_suffix//lib/public_suffix/list.rb#106 def initialize; end + # Adds the given object to the list and optionally refreshes the rule index. + # + # @param rule [PublicSuffix::Rule::*] the rule to add to the list + # @return [self] + # + # source://public_suffix//lib/public_suffix/list.rb#141 def <<(rule); end + + # Checks whether two lists are equal. + # + # List one is equal to two, if two is an instance of + # {PublicSuffix::List} and each +PublicSuffix::Rule::*+ + # in list one is available in list two, in the same order. + # + # @param other [PublicSuffix::List] the List to compare + # @return [Boolean] + # + # source://public_suffix//lib/public_suffix/list.rb#120 def ==(other); end + + # Adds the given object to the list and optionally refreshes the rule index. + # + # @param rule [PublicSuffix::Rule::*] the rule to add to the list + # @return [self] + # + # source://public_suffix//lib/public_suffix/list.rb#141 def add(rule); end + + # Removes all rules. + # + # @return [self] + # + # source://public_suffix//lib/public_suffix/list.rb#164 def clear; end + + # Gets the default rule. + # + # @return [PublicSuffix::Rule::*] + # @see PublicSuffix::Rule.default_rule + # + # source://public_suffix//lib/public_suffix/list.rb#226 def default_rule; end + + # Iterates each rule in the list. + # + # source://public_suffix//lib/public_suffix/list.rb#128 def each(&block); end + + # Checks whether the list is empty. + # + # @return [Boolean] + # + # source://public_suffix//lib/public_suffix/list.rb#157 def empty?; end + + # Checks whether two lists are equal. + # + # List one is equal to two, if two is an instance of + # {PublicSuffix::List} and each +PublicSuffix::Rule::*+ + # in list one is available in list two, in the same order. + # + # @param other [PublicSuffix::List] the List to compare + # @return [Boolean] + # + # source://public_suffix//lib/public_suffix/list.rb#120 def eql?(other); end + + # Finds and returns the rule corresponding to the longest public suffix for the hostname. + # + # @param name [#to_s] the hostname + # @param default [PublicSuffix::Rule::*] the default rule to return in case no rule matches + # @return [PublicSuffix::Rule::*] + # + # source://public_suffix//lib/public_suffix/list.rb#174 def find(name, default: T.unsafe(nil), **options); end + + # Gets the number of rules in the list. + # + # @return [Integer] + # + # source://public_suffix//lib/public_suffix/list.rb#150 def size; end protected + # Returns the value of attribute rules. + # + # source://public_suffix//lib/public_suffix/list.rb#233 def rules; end private + # source://public_suffix//lib/public_suffix/list.rb#238 def entry_to_rule(entry, value); end + + # source://public_suffix//lib/public_suffix/list.rb#242 def rule_to_entry(rule); end + + # Selects all the rules matching given hostame. + # + # If `ignore_private` is set to true, the algorithm will skip the rules that are flagged as + # private domain. Note that the rules will still be part of the loop. + # If you frequently need to access lists ignoring the private domains, + # you should create a list that doesn't include these domains setting the + # `private_domains: false` option when calling {.parse}. + # + # Note that this method is currently private, as you should not rely on it. Instead, + # the public interface is {#find}. The current internal algorithm allows to return all + # matching rules, but different data structures may not be able to do it, and instead would + # return only the match. For this reason, you should rely on {#find}. + # + # @param name [#to_s] the hostname + # @param ignore_private [Boolean] + # @return [Array] + # + # source://public_suffix//lib/public_suffix/list.rb#199 def select(name, ignore_private: T.unsafe(nil)); end class << self + # Gets the default rule list. + # + # Initializes a new {PublicSuffix::List} parsing the content + # of {PublicSuffix::List.default_list_content}, if required. + # + # @return [PublicSuffix::List] + # + # source://public_suffix//lib/public_suffix/list.rb#50 def default(**options); end + + # Sets the default rule list to +value+. + # + # @param value [PublicSuffix::List] the new list + # @return [PublicSuffix::List] + # + # source://public_suffix//lib/public_suffix/list.rb#58 def default=(value); end + + # Parse given +input+ treating the content as Public Suffix List. + # + # See http://publicsuffix.org/format/ for more details about input format. + # + # @param input [#each_line] the list to parse + # @param private_domains [Boolean] whether to ignore the private domains section + # @return [PublicSuffix::List] + # + # source://public_suffix//lib/public_suffix/list.rb#69 def parse(input, private_domains: T.unsafe(nil)); end end end +# source://public_suffix//lib/public_suffix/list.rb#42 PublicSuffix::List::DEFAULT_LIST_PATH = T.let(T.unsafe(nil), String) +# A Rule is a special object which holds a single definition +# of the Public Suffix List. +# +# There are 3 types of rules, each one represented by a specific +# subclass within the +PublicSuffix::Rule+ namespace. +# +# To create a new Rule, use the {PublicSuffix::Rule#factory} method. +# +# PublicSuffix::Rule.factory("ar") +# # => # +# +# source://public_suffix//lib/public_suffix/rule.rb#22 module PublicSuffix::Rule class << self + # The default rule to use if no rule match. + # + # The default rule is "*". From https://publicsuffix.org/list/: + # + # > If no rules match, the prevailing rule is "*". + # + # @return [PublicSuffix::Rule::Wildcard] The default rule. + # + # source://public_suffix//lib/public_suffix/rule.rb#344 def default; end + + # Takes the +name+ of the rule, detects the specific rule class + # and creates a new instance of that class. + # The +name+ becomes the rule +value+. + # + # @example Creates a Normal rule + # PublicSuffix::Rule.factory("ar") + # # => # + # @example Creates a Wildcard rule + # PublicSuffix::Rule.factory("*.ar") + # # => # + # @example Creates an Exception rule + # PublicSuffix::Rule.factory("!congresodelalengua3.ar") + # # => # + # @param content [#to_s] the content of the rule + # @return [PublicSuffix::Rule::*] A rule instance. + # + # source://public_suffix//lib/public_suffix/rule.rb#326 def factory(content, private: T.unsafe(nil)); end end end +# = Abstract rule class +# +# This represent the base class for a Rule definition +# in the {Public Suffix List}[https://publicsuffix.org]. +# +# This is intended to be an Abstract class +# and you shouldn't create a direct instance. The only purpose +# of this class is to expose a common interface +# for all the available subclasses. +# +# * {PublicSuffix::Rule::Normal} +# * {PublicSuffix::Rule::Exception} +# * {PublicSuffix::Rule::Wildcard} +# +# ## Properties +# +# A rule is composed by 4 properties: +# +# value - A normalized version of the rule name. +# The normalization process depends on rule tpe. +# +# Here's an example +# +# PublicSuffix::Rule.factory("*.google.com") +# # +# +# ## Rule Creation +# +# The best way to create a new rule is passing the rule name +# to the PublicSuffix::Rule.factory method. +# +# PublicSuffix::Rule.factory("com") +# # => PublicSuffix::Rule::Normal +# +# PublicSuffix::Rule.factory("*.com") +# # => PublicSuffix::Rule::Wildcard +# +# This method will detect the rule type and create an instance +# from the proper rule class. +# +# ## Rule Usage +# +# A rule describes the composition of a domain name and explains how to tokenize +# the name into tld, sld and trd. +# +# To use a rule, you first need to be sure the name you want to tokenize +# can be handled by the current rule. +# You can use the #match? method. +# +# rule = PublicSuffix::Rule.factory("com") +# +# rule.match?("google.com") +# # => true +# +# rule.match?("google.com") +# # => false +# +# Rule order is significant. A name can match more than one rule. +# See the {Public Suffix Documentation}[http://publicsuffix.org/format/] +# to learn more about rule priority. +# +# When you have the right rule, you can use it to tokenize the domain name. +# +# rule = PublicSuffix::Rule.factory("com") +# +# rule.decompose("google.com") +# # => ["google", "com"] +# +# rule.decompose("www.google.com") +# # => ["www.google", "com"] +# +# @abstract +# +# source://public_suffix//lib/public_suffix/rule.rb#102 class PublicSuffix::Rule::Base + # Initializes a new rule. + # + # @param value [String] + # @param private [Boolean] + # @return [Base] a new instance of Base + # + # source://public_suffix//lib/public_suffix/rule.rb#126 def initialize(value:, length: T.unsafe(nil), private: T.unsafe(nil)); end + # Checks whether this rule is equal to other. + # + # @param other [PublicSuffix::Rule::*] The rule to compare + # @return [Boolean] true if this rule and other are instances of the same class + # and has the same value, false otherwise. + # + # source://public_suffix//lib/public_suffix/rule.rb#137 def ==(other); end + + # @abstract + # @param domain [#to_s] The domain name to decompose + # @raise [NotImplementedError] + # @return [Array] + # + # source://public_suffix//lib/public_suffix/rule.rb#180 def decompose(*_arg0); end + + # Checks whether this rule is equal to other. + # + # @param other [PublicSuffix::Rule::*] The rule to compare + # @return [Boolean] true if this rule and other are instances of the same class + # and has the same value, false otherwise. + # + # source://public_suffix//lib/public_suffix/rule.rb#137 def eql?(other); end + + # @return [String] the length of the rule + # + # source://public_suffix//lib/public_suffix/rule.rb#108 def length; end + + # Checks if this rule matches +name+. + # + # A domain name is said to match a rule if and only if + # all of the following conditions are met: + # + # - When the domain and rule are split into corresponding labels, + # that the domain contains as many or more labels than the rule. + # - Beginning with the right-most labels of both the domain and the rule, + # and continuing for all labels in the rule, one finds that for every pair, + # either they are identical, or that the label from the rule is "*". + # + # @example + # PublicSuffix::Rule.factory("com").match?("example.com") + # # => true + # PublicSuffix::Rule.factory("com").match?("example.net") + # # => false + # @param name [String] the domain name to check + # @return [Boolean] + # @see https://publicsuffix.org/list/ + # + # source://public_suffix//lib/public_suffix/rule.rb#163 def match?(name); end + + # @abstract + # @raise [NotImplementedError] + # + # source://public_suffix//lib/public_suffix/rule.rb#173 def parts; end + + # @return [Boolean] true if the rule is a private domain + # + # source://public_suffix//lib/public_suffix/rule.rb#111 def private; end + + # @return [String] the rule definition + # + # source://public_suffix//lib/public_suffix/rule.rb#105 def value; end class << self + # Initializes a new rule from the content. + # + # @param content [String] the content of the rule + # @param private [Boolean] + # + # source://public_suffix//lib/public_suffix/rule.rb#118 def build(content, private: T.unsafe(nil)); end end end +# @api internal +# +# source://public_suffix//lib/public_suffix/rule.rb#25 class PublicSuffix::Rule::Entry < ::Struct + # Returns the value of attribute length + # + # @return [Object] the current value of length def length; end + + # Sets the attribute length + # + # @param value [Object] the value to set the attribute length to. + # @return [Object] the newly set value def length=(_); end + + # Returns the value of attribute private + # + # @return [Object] the current value of private def private; end + + # Sets the attribute private + # + # @param value [Object] the value to set the attribute private to. + # @return [Object] the newly set value def private=(_); end + + # Returns the value of attribute type + # + # @return [Object] the current value of type def type; end + + # Sets the attribute type + # + # @param value [Object] the value to set the attribute type to. + # @return [Object] the newly set value def type=(_); end class << self def [](*_arg0); end def inspect; end + def keyword_init?; end def members; end def new(*_arg0); end end end +# Exception represents an exception rule (e.g. !parliament.uk). +# +# source://public_suffix//lib/public_suffix/rule.rb#265 class PublicSuffix::Rule::Exception < ::PublicSuffix::Rule::Base + # Decomposes the domain name according to rule properties. + # + # @param domain [#to_s] The domain name to decompose + # @return [Array] The array with [trd + sld, tld]. + # + # source://public_suffix//lib/public_suffix/rule.rb#286 def decompose(domain); end + + # dot-split rule value and returns all rule parts + # in the order they appear in the value. + # The leftmost label is not considered a label. + # + # See http://publicsuffix.org/format/: + # If the prevailing rule is a exception rule, + # modify it by removing the leftmost label. + # + # @return [Array] + # + # source://public_suffix//lib/public_suffix/rule.rb#301 def parts; end + + # Gets the original rule definition. + # + # @return [String] The rule definition. + # + # source://public_suffix//lib/public_suffix/rule.rb#278 def rule; end class << self + # Initializes a new rule from the content. + # + # @param content [#to_s] the content of the rule + # @param private [Boolean] + # + # source://public_suffix//lib/public_suffix/rule.rb#271 def build(content, private: T.unsafe(nil)); end end end +# Normal represents a standard rule (e.g. com). +# +# source://public_suffix//lib/public_suffix/rule.rb#187 class PublicSuffix::Rule::Normal < ::PublicSuffix::Rule::Base + # Decomposes the domain name according to rule properties. + # + # @param domain [#to_s] The domain name to decompose + # @return [Array] The array with [trd + sld, tld]. + # + # source://public_suffix//lib/public_suffix/rule.rb#200 def decompose(domain); end + + # dot-split rule value and returns all rule parts + # in the order they appear in the value. + # + # @return [Array] + # + # source://public_suffix//lib/public_suffix/rule.rb#210 def parts; end + + # Gets the original rule definition. + # + # @return [String] The rule definition. + # + # source://public_suffix//lib/public_suffix/rule.rb#192 def rule; end end +# Wildcard represents a wildcard rule (e.g. *.co.uk). +# +# source://public_suffix//lib/public_suffix/rule.rb#217 class PublicSuffix::Rule::Wildcard < ::PublicSuffix::Rule::Base + # Initializes a new rule. + # + # @param value [String] + # @param length [Integer] + # @param private [Boolean] + # @return [Wildcard] a new instance of Wildcard + # + # source://public_suffix//lib/public_suffix/rule.rb#232 def initialize(value:, length: T.unsafe(nil), private: T.unsafe(nil)); end + # Decomposes the domain name according to rule properties. + # + # @param domain [#to_s] The domain name to decompose + # @return [Array] The array with [trd + sld, tld]. + # + # source://public_suffix//lib/public_suffix/rule.rb#248 def decompose(domain); end + + # dot-split rule value and returns all rule parts + # in the order they appear in the value. + # + # @return [Array] + # + # source://public_suffix//lib/public_suffix/rule.rb#258 def parts; end + + # Gets the original rule definition. + # + # @return [String] The rule definition. + # + # source://public_suffix//lib/public_suffix/rule.rb#240 def rule; end class << self + # Initializes a new rule from the content. + # + # @param content [String] the content of the rule + # @param private [Boolean] + # + # source://public_suffix//lib/public_suffix/rule.rb#223 def build(content, private: T.unsafe(nil)); end end end +# source://public_suffix//lib/public_suffix.rb#27 PublicSuffix::STAR = T.let(T.unsafe(nil), String) + +# @return [String] the current library version +# +# source://public_suffix//lib/public_suffix/version.rb#12 PublicSuffix::VERSION = T.let(T.unsafe(nil), String) diff --git a/Library/Homebrew/sorbet/rbi/gems/racc@1.7.3.rbi b/Library/Homebrew/sorbet/rbi/gems/racc@1.7.3.rbi index 0cf00c5926b7e1..c6c7c2deef162a 100644 --- a/Library/Homebrew/sorbet/rbi/gems/racc@1.7.3.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/racc@1.7.3.rbi @@ -4,641 +4,2016 @@ # This is an autogenerated file for types exported from the `racc` gem. # Please instead update this file by running `bin/tapioca gem racc`. -::APPLE_GEM_HOME = T.let(T.unsafe(nil), String) -::RUBY19 = T.let(T.unsafe(nil), TrueClass) -::RUBY_FRAMEWORK = T.let(T.unsafe(nil), TrueClass) -::RUBY_FRAMEWORK_VERSION = T.let(T.unsafe(nil), String) - +# source://racc//lib/racc/compat.rb#14 class Object < ::BasicObject - include ::ActiveSupport::ToJsonWithActiveSupportEncoder include ::ActiveSupport::ForkTracker::CoreExt - include ::ActiveSupport::ForkTracker::CoreExtPrivate include ::Kernel - include ::JSON::Ext::Generator::GeneratorMethods::Object include ::PP::ObjectMixin - include ::ActiveSupport::Tryable - include ::ActiveSupport::Dependencies::Loadable end +# source://racc//lib/racc/parser.rb#23 ParseError = Racc::ParseError +# source://racc//lib/racc/state.rb#924 class Racc::Accept + # source://racc//lib/racc/state.rb#925 def inspect; end end +# The table of LALR actions. Actions are either of +# Shift, Reduce, Accept and Error. +# +# source://racc//lib/racc/state.rb#811 class Racc::ActionTable + # @return [ActionTable] a new instance of ActionTable + # + # source://racc//lib/racc/state.rb#813 def initialize(rt, st); end + # Returns the value of attribute accept. + # + # source://racc//lib/racc/state.rb#874 def accept; end + + # source://racc//lib/racc/state.rb#851 def each_reduce(&block); end + + # source://racc//lib/racc/state.rb#870 def each_shift(&block); end + + # Returns the value of attribute error. + # + # source://racc//lib/racc/state.rb#875 def error; end + + # source://racc//lib/racc/state.rb#823 def init; end + + # source://racc//lib/racc/state.rb#838 def reduce(i); end + + # source://racc//lib/racc/state.rb#834 def reduce_n; end + + # source://racc//lib/racc/state.rb#859 def shift(i); end + + # source://racc//lib/racc/state.rb#855 def shift_n; end end +# source://racc//lib/racc/exception.rb#15 class Racc::CompileError < ::Racc::Error; end + +# source://racc//lib/racc/info.rb#17 Racc::Copyright = T.let(T.unsafe(nil), String) +# source://racc//lib/racc/debugflags.rb#15 class Racc::DebugFlags + # @return [DebugFlags] a new instance of DebugFlags + # + # source://racc//lib/racc/debugflags.rb#34 def initialize(parse = T.unsafe(nil), rule = T.unsafe(nil), token = T.unsafe(nil), state = T.unsafe(nil), la = T.unsafe(nil), prec = T.unsafe(nil), conf = T.unsafe(nil)); end + # @return [Boolean] + # + # source://racc//lib/racc/debugflags.rb#53 def any?; end + + # Returns the value of attribute la. + # + # source://racc//lib/racc/debugflags.rb#50 def la; end + + # Returns the value of attribute parse. + # + # source://racc//lib/racc/debugflags.rb#46 def parse; end + + # Returns the value of attribute prec. + # + # source://racc//lib/racc/debugflags.rb#51 def prec; end + + # Returns the value of attribute rule. + # + # source://racc//lib/racc/debugflags.rb#47 def rule; end + + # Returns the value of attribute state. + # + # source://racc//lib/racc/debugflags.rb#49 def state; end + + # Returns the value of attribute status_logging. + # + # source://racc//lib/racc/debugflags.rb#57 def status_logging; end + + # Returns the value of attribute token. + # + # source://racc//lib/racc/debugflags.rb#48 def token; end class << self + # source://racc//lib/racc/debugflags.rb#16 def parse_option_string(s); end end end +# source://racc//lib/racc/exception.rb#14 class Racc::Error < ::StandardError + # source://racc//lib/racc/state.rb#931 def inspect; end end +# Represents a transition on the grammar. +# "Real goto" means a transition by nonterminal, +# but this class treats also terminal's. +# If one is a terminal transition, .ident returns nil. +# +# source://racc//lib/racc/state.rb#767 class Racc::Goto + # @return [Goto] a new instance of Goto + # + # source://racc//lib/racc/state.rb#768 def initialize(ident, sym, from, to); end + # Returns the value of attribute from_state. + # + # source://racc//lib/racc/state.rb#777 def from_state; end + + # Returns the value of attribute ident. + # + # source://racc//lib/racc/state.rb#775 def ident; end + + # source://racc//lib/racc/state.rb#780 def inspect; end + + # Returns the value of attribute symbol. + # + # source://racc//lib/racc/state.rb#776 def symbol; end + + # Returns the value of attribute to_state. + # + # source://racc//lib/racc/state.rb#778 def to_state; end end +# source://racc//lib/racc/grammar.rb#22 class Racc::Grammar extend ::Forwardable + # @return [Grammar] a new instance of Grammar + # + # source://racc//lib/racc/grammar.rb#24 def initialize(debug_flags = T.unsafe(nil)); end + # source://racc//lib/racc/grammar.rb#40 def [](x); end + + # Grammar Definition Interface + # + # @raise [ArgumentError] + # + # source://racc//lib/racc/grammar.rb#166 def add(rule); end + + # @return [Boolean] + # + # source://racc//lib/racc/grammar.rb#171 def added?(sym); end + + # @raise [CompileError] + # + # source://racc//lib/racc/grammar.rb#180 def declare_precedence(assoc, syms); end + + # source://racc//lib/racc/grammar.rb#120 def dfa; end + + # source://racc//lib/racc/grammar.rb#44 def each(&block); end + + # source://racc//lib/racc/grammar.rb#50 def each_index(&block); end - def each_nonterminal(*args, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def each_nonterminal(*args, **_arg1, &block); end + + # source://racc//lib/racc/grammar.rb#44 def each_rule(&block); end - def each_symbol(*args, &block); end - def each_terminal(*args, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def each_symbol(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def each_terminal(*args, **_arg1, &block); end + + # source://racc//lib/racc/grammar.rb#92 def each_useless_nonterminal; end + + # source://racc//lib/racc/grammar.rb#108 def each_useless_rule; end + + # source://racc//lib/racc/grammar.rb#54 def each_with_index(&block); end + + # source://racc//lib/racc/grammar.rb#185 def end_precedence_declaration(reverse); end + + # Computation + # + # @raise [CompileError] + # + # source://racc//lib/racc/grammar.rb#409 def init; end + + # source://racc//lib/racc/grammar.rb#72 def intern(value, dummy = T.unsafe(nil)); end + + # Returns the value of attribute n_expected_srconflicts. + # + # source://racc//lib/racc/grammar.rb#38 def n_expected_srconflicts; end + + # Sets the attribute n_expected_srconflicts + # + # @param value the value to set the attribute n_expected_srconflicts to. + # + # source://racc//lib/racc/grammar.rb#38 def n_expected_srconflicts=(_arg0); end + + # source://racc//lib/racc/grammar.rb#88 def n_useless_nonterminals; end + + # source://racc//lib/racc/grammar.rb#104 def n_useless_rules; end + + # source://racc//lib/racc/grammar.rb#116 def nfa; end + + # source://racc//lib/racc/grammar.rb#80 def nonterminal_base; end + + # source://racc//lib/racc/grammar.rb#130 def parser_class; end + + # source://racc//lib/racc/grammar.rb#58 def size; end + + # Returns the value of attribute start. + # + # source://racc//lib/racc/grammar.rb#36 def start; end + + # @raise [CompileError] + # + # source://racc//lib/racc/grammar.rb#175 def start_symbol=(s); end + + # source://racc//lib/racc/grammar.rb#126 def state_transition_table; end + + # source://racc//lib/racc/grammar.rb#120 def states; end + + # source://racc//lib/racc/grammar.rb#76 def symbols; end + + # Returns the value of attribute symboltable. + # + # source://racc//lib/racc/grammar.rb#37 def symboltable; end + + # source://racc//lib/racc/grammar.rb#62 def to_s; end + + # @return [Boolean] + # + # source://racc//lib/racc/grammar.rb#84 def useless_nonterminal_exist?; end + + # @return [Boolean] + # + # source://racc//lib/racc/grammar.rb#100 def useless_rule_exist?; end + + # source://racc//lib/racc/grammar.rb#156 def write_log(path); end private + # source://racc//lib/racc/grammar.rb#504 def _compute_expand(t, set, lock); end + + # source://racc//lib/racc/grammar.rb#430 def add_start_rule; end + + # source://racc//lib/racc/grammar.rb#537 def check_rules_nullable(rules); end + + # source://racc//lib/racc/grammar.rb#578 def check_rules_useless(rules); end + + # source://racc//lib/racc/grammar.rb#550 def check_symbols_nullable(symbols); end + + # source://racc//lib/racc/grammar.rb#591 def check_symbols_useless(s); end + + # Sym#expand + # + # source://racc//lib/racc/grammar.rb#498 def compute_expand(t); end + + # Rule#hash + # + # source://racc//lib/racc/grammar.rb#449 def compute_hash; end + + # Sym#heads + # + # source://racc//lib/racc/grammar.rb#458 def compute_heads; end + + # Sym#locate + # + # source://racc//lib/racc/grammar.rb#483 def compute_locate; end + + # Sym#nullable?, Rule#nullable? + # + # source://racc//lib/racc/grammar.rb#524 def compute_nullable; end + + # Sym#self_null? + # + # source://racc//lib/racc/grammar.rb#472 def compute_nullable_0; end + + # Sym#useless?, Rule#useless? + # FIXME: what means "useless"? + # + # source://racc//lib/racc/grammar.rb#564 def compute_useless; end + + # Sym#terminal? + # + # source://racc//lib/racc/grammar.rb#465 def determine_terminals; end + + # Rule#ident + # LocationPointer#ident + # + # source://racc//lib/racc/grammar.rb#442 def fix_ident; end class << self + # Dynamic Generation Interface + # + # source://racc//lib/racc/grammar.rb#201 def define(&block); end end end +# source://racc//lib/racc/grammar.rb#207 class Racc::Grammar::DefinitionEnv + # @return [DefinitionEnv] a new instance of DefinitionEnv + # + # source://racc//lib/racc/grammar.rb#208 def initialize; end + # source://racc//lib/racc/grammar.rb#282 def _(&block); end + + # source://racc//lib/racc/grammar.rb#242 def _add(target, x); end + + # @return [Boolean] + # + # source://racc//lib/racc/grammar.rb#262 def _added?(sym); end + + # source://racc//lib/racc/grammar.rb#258 def _delayed_add(rule); end + + # source://racc//lib/racc/grammar.rb#321 def _intern(x); end + + # source://racc//lib/racc/grammar.rb#282 def action(&block); end + + # source://racc//lib/racc/grammar.rb#266 def flush_delayed; end + + # source://racc//lib/racc/grammar.rb#214 def grammar; end + + # source://racc//lib/racc/grammar.rb#296 def many(sym, &block); end + + # source://racc//lib/racc/grammar.rb#303 def many1(sym, &block); end + + # source://racc//lib/racc/grammar.rb#231 def method_missing(mid, *args, &block); end + + # source://racc//lib/racc/grammar.rb#278 def null(&block); end + + # source://racc//lib/racc/grammar.rb#290 def option(sym, default = T.unsafe(nil), &block); end + + # source://racc//lib/racc/grammar.rb#225 def precedence_table(&block); end + + # source://racc//lib/racc/grammar.rb#310 def separated_by(sep, sym, &block); end + + # source://racc//lib/racc/grammar.rb#314 def separated_by1(sep, sym, &block); end + + # source://racc//lib/racc/grammar.rb#274 def seq(*list, &block); end private + # source://racc//lib/racc/grammar.rb#334 def _defmetasyntax(type, id, action, &block); end + + # source://racc//lib/racc/grammar.rb#345 def _register(target_name); end + + # source://racc//lib/racc/grammar.rb#356 def _wrap(target_name, sym, block); end end +# source://racc//lib/racc/grammar.rb#365 class Racc::Grammar::PrecedenceDefinitionEnv + # @return [PrecedenceDefinitionEnv] a new instance of PrecedenceDefinitionEnv + # + # source://racc//lib/racc/grammar.rb#366 def initialize(g); end + # source://racc//lib/racc/grammar.rb#375 def higher; end + + # source://racc//lib/racc/grammar.rb#392 def left(*syms); end + + # source://racc//lib/racc/grammar.rb#382 def lower; end + + # source://racc//lib/racc/grammar.rb#400 def nonassoc(*syms); end + + # Returns the value of attribute reverse. + # + # source://racc//lib/racc/grammar.rb#373 def reverse; end + + # source://racc//lib/racc/grammar.rb#396 def right(*syms); end end +# An "indexed" set. All items must respond to :ident. +# +# source://racc//lib/racc/iset.rb#16 class Racc::ISet + # @return [ISet] a new instance of ISet + # + # source://racc//lib/racc/iset.rb#18 def initialize(a = T.unsafe(nil)); end + # source://racc//lib/racc/iset.rb#28 def [](key); end + + # source://racc//lib/racc/iset.rb#32 def []=(key, val); end + + # source://racc//lib/racc/iset.rb#24 def add(i); end + + # source://racc//lib/racc/iset.rb#82 def clear; end + + # source://racc//lib/racc/iset.rb#54 def delete(key); end + + # source://racc//lib/racc/iset.rb#86 def dup; end + + # source://racc//lib/racc/iset.rb#60 def each(&block); end + + # @return [Boolean] + # + # source://racc//lib/racc/iset.rb#78 def empty?; end + + # source://racc//lib/racc/iset.rb#28 def include?(key); end + + # source://racc//lib/racc/iset.rb#68 def inspect; end + + # source://racc//lib/racc/iset.rb#28 def key?(key); end + + # Returns the value of attribute set. + # + # source://racc//lib/racc/iset.rb#22 def set; end + + # source://racc//lib/racc/iset.rb#74 def size; end + + # source://racc//lib/racc/iset.rb#64 def to_a; end + + # source://racc//lib/racc/iset.rb#68 def to_s; end + + # source://racc//lib/racc/iset.rb#39 def update(other); end + + # source://racc//lib/racc/iset.rb#49 def update_a(a); end end +# LALR item. A set of rule and its lookahead tokens. +# +# source://racc//lib/racc/state.rb#787 class Racc::Item + # @return [Item] a new instance of Item + # + # source://racc//lib/racc/state.rb#788 def initialize(rule, la); end + # source://racc//lib/racc/state.rb#796 def each_la(tbl); end + + # Returns the value of attribute la. + # + # source://racc//lib/racc/state.rb#794 def la; end + + # Returns the value of attribute rule. + # + # source://racc//lib/racc/state.rb#793 def rule; end end +# A set of rule and position in it's RHS. +# Note that the number of pointers is more than rule's RHS array, +# because pointer points right edge of the final symbol when reducing. +# +# source://racc//lib/racc/grammar.rb#812 class Racc::LocationPointer + # @return [LocationPointer] a new instance of LocationPointer + # + # source://racc//lib/racc/grammar.rb#814 def initialize(rule, i, sym); end + # @return [Boolean] + # + # source://racc//lib/racc/grammar.rb#840 def ==(ot); end + + # source://racc//lib/racc/grammar.rb#856 def before(len); end + + # Returns the value of attribute symbol. + # + # source://racc//lib/racc/grammar.rb#824 def dereference; end + + # @return [Boolean] + # + # source://racc//lib/racc/grammar.rb#840 def eql?(ot); end + + # Returns the value of attribute ident. + # + # source://racc//lib/racc/grammar.rb#828 def hash; end + + # @return [Boolean] + # + # source://racc//lib/racc/grammar.rb#846 def head?; end + + # Returns the value of attribute ident. + # + # source://racc//lib/racc/grammar.rb#828 def ident; end + + # source://racc//lib/racc/grammar.rb#850 def increment; end + + # Returns the value of attribute index. + # + # source://racc//lib/racc/grammar.rb#823 def index; end + + # source://racc//lib/racc/grammar.rb#833 def inspect; end + + # source://racc//lib/racc/grammar.rb#850 def next; end + + # Returns the value of attribute reduce. + # + # source://racc//lib/racc/grammar.rb#830 def reduce; end + + # Returns the value of attribute reduce. + # + # source://racc//lib/racc/grammar.rb#830 def reduce?; end + + # Returns the value of attribute rule. + # + # source://racc//lib/racc/grammar.rb#822 def rule; end + + # Returns the value of attribute symbol. + # + # source://racc//lib/racc/grammar.rb#824 def symbol; end + + # source://racc//lib/racc/grammar.rb#833 def to_s; end private + # source://racc//lib/racc/grammar.rb#862 def ptr_bug!; end end +# source://racc//lib/racc/logfilegenerator.rb#15 class Racc::LogFileGenerator + # @return [LogFileGenerator] a new instance of LogFileGenerator + # + # source://racc//lib/racc/logfilegenerator.rb#17 def initialize(states, debug_flags = T.unsafe(nil)); end + # source://racc//lib/racc/logfilegenerator.rb#92 def action_out(f, state); end + + # source://racc//lib/racc/logfilegenerator.rb#133 def outact(f, t, act); end + + # source://racc//lib/racc/logfilegenerator.rb#23 def output(out); end + + # Warnings + # + # source://racc//lib/racc/logfilegenerator.rb#35 def output_conflict(out); end + + # Rules + # + # source://racc//lib/racc/logfilegenerator.rb#170 def output_rule(out); end + + # States + # + # source://racc//lib/racc/logfilegenerator.rb#66 def output_state(out); end + + # Tokens + # + # source://racc//lib/racc/logfilegenerator.rb#184 def output_token(out); end + + # source://racc//lib/racc/logfilegenerator.rb#48 def output_useless(out); end + + # source://racc//lib/racc/logfilegenerator.rb#158 def outrrconf(f, confs); end + + # source://racc//lib/racc/logfilegenerator.rb#150 def outsrconf(f, confs); end + + # source://racc//lib/racc/logfilegenerator.rb#82 def pointer_out(out, ptr); end + + # source://racc//lib/racc/logfilegenerator.rb#206 def symbol_locations(locs); end end +# source://racc//lib/racc/grammar.rb#775 class Racc::OrMark + # @return [OrMark] a new instance of OrMark + # + # source://racc//lib/racc/grammar.rb#776 def initialize(lineno); end + # source://racc//lib/racc/grammar.rb#780 def inspect; end + + # Returns the value of attribute lineno. + # + # source://racc//lib/racc/grammar.rb#786 def lineno; end + + # source://racc//lib/racc/grammar.rb#780 def name; end end +# source://racc//lib/racc/parser.rb#188 class Racc::Parser + # source://racc//lib/racc/parser.rb#283 def _racc_do_parse_rb(arg, in_debug); end + + # source://racc//lib/racc/parser.rb#483 def _racc_do_reduce(arg, act); end + + # common + # + # source://racc//lib/racc/parser.rb#386 def _racc_evalact(act, arg); end + + # source://racc//lib/racc/parser.rb#236 def _racc_init_sysvars; end + + # source://racc//lib/racc/parser.rb#224 def _racc_setup; end + + # source://racc//lib/racc/parser.rb#333 def _racc_yyparse_rb(recv, mid, arg, c_debug); end + + # source://racc//lib/racc/parser.rb#266 def do_parse; end + + # The method to fetch next token. + # If you use #do_parse method, you must implement #next_token. + # + # The format of return value is [TOKEN_SYMBOL, VALUE]. + # +token-symbol+ is represented by Ruby's symbol by default, e.g. :IDENT + # for 'IDENT'. ";" (String) for ';'. + # + # The final symbol (End of file) must be false. + # + # @raise [NotImplementedError] + # + # source://racc//lib/racc/parser.rb#279 def next_token; end + + # This method is called when a parse error is found. + # + # ERROR_TOKEN_ID is an internal ID of token which caused error. + # You can get string representation of this ID by calling + # #token_to_str. + # + # ERROR_VALUE is a value of error token. + # + # value_stack is a stack of symbol values. + # DO NOT MODIFY this object. + # + # This method raises ParseError by default. + # + # If this method returns, parsers enter "error recovering mode". + # + # @raise [ParseError] + # + # source://racc//lib/racc/parser.rb#539 def on_error(t, val, vstack); end + + # source://racc//lib/racc/parser.rb#588 def racc_accept; end + + # source://racc//lib/racc/parser.rb#593 def racc_e_pop(state, tstack, vstack); end + + # source://racc//lib/racc/parser.rb#600 def racc_next_state(curstate, state); end + + # source://racc//lib/racc/parser.rb#606 def racc_print_stacks(t, v); end + + # source://racc//lib/racc/parser.rb#615 def racc_print_states(s); end + + # For debugging output + # + # source://racc//lib/racc/parser.rb#562 def racc_read_token(t, tok, val); end + + # source://racc//lib/racc/parser.rb#575 def racc_reduce(toks, sim, tstack, vstack); end + + # source://racc//lib/racc/parser.rb#569 def racc_shift(tok, tstack, vstack); end + + # source://racc//lib/racc/parser.rb#622 def racc_token2str(tok); end + + # Convert internal ID of token symbol to the string. + # + # source://racc//lib/racc/parser.rb#628 def token_to_str(t); end + + # Exit parser. + # Return value is +Symbol_Value_Stack[0]+. + # + # source://racc//lib/racc/parser.rb#552 def yyaccept; end + + # Leave error recovering mode. + # + # source://racc//lib/racc/parser.rb#557 def yyerrok; end + + # Enter error recovering mode. + # This method does not call #on_error. + # + # source://racc//lib/racc/parser.rb#546 def yyerror; end + + # source://racc//lib/racc/parser.rb#328 def yyparse(recv, mid); end class << self + # source://racc//lib/racc/parser.rb#220 def racc_runtime_type; end end end +# source://racc//lib/racc/parser.rb#209 Racc::Parser::Racc_Main_Parsing_Routine = T.let(T.unsafe(nil), Symbol) + Racc::Parser::Racc_Runtime_Core_Id_C = T.let(T.unsafe(nil), String) + +# source://racc//lib/racc/parser.rb#211 Racc::Parser::Racc_Runtime_Core_Version = T.let(T.unsafe(nil), String) + Racc::Parser::Racc_Runtime_Core_Version_C = T.let(T.unsafe(nil), String) + +# source://racc//lib/racc/parser.rb#191 Racc::Parser::Racc_Runtime_Core_Version_R = T.let(T.unsafe(nil), String) + +# source://racc//lib/racc/parser.rb#212 Racc::Parser::Racc_Runtime_Type = T.let(T.unsafe(nil), String) + +# source://racc//lib/racc/parser.rb#190 Racc::Parser::Racc_Runtime_Version = T.let(T.unsafe(nil), String) + +# source://racc//lib/racc/parser.rb#210 Racc::Parser::Racc_YY_Parse_Method = T.let(T.unsafe(nil), Symbol) +# source://racc//lib/racc/statetransitiontable.rb#261 class Racc::ParserClassGenerator + # @return [ParserClassGenerator] a new instance of ParserClassGenerator + # + # source://racc//lib/racc/statetransitiontable.rb#263 def initialize(states); end + # source://racc//lib/racc/statetransitiontable.rb#268 def generate; end private + # source://racc//lib/racc/statetransitiontable.rb#293 def define_actions(c); end end +# source://racc//lib/racc/grammar.rb#790 class Racc::Prec + # @return [Prec] a new instance of Prec + # + # source://racc//lib/racc/grammar.rb#791 def initialize(symbol, lineno); end + # source://racc//lib/racc/grammar.rb#796 def inspect; end + + # Returns the value of attribute lineno. + # + # source://racc//lib/racc/grammar.rb#803 def lineno; end + + # source://racc//lib/racc/grammar.rb#796 def name; end + + # Returns the value of attribute symbol. + # + # source://racc//lib/racc/grammar.rb#802 def symbol; end end +# source://racc//lib/racc/state.rb#953 class Racc::RRconflict + # @return [RRconflict] a new instance of RRconflict + # + # source://racc//lib/racc/state.rb#954 def initialize(sid, high, low, tok); end + # Returns the value of attribute high_prec. + # + # source://racc//lib/racc/state.rb#962 def high_prec; end + + # Returns the value of attribute low_prec. + # + # source://racc//lib/racc/state.rb#963 def low_prec; end + + # Returns the value of attribute stateid. + # + # source://racc//lib/racc/state.rb#961 def stateid; end + + # source://racc//lib/racc/state.rb#966 def to_s; end + + # Returns the value of attribute token. + # + # source://racc//lib/racc/state.rb#964 def token; end end +# source://racc//lib/racc/parser.rb#185 +Racc::Racc_No_Extensions = T.let(T.unsafe(nil), FalseClass) + +# source://racc//lib/racc/state.rb#897 class Racc::Reduce + # @return [Reduce] a new instance of Reduce + # + # source://racc//lib/racc/state.rb#898 def initialize(rule); end + # source://racc//lib/racc/state.rb#918 def decref; end + + # source://racc//lib/racc/state.rb#914 def incref; end + + # source://racc//lib/racc/state.rb#910 def inspect; end + + # Returns the value of attribute refn. + # + # source://racc//lib/racc/state.rb#904 def refn; end + + # Returns the value of attribute rule. + # + # source://racc//lib/racc/state.rb#903 def rule; end + + # source://racc//lib/racc/state.rb#906 def ruleid; end end +# source://racc//lib/racc/grammar.rb#606 class Racc::Rule + # @return [Rule] a new instance of Rule + # + # source://racc//lib/racc/grammar.rb#608 def initialize(target, syms, act); end + # source://racc//lib/racc/grammar.rb#687 def ==(other); end + + # source://racc//lib/racc/grammar.rb#691 def [](idx); end + + # @return [Boolean] + # + # source://racc//lib/racc/grammar.rb#707 def accept?; end + + # Returns the value of attribute action. + # + # source://racc//lib/racc/grammar.rb#625 def action; end + + # source://racc//lib/racc/grammar.rb#715 def each(&block); end + + # @yield [_self] + # @yieldparam _self [Racc::Rule] the object that the method was called on + # + # source://racc//lib/racc/grammar.rb#636 def each_rule(&block); end + + # @return [Boolean] + # + # source://racc//lib/racc/grammar.rb#699 def empty?; end + + # Returns the value of attribute hash. + # + # source://racc//lib/racc/grammar.rb#643 def hash; end + + # source://racc//lib/racc/grammar.rb#646 def hash=(n); end + + # Returns the value of attribute ident. + # + # source://racc//lib/racc/grammar.rb#641 def ident; end + + # Sets the attribute ident + # + # @param value the value to set the attribute ident to. + # + # source://racc//lib/racc/grammar.rb#641 def ident=(_arg0); end + + # source://racc//lib/racc/grammar.rb#683 def inspect; end + + # source://racc//lib/racc/grammar.rb#678 def null=(n); end + + # @return [Boolean] + # + # source://racc//lib/racc/grammar.rb#677 def nullable?; end + + # source://racc//lib/racc/grammar.rb#664 def prec(sym, &block); end + + # source://racc//lib/racc/grammar.rb#656 def precedence; end + + # source://racc//lib/racc/grammar.rb#660 def precedence=(sym); end + + # Returns the value of attribute ptrs. + # + # source://racc//lib/racc/grammar.rb#644 def ptrs; end + + # source://racc//lib/racc/grammar.rb#719 def replace(src, dest); end + + # source://racc//lib/racc/grammar.rb#632 def rule; end + + # source://racc//lib/racc/grammar.rb#695 def size; end + + # Returns the value of attribute specified_prec. + # + # source://racc//lib/racc/grammar.rb#675 def specified_prec; end + + # Sets the attribute specified_prec + # + # @param value the value to set the attribute specified_prec to. + # + # source://racc//lib/racc/grammar.rb#675 def specified_prec=(_arg0); end + + # Returns the value of attribute symbols. + # + # source://racc//lib/racc/grammar.rb#624 def symbols; end + + # Returns the value of attribute target. + # + # source://racc//lib/racc/grammar.rb#623 def target; end + + # Sets the attribute target + # + # @param value the value to set the attribute target to. + # + # source://racc//lib/racc/grammar.rb#623 def target=(_arg0); end + + # source://racc//lib/racc/grammar.rb#703 def to_s; end + + # source://racc//lib/racc/grammar.rb#681 def useless=(u); end + + # @return [Boolean] + # + # source://racc//lib/racc/grammar.rb#680 def useless?; end + + # source://racc//lib/racc/grammar.rb#627 def |(x); end end +# source://racc//lib/racc/state.rb#936 class Racc::SRconflict + # @return [SRconflict] a new instance of SRconflict + # + # source://racc//lib/racc/state.rb#937 def initialize(sid, shift, reduce); end + # Returns the value of attribute reduce. + # + # source://racc//lib/racc/state.rb#945 def reduce; end + + # Returns the value of attribute shift. + # + # source://racc//lib/racc/state.rb#944 def shift; end + + # Returns the value of attribute stateid. + # + # source://racc//lib/racc/state.rb#943 def stateid; end + + # source://racc//lib/racc/state.rb#947 def to_s; end end +# source://racc//lib/racc/state.rb#880 class Racc::Shift + # @return [Shift] a new instance of Shift + # + # source://racc//lib/racc/state.rb#881 def initialize(goto); end + # source://racc//lib/racc/state.rb#887 def goto_id; end + + # Returns the value of attribute goto_state. + # + # source://racc//lib/racc/state.rb#885 def goto_state; end + + # source://racc//lib/racc/state.rb#891 def inspect; end end +# source://racc//lib/racc/sourcetext.rb#15 class Racc::SourceText + # @return [SourceText] a new instance of SourceText + # + # source://racc//lib/racc/sourcetext.rb#16 def initialize(text, filename, lineno); end + # Returns the value of attribute filename. + # + # source://racc//lib/racc/sourcetext.rb#23 def filename; end + + # Returns the value of attribute lineno. + # + # source://racc//lib/racc/sourcetext.rb#24 def lineno; end + + # source://racc//lib/racc/sourcetext.rb#30 def location; end + + # Returns the value of attribute text. + # + # source://racc//lib/racc/sourcetext.rb#22 def text; end + + # source://racc//lib/racc/sourcetext.rb#26 def to_s; end end +# A LALR state. +# +# source://racc//lib/racc/state.rb#607 class Racc::State + # @return [State] a new instance of State + # + # source://racc//lib/racc/state.rb#609 def initialize(ident, core); end + # source://racc//lib/racc/state.rb#650 def ==(oth); end + + # Returns the value of attribute action. + # + # source://racc//lib/racc/state.rb#638 def action; end + + # source://racc//lib/racc/state.rb#667 def check_la(la_rules); end + + # Returns the value of attribute closure. + # + # source://racc//lib/racc/state.rb#629 def closure; end + + # @return [Boolean] + # + # source://racc//lib/racc/state.rb#701 def conflict?; end + + # Returns the value of attribute core. + # + # source://racc//lib/racc/state.rb#628 def core; end + + # default action + # + # source://racc//lib/racc/state.rb#639 def defact; end + + # default action + # + # source://racc//lib/racc/state.rb#639 def defact=(_arg0); end + + # source://racc//lib/racc/state.rb#650 def eql?(oth); end + + # Returns the value of attribute goto_table. + # + # source://racc//lib/racc/state.rb#631 def goto_table; end + + # Returns the value of attribute gotos. + # + # source://racc//lib/racc/state.rb#632 def gotos; end + + # Returns the value of attribute ident. + # + # source://racc//lib/racc/state.rb#624 def hash; end + + # Returns the value of attribute ident. + # + # source://racc//lib/racc/state.rb#624 def ident; end + + # source://racc//lib/racc/state.rb#644 def inspect; end + + # source://racc//lib/racc/state.rb#718 def la=(la); end + + # source://racc//lib/racc/state.rb#656 def make_closure(core); end + + # source://racc//lib/racc/state.rb#754 def n_rrconflicts; end + + # source://racc//lib/racc/state.rb#750 def n_srconflicts; end + + # Returns the value of attribute ritems. + # + # source://racc//lib/racc/state.rb#635 def ritems; end + + # source://racc//lib/racc/state.rb#728 def rr_conflict(high, low, ctok); end + + # Returns the value of attribute rrconf. + # + # source://racc//lib/racc/state.rb#641 def rrconf; end + + # source://racc//lib/racc/state.rb#705 def rruleid(rule); end + + # Returns the value of attribute rrules. + # + # source://racc//lib/racc/state.rb#636 def rrules; end + + # source://racc//lib/racc/state.rb#739 def sr_conflict(shift, reduce); end + + # Returns the value of attribute srconf. + # + # source://racc//lib/racc/state.rb#642 def srconf; end + + # Returns the value of attribute ident. + # + # source://racc//lib/racc/state.rb#624 def stateid; end + + # Returns the value of attribute stokens. + # + # source://racc//lib/racc/state.rb#634 def stokens; end + + # source://racc//lib/racc/state.rb#644 def to_s; end end +# reopen +# +# source://racc//lib/racc/statetransitiontable.rb#17 class Racc::StateTransitionTable < ::Struct + # @return [StateTransitionTable] a new instance of StateTransitionTable + # + # source://racc//lib/racc/statetransitiontable.rb#38 def initialize(states); end + # Returns the value of attribute action_check + # + # @return [Object] the current value of action_check def action_check; end + + # Sets the attribute action_check + # + # @param value [Object] the value to set the attribute action_check to. + # @return [Object] the newly set value def action_check=(_); end + + # Returns the value of attribute action_default + # + # @return [Object] the current value of action_default def action_default; end + + # Sets the attribute action_default + # + # @param value [Object] the value to set the attribute action_default to. + # @return [Object] the newly set value def action_default=(_); end + + # Returns the value of attribute action_pointer + # + # @return [Object] the current value of action_pointer def action_pointer; end + + # Sets the attribute action_pointer + # + # @param value [Object] the value to set the attribute action_pointer to. + # @return [Object] the newly set value def action_pointer=(_); end + + # Returns the value of attribute action_table + # + # @return [Object] the current value of action_table def action_table; end + + # Sets the attribute action_table + # + # @param value [Object] the value to set the attribute action_table to. + # @return [Object] the newly set value def action_table=(_); end + + # Returns the value of attribute debug_parser + # + # @return [Object] the current value of debug_parser def debug_parser; end + + # Sets the attribute debug_parser + # + # @param value [Object] the value to set the attribute debug_parser to. + # @return [Object] the newly set value def debug_parser=(_); end + + # Returns the value of attribute goto_check + # + # @return [Object] the current value of goto_check def goto_check; end + + # Sets the attribute goto_check + # + # @param value [Object] the value to set the attribute goto_check to. + # @return [Object] the newly set value def goto_check=(_); end + + # Returns the value of attribute goto_default + # + # @return [Object] the current value of goto_default def goto_default; end + + # Sets the attribute goto_default + # + # @param value [Object] the value to set the attribute goto_default to. + # @return [Object] the newly set value def goto_default=(_); end + + # Returns the value of attribute goto_pointer + # + # @return [Object] the current value of goto_pointer def goto_pointer; end + + # Sets the attribute goto_pointer + # + # @param value [Object] the value to set the attribute goto_pointer to. + # @return [Object] the newly set value def goto_pointer=(_); end + + # Returns the value of attribute goto_table + # + # @return [Object] the current value of goto_table def goto_table; end + + # Sets the attribute goto_table + # + # @param value [Object] the value to set the attribute goto_table to. + # @return [Object] the newly set value def goto_table=(_); end + + # Returns the value of attribute grammar. + # + # source://racc//lib/racc/statetransitiontable.rb#47 def grammar; end + + # Returns the value of attribute nt_base + # + # @return [Object] the current value of nt_base def nt_base; end + + # Sets the attribute nt_base + # + # @param value [Object] the value to set the attribute nt_base to. + # @return [Object] the newly set value def nt_base=(_); end + + # source://racc//lib/racc/statetransitiontable.rb#49 def parser_class; end + + # Returns the value of attribute reduce_n + # + # @return [Object] the current value of reduce_n def reduce_n; end + + # Sets the attribute reduce_n + # + # @param value [Object] the value to set the attribute reduce_n to. + # @return [Object] the newly set value def reduce_n=(_); end + + # Returns the value of attribute reduce_table + # + # @return [Object] the current value of reduce_table def reduce_table; end + + # Sets the attribute reduce_table + # + # @param value [Object] the value to set the attribute reduce_table to. + # @return [Object] the newly set value def reduce_table=(_); end + + # Returns the value of attribute shift_n + # + # @return [Object] the current value of shift_n def shift_n; end + + # Sets the attribute shift_n + # + # @param value [Object] the value to set the attribute shift_n to. + # @return [Object] the newly set value def shift_n=(_); end + + # Returns the value of attribute states. + # + # source://racc//lib/racc/statetransitiontable.rb#46 def states; end + + # Returns the value of attribute token_table + # + # @return [Object] the current value of token_table def token_table; end + + # Sets the attribute token_table + # + # @param value [Object] the value to set the attribute token_table to. + # @return [Object] the newly set value def token_table=(_); end + + # Returns the value of attribute token_to_s_table + # + # @return [Object] the current value of token_to_s_table def token_to_s_table; end + + # Sets the attribute token_to_s_table + # + # @param value [Object] the value to set the attribute token_to_s_table to. + # @return [Object] the newly set value def token_to_s_table=(_); end + + # source://racc//lib/racc/statetransitiontable.rb#53 def token_value_table; end + + # Returns the value of attribute use_result_var + # + # @return [Object] the current value of use_result_var def use_result_var; end + + # Sets the attribute use_result_var + # + # @param value [Object] the value to set the attribute use_result_var to. + # @return [Object] the newly set value def use_result_var=(_); end class << self def [](*_arg0); end + + # source://racc//lib/racc/statetransitiontable.rb#34 def generate(states); end + def inspect; end + def keyword_init?; end def members; end def new(*_arg0); end end end +# source://racc//lib/racc/statetransitiontable.rb#63 class Racc::StateTransitionTableGenerator + # @return [StateTransitionTableGenerator] a new instance of StateTransitionTableGenerator + # + # source://racc//lib/racc/statetransitiontable.rb#65 def initialize(states); end + # source://racc//lib/racc/statetransitiontable.rb#247 def act2actid(act); end + + # source://racc//lib/racc/statetransitiontable.rb#169 def addent(all, arr, chkval, ptr); end + + # source://racc//lib/racc/statetransitiontable.rb#105 def gen_action_tables(t, states); end + + # source://racc//lib/racc/statetransitiontable.rb#127 def gen_goto_tables(t, grammar); end + + # source://racc//lib/racc/statetransitiontable.rb#70 def generate; end + + # source://racc//lib/racc/statetransitiontable.rb#191 def mkmapexp(arr); end + + # source://racc//lib/racc/statetransitiontable.rb#83 def reduce_table(grammar); end + + # source://racc//lib/racc/statetransitiontable.rb#222 def set_table(entries, dummy, tbl, chk, ptr); end + + # source://racc//lib/racc/statetransitiontable.rb#97 def token_table(grammar); end end +# source://racc//lib/racc/statetransitiontable.rb#185 Racc::StateTransitionTableGenerator::RE_DUP_MAX = T.let(T.unsafe(nil), Integer) +# A table of LALR states. +# +# source://racc//lib/racc/state.rb#21 class Racc::States include ::Enumerable extend ::Forwardable + # @return [States] a new instance of States + # + # source://racc//lib/racc/state.rb#25 def initialize(grammar, debug_flags = T.unsafe(nil)); end + # source://racc//lib/racc/state.rb#51 def [](i); end + + # Returns the value of attribute actions. + # + # source://racc//lib/racc/state.rb#39 def actions; end + + # source://racc//lib/racc/state.rb#196 def dfa; end + + # source://racc//lib/racc/state.rb#55 def each(&block); end + + # source://racc//lib/racc/state.rb#61 def each_index(&block); end + + # source://racc//lib/racc/state.rb#55 def each_state(&block); end + + # Returns the value of attribute grammar. + # + # source://racc//lib/racc/state.rb#38 def grammar; end + + # source://racc//lib/racc/state.rb#45 def inspect; end + + # source://racc//lib/racc/state.rb#88 def n_rrconflicts; end + + # source://racc//lib/racc/state.rb#80 def n_srconflicts; end + + # source://racc//lib/racc/state.rb#102 def nfa; end - def nt_base(*args, &block); end - def reduce_n(*args, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def nt_base(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def reduce_n(*args, **_arg1, &block); end + + # @return [Boolean] + # + # source://racc//lib/racc/state.rb#84 def rrconflict_exist?; end - def shift_n(*args, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def shift_n(*args, **_arg1, &block); end + + # @return [Boolean] + # + # source://racc//lib/racc/state.rb#71 def should_report_srconflict?; end + + # source://racc//lib/racc/state.rb#41 def size; end + + # @return [Boolean] + # + # source://racc//lib/racc/state.rb#76 def srconflict_exist?; end + + # source://racc//lib/racc/state.rb#92 def state_transition_table; end + + # source://racc//lib/racc/state.rb#45 def to_s; end private + # source://racc//lib/racc/state.rb#317 def addrel(tbl, i, item); end + + # source://racc//lib/racc/state.rb#154 def addsym(table, sym, ptr); end + + # source://racc//lib/racc/state.rb#586 def check_useless; end + + # source://racc//lib/racc/state.rb#206 def compute_dfa; end + + # source://racc//lib/racc/state.rb#111 def compute_nfa; end + + # source://racc//lib/racc/state.rb#161 def core_to_state(core); end + + # source://racc//lib/racc/state.rb#313 def create_tmap(size); end + + # source://racc//lib/racc/state.rb#348 def digraph(map, relation); end + + # source://racc//lib/racc/state.rb#523 def do_resolve_sr(stok, rtok); end + + # source://racc//lib/racc/state.rb#422 def each_t(tbl, set); end + + # source://racc//lib/racc/state.rb#186 def fingerprint(arr); end + + # source://racc//lib/racc/state.rb#125 def generate_states(state); end + + # source://racc//lib/racc/state.rb#219 def lookahead; end + + # source://racc//lib/racc/state.rb#564 def pack(state); end + + # for debug + # + # source://racc//lib/racc/state.rb#390 def print_atab(idx, tab); end + + # source://racc//lib/racc/state.rb#397 def print_tab(idx, rel, tab); end + + # for debug + # + # source://racc//lib/racc/state.rb#407 def print_tab_i(idx, rel, tab, i); end + + # for debug + # + # source://racc//lib/racc/state.rb#415 def printb(i); end + + # source://racc//lib/racc/state.rb#325 def record_path(begst, rule); end + + # resolve + # + # source://racc//lib/racc/state.rb#436 def resolve(state); end + + # source://racc//lib/racc/state.rb#453 def resolve_rr(state, r); end + + # source://racc//lib/racc/state.rb#472 def resolve_sr(state, s); end + + # complete + # + # source://racc//lib/racc/state.rb#553 def set_accept; end + + # source://racc//lib/racc/state.rb#336 def transpose(rel); end + + # source://racc//lib/racc/state.rb#361 def traverse(i, index, vertices, map, relation); end end +# source://racc//lib/racc/state.rb#517 Racc::States::ASSOC = T.let(T.unsafe(nil), Hash) +# Stands terminal and nonterminal symbols. +# +# source://racc//lib/racc/grammar.rb#972 class Racc::Sym + # @return [Sym] a new instance of Sym + # + # source://racc//lib/racc/grammar.rb#974 def initialize(value, dummyp); end + # Returns the value of attribute assoc. + # + # source://racc//lib/racc/grammar.rb#1064 def assoc; end + + # Sets the attribute assoc + # + # @param value the value to set the attribute assoc to. + # + # source://racc//lib/racc/grammar.rb#1064 def assoc=(_arg0); end + + # @return [Boolean] + # + # source://racc//lib/racc/grammar.rb#1027 def dummy?; end + + # Returns the value of attribute expand. + # + # source://racc//lib/racc/grammar.rb#1101 def expand; end + def expand=(v); end + + # Returns the value of attribute ident. + # + # source://racc//lib/racc/grammar.rb#1021 def hash; end + + # cache + # + # source://racc//lib/racc/grammar.rb#1084 def heads; end + + # Returns the value of attribute ident. + # + # source://racc//lib/racc/grammar.rb#1021 def ident; end + def ident=(v); end + + # source://racc//lib/racc/grammar.rb#1066 def inspect; end + + # Returns the value of attribute locate. + # + # source://racc//lib/racc/grammar.rb#1085 def locate; end + + # @return [Boolean] + # + # source://racc//lib/racc/grammar.rb#1035 def nonterminal?; end + + # source://racc//lib/racc/grammar.rb#1097 def null=(n); end + + # @return [Boolean] + # + # source://racc//lib/racc/grammar.rb#1093 def nullable?; end + + # Returns the value of attribute precedence. + # + # source://racc//lib/racc/grammar.rb#1063 def precedence; end + + # Sets the attribute precedence + # + # @param value the value to set the attribute precedence to. + # + # source://racc//lib/racc/grammar.rb#1063 def precedence=(_arg0); end + + # source://racc//lib/racc/grammar.rb#1076 def rule; end + + # @return [Boolean] + # + # source://racc//lib/racc/grammar.rb#1087 def self_null?; end + + # source://racc//lib/racc/grammar.rb#1057 def serialize; end + + # Sets the attribute serialized + # + # @param value the value to set the attribute serialized to. + # + # source://racc//lib/racc/grammar.rb#1061 def serialized=(_arg0); end + + # source://racc//lib/racc/grammar.rb#1045 def should_terminal; end + + # @return [Boolean] + # + # source://racc//lib/racc/grammar.rb#1049 def should_terminal?; end + def snull=(v); end + + # @return [Boolean] + # + # source://racc//lib/racc/grammar.rb#1053 def string_symbol?; end + + # source://racc//lib/racc/grammar.rb#1039 def term=(t); end + + # @return [Boolean] + # + # source://racc//lib/racc/grammar.rb#1031 def terminal?; end + + # source://racc//lib/racc/grammar.rb#1066 def to_s; end + + # source://racc//lib/racc/grammar.rb#1108 def useless=(f); end + + # @return [Boolean] + # + # source://racc//lib/racc/grammar.rb#1104 def useless?; end + + # Returns the value of attribute value. + # + # source://racc//lib/racc/grammar.rb#1025 def value; end + + # source://racc//lib/racc/grammar.rb#1072 def |(x); end class << self + # source://racc//lib/racc/grammar.rb#1009 def once_writer(nm); end end end +# source://racc//lib/racc/grammar.rb#869 class Racc::SymbolTable include ::Enumerable + # @return [SymbolTable] a new instance of SymbolTable + # + # source://racc//lib/racc/grammar.rb#873 def initialize; end + # source://racc//lib/racc/grammar.rb#885 def [](id); end + + # Returns the value of attribute anchor. + # + # source://racc//lib/racc/grammar.rb#882 def anchor; end + + # source://racc//lib/racc/grammar.rb#901 def delete(sym); end + + # Returns the value of attribute dummy. + # + # source://racc//lib/racc/grammar.rb#881 def dummy; end + + # source://racc//lib/racc/grammar.rb#912 def each(&block); end + + # source://racc//lib/racc/grammar.rb#928 def each_nonterminal(&block); end + + # source://racc//lib/racc/grammar.rb#920 def each_terminal(&block); end + + # Returns the value of attribute error. + # + # source://racc//lib/racc/grammar.rb#883 def error; end + + # source://racc//lib/racc/grammar.rb#932 def fix; end + + # source://racc//lib/racc/grammar.rb#889 def intern(val, dummy = T.unsafe(nil)); end + + # source://racc//lib/racc/grammar.rb#924 def nonterminals; end + + # Returns the value of attribute nt_base. + # + # source://racc//lib/racc/grammar.rb#906 def nt_base; end + + # source://racc//lib/racc/grammar.rb#908 def nt_max; end + + # Returns the value of attribute symbols. + # + # source://racc//lib/racc/grammar.rb#898 def symbols; end + + # source://racc//lib/racc/grammar.rb#916 def terminals(&block); end + + # Returns the value of attribute symbols. + # + # source://racc//lib/racc/grammar.rb#898 def to_a; end private + # source://racc//lib/racc/grammar.rb#950 def check_terminals; end + + # source://racc//lib/racc/grammar.rb#944 def fix_ident; end end +# source://racc//lib/racc/grammar.rb#727 class Racc::UserAction + # @return [UserAction] a new instance of UserAction + # + # source://racc//lib/racc/grammar.rb#746 def initialize(src, proc); end + # @return [Boolean] + # + # source://racc//lib/racc/grammar.rb#762 def empty?; end + + # source://racc//lib/racc/grammar.rb#766 def inspect; end + + # source://racc//lib/racc/grammar.rb#766 def name; end + + # Returns the value of attribute proc. + # + # source://racc//lib/racc/grammar.rb#752 def proc; end + + # @return [Boolean] + # + # source://racc//lib/racc/grammar.rb#758 def proc?; end + + # Returns the value of attribute source. + # + # source://racc//lib/racc/grammar.rb#751 def source; end + + # @return [Boolean] + # + # source://racc//lib/racc/grammar.rb#754 def source?; end class << self + # source://racc//lib/racc/grammar.rb#740 def empty; end + + # source://racc//lib/racc/grammar.rb#733 def proc(pr = T.unsafe(nil), &block); end + + # source://racc//lib/racc/grammar.rb#729 def source_text(src); end + + private + + def new(*_arg0); end end end +# source://racc//lib/racc/info.rb#15 Racc::VERSION = T.let(T.unsafe(nil), String) + +# source://racc//lib/racc/info.rb#16 Racc::Version = T.let(T.unsafe(nil), String) diff --git a/Library/Homebrew/sorbet/rbi/gems/rack@3.0.8.rbi b/Library/Homebrew/sorbet/rbi/gems/rack@3.0.8.rbi index 7d7259cb49978e..1b8c57e096727d 100644 --- a/Library/Homebrew/sorbet/rbi/gems/rack@3.0.8.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/rack@3.0.8.rbi @@ -4,645 +4,2311 @@ # This is an autogenerated file for types exported from the `rack` gem. # Please instead update this file by running `bin/tapioca gem rack`. +# The Rack main module, serving as a namespace for all core Rack +# modules and classes. +# +# All modules meant for use in your application are autoloaded here, +# so it should be enough just to require 'rack' in your code. +# +# source://rack//lib/rack/query_parser.rb#5 module Rack class << self + # Return the Rack release as a dotted string. + # + # source://rack//lib/rack/version.rb#31 def release; end + + # The Rack protocol version number implemented. + # + # source://rack//lib/rack/version.rb#23 def version; end end end +# source://rack//lib/rack.rb#65 module Rack::Auth; end +# Rack::Auth::AbstractHandler implements common authentication functionality. +# +# +realm+ should be set for all handlers. +# +# source://rack//lib/rack/auth/abstract/handler.rb#11 class Rack::Auth::AbstractHandler + # @return [AbstractHandler] a new instance of AbstractHandler + # + # source://rack//lib/rack/auth/abstract/handler.rb#15 def initialize(app, realm = T.unsafe(nil), &authenticator); end + # Returns the value of attribute realm. + # + # source://rack//lib/rack/auth/abstract/handler.rb#13 def realm; end + + # Sets the attribute realm + # + # @param value the value to set the attribute realm to. + # + # source://rack//lib/rack/auth/abstract/handler.rb#13 def realm=(_arg0); end private + # source://rack//lib/rack/auth/abstract/handler.rb#31 def bad_request; end + + # source://rack//lib/rack/auth/abstract/handler.rb#22 def unauthorized(www_authenticate = T.unsafe(nil)); end end +# source://rack//lib/rack/auth/abstract/request.rb#7 class Rack::Auth::AbstractRequest + # @return [AbstractRequest] a new instance of AbstractRequest + # + # source://rack//lib/rack/auth/abstract/request.rb#9 def initialize(env); end + # source://rack//lib/rack/auth/abstract/request.rb#33 def params; end + + # source://rack//lib/rack/auth/abstract/request.rb#25 def parts; end + + # @return [Boolean] + # + # source://rack//lib/rack/auth/abstract/request.rb#17 def provided?; end + + # source://rack//lib/rack/auth/abstract/request.rb#13 def request; end + + # source://rack//lib/rack/auth/abstract/request.rb#29 def scheme; end + + # @return [Boolean] + # + # source://rack//lib/rack/auth/abstract/request.rb#21 def valid?; end private + # source://rack//lib/rack/auth/abstract/request.rb#42 def authorization_key; end end +# source://rack//lib/rack/auth/abstract/request.rb#40 Rack::Auth::AbstractRequest::AUTHORIZATION_KEYS = T.let(T.unsafe(nil), Array) +# Rack::Auth::Basic implements HTTP Basic Authentication, as per RFC 2617. +# +# Initialize with the Rack application that you want protecting, +# and a block that checks if a username and password pair are valid. +# +# source://rack//lib/rack/auth/basic.rb#14 class Rack::Auth::Basic < ::Rack::Auth::AbstractHandler + # source://rack//lib/rack/auth/basic.rb#16 def call(env); end private + # source://rack//lib/rack/auth/basic.rb#35 def challenge; end + + # @return [Boolean] + # + # source://rack//lib/rack/auth/basic.rb#39 def valid?(auth); end end +# source://rack//lib/rack/auth/basic.rb#43 class Rack::Auth::Basic::Request < ::Rack::Auth::AbstractRequest + # @return [Boolean] + # + # source://rack//lib/rack/auth/basic.rb#44 def basic?; end + + # source://rack//lib/rack/auth/basic.rb#48 def credentials; end + + # source://rack//lib/rack/auth/basic.rb#52 def username; end end +# source://rack//lib/rack/auth/digest.rb#12 module Rack::Auth::Digest; end +# Rack::Auth::Digest::MD5 implements the MD5 algorithm version of +# HTTP Digest Authentication, as per RFC 2617. +# +# Initialize with the [Rack] application that you want protecting, +# and a block that looks up a plaintext password for a given username. +# +# +opaque+ needs to be set to a constant base64/hexadecimal string. +# +# source://rack//lib/rack/auth/digest.rb#144 class Rack::Auth::Digest::MD5 < ::Rack::Auth::AbstractHandler + # @return [MD5] a new instance of MD5 + # + # source://rack//lib/rack/auth/digest.rb#150 def initialize(app, realm = T.unsafe(nil), opaque = T.unsafe(nil), &authenticator); end + # source://rack//lib/rack/auth/digest.rb#163 def call(env); end + + # Returns the value of attribute opaque. + # + # source://rack//lib/rack/auth/digest.rb#146 def opaque; end + + # Sets the attribute opaque + # + # @param value the value to set the attribute opaque to. + # + # source://rack//lib/rack/auth/digest.rb#146 def opaque=(_arg0); end + + # Sets the attribute passwords_hashed + # + # @param value the value to set the attribute passwords_hashed to. + # + # source://rack//lib/rack/auth/digest.rb#148 def passwords_hashed=(_arg0); end + + # @return [Boolean] + # + # source://rack//lib/rack/auth/digest.rb#159 def passwords_hashed?; end private + # source://rack//lib/rack/auth/digest.rb#238 def A1(auth, password); end + + # source://rack//lib/rack/auth/digest.rb#242 def A2(auth); end + + # source://rack//lib/rack/auth/digest.rb#228 def H(data); end + + # source://rack//lib/rack/auth/digest.rb#234 def KD(secret, data); end + + # source://rack//lib/rack/auth/digest.rb#203 def challenge(hash = T.unsafe(nil)); end + + # source://rack//lib/rack/auth/digest.rb#246 def digest(auth, password); end + + # source://rack//lib/rack/auth/digest.rb#228 def md5(data); end + + # source://rack//lib/rack/auth/digest.rb#192 def params(hash = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rack//lib/rack/auth/digest.rb#207 def valid?(auth); end + + # @return [Boolean] + # + # source://rack//lib/rack/auth/digest.rb#223 def valid_digest?(auth); end + + # @return [Boolean] + # + # source://rack//lib/rack/auth/digest.rb#219 def valid_nonce?(auth); end + + # @return [Boolean] + # + # source://rack//lib/rack/auth/digest.rb#215 def valid_opaque?(auth); end + + # @return [Boolean] + # + # source://rack//lib/rack/auth/digest.rb#211 def valid_qop?(auth); end end +# source://rack//lib/rack/auth/digest.rb#190 Rack::Auth::Digest::MD5::QOP = T.let(T.unsafe(nil), String) +# Rack::Auth::Digest::Nonce is the default nonce generator for the +# Rack::Auth::Digest::MD5 authentication handler. +# +# +private_key+ needs to set to a constant string. +# +# +time_limit+ can be optionally set to an integer (number of seconds), +# to limit the validity of the generated nonces. +# +# source://rack//lib/rack/auth/digest.rb#21 class Rack::Auth::Digest::Nonce + # @return [Nonce] a new instance of Nonce + # + # source://rack//lib/rack/auth/digest.rb#31 def initialize(timestamp = T.unsafe(nil), given_digest = T.unsafe(nil)); end + # source://rack//lib/rack/auth/digest.rb#39 def digest; end + + # @return [Boolean] + # + # source://rack//lib/rack/auth/digest.rb#51 def fresh?; end + + # @return [Boolean] + # + # source://rack//lib/rack/auth/digest.rb#47 def stale?; end + + # source://rack//lib/rack/auth/digest.rb#35 def to_s; end + + # @return [Boolean] + # + # source://rack//lib/rack/auth/digest.rb#43 def valid?; end class << self + # source://rack//lib/rack/auth/digest.rb#27 def parse(string); end + + # Returns the value of attribute private_key. + # + # source://rack//lib/rack/auth/digest.rb#24 def private_key; end + + # Sets the attribute private_key + # + # @param value the value to set the attribute private_key to. + # + # source://rack//lib/rack/auth/digest.rb#24 def private_key=(_arg0); end + + # Returns the value of attribute time_limit. + # + # source://rack//lib/rack/auth/digest.rb#24 def time_limit; end + + # Sets the attribute time_limit + # + # @param value the value to set the attribute time_limit to. + # + # source://rack//lib/rack/auth/digest.rb#24 def time_limit=(_arg0); end end end +# source://rack//lib/rack/auth/digest.rb#57 class Rack::Auth::Digest::Params < ::Hash + # @return [Params] a new instance of Params + # @yield [_self] + # @yieldparam _self [Rack::Auth::Digest::Params] the object that the method was called on + # + # source://rack//lib/rack/auth/digest.rb#76 def initialize; end + # source://rack//lib/rack/auth/digest.rb#82 def [](k); end + + # source://rack//lib/rack/auth/digest.rb#86 def []=(k, v); end + + # From WEBrick::HTTPUtils + # + # source://rack//lib/rack/auth/digest.rb#98 def quote(str); end + + # source://rack//lib/rack/auth/digest.rb#92 def to_s; end class << self + # From WEBrick::HTTPUtils + # + # source://rack//lib/rack/auth/digest.rb#66 def dequote(str); end + + # source://rack//lib/rack/auth/digest.rb#59 def parse(str); end + + # source://rack//lib/rack/auth/digest.rb#72 def split_header_value(str); end end end +# source://rack//lib/rack/auth/digest.rb#90 Rack::Auth::Digest::Params::UNQUOTED = T.let(T.unsafe(nil), Array) +# source://rack//lib/rack/auth/digest.rb#104 class Rack::Auth::Digest::Request < ::Rack::Auth::AbstractRequest + # @return [Boolean] + # + # source://rack//lib/rack/auth/digest.rb#113 def correct_uri?; end + + # @return [Boolean] + # + # source://rack//lib/rack/auth/digest.rb#109 def digest?; end + + # source://rack//lib/rack/auth/digest.rb#105 def method; end + + # @raise [ArgumentError] + # + # source://rack//lib/rack/auth/digest.rb#129 def method_missing(sym, *args); end + + # source://rack//lib/rack/auth/digest.rb#117 def nonce; end + + # source://rack//lib/rack/auth/digest.rb#121 def params; end + + # @return [Boolean] + # + # source://rack//lib/rack/auth/digest.rb#125 def respond_to?(sym, *_arg1); end end +# Proxy for response bodies allowing calling a block when +# the response body is closed (after the response has been fully +# sent to the client). +# +# source://rack//lib/rack/body_proxy.rb#7 class Rack::BodyProxy + # Set the response body to wrap, and the block to call when the + # response has been fully sent. + # + # @return [BodyProxy] a new instance of BodyProxy + # + # source://rack//lib/rack/body_proxy.rb#10 def initialize(body, &block); end + # If not already closed, close the wrapped body and + # then call the block the proxy was initialized with. + # + # source://rack//lib/rack/body_proxy.rb#23 def close; end + + # Whether the proxy is closed. The proxy starts as not closed, + # and becomes closed on the first call to close. + # + # @return [Boolean] + # + # source://rack//lib/rack/body_proxy.rb#35 def closed?; end - def method_missing(method_name, *args, &block); end + + # Delegate missing methods to the wrapped body. + # + # source://rack//lib/rack/body_proxy.rb#40 + def method_missing(method_name, *args, **_arg2, &block); end private + # Return whether the wrapped body responds to the method. + # + # @return [Boolean] + # + # source://rack//lib/rack/body_proxy.rb#17 def respond_to_missing?(method_name, include_all = T.unsafe(nil)); end end +# Rack::Builder provides a domain-specific language (DSL) to construct Rack +# applications. It is primarily used to parse +config.ru+ files which +# instantiate several middleware and a final application which are hosted +# by a Rack-compatible web server. +# +# Example: +# +# app = Rack::Builder.new do +# use Rack::CommonLogger +# map "/ok" do +# run lambda { |env| [200, {'content-type' => 'text/plain'}, ['OK']] } +# end +# end +# +# run app +# +# Or +# +# app = Rack::Builder.app do +# use Rack::CommonLogger +# run lambda { |env| [200, {'content-type' => 'text/plain'}, ['OK']] } +# end +# +# run app +# +# +use+ adds middleware to the stack, +run+ dispatches to an application. +# You can use +map+ to construct a Rack::URLMap in a convenient way. +# +# source://rack//lib/rack/builder.rb#33 class Rack::Builder + # Initialize a new Rack::Builder instance. +default_app+ specifies the + # default application if +run+ is not called later. If a block + # is given, it is evaluated in the context of the instance. + # + # @return [Builder] a new instance of Builder + # + # source://rack//lib/rack/builder.rb#111 def initialize(default_app = T.unsafe(nil), &block); end + # Call the Rack application generated by this builder instance. Note that + # this rebuilds the Rack application and runs the warmup code (if any) + # every time it is called, so it should not be used if performance is important. + # + # source://rack//lib/rack/builder.rb#263 def call(env); end + + # Freeze the app (set using run) and all middleware instances when building the application + # in to_app. + # + # source://rack//lib/rack/builder.rb#246 def freeze_app; end + + # Creates a route within the application. Routes under the mapped path will be sent to + # the Rack application specified by run inside the block. Other requests will be sent to the + # default application specified by run outside the block. + # + # class App + # def call(env) + # [200, {'content-type' => 'text/plain'}, ["Hello World"]] + # end + # end + # + # class Heartbeat + # def call(env) + # [200, { "content-type" => "text/plain" }, ["OK"]] + # end + # end + # + # app = Rack::Builder.app do + # map '/heartbeat' do + # run Heartbeat.new + # end + # run App.new + # end + # + # run app + # + # The +use+ method can also be used inside the block to specify middleware to run under a specific path: + # + # app = Rack::Builder.app do + # map '/heartbeat' do + # use Middleware + # run Heartbeat.new + # end + # run App.new + # end + # + # This example includes a piece of middleware which will run before +/heartbeat+ requests hit +Heartbeat+. + # + # Note that providing a +path+ of +/+ will ignore any default application given in a +run+ statement + # outside the block. + # + # source://rack//lib/rack/builder.rb#239 def map(path, &block); end + + # Takes a block or argument that is an object that responds to #call and + # returns a Rack response. + # + # You can use a block: + # + # run do |env| + # [200, { "content-type" => "text/plain" }, ["Hello World!"]] + # end + # + # You can also provide a lambda: + # + # run lambda { |env| [200, { "content-type" => "text/plain" }, ["OK"]] } + # + # You can also provide a class instance: + # + # class Heartbeat + # def call(env) + # [200, { "content-type" => "text/plain" }, ["OK"]] + # end + # end + # + # run Heartbeat.new + # + # @raise [ArgumentError] + # + # source://rack//lib/rack/builder.rb#180 def run(app = T.unsafe(nil), &block); end + + # Return the Rack application generated by this instance. + # + # source://rack//lib/rack/builder.rb#251 def to_app; end - def use(middleware, *args, &block); end + + # Specifies middleware to use in a stack. + # + # class Middleware + # def initialize(app) + # @app = app + # end + # + # def call(env) + # env["rack.some_header"] = "setting an example" + # @app.call(env) + # end + # end + # + # use Middleware + # run lambda { |env| [200, { "content-type" => "text/plain" }, ["OK"]] } + # + # All requests through to this application will first be processed by the middleware class. + # The +call+ method in this example sets an additional environment key which then can be + # referenced in the application if required. + # + # source://rack//lib/rack/builder.rb#146 + def use(middleware, *args, **_arg2, &block); end + + # Takes a lambda or block that is used to warm-up the application. This block is called + # before the Rack application is returned by to_app. + # + # warmup do |app| + # client = Rack::MockRequest.new(app) + # client.get('/') + # end + # + # use SomeMiddleware + # run MyApp + # + # source://rack//lib/rack/builder.rb#196 def warmup(prc = T.unsafe(nil), &block); end private + # Generate a URLMap instance by generating new Rack applications for each + # map block in this instance. + # + # source://rack//lib/rack/builder.rb#271 def generate_map(default_app, mapping); end class << self + # Create a new Rack::Builder instance and return the Rack application + # generated from it. + # + # source://rack//lib/rack/builder.rb#123 def app(default_app = T.unsafe(nil), &block); end + + # Load the given file as a rackup file, treating the + # contents as if specified inside a Rack::Builder block. + # + # Ignores content in the file after +__END__+, so that + # use of +__END__+ will not result in a syntax error. + # + # Example config.ru file: + # + # $ cat config.ru + # + # use Rack::ContentLength + # require './app.rb' + # run App + # + # source://rack//lib/rack/builder.rb#84 def load_file(path); end + + # Evaluate the given +builder_script+ string in the context of + # a Rack::Builder block, returning a Rack application. + # + # source://rack//lib/rack/builder.rb#99 def new_from_string(builder_script, file = T.unsafe(nil)); end + + # Parse the given config file to get a Rack application. + # + # If the config file ends in +.ru+, it is treated as a + # rackup file and the contents will be treated as if + # specified inside a Rack::Builder block. + # + # If the config file does not end in +.ru+, it is + # required and Rack will use the basename of the file + # to guess which constant will be the Rack application to run. + # + # Examples: + # + # Rack::Builder.parse_file('config.ru') + # # Rack application built using Rack::Builder.new + # + # Rack::Builder.parse_file('app.rb') + # # requires app.rb, which can be anywhere in Ruby's + # # load path. After requiring, assumes App constant + # # contains Rack application + # + # Rack::Builder.parse_file('./my_app.rb') + # # requires ./my_app.rb, which should be in the + # # process's current directory. After requiring, + # # assumes MyApp constant contains Rack application + # + # source://rack//lib/rack/builder.rb#62 def parse_file(path); end end end +# https://stackoverflow.com/questions/2223882/whats-the-difference-between-utf-8-and-utf-8-without-bom +# +# source://rack//lib/rack/builder.rb#36 Rack::Builder::UTF_8_BOM = T.let(T.unsafe(nil), String) + +# Response Header Keys +# +# source://rack//lib/rack/constants.rb#19 Rack::CACHE_CONTROL = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#20 Rack::CONTENT_LENGTH = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#21 Rack::CONTENT_TYPE = T.let(T.unsafe(nil), String) +# Rack::Cascade tries a request on several apps, and returns the +# first response that is not 404 or 405 (or in a list of configured +# status codes). If all applications tried return one of the configured +# status codes, return the last response. +# +# source://rack//lib/rack/cascade.rb#11 class Rack::Cascade + # Set the apps to send requests to, and what statuses result in + # cascading. Arguments: + # + # apps: An enumerable of rack applications. + # cascade_for: The statuses to use cascading for. If a response is received + # from an app, the next app is tried. + # + # @return [Cascade] a new instance of Cascade + # + # source://rack//lib/rack/cascade.rb#24 def initialize(apps, cascade_for = T.unsafe(nil)); end + # Append an app to the list of apps to cascade. This app will + # be tried last. + # + # source://rack//lib/rack/cascade.rb#59 def <<(app); end + + # Append an app to the list of apps to cascade. This app will + # be tried last. + # + # source://rack//lib/rack/cascade.rb#59 def add(app); end + + # An array of applications to try in order. + # + # source://rack//lib/rack/cascade.rb#16 def apps; end + + # Call each app in order. If the responses uses a status that requires + # cascading, try the next app. If all responses require cascading, + # return the response from the last app. + # + # source://rack//lib/rack/cascade.rb#35 def call(env); end + + # Whether the given app is one of the apps to cascade to. + # + # @return [Boolean] + # + # source://rack//lib/rack/cascade.rb#64 def include?(app); end end +# deprecated, no longer used +# +# source://rack//lib/rack/cascade.rb#13 Rack::Cascade::NotFound = T.let(T.unsafe(nil), Array) +# Middleware that applies chunked transfer encoding to response bodies +# when the response does not include a content-length header. +# +# This supports the trailer response header to allow the use of trailing +# headers in the chunked encoding. However, using this requires you manually +# specify a response body that supports a +trailers+ method. Example: +# +# [200, { 'trailer' => 'expires'}, ["Hello", "World"]] +# # error raised +# +# body = ["Hello", "World"] +# def body.trailers +# { 'expires' => Time.now.to_s } +# end +# [200, { 'trailer' => 'expires'}, body] +# # No exception raised +# +# source://rack//lib/rack/chunked.rb#25 class Rack::Chunked include ::Rack::Utils + # @return [Chunked] a new instance of Chunked + # + # source://rack//lib/rack/chunked.rb#82 def initialize(app); end + # If the rack app returns a response that should have a body, + # but does not have content-length or transfer-encoding headers, + # modify the response to use chunked transfer-encoding. + # + # source://rack//lib/rack/chunked.rb#101 def call(env); end + + # Whether the HTTP version supports chunked encoding (HTTP 1.1 does). + # + # @return [Boolean] + # + # source://rack//lib/rack/chunked.rb#87 def chunkable_version?(ver); end end +# A body wrapper that emits chunked responses. +# +# source://rack//lib/rack/chunked.rb#29 class Rack::Chunked::Body + # Store the response body to be chunked. + # + # @return [Body] a new instance of Body + # + # source://rack//lib/rack/chunked.rb#34 def initialize(body); end + # Close the response body if the response body supports it. + # + # source://rack//lib/rack/chunked.rb#54 def close; end + + # For each element yielded by the response body, yield + # the element in chunked encoding. + # + # @yield [TAIL] + # + # source://rack//lib/rack/chunked.rb#40 def each(&block); end private + # Do nothing as this class does not support trailer headers. + # + # source://rack//lib/rack/chunked.rb#61 def yield_trailers; end end +# source://rack//lib/rack/chunked.rb#31 Rack::Chunked::Body::TAIL = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/chunked.rb#30 Rack::Chunked::Body::TERM = T.let(T.unsafe(nil), String) +# A body wrapper that emits chunked responses and also supports +# sending Trailer headers. Note that the response body provided to +# initialize must have a +trailers+ method that returns a hash +# of trailer headers, and the rack response itself should have a +# Trailer header listing the headers that the +trailers+ method +# will return. +# +# source://rack//lib/rack/chunked.rb#71 class Rack::Chunked::TrailerBody < ::Rack::Chunked::Body private + # Yield strings for each trailer header. + # + # source://rack//lib/rack/chunked.rb#75 def yield_trailers; end end +# Rack::CommonLogger forwards every request to the given +app+, and +# logs a line in the +# {Apache common log format}[http://httpd.apache.org/docs/1.3/logs.html#common] +# to the configured logger. +# +# source://rack//lib/rack/common_logger.rb#13 class Rack::CommonLogger + # +logger+ can be any object that supports the +write+ or +<<+ methods, + # which includes the standard library Logger. These methods are called + # with a single string argument, the log message. + # If +logger+ is nil, CommonLogger will fall back env['rack.errors']. + # + # @return [CommonLogger] a new instance of CommonLogger + # + # source://rack//lib/rack/common_logger.rb#29 def initialize(app, logger = T.unsafe(nil)); end + # Log all requests in common_log format after a response has been + # returned. Note that if the app raises an exception, the request + # will not be logged, so if exception handling middleware are used, + # they should be loaded after this middleware. Additionally, because + # the logging happens after the request body has been fully sent, any + # exceptions raised during the sending of the response body will + # cause the request not to be logged. + # + # source://rack//lib/rack/common_logger.rb#41 def call(env); end private + # Attempt to determine the content length for the response to + # include it in the logged data. + # + # source://rack//lib/rack/common_logger.rb#83 def extract_content_length(headers); end + + # Log the request to the configured logger. + # + # source://rack//lib/rack/common_logger.rb#52 def log(env, status, response_headers, began_at); end end +# Common Log Format: http://httpd.apache.org/docs/1.3/logs.html#common +# +# lilith.local - - [07/Aug/2006 23:58:02 -0400] "GET / HTTP/1.1" 500 - +# +# %{%s - %s [%s] "%s %s%s %s" %d %s\n} % +# +# The actual format is slightly different than the above due to the +# separation of SCRIPT_NAME and PATH_INFO, and because the elapsed +# time in seconds is included at the end. +# +# source://rack//lib/rack/common_logger.rb#23 Rack::CommonLogger::FORMAT = T.let(T.unsafe(nil), String) +# Middleware that enables conditional GET using if-none-match and +# if-modified-since. The application should set either or both of the +# last-modified or etag response headers according to RFC 2616. When +# either of the conditions is met, the response body is set to be zero +# length and the response status is set to 304 Not Modified. +# +# Applications that defer response body generation until the body's each +# message is received will avoid response body generation completely when +# a conditional GET matches. +# +# Adapted from Michael Klishin's Merb implementation: +# https://github.com/wycats/merb/blob/master/merb-core/lib/merb-core/rack/middleware/conditional_get.rb +# +# source://rack//lib/rack/conditional_get.rb#21 class Rack::ConditionalGet + # @return [ConditionalGet] a new instance of ConditionalGet + # + # source://rack//lib/rack/conditional_get.rb#22 def initialize(app); end + # Return empty 304 response if the response has not been + # modified since the last request. + # + # source://rack//lib/rack/conditional_get.rb#28 def call(env); end private + # Whether the etag response header matches the if-none-match request header. + # If so, the request has not been modified. + # + # @return [Boolean] + # + # source://rack//lib/rack/conditional_get.rb#62 def etag_matches?(none_match, headers); end + + # Return whether the response has not been modified since the + # last request. + # + # @return [Boolean] + # + # source://rack//lib/rack/conditional_get.rb#51 def fresh?(env, headers); end + + # Whether the last-modified response header matches the if-modified-since + # request header. If so, the request has not been modified. + # + # @return [Boolean] + # + # source://rack//lib/rack/conditional_get.rb#68 def modified_since?(modified_since, headers); end + + # Return a Time object for the given string (which should be in RFC2822 + # format), or nil if the string cannot be parsed. + # + # source://rack//lib/rack/conditional_get.rb#75 def to_rfc2822(since); end end +# Rack::Config modifies the environment using the block given during +# initialization. +# +# Example: +# use Rack::Config do |env| +# env['my-key'] = 'some-value' +# end +# +# source://rack//lib/rack/config.rb#11 class Rack::Config + # @return [Config] a new instance of Config + # + # source://rack//lib/rack/config.rb#12 def initialize(app, &block); end + # source://rack//lib/rack/config.rb#17 def call(env); end end +# Sets the content-length header on responses that do not specify +# a content-length or transfer-encoding header. Note that this +# does not fix responses that have an invalid content-length +# header specified. +# +# source://rack//lib/rack/content_length.rb#12 class Rack::ContentLength include ::Rack::Utils + # @return [ContentLength] a new instance of ContentLength + # + # source://rack//lib/rack/content_length.rb#15 def initialize(app); end + # source://rack//lib/rack/content_length.rb#19 def call(env); end end +# Sets the content-type header on responses which don't have one. +# +# Builder Usage: +# use Rack::ContentType, "text/plain" +# +# When no content type argument is provided, "text/html" is the +# default. +# +# source://rack//lib/rack/content_type.rb#15 class Rack::ContentType include ::Rack::Utils + # @return [ContentType] a new instance of ContentType + # + # source://rack//lib/rack/content_type.rb#18 def initialize(app, content_type = T.unsafe(nil)); end + # source://rack//lib/rack/content_type.rb#23 def call(env); end end +# source://rack//lib/rack/constants.rb#32 Rack::DELETE = T.let(T.unsafe(nil), String) +# This middleware enables content encoding of http responses, +# usually for purposes of compression. +# +# Currently supported encodings: +# +# * gzip +# * identity (no transformation) +# +# This middleware automatically detects when encoding is supported +# and allowed. For example no encoding is made when a cache +# directive of 'no-transform' is present, when the response status +# code is one that doesn't allow an entity body, or when the body +# is empty. +# +# Note that despite the name, Deflater does not support the +deflate+ +# encoding. +# +# source://rack//lib/rack/deflater.rb#28 class Rack::Deflater + # Creates Rack::Deflater middleware. Options: + # + # :if :: a lambda enabling / disabling deflation based on returned boolean value + # (e.g use Rack::Deflater, :if => lambda { |*, body| sum=0; body.each { |i| sum += i.length }; sum > 512 }). + # However, be aware that calling `body.each` inside the block will break cases where `body.each` is not idempotent, + # such as when it is an +IO+ instance. + # :include :: a list of content types that should be compressed. By default, all content types are compressed. + # :sync :: determines if the stream is going to be flushed after every chunk. Flushing after every chunk reduces + # latency for time-sensitive streaming applications, but hurts compression and throughput. + # Defaults to +true+. + # + # @return [Deflater] a new instance of Deflater + # + # source://rack//lib/rack/deflater.rb#39 def initialize(app, options = T.unsafe(nil)); end + # source://rack//lib/rack/deflater.rb#46 def call(env); end private + # Whether the body should be compressed. + # + # @return [Boolean] + # + # source://rack//lib/rack/deflater.rb#136 def should_deflate?(env, status, headers, body); end end +# Body class used for gzip encoded responses. +# +# source://rack//lib/rack/deflater.rb#83 class Rack::Deflater::GzipStream + # Initialize the gzip stream. Arguments: + # body :: Response body to compress with gzip + # mtime :: The modification time of the body, used to set the + # modification time in the gzip header. + # sync :: Whether to flush each gzip chunk as soon as it is ready. + # + # @return [GzipStream] a new instance of GzipStream + # + # source://rack//lib/rack/deflater.rb#92 def initialize(body, mtime, sync); end + # Close the original body if possible. + # + # source://rack//lib/rack/deflater.rb#128 def close; end + + # Yield gzip compressed strings to the given block. + # + # source://rack//lib/rack/deflater.rb#99 def each(&block); end + + # Call the block passed to #each with the gzipped data. + # + # source://rack//lib/rack/deflater.rb#123 def write(data); end end +# source://rack//lib/rack/deflater.rb#85 Rack::Deflater::GzipStream::BUFFER_LENGTH = T.let(T.unsafe(nil), Integer) +# Rack::Directory serves entries below the +root+ given, according to the +# path info of the Rack request. If a directory is found, the file's contents +# will be presented in an html based index. If a file is found, the env will +# be passed to the specified +app+. +# +# If +app+ is not specified, a Rack::Files of the same +root+ will be used. +# +# source://rack//lib/rack/directory.rb#19 class Rack::Directory + # Set the root directory and application for serving files. + # + # @return [Directory] a new instance of Directory + # + # source://rack//lib/rack/directory.rb#83 def initialize(root, app = T.unsafe(nil)); end + # source://rack//lib/rack/directory.rb#89 def call(env); end + + # Rack response to use for requests with invalid paths, or nil if path is valid. + # + # source://rack//lib/rack/directory.rb#109 def check_bad_request(path_info); end + + # Rack response to use for requests with paths outside the root, or nil if path is inside the root. + # + # source://rack//lib/rack/directory.rb#119 def check_forbidden(path_info); end + + # Rack response to use for unreadable and non-file, non-directory entries. + # + # source://rack//lib/rack/directory.rb#181 def entity_not_found(path_info); end + + # Provide human readable file sizes + # + # source://rack//lib/rack/directory.rb#197 def filesize_format(int); end + + # Internals of request handling. Similar to call but does + # not remove body for HEAD requests. + # + # source://rack//lib/rack/directory.rb#96 def get(env); end + + # Rack response to use for directories under the root. + # + # source://rack//lib/rack/directory.rb#130 def list_directory(path_info, path, script_name); end + + # Rack response to use for files and directories under the root. + # Unreadable and non-file, non-directory entries will get a 404 response. + # + # source://rack//lib/rack/directory.rb#171 def list_path(env, path, path_info, script_name); end + + # The root of the directory hierarchy. Only requests for files and + # directories inside of the root directory are supported. + # + # source://rack//lib/rack/directory.rb#80 def root; end + + # File::Stat for the given path, but return nil for missing/bad entries. + # + # source://rack//lib/rack/directory.rb#163 def stat(path); end end +# source://rack//lib/rack/directory.rb#20 Rack::Directory::DIR_FILE = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/directory.rb#43 Rack::Directory::DIR_PAGE_FOOTER = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/directory.rb#21 Rack::Directory::DIR_PAGE_HEADER = T.let(T.unsafe(nil), String) +# Body class for directory entries, showing an index page with links +# to each file. +# +# source://rack//lib/rack/directory.rb#52 class Rack::Directory::DirectoryBody < ::Struct + # Yield strings for each part of the directory entry + # + # @yield [DIR_PAGE_HEADER % [ show_path, show_path ]] + # + # source://rack//lib/rack/directory.rb#53 def each; end private + # Escape each element in the array of html strings. + # + # source://rack//lib/rack/directory.rb#73 def DIR_FILE_escape(htmls); end end +# Stolen from Ramaze +# +# source://rack//lib/rack/directory.rb#189 Rack::Directory::FILESIZE_FORMAT = T.let(T.unsafe(nil), Array) + +# source://rack//lib/rack/constants.rb#22 Rack::ETAG = T.let(T.unsafe(nil), String) +# Automatically sets the etag header on all String bodies. +# +# The etag header is skipped if etag or last-modified headers are sent or if +# a sendfile body (body.responds_to :to_path) is given (since such cases +# should be handled by apache/nginx). +# +# On initialization, you can pass two parameters: a cache-control directive +# used when etag is absent and a directive when it is present. The first +# defaults to nil, while the second defaults to "max-age=0, private, must-revalidate" +# +# source://rack//lib/rack/etag.rb#18 class Rack::ETag + # @return [ETag] a new instance of ETag + # + # source://rack//lib/rack/etag.rb#22 def initialize(app, no_cache_control = T.unsafe(nil), cache_control = T.unsafe(nil)); end + # source://rack//lib/rack/etag.rb#28 def call(env); end private + # source://rack//lib/rack/etag.rb#58 def digest_body(body); end + + # @return [Boolean] + # + # source://rack//lib/rack/etag.rb#50 def etag_status?(status); end + + # @return [Boolean] + # + # source://rack//lib/rack/etag.rb#54 def skip_caching?(headers); end end +# source://rack//lib/rack/etag.rb#20 Rack::ETag::DEFAULT_CACHE_CONTROL = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/etag.rb#19 Rack::ETag::ETAG_STRING = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#23 Rack::EXPIRES = T.let(T.unsafe(nil), String) +# This middleware provides hooks to certain places in the request / +# response lifecycle. This is so that middleware that don't need to filter +# the response data can safely leave it alone and not have to send messages +# down the traditional "rack stack". +# +# The events are: +# +# * on_start(request, response) +# +# This event is sent at the start of the request, before the next +# middleware in the chain is called. This method is called with a request +# object, and a response object. Right now, the response object is always +# nil, but in the future it may actually be a real response object. +# +# * on_commit(request, response) +# +# The response has been committed. The application has returned, but the +# response has not been sent to the webserver yet. This method is always +# called with a request object and the response object. The response +# object is constructed from the rack triple that the application returned. +# Changes may still be made to the response object at this point. +# +# * on_send(request, response) +# +# The webserver has started iterating over the response body and presumably +# has started sending data over the wire. This method is always called with +# a request object and the response object. The response object is +# constructed from the rack triple that the application returned. Changes +# SHOULD NOT be made to the response object as the webserver has already +# started sending data. Any mutations will likely result in an exception. +# +# * on_finish(request, response) +# +# The webserver has closed the response, and all data has been written to +# the response socket. The request and response object should both be +# read-only at this point. The body MAY NOT be available on the response +# object as it may have been flushed to the socket. +# +# * on_error(request, response, error) +# +# An exception has occurred in the application or an `on_commit` event. +# This method will get the request, the response (if available) and the +# exception that was raised. +# +# ## Order +# +# `on_start` is called on the handlers in the order that they were passed to +# the constructor. `on_commit`, on_send`, `on_finish`, and `on_error` are +# called in the reverse order. `on_finish` handlers are called inside an +# `ensure` block, so they are guaranteed to be called even if something +# raises an exception. If something raises an exception in a `on_finish` +# method, then nothing is guaranteed. +# +# source://rack//lib/rack/events.rb#61 class Rack::Events + # @return [Events] a new instance of Events + # + # source://rack//lib/rack/events.rb#106 def initialize(app, handlers); end + # source://rack//lib/rack/events.rb#111 def call(env); end private + # source://rack//lib/rack/events.rb#149 def make_request(env); end + + # source://rack//lib/rack/events.rb#153 def make_response(status, headers, body); end + + # source://rack//lib/rack/events.rb#137 def on_commit(request, response); end + + # source://rack//lib/rack/events.rb#133 def on_error(request, response, e); end + + # source://rack//lib/rack/events.rb#145 def on_finish(request, response); end + + # source://rack//lib/rack/events.rb#141 def on_start(request, response); end end +# source://rack//lib/rack/events.rb#62 module Rack::Events::Abstract + # source://rack//lib/rack/events.rb#66 def on_commit(req, res); end + + # source://rack//lib/rack/events.rb#75 def on_error(req, res, e); end + + # source://rack//lib/rack/events.rb#72 def on_finish(req, res); end + + # source://rack//lib/rack/events.rb#69 def on_send(req, res); end + + # source://rack//lib/rack/events.rb#63 def on_start(req, res); end end +# source://rack//lib/rack/events.rb#95 class Rack::Events::BufferedResponse < ::Rack::Response::Raw + # @return [BufferedResponse] a new instance of BufferedResponse + # + # source://rack//lib/rack/events.rb#98 def initialize(status, headers, body); end + # Returns the value of attribute body. + # + # source://rack//lib/rack/events.rb#96 def body; end + + # source://rack//lib/rack/events.rb#103 def to_a; end end +# source://rack//lib/rack/events.rb#79 class Rack::Events::EventedBodyProxy < ::Rack::BodyProxy + # @return [EventedBodyProxy] a new instance of EventedBodyProxy + # + # source://rack//lib/rack/events.rb#82 def initialize(body, request, response, handlers, &block); end + # source://rack//lib/rack/events.rb#89 def each; end + + # Returns the value of attribute request. + # + # source://rack//lib/rack/events.rb#80 def request; end + + # Returns the value of attribute response. + # + # source://rack//lib/rack/events.rb#80 def response; end end +# source://rack//lib/rack/file.rb#8 Rack::File = Rack::Files +# Rack::Files serves files below the +root+ directory given, according to the +# path info of the Rack request. +# e.g. when Rack::Files.new("/etc") is used, you can access 'passwd' file +# as http://localhost:9292/passwd +# +# Handlers can detect if bodies are a Rack::Files, and use mechanisms +# like sendfile on the +path+. +# +# source://rack//lib/rack/files.rb#20 class Rack::Files + # @return [Files] a new instance of Files + # + # source://rack//lib/rack/files.rb#27 def initialize(root, headers = T.unsafe(nil), default_mime = T.unsafe(nil)); end + # source://rack//lib/rack/files.rb#34 def call(env); end + + # source://rack//lib/rack/files.rb#39 def get(env); end + + # Returns the value of attribute root. + # + # source://rack//lib/rack/files.rb#25 def root; end + + # source://rack//lib/rack/files.rb#68 def serving(request, path); end private + # source://rack//lib/rack/files.rb#190 def fail(status, body, headers = T.unsafe(nil)); end + + # source://rack//lib/rack/files.rb#209 def filesize(path); end + + # The MIME type for the contents of the file located at @path + # + # source://rack//lib/rack/files.rb#205 def mime_type(path, default_mime); end end +# source://rack//lib/rack/files.rb#21 Rack::Files::ALLOWED_VERBS = T.let(T.unsafe(nil), Array) + +# source://rack//lib/rack/files.rb#22 Rack::Files::ALLOW_HEADER = T.let(T.unsafe(nil), String) +# source://rack//lib/rack/files.rb#121 class Rack::Files::BaseIterator + # @return [BaseIterator] a new instance of BaseIterator + # + # source://rack//lib/rack/files.rb#124 def initialize(path, ranges, options); end + # source://rack//lib/rack/files.rb#144 def bytesize; end + + # source://rack//lib/rack/files.rb#153 def close; end + + # source://rack//lib/rack/files.rb#130 def each; end + + # Returns the value of attribute options. + # + # source://rack//lib/rack/files.rb#122 def options; end + + # Returns the value of attribute path. + # + # source://rack//lib/rack/files.rb#122 def path; end + + # Returns the value of attribute ranges. + # + # source://rack//lib/rack/files.rb#122 def ranges; end private + # source://rack//lib/rack/files.rb#171 def each_range_part(file, range); end + + # @return [Boolean] + # + # source://rack//lib/rack/files.rb#157 def multipart?; end + + # source://rack//lib/rack/files.rb#161 def multipart_heading(range); end end +# source://rack//lib/rack/files.rb#184 class Rack::Files::Iterator < ::Rack::Files::BaseIterator + # source://rack//lib/rack/files.rb#122 def to_path; end end +# source://rack//lib/rack/files.rb#23 Rack::Files::MULTIPART_BOUNDARY = T.let(T.unsafe(nil), String) +# Rack::ForwardRequest gets caught by Rack::Recursive and redirects +# the current request to the app at +url+. +# +# raise ForwardRequest.new("/not-found") +# +# source://rack//lib/rack/recursive.rb#14 class Rack::ForwardRequest < ::Exception + # @return [ForwardRequest] a new instance of ForwardRequest + # + # source://rack//lib/rack/recursive.rb#17 def initialize(url, env = T.unsafe(nil)); end + # Returns the value of attribute env. + # + # source://rack//lib/rack/recursive.rb#15 def env; end + + # Returns the value of attribute url. + # + # source://rack//lib/rack/recursive.rb#15 def url; end end +# HTTP method verbs +# +# source://rack//lib/rack/constants.rb#28 Rack::GET = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#33 Rack::HEAD = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#7 Rack::HTTPS = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#16 Rack::HTTP_COOKIE = T.let(T.unsafe(nil), String) + +# Request env keys +# +# source://rack//lib/rack/constants.rb#5 Rack::HTTP_HOST = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#6 Rack::HTTP_PORT = T.let(T.unsafe(nil), String) +# Rack::Head returns an empty body for all HEAD requests. It leaves +# all other requests unchanged. +# +# source://rack//lib/rack/head.rb#9 class Rack::Head + # @return [Head] a new instance of Head + # + # source://rack//lib/rack/head.rb#10 def initialize(app); end + # source://rack//lib/rack/head.rb#14 def call(env); end end +# Rack::Headers is a Hash subclass that downcases all keys. It's designed +# to be used by rack applications that don't implement the Rack 3 SPEC +# (by using non-lowercase response header keys), automatically handling +# the downcasing of keys. +# +# source://rack//lib/rack/headers.rb#6 class Rack::Headers < ::Hash + # source://rack//lib/rack/headers.rb#26 def [](key); end + + # source://rack//lib/rack/headers.rb#30 def []=(key, value); end + + # source://rack//lib/rack/headers.rb#35 def assoc(key); end + + # @raise [TypeError] + # + # source://rack//lib/rack/headers.rb#39 def compare_by_identity; end + + # source://rack//lib/rack/headers.rb#43 def delete(key); end + + # source://rack//lib/rack/headers.rb#47 def dig(key, *a); end + + # :nocov: + # + # source://rack//lib/rack/headers.rb#143 + def except(*a); end + + # source://rack//lib/rack/headers.rb#51 def fetch(key, *default, &block); end + + # source://rack//lib/rack/headers.rb#56 def fetch_values(*a); end + + # @return [Boolean] + # + # source://rack//lib/rack/headers.rb#60 def has_key?(key); end + + # @return [Boolean] + # + # source://rack//lib/rack/headers.rb#60 def include?(key); end + + # source://rack//lib/rack/headers.rb#67 def invert; end + + # @return [Boolean] + # + # source://rack//lib/rack/headers.rb#60 def key?(key); end + + # @return [Boolean] + # + # source://rack//lib/rack/headers.rb#60 def member?(key); end + + # source://rack//lib/rack/headers.rb#73 def merge(hash, &block); end + + # source://rack//lib/rack/headers.rb#102 def merge!(hash, &block); end + + # source://rack//lib/rack/headers.rb#77 def reject(&block); end + + # source://rack//lib/rack/headers.rb#83 def replace(hash); end + + # source://rack//lib/rack/headers.rb#88 def select(&block); end + + # :nocov: + # + # source://rack//lib/rack/headers.rb#121 def slice(*a); end + + # source://rack//lib/rack/headers.rb#30 def store(key, value); end + + # source://rack//lib/rack/headers.rb#94 def to_proc; end + + # source://rack//lib/rack/headers.rb#127 def transform_keys(&block); end + + # source://rack//lib/rack/headers.rb#131 def transform_keys!; end + + # source://rack//lib/rack/headers.rb#98 def transform_values(&block); end + + # source://rack//lib/rack/headers.rb#102 def update(hash, &block); end + + # source://rack//lib/rack/headers.rb#114 def values_at(*keys); end private + # source://rack//lib/rack/headers.rb#150 def downcase_key(key); end class << self + # source://rack//lib/rack/headers.rb#7 def [](*items); end end end +# source://rack//lib/rack/constants.rb#35 Rack::LINK = T.let(T.unsafe(nil), String) +# Rack::Lint validates your application and the requests and +# responses according to the Rack spec. +# +# source://rack//lib/rack/lint.rb#12 class Rack::Lint + # @return [Lint] a new instance of Lint + # + # source://rack//lib/rack/lint.rb#13 def initialize(app); end + # AUTHORS: n.b. The trailing whitespace between paragraphs is important and + # should not be removed. The whitespace creates paragraphs in the RDoc + # output. + # + # This specification aims to formalize the Rack protocol. You + # can (and should) use Rack::Lint to enforce it. + # + # When you develop middleware, be sure to add a Lint before and + # after to catch all mistakes. + # + # = Rack applications + # + # A Rack application is a Ruby object (not a class) that + # responds to +call+. + # + # source://rack//lib/rack/lint.rb#34 def call(env = T.unsafe(nil)); end end +# :stopdoc: +# +# source://rack//lib/rack/lint.rb#19 class Rack::Lint::LintError < ::RuntimeError; end +# source://rack//lib/rack/lint.rb#38 class Rack::Lint::Wrapper + # @return [Wrapper] a new instance of Wrapper + # + # source://rack//lib/rack/lint.rb#39 def initialize(app, env); end + # ==== Streaming Body + # + # @raise [LintError] + # + # source://rack//lib/rack/lint.rb#855 def call(stream); end + + # === The content-length + # + # source://rack//lib/rack/lint.rb#693 def check_content_length(status, headers); end + + # === The content-type + # + # source://rack//lib/rack/lint.rb#677 def check_content_type(status, headers); end + + # == The Environment + # + # @raise [LintError] + # + # source://rack//lib/rack/lint.rb#97 def check_environment(env); end + + # === The Error Stream + # + # source://rack//lib/rack/lint.rb#491 def check_error(error); end + + # source://rack//lib/rack/lint.rb#667 def check_header_value(key, value); end + + # === The Headers + # + # source://rack//lib/rack/lint.rb#627 def check_headers(headers); end + + # === Hijacking + # + # The hijacking interfaces provides a means for an application to take + # control of the HTTP connection. There are two distinct hijack + # interfaces: full hijacking where the application takes over the raw + # connection, and partial hijacking where the application takes over + # just the response body stream. In both cases, the application is + # responsible for closing the hijacked stream. + # + # Full hijacking only works with HTTP/1. Partial hijacking is functionally + # equivalent to streaming bodies, and is still optionally supported for + # backwards compatibility with older Rack versions. + # + # ==== Full Hijack + # + # Full hijack is used to completely take over an HTTP/1 connection. It + # occurs before any headers are written and causes the request to + # ignores any response generated by the application. + # + # It is intended to be used when applications need access to raw HTTP/1 + # connection. + # + # source://rack//lib/rack/lint.rb#551 def check_hijack(env); end + + # ==== Partial Hijack + # + # Partial hijack is used for bi-directional streaming of the request and + # response body. It occurs after the status and headers are written by + # the server and causes the server to ignore the Body of the response. + # + # It is intended to be used when applications need bi-directional + # streaming. + # + # source://rack//lib/rack/lint.rb#579 def check_hijack_response(headers, env); end + + # === The Input Stream + # + # The input stream is an IO-like object which contains the raw HTTP + # POST data. + # + # source://rack//lib/rack/lint.rb#387 def check_input(input); end + + # == The Response + # + # === The Status + # + # source://rack//lib/rack/lint.rb#616 def check_status(status); end + + # === The Body + # + # The Body is typically an +Array+ of +String+ instances, an enumerable + # that yields +String+ instances, a +Proc+ instance, or a File-like + # object. + # + # The Body must respond to +each+ or +call+. It may optionally respond + # to +to_path+ or +to_ary+. A Body that responds to +each+ is considered + # to be an Enumerable Body. A Body that responds to +call+ is considered + # to be a Streaming Body. + # + # A Body that responds to both +each+ and +call+ must be treated as an + # Enumerable Body, not a Streaming Body. If it responds to +each+, you + # must call +each+ and not +call+. If the Body doesn't respond to + # +each+, then you can assume it responds to +call+. + # + # The Body must either be consumed or returned. The Body is consumed by + # optionally calling either +each+ or +call+. + # Then, if the Body responds to +close+, it must be called to release + # any resources associated with the generation of the body. + # In other words, +close+ must always be called at least once; typically + # after the web server has sent the response to the client, but also in + # cases where the Rack application makes internal/virtual requests and + # discards the response. + # + # source://rack//lib/rack/lint.rb#744 def close; end + + # ==== Enumerable Body + # + # @raise [LintError] + # + # source://rack//lib/rack/lint.rb#778 def each; end + + # @return [Boolean] + # + # source://rack//lib/rack/lint.rb#826 def respond_to?(name, *_arg1); end + + # @raise [LintError] + # + # source://rack//lib/rack/lint.rb#54 def response; end + + # If the Body responds to +to_ary+, it must return an +Array+ whose + # contents are identical to that produced by calling +each+. + # Middleware may call +to_ary+ directly on the Body and return a new + # Body in its place. In other words, middleware can only process the + # Body directly if it responds to +to_ary+. If the Body responds to both + # +to_ary+ and +close+, its implementation of +to_ary+ must call + # +close+. + # + # source://rack//lib/rack/lint.rb#842 def to_ary; end + + # source://rack//lib/rack/lint.rb#822 def to_path; end + + # source://rack//lib/rack/lint.rb#706 def verify_content_length(size); end + + # source://rack//lib/rack/lint.rb#760 def verify_to_path; end end +# source://rack//lib/rack/lint.rb#820 Rack::Lint::Wrapper::BODY_METHODS = T.let(T.unsafe(nil), Hash) +# source://rack//lib/rack/lint.rb#500 class Rack::Lint::Wrapper::ErrorWrapper + # @return [ErrorWrapper] a new instance of ErrorWrapper + # + # source://rack//lib/rack/lint.rb#501 def initialize(error); end + # * +close+ must never be called on the error stream. + # + # @raise [LintError] + # + # source://rack//lib/rack/lint.rb#523 def close(*args); end + + # * +flush+ must be called without arguments and must be called + # in order to make the error appear for sure. + # + # source://rack//lib/rack/lint.rb#518 def flush; end + + # * +puts+ must be called with a single argument that responds to +to_s+. + # + # source://rack//lib/rack/lint.rb#506 def puts(str); end + + # * +write+ must be called with a single argument that is a String. + # + # @raise [LintError] + # + # source://rack//lib/rack/lint.rb#511 def write(str); end end +# source://rack//lib/rack/lint.rb#405 class Rack::Lint::Wrapper::InputWrapper + # @return [InputWrapper] a new instance of InputWrapper + # + # source://rack//lib/rack/lint.rb#406 def initialize(input); end + # * +close+ can be called on the input stream to indicate that the + # any remaining input is not needed. + # + # source://rack//lib/rack/lint.rb#483 def close(*args); end + + # * +each+ must be called without arguments and only yield Strings. + # + # @raise [LintError] + # + # source://rack//lib/rack/lint.rb#471 def each(*args); end + + # * +gets+ must be called without arguments and return a string, + # or +nil+ on EOF. + # + # @raise [LintError] + # + # source://rack//lib/rack/lint.rb#412 def gets(*args); end + + # * +read+ behaves like IO#read. + # Its signature is read([length, [buffer]]). + # + # If given, +length+ must be a non-negative Integer (>= 0) or +nil+, + # and +buffer+ must be a String and may not be nil. + # + # If +length+ is given and not nil, then this method reads at most + # +length+ bytes from the input stream. + # + # If +length+ is not given or nil, then this method reads + # all data until EOF. + # + # When EOF is reached, this method returns nil if +length+ is given + # and not nil, or "" if +length+ is not given or is nil. + # + # If +buffer+ is given, then the read data will be placed + # into +buffer+ instead of a newly created String object. + # + # source://rack//lib/rack/lint.rb#438 def read(*args); end end +# source://rack//lib/rack/lint.rb#875 class Rack::Lint::Wrapper::StreamWrapper extend ::Forwardable + # @return [StreamWrapper] a new instance of StreamWrapper + # + # source://rack//lib/rack/lint.rb#890 def initialize(stream); end - def <<(*args, &block); end - def close(*args, &block); end - def close_read(*args, &block); end - def close_write(*args, &block); end - def closed?(*args, &block); end - def flush(*args, &block); end - def read(*args, &block); end - def write(*args, &block); end + # source://forwardable/1.3.2/forwardable.rb#229 + def <<(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def close(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def close_read(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def close_write(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def closed?(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def flush(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def read(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def write(*args, **_arg1, &block); end end +# The semantics of these IO methods must be a best effort match to +# those of a normal Ruby IO or Socket object, using standard arguments +# and raising standard exceptions. Servers are encouraged to simply +# pass on real IO objects, although it is recognized that this approach +# is not directly compatible with HTTP/2. +# +# source://rack//lib/rack/lint.rb#883 Rack::Lint::Wrapper::StreamWrapper::REQUIRED_METHODS = T.let(T.unsafe(nil), Array) +# Rack::Lock locks every request inside a mutex, so that every request +# will effectively be executed synchronously. +# +# source://rack//lib/rack/lock.rb#8 class Rack::Lock + # @return [Lock] a new instance of Lock + # + # source://rack//lib/rack/lock.rb#9 def initialize(app, mutex = T.unsafe(nil)); end + # source://rack//lib/rack/lock.rb#13 def call(env); end private + # source://rack//lib/rack/lock.rb#25 def unlock; end end +# Sets up rack.logger to write to rack.errors stream +# +# source://rack//lib/rack/logger.rb#9 class Rack::Logger + # @return [Logger] a new instance of Logger + # + # source://rack//lib/rack/logger.rb#10 def initialize(app, level = T.unsafe(nil)); end + # source://rack//lib/rack/logger.rb#14 def call(env); end end +# Rack::MediaType parse media type and parameters out of content_type string +# +# source://rack//lib/rack/media_type.rb#6 class Rack::MediaType class << self + # The media type parameters provided in CONTENT_TYPE as a Hash, or + # an empty Hash if no CONTENT_TYPE or media-type parameters were + # provided. e.g., when the CONTENT_TYPE is "text/plain;charset=utf-8", + # this method responds with the following Hash: + # { 'charset' => 'utf-8' } + # + # source://rack//lib/rack/media_type.rb#26 def params(content_type); end + + # The media type (type/subtype) portion of the CONTENT_TYPE header + # without any media type parameters. e.g., when CONTENT_TYPE is + # "text/plain;charset=utf-8", the media-type is "text/plain". + # + # For more information on the use of media types in HTTP, see: + # http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7 + # + # source://rack//lib/rack/media_type.rb#16 def type(content_type); end private + # source://rack//lib/rack/media_type.rb#38 def strip_doublequotes(str); end end end +# source://rack//lib/rack/media_type.rb#7 Rack::MediaType::SPLIT_PATTERN = T.let(T.unsafe(nil), Regexp) +# source://rack//lib/rack/method_override.rb#8 class Rack::MethodOverride + # @return [MethodOverride] a new instance of MethodOverride + # + # source://rack//lib/rack/method_override.rb#15 def initialize(app); end + # source://rack//lib/rack/method_override.rb#19 def call(env); end + + # source://rack//lib/rack/method_override.rb#31 def method_override(env); end private + # source://rack//lib/rack/method_override.rb#44 def allowed_methods; end + + # source://rack//lib/rack/method_override.rb#48 def method_override_param(req); end end +# source://rack//lib/rack/method_override.rb#13 Rack::MethodOverride::ALLOWED_METHODS = T.let(T.unsafe(nil), Array) + +# source://rack//lib/rack/method_override.rb#9 Rack::MethodOverride::HTTP_METHODS = T.let(T.unsafe(nil), Array) + +# source://rack//lib/rack/method_override.rb#12 Rack::MethodOverride::HTTP_METHOD_OVERRIDE_HEADER = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/method_override.rb#11 Rack::MethodOverride::METHOD_OVERRIDE_PARAM_KEY = T.let(T.unsafe(nil), String) +# source://rack//lib/rack/mime.rb#4 module Rack::Mime private + # Returns true if the given value is a mime match for the given mime match + # specification, false otherwise. + # + # Rack::Mime.match?('text/html', 'text/*') => true + # Rack::Mime.match?('text/plain', '*') => true + # Rack::Mime.match?('text/html', 'application/json') => false + # + # @return [Boolean] + # + # source://rack//lib/rack/mime.rb#30 def match?(value, matcher); end + + # Returns String with mime type if found, otherwise use +fallback+. + # +ext+ should be filename extension in the '.ext' format that + # File.extname(file) returns. + # +fallback+ may be any object + # + # Also see the documentation for MIME_TYPES + # + # Usage: + # Rack::Mime.mime_type('.foo') + # + # This is a shortcut for: + # Rack::Mime::MIME_TYPES.fetch('.foo', 'application/octet-stream') + # + # source://rack//lib/rack/mime.rb#18 def mime_type(ext, fallback = T.unsafe(nil)); end class << self + # Returns true if the given value is a mime match for the given mime match + # specification, false otherwise. + # + # Rack::Mime.match?('text/html', 'text/*') => true + # Rack::Mime.match?('text/plain', '*') => true + # Rack::Mime.match?('text/html', 'application/json') => false + # + # @return [Boolean] + # + # source://rack//lib/rack/mime.rb#30 def match?(value, matcher); end + + # Returns String with mime type if found, otherwise use +fallback+. + # +ext+ should be filename extension in the '.ext' format that + # File.extname(file) returns. + # +fallback+ may be any object + # + # Also see the documentation for MIME_TYPES + # + # Usage: + # Rack::Mime.mime_type('.foo') + # + # This is a shortcut for: + # Rack::Mime::MIME_TYPES.fetch('.foo', 'application/octet-stream') + # + # source://rack//lib/rack/mime.rb#18 def mime_type(ext, fallback = T.unsafe(nil)); end end end +# List of most common mime-types, selected various sources +# according to their usefulness in a webserving scope for Ruby +# users. +# +# To amend this list with your local mime.types list you can use: +# +# require 'webrick/httputils' +# list = WEBrick::HTTPUtils.load_mime_types('/etc/mime.types') +# Rack::Mime::MIME_TYPES.merge!(list) +# +# N.B. On Ubuntu the mime.types file does not include the leading period, so +# users may need to modify the data before merging into the hash. +# +# source://rack//lib/rack/mime.rb#51 Rack::Mime::MIME_TYPES = T.let(T.unsafe(nil), Hash) +# Rack::MockRequest helps testing your Rack application without +# actually using HTTP. +# +# After performing a request on a URL with get/post/put/patch/delete, it +# returns a MockResponse with useful helper methods for effective +# testing. +# +# You can pass a hash with additional configuration to the +# get/post/put/patch/delete. +# :input:: A String or IO-like to be used as rack.input. +# :fatal:: Raise a FatalWarning if the app writes to rack.errors. +# :lint:: If true, wrap the application in a Rack::Lint. +# +# source://rack//lib/rack/mock_request.rb#23 class Rack::MockRequest + # @return [MockRequest] a new instance of MockRequest + # + # source://rack//lib/rack/mock_request.rb#49 def initialize(app); end + # Make a DELETE request and return a MockResponse. See #request. + # + # source://rack//lib/rack/mock_request.rb#62 def delete(uri, opts = T.unsafe(nil)); end + + # Make a GET request and return a MockResponse. See #request. + # + # source://rack//lib/rack/mock_request.rb#54 def get(uri, opts = T.unsafe(nil)); end + + # Make a HEAD request and return a MockResponse. See #request. + # + # source://rack//lib/rack/mock_request.rb#64 def head(uri, opts = T.unsafe(nil)); end + + # Make an OPTIONS request and return a MockResponse. See #request. + # + # source://rack//lib/rack/mock_request.rb#66 def options(uri, opts = T.unsafe(nil)); end + + # Make a PATCH request and return a MockResponse. See #request. + # + # source://rack//lib/rack/mock_request.rb#60 def patch(uri, opts = T.unsafe(nil)); end + + # Make a POST request and return a MockResponse. See #request. + # + # source://rack//lib/rack/mock_request.rb#56 def post(uri, opts = T.unsafe(nil)); end + + # Make a PUT request and return a MockResponse. See #request. + # + # source://rack//lib/rack/mock_request.rb#58 def put(uri, opts = T.unsafe(nil)); end + + # Make a request using the given request method for the given + # uri to the rack application and return a MockResponse. + # Options given are passed to MockRequest.env_for. + # + # source://rack//lib/rack/mock_request.rb#71 def request(method = T.unsafe(nil), uri = T.unsafe(nil), opts = T.unsafe(nil)); end class << self + # Return the Rack environment used for a request to +uri+. + # All options that are strings are added to the returned environment. + # Options: + # :fatal :: Whether to raise an exception if request outputs to rack.errors + # :input :: The rack.input to set + # :http_version :: The SERVER_PROTOCOL to set + # :method :: The HTTP request method to use + # :params :: The params to use + # :script_name :: The SCRIPT_NAME to set + # + # source://rack//lib/rack/mock_request.rb#103 def env_for(uri = T.unsafe(nil), opts = T.unsafe(nil)); end + + # For historical reasons, we're pinning to RFC 2396. + # URI::Parser = URI::RFC2396_Parser + # + # source://rack//lib/rack/mock_request.rb#89 def parse_uri_rfc2396(uri); end end end +# source://rack//lib/rack/mock_request.rb#44 Rack::MockRequest::DEFAULT_ENV = T.let(T.unsafe(nil), Hash) +# source://rack//lib/rack/mock_request.rb#27 class Rack::MockRequest::FatalWarner + # source://rack//lib/rack/mock_request.rb#36 def flush; end + + # @raise [FatalWarning] + # + # source://rack//lib/rack/mock_request.rb#28 def puts(warning); end + + # source://rack//lib/rack/mock_request.rb#39 def string; end + + # @raise [FatalWarning] + # + # source://rack//lib/rack/mock_request.rb#32 def write(warning); end end +# source://rack//lib/rack/mock_request.rb#24 class Rack::MockRequest::FatalWarning < ::RuntimeError; end +# Rack::MockResponse provides useful helpers for testing your apps. +# Usually, you don't create the MockResponse on your own, but use +# MockRequest. +# +# source://rack//lib/rack/mock_response.rb#13 class Rack::MockResponse < ::Rack::Response + # @return [MockResponse] a new instance of MockResponse + # + # source://rack//lib/rack/mock_response.rb#24 def initialize(status, headers, body, errors = T.unsafe(nil)); end + # source://rack//lib/rack/mock_response.rb#39 def =~(other); end + + # source://rack//lib/rack/mock_response.rb#47 def body; end + + # source://rack//lib/rack/mock_response.rb#73 def cookie(name); end + + # Headers + # + # source://rack//lib/rack/mock_response.rb#19 def cookies; end + + # @return [Boolean] + # + # source://rack//lib/rack/mock_response.rb#69 def empty?; end + + # Errors + # + # source://rack//lib/rack/mock_response.rb#22 def errors; end + + # Errors + # + # source://rack//lib/rack/mock_response.rb#22 def errors=(_arg0); end + + # source://rack//lib/rack/mock_response.rb#43 def match(other); end + + # Headers + # + # source://rack//lib/rack/mock_response.rb#19 def original_headers; end private + # source://rack//lib/rack/mock_response.rb#102 def identify_cookie_attributes(cookie_filling); end + + # source://rack//lib/rack/mock_response.rb#79 def parse_cookies_from_header; end class << self @@ -650,741 +2316,2868 @@ class Rack::MockResponse < ::Rack::Response end end +# A multipart form data parser, adapted from IOWA. +# +# Usually, Rack::Request#POST takes care of calling this. +# +# source://rack//lib/rack/multipart/parser.rb#8 module Rack::Multipart class << self + # source://rack//lib/rack/multipart.rb#39 def build_multipart(params, first = T.unsafe(nil)); end + + # source://rack//lib/rack/multipart.rb#35 def extract_multipart(request, params = T.unsafe(nil)); end + + # source://rack//lib/rack/multipart.rb#17 def parse_multipart(env, params = T.unsafe(nil)); end end end +# source://rack//lib/rack/multipart/parser.rb#32 Rack::Multipart::ATTRIBUTE = T.let(T.unsafe(nil), Regexp) + +# Updated definitions from RFC 2231 +# +# source://rack//lib/rack/multipart/parser.rb#31 Rack::Multipart::ATTRIBUTE_CHAR = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/multipart/parser.rb#26 Rack::Multipart::BROKEN = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/multipart/parser.rb#24 Rack::Multipart::CONDISP = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/multipart/parser.rb#43 Rack::Multipart::DISPPARM = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/multipart/parser.rb#21 Rack::Multipart::EOL = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/multipart/parser.rb#39 Rack::Multipart::EXTENDED_INITIAL_NAME = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/multipart/parser.rb#41 Rack::Multipart::EXTENDED_INITIAL_PARAMETER = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/multipart/parser.rb#40 Rack::Multipart::EXTENDED_INITIAL_VALUE = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/multipart/parser.rb#36 Rack::Multipart::EXTENDED_OTHER_NAME = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/multipart/parser.rb#38 Rack::Multipart::EXTENDED_OTHER_PARAMETER = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/multipart/parser.rb#37 Rack::Multipart::EXTENDED_OTHER_VALUE = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/multipart/parser.rb#42 Rack::Multipart::EXTENDED_PARAMETER = T.let(T.unsafe(nil), Regexp) + +# Use specific error class when parsing multipart request +# that ends early. +# +# source://rack//lib/rack/multipart/parser.rb#15 class Rack::Multipart::EmptyContentError < ::EOFError; end + +# Base class for multipart exceptions that do not subclass from +# other exception classes for backwards compatibility. +# +# source://rack//lib/rack/multipart/parser.rb#19 class Rack::Multipart::Error < ::StandardError; end +# source://rack//lib/rack/multipart/generator.rb#7 class Rack::Multipart::Generator + # @return [Generator] a new instance of Generator + # + # source://rack//lib/rack/multipart/generator.rb#8 def initialize(params, first = T.unsafe(nil)); end + # source://rack//lib/rack/multipart/generator.rb#16 def dump; end private + # source://rack//lib/rack/multipart/generator.rb#89 def content_for_other(file, name); end + + # source://rack//lib/rack/multipart/generator.rb#77 def content_for_tempfile(io, file, name); end + + # source://rack//lib/rack/multipart/generator.rb#52 def flattened_params; end + + # @return [Boolean] + # + # source://rack//lib/rack/multipart/generator.rb#37 def multipart?; end end +# source://rack//lib/rack/multipart/parser.rb#22 Rack::Multipart::MULTIPART = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/multipart.rb#14 Rack::Multipart::MULTIPART_BOUNDARY = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/multipart/parser.rb#28 Rack::Multipart::MULTIPART_CONTENT_DISPOSITION = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/multipart/parser.rb#29 Rack::Multipart::MULTIPART_CONTENT_ID = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/multipart/parser.rb#27 Rack::Multipart::MULTIPART_CONTENT_TYPE = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/multipart/parser.rb#9 class Rack::Multipart::MultipartPartLimitError < ::Errno::EMFILE; end + +# source://rack//lib/rack/multipart/parser.rb#11 class Rack::Multipart::MultipartTotalPartLimitError < ::StandardError; end +# source://rack//lib/rack/multipart/parser.rb#46 class Rack::Multipart::Parser + # @return [Parser] a new instance of Parser + # + # source://rack//lib/rack/multipart/parser.rb#205 def initialize(boundary, tempfile, bufsize, query_parser); end + # source://rack//lib/rack/multipart/parser.rb#220 def parse(io); end + + # source://rack//lib/rack/multipart/parser.rb#243 def result; end + + # Returns the value of attribute state. + # + # source://rack//lib/rack/multipart/parser.rb#203 def state; end private + # Scan until the we find the start or end of the boundary. + # If we find it, return the appropriate symbol for the start or + # end of the boundary. If we don't find the start or end of the + # boundary, clear the buffer and return nil. + # + # source://rack//lib/rack/multipart/parser.rb#346 def consume_boundary; end + + # From WEBrick::HTTPUtils + # + # source://rack//lib/rack/multipart/parser.rb#255 def dequote(str); end + + # source://rack//lib/rack/multipart/parser.rb#355 def get_filename(head); end + + # source://rack//lib/rack/multipart/parser.rb#290 def handle_consume_token; end + + # source://rack//lib/rack/multipart/parser.rb#427 def handle_empty_content!(content); end + + # This handles the initial parser state. We read until we find the starting + # boundary, then we can transition to the next state. If we find the ending + # boundary, this is an invalid multipart upload, but keep scanning for opening + # boundary in that case. If no boundary found, we need to keep reading data + # and retry. It's highly unlikely the initial read will not consume the + # boundary. The client would have to deliberately craft a response + # with the opening boundary beyond the buffer size for that to happen. + # + # source://rack//lib/rack/multipart/parser.rb#274 def handle_fast_forward; end + + # source://rack//lib/rack/multipart/parser.rb#323 def handle_mime_body; end + + # source://rack//lib/rack/multipart/parser.rb#300 def handle_mime_head; end + + # source://rack//lib/rack/multipart/parser.rb#261 def read_data(io, outbuf); end + + # source://rack//lib/rack/multipart/parser.rb#393 def tag_multipart_encoding(filename, content_type, name, body); end class << self + # source://rack//lib/rack/multipart/parser.rb#92 def parse(io, content_length, content_type, tmpfile, bufsize, qp); end + + # source://rack//lib/rack/multipart/parser.rb#85 def parse_boundary(content_type); end end end +# source://rack//lib/rack/multipart/parser.rb#47 Rack::Multipart::Parser::BUFSIZE = T.let(T.unsafe(nil), Integer) +# source://rack//lib/rack/multipart/parser.rb#53 class Rack::Multipart::Parser::BoundedIO + # @return [BoundedIO] a new instance of BoundedIO + # + # source://rack//lib/rack/multipart/parser.rb#54 def initialize(io, content_length); end + # source://rack//lib/rack/multipart/parser.rb#60 def read(size, outbuf = T.unsafe(nil)); end end +# source://rack//lib/rack/multipart/parser.rb#390 Rack::Multipart::Parser::CHARSET = T.let(T.unsafe(nil), String) +# source://rack//lib/rack/multipart/parser.rb#112 class Rack::Multipart::Parser::Collector include ::Enumerable + # @return [Collector] a new instance of Collector + # + # source://rack//lib/rack/multipart/parser.rb#148 def initialize(tempfile); end + # source://rack//lib/rack/multipart/parser.rb#154 def each; end + + # source://rack//lib/rack/multipart/parser.rb#174 def on_mime_body(mime_index, content); end + + # source://rack//lib/rack/multipart/parser.rb#178 def on_mime_finish(mime_index); end + + # source://rack//lib/rack/multipart/parser.rb#158 def on_mime_head(mime_index, head, filename, content_type, name); end private + # source://rack//lib/rack/multipart/parser.rb#183 def check_part_limits; end end +# source://rack//lib/rack/multipart/parser.rb#136 class Rack::Multipart::Parser::Collector::BufferPart < ::Rack::Multipart::Parser::Collector::MimePart + # source://rack//lib/rack/multipart/parser.rb#138 def close; end + + # @return [Boolean] + # + # source://rack//lib/rack/multipart/parser.rb#137 def file?; end end +# source://rack//lib/rack/multipart/parser.rb#113 class Rack::Multipart::Parser::Collector::MimePart < ::Struct + # @yield [data] + # + # source://rack//lib/rack/multipart/parser.rb#114 def get_data; end end +# source://rack//lib/rack/multipart/parser.rb#141 class Rack::Multipart::Parser::Collector::TempfilePart < ::Rack::Multipart::Parser::Collector::MimePart + # source://rack//lib/rack/multipart/parser.rb#143 def close; end + + # @return [Boolean] + # + # source://rack//lib/rack/multipart/parser.rb#142 def file?; end end +# source://rack//lib/rack/multipart/parser.rb#83 Rack::Multipart::Parser::EMPTY = T.let(T.unsafe(nil), Rack::Multipart::Parser::MultipartInfo) +# source://rack//lib/rack/multipart/parser.rb#82 class Rack::Multipart::Parser::MultipartInfo < ::Struct + # Returns the value of attribute params + # + # @return [Object] the current value of params def params; end + + # Sets the attribute params + # + # @param value [Object] the value to set the attribute params to. + # @return [Object] the newly set value def params=(_); end + + # Returns the value of attribute tmp_files + # + # @return [Object] the current value of tmp_files def tmp_files; end + + # Sets the attribute tmp_files + # + # @param value [Object] the value to set the attribute tmp_files to. + # @return [Object] the newly set value def tmp_files=(_); end class << self def [](*_arg0); end def inspect; end + def keyword_init?; end def members; end def new(*_arg0); end end end +# source://rack//lib/rack/multipart/parser.rb#49 Rack::Multipart::Parser::TEMPFILE_FACTORY = T.let(T.unsafe(nil), Proc) + +# source://rack//lib/rack/multipart/parser.rb#48 Rack::Multipart::Parser::TEXT_PLAIN = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/multipart/parser.rb#35 Rack::Multipart::REGULAR_PARAMETER = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/multipart/parser.rb#34 Rack::Multipart::REGULAR_PARAMETER_NAME = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/multipart/parser.rb#44 Rack::Multipart::RFC2183 = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/multipart/parser.rb#33 Rack::Multipart::SECTION = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/multipart/parser.rb#23 Rack::Multipart::TOKEN = T.let(T.unsafe(nil), Regexp) +# source://rack//lib/rack/multipart/uploaded_file.rb#8 class Rack::Multipart::UploadedFile + # @return [UploadedFile] a new instance of UploadedFile + # + # source://rack//lib/rack/multipart/uploaded_file.rb#16 def initialize(filepath = T.unsafe(nil), ct = T.unsafe(nil), bin = T.unsafe(nil), path: T.unsafe(nil), content_type: T.unsafe(nil), binary: T.unsafe(nil), filename: T.unsafe(nil), io: T.unsafe(nil)); end + # The content type of the "uploaded" file + # + # source://rack//lib/rack/multipart/uploaded_file.rb#14 def content_type; end + + # The content type of the "uploaded" file + # + # source://rack//lib/rack/multipart/uploaded_file.rb#14 def content_type=(_arg0); end + + # source://rack//lib/rack/multipart/uploaded_file.rb#31 def local_path; end + + # source://rack//lib/rack/multipart/uploaded_file.rb#40 def method_missing(method_name, *args, &block); end + + # The filename, *not* including the path, of the "uploaded" file + # + # source://rack//lib/rack/multipart/uploaded_file.rb#11 def original_filename; end + + # source://rack//lib/rack/multipart/uploaded_file.rb#31 def path; end + + # @return [Boolean] + # + # source://rack//lib/rack/multipart/uploaded_file.rb#36 def respond_to?(*args); end end +# source://rack//lib/rack/multipart/parser.rb#25 Rack::Multipart::VALUE = T.let(T.unsafe(nil), Regexp) +# source://rack//lib/rack/null_logger.rb#6 class Rack::NullLogger + # @return [NullLogger] a new instance of NullLogger + # + # source://rack//lib/rack/null_logger.rb#7 def initialize(app); end + # source://rack//lib/rack/null_logger.rb#45 def <<(msg); end + + # source://rack//lib/rack/null_logger.rb#43 def add(severity, message = T.unsafe(nil), progname = T.unsafe(nil), &block); end + + # source://rack//lib/rack/null_logger.rb#11 def call(env); end + + # source://rack//lib/rack/null_logger.rb#42 def close; end + + # source://rack//lib/rack/null_logger.rb#34 def datetime_format; end + + # source://rack//lib/rack/null_logger.rb#39 def datetime_format=(datetime_format); end + + # source://rack//lib/rack/null_logger.rb#17 def debug(progname = T.unsafe(nil), &block); end + + # source://rack//lib/rack/null_logger.rb#27 def debug!; end + + # @return [Boolean] + # + # source://rack//lib/rack/null_logger.rb#23 def debug?; end + + # source://rack//lib/rack/null_logger.rb#19 def error(progname = T.unsafe(nil), &block); end + + # source://rack//lib/rack/null_logger.rb#28 def error!; end + + # @return [Boolean] + # + # source://rack//lib/rack/null_logger.rb#25 def error?; end + + # source://rack//lib/rack/null_logger.rb#20 def fatal(progname = T.unsafe(nil), &block); end + + # source://rack//lib/rack/null_logger.rb#29 def fatal!; end + + # @return [Boolean] + # + # source://rack//lib/rack/null_logger.rb#26 def fatal?; end + + # source://rack//lib/rack/null_logger.rb#35 def formatter; end + + # source://rack//lib/rack/null_logger.rb#40 def formatter=(formatter); end + + # source://rack//lib/rack/null_logger.rb#16 def info(progname = T.unsafe(nil), &block); end + + # source://rack//lib/rack/null_logger.rb#30 def info!; end + + # @return [Boolean] + # + # source://rack//lib/rack/null_logger.rb#22 def info?; end + + # source://rack//lib/rack/null_logger.rb#32 def level; end + + # source://rack//lib/rack/null_logger.rb#37 def level=(level); end + + # source://rack//lib/rack/null_logger.rb#44 def log(severity, message = T.unsafe(nil), progname = T.unsafe(nil), &block); end + + # source://rack//lib/rack/null_logger.rb#33 def progname; end + + # source://rack//lib/rack/null_logger.rb#38 def progname=(progname); end + + # source://rack//lib/rack/null_logger.rb#46 def reopen(logdev = T.unsafe(nil)); end + + # source://rack//lib/rack/null_logger.rb#36 def sev_threshold; end + + # source://rack//lib/rack/null_logger.rb#41 def sev_threshold=(sev_threshold); end + + # source://rack//lib/rack/null_logger.rb#21 def unknown(progname = T.unsafe(nil), &block); end + + # source://rack//lib/rack/null_logger.rb#18 def warn(progname = T.unsafe(nil), &block); end + + # source://rack//lib/rack/null_logger.rb#31 def warn!; end + + # @return [Boolean] + # + # source://rack//lib/rack/null_logger.rb#24 def warn?; end end +# source://rack//lib/rack/constants.rb#34 Rack::OPTIONS = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#31 Rack::PATCH = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#8 Rack::PATH_INFO = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#29 Rack::POST = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#30 Rack::PUT = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#12 Rack::QUERY_STRING = T.let(T.unsafe(nil), String) +# source://rack//lib/rack/query_parser.rb#6 class Rack::QueryParser + # @return [QueryParser] a new instance of QueryParser + # + # source://rack//lib/rack/query_parser.rb#33 def initialize(params_class, _key_space_limit = T.unsafe(nil), param_depth_limit); end + # source://rack//lib/rack/query_parser.rb#167 def make_params; end + + # source://rack//lib/rack/query_parser.rb#171 def new_depth_limit(param_depth_limit); end + + # normalize_params recursively expands parameters into structural types. If + # the structural types represented by two different parameter names are in + # conflict, a ParameterTypeError is raised. The depth argument is deprecated + # and should no longer be used, it is kept for backwards compatibility with + # earlier versions of rack. + # + # source://rack//lib/rack/query_parser.rb#95 def normalize_params(params, name, v, _depth = T.unsafe(nil)); end + + # Returns the value of attribute param_depth_limit. + # + # source://rack//lib/rack/query_parser.rb#31 def param_depth_limit; end + + # parse_nested_query expands a query string into structural types. Supported + # types are Arrays, Hashes and basic value types. It is possible to supply + # query strings with parameters of conflicting types, in this case a + # ParameterTypeError is raised. Users are encouraged to return a 400 in this + # case. + # + # source://rack//lib/rack/query_parser.rb#74 def parse_nested_query(qs, separator = T.unsafe(nil)); end + + # Stolen from Mongrel, with some small modifications: + # Parses a query string by breaking it up at the '&'. You can also use this + # to parse cookies by changing the characters used in the second parameter + # (which defaults to '&'). + # + # source://rack//lib/rack/query_parser.rb#46 def parse_query(qs, separator = T.unsafe(nil), &unescaper); end private + # @raise [ParamsTooDeepError] + # + # source://rack//lib/rack/query_parser.rb#99 def _normalize_params(params, name, v, depth); end + + # @return [Boolean] + # + # source://rack//lib/rack/query_parser.rb#181 def params_hash_has_key?(hash, key); end + + # @return [Boolean] + # + # source://rack//lib/rack/query_parser.rb#177 def params_hash_type?(obj); end + + # source://rack//lib/rack/query_parser.rb#193 def unescape(string, encoding = T.unsafe(nil)); end class << self + # source://rack//lib/rack/query_parser.rb#23 def make_default(_key_space_limit = T.unsafe(nil), param_depth_limit); end end end +# source://rack//lib/rack/query_parser.rb#8 Rack::QueryParser::COMMON_SEP = T.let(T.unsafe(nil), Hash) + +# source://rack//lib/rack/query_parser.rb#7 Rack::QueryParser::DEFAULT_SEP = T.let(T.unsafe(nil), Regexp) + +# InvalidParameterError is the error that is raised when incoming structural +# parameters (parsed by parse_nested_query) contain invalid format or byte +# sequence. +# +# source://rack//lib/rack/query_parser.rb#17 class Rack::QueryParser::InvalidParameterError < ::ArgumentError; end + +# ParameterTypeError is the error that is raised when incoming structural +# parameters (parsed by parse_nested_query) contain conflicting types. +# +# source://rack//lib/rack/query_parser.rb#12 class Rack::QueryParser::ParameterTypeError < ::TypeError; end +# source://rack//lib/rack/query_parser.rb#197 class Rack::QueryParser::Params + # @return [Params] a new instance of Params + # + # source://rack//lib/rack/query_parser.rb#198 def initialize; end + # source://rack//lib/rack/query_parser.rb#203 def [](key); end + + # source://rack//lib/rack/query_parser.rb#207 def []=(key, value); end + + # @return [Boolean] + # + # source://rack//lib/rack/query_parser.rb#211 def key?(key); end + + # Recursively unwraps nested `Params` objects and constructs an object + # of the same shape, but using the objects' internal representations + # (Ruby hashes) in place of the objects. The result is a hash consisting + # purely of Ruby primitives. + # + # Mutation warning! + # + # 1. This method mutates the internal representation of the `Params` + # objects in order to save object allocations. + # + # 2. The value you get back is a reference to the internal hash + # representation, not a copy. + # + # 3. Because the `Params` object's internal representation is mutable + # through the `#[]=` method, it is not thread safe. The result of + # getting the hash representation while another thread is adding a + # key to it is non-deterministic. + # + # source://rack//lib/rack/query_parser.rb#233 def to_h; end + + # Recursively unwraps nested `Params` objects and constructs an object + # of the same shape, but using the objects' internal representations + # (Ruby hashes) in place of the objects. The result is a hash consisting + # purely of Ruby primitives. + # + # Mutation warning! + # + # 1. This method mutates the internal representation of the `Params` + # objects in order to save object allocations. + # + # 2. The value you get back is a reference to the internal hash + # representation, not a copy. + # + # 3. Because the `Params` object's internal representation is mutable + # through the `#[]=` method, it is not thread safe. The result of + # getting the hash representation while another thread is adding a + # key to it is non-deterministic. + # + # source://rack//lib/rack/query_parser.rb#233 def to_params_hash; end end +# ParamsTooDeepError is the error that is raised when params are recursively +# nested over the specified limit. +# +# source://rack//lib/rack/query_parser.rb#21 class Rack::QueryParser::ParamsTooDeepError < ::RangeError; end + +# source://rack//lib/rack/constants.rb#42 Rack::RACK_ERRORS = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#49 Rack::RACK_HIJACK = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#44 Rack::RACK_INPUT = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#50 Rack::RACK_IS_HIJACK = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#43 Rack::RACK_LOGGER = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#63 Rack::RACK_METHODOVERRIDE_ORIGINAL_METHOD = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#52 Rack::RACK_MULTIPART_BUFFER_SIZE = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#53 Rack::RACK_MULTIPART_TEMPFILE_FACTORY = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#51 Rack::RACK_RECURSIVE_INCLUDE = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#59 Rack::RACK_REQUEST_COOKIE_HASH = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#60 Rack::RACK_REQUEST_COOKIE_STRING = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#58 Rack::RACK_REQUEST_FORM_ERROR = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#56 Rack::RACK_REQUEST_FORM_HASH = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#55 Rack::RACK_REQUEST_FORM_INPUT = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#57 Rack::RACK_REQUEST_FORM_VARS = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#61 Rack::RACK_REQUEST_QUERY_HASH = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#62 Rack::RACK_REQUEST_QUERY_STRING = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#54 Rack::RACK_RESPONSE_FINISHED = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#45 Rack::RACK_SESSION = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#46 Rack::RACK_SESSION_OPTIONS = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#47 Rack::RACK_SHOWSTATUS_DETAIL = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#41 Rack::RACK_TEMPFILES = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#48 Rack::RACK_URL_SCHEME = T.let(T.unsafe(nil), String) + +# Rack environment variables +# +# source://rack//lib/rack/constants.rb#40 Rack::RACK_VERSION = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/version.rb#28 Rack::RELEASE = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#9 Rack::REQUEST_METHOD = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#10 Rack::REQUEST_PATH = T.let(T.unsafe(nil), String) +# Rack::Recursive allows applications called down the chain to +# include data from other applications (by using +# rack['rack.recursive.include'][...] or raise a +# ForwardRequest to redirect internally. +# +# source://rack//lib/rack/recursive.rb#36 class Rack::Recursive + # @return [Recursive] a new instance of Recursive + # + # source://rack//lib/rack/recursive.rb#37 def initialize(app); end + # source://rack//lib/rack/recursive.rb#45 def _call(env); end + + # source://rack//lib/rack/recursive.rb#41 def call(env); end + + # source://rack//lib/rack/recursive.rb#52 def include(env, path); end end +# High performant source reloader +# +# This class acts as Rack middleware. +# +# What makes it especially suited for use in a production environment is that +# any file will only be checked once and there will only be made one system +# call stat(2). +# +# Please note that this will not reload files in the background, it does so +# only when actively called. +# +# It is performing a check/reload cycle at the start of every request, but +# also respects a cool down time, during which nothing will be done. +# +# source://rack//lib/rack/reloader.rb#24 class Rack::Reloader + # @return [Reloader] a new instance of Reloader + # + # source://rack//lib/rack/reloader.rb#25 def initialize(app, cooldown = T.unsafe(nil), backend = T.unsafe(nil)); end + # source://rack//lib/rack/reloader.rb#36 def call(env); end + + # source://rack//lib/rack/reloader.rb#50 def reload!(stderr = T.unsafe(nil)); end + + # A safe Kernel::load, issuing the hooks depending on the results + # + # source://rack//lib/rack/reloader.rb#58 def safe_load(file, mtime, stderr = T.unsafe(nil)); end end +# source://rack//lib/rack/reloader.rb#68 module Rack::Reloader::Stat + # Takes a relative or absolute +file+ name, a couple possible +paths+ that + # the +file+ might reside in. Returns the full path and File::Stat for the + # path. + # + # source://rack//lib/rack/reloader.rb#88 def figure_path(file, paths); end + + # source://rack//lib/rack/reloader.rb#69 def rotation; end + + # source://rack//lib/rack/reloader.rb#103 def safe_stat(file); end end +# Rack::Request provides a convenient interface to a Rack +# environment. It is stateless, the environment +env+ passed to the +# constructor will be directly modified. +# +# req = Rack::Request.new(env) +# req.post? +# req.params["data"] +# +# source://rack//lib/rack/request.rb#16 class Rack::Request include ::Rack::Request::Env include ::Rack::Request::Helpers + # @return [Request] a new instance of Request + # + # source://rack//lib/rack/request.rb#62 def initialize(env); end + # source://rack//lib/rack/request.rb#76 def delete_param(k); end + + # source://rack//lib/rack/request.rb#67 def params; end + + # source://rack//lib/rack/request.rb#71 def update_param(k, v); end class << self + # The priority when checking forwarded headers. The default + # is [:forwarded, :x_forwarded], which means, check the + # +Forwarded+ header first, followed by the appropriate + # X-Forwarded-* header. You can revert the priority by + # reversing the priority, or remove checking of either + # or both headers by removing elements from the array. + # + # This should be set as appropriate in your environment + # based on what reverse proxies are in use. If you are not + # using reverse proxies, you should probably use an empty + # array. + # + # source://rack//lib/rack/request.rb#31 def forwarded_priority; end + + # The priority when checking forwarded headers. The default + # is [:forwarded, :x_forwarded], which means, check the + # +Forwarded+ header first, followed by the appropriate + # X-Forwarded-* header. You can revert the priority by + # reversing the priority, or remove checking of either + # or both headers by removing elements from the array. + # + # This should be set as appropriate in your environment + # based on what reverse proxies are in use. If you are not + # using reverse proxies, you should probably use an empty + # array. + # + # source://rack//lib/rack/request.rb#31 def forwarded_priority=(_arg0); end + + # Returns the value of attribute ip_filter. + # + # source://rack//lib/rack/request.rb#18 def ip_filter; end + + # Sets the attribute ip_filter + # + # @param value the value to set the attribute ip_filter to. + # + # source://rack//lib/rack/request.rb#18 def ip_filter=(_arg0); end + + # The priority when checking either the X-Forwarded-Proto + # or X-Forwarded-Scheme header for the forwarded protocol. + # The default is [:proto, :scheme], to try the + # X-Forwarded-Proto header before the + # X-Forwarded-Scheme header. Rack 2 had behavior + # similar to [:scheme, :proto]. You can remove either or + # both of the entries in array to ignore that respective header. + # + # source://rack//lib/rack/request.rb#40 def x_forwarded_proto_priority; end + + # The priority when checking either the X-Forwarded-Proto + # or X-Forwarded-Scheme header for the forwarded protocol. + # The default is [:proto, :scheme], to try the + # X-Forwarded-Proto header before the + # X-Forwarded-Scheme header. Rack 2 had behavior + # similar to [:scheme, :proto]. You can remove either or + # both of the entries in array to ignore that respective header. + # + # source://rack//lib/rack/request.rb#40 def x_forwarded_proto_priority=(_arg0); end end end +# source://rack//lib/rack/request.rb#60 Rack::Request::ALLOWED_SCHEMES = T.let(T.unsafe(nil), Array) +# source://rack//lib/rack/request.rb#82 module Rack::Request::Env + # source://rack//lib/rack/request.rb#86 def initialize(env); end + # Add a header that may have multiple values. + # + # Example: + # request.add_header 'Accept', 'image/png' + # request.add_header 'Accept', '*/*' + # + # assert_equal 'image/png,*/*', request.get_header('Accept') + # + # http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2 + # + # source://rack//lib/rack/request.rb#129 def add_header(key, v); end + + # Delete a request specific value for `name`. + # + # source://rack//lib/rack/request.rb#140 def delete_header(name); end + + # Loops through each key / value pair in the request specific data. + # + # source://rack//lib/rack/request.rb#111 def each_header(&block); end + + # The environment of the request. + # + # source://rack//lib/rack/request.rb#84 def env; end + + # If a block is given, it yields to the block if the value hasn't been set + # on the request. + # + # source://rack//lib/rack/request.rb#106 def fetch_header(name, &block); end + + # Get a request specific value for `name`. + # + # source://rack//lib/rack/request.rb#100 def get_header(name); end + + # Predicate method to test to see if `name` has been set as request + # specific data + # + # @return [Boolean] + # + # source://rack//lib/rack/request.rb#95 def has_header?(name); end + + # Set a request specific value for `name` to `v` + # + # source://rack//lib/rack/request.rb#116 def set_header(name, v); end private + # source://rack//lib/rack/request.rb#144 def initialize_copy(other); end end +# source://rack//lib/rack/request.rb#149 module Rack::Request::Helpers + # Returns the data received in the query string. + # + # source://rack//lib/rack/request.rb#484 def GET; end + + # Returns the data received in the request body. + # + # This method support both application/x-www-form-urlencoded and + # multipart/form-data. + # + # source://rack//lib/rack/request.rb#498 def POST; end + + # shortcut for request.params[key] + # + # source://rack//lib/rack/request.rb#609 def [](key); end + + # shortcut for request.params[key] = value + # + # Note that modifications will not be persisted in the env. Use update_param or delete_param if you want to destructively modify params. + # + # source://rack//lib/rack/request.rb#618 def []=(key, value); end + + # source://rack//lib/rack/request.rb#596 def accept_encoding; end + + # source://rack//lib/rack/request.rb#600 def accept_language; end + + # The authority of the incoming request as defined by RFC3976. + # https://tools.ietf.org/html/rfc3986#section-3.2 + # + # In HTTP/1, this is the `host` header. + # In HTTP/2, this is the `:authority` pseudo-header. + # + # source://rack//lib/rack/request.rb#266 def authority; end + + # source://rack//lib/rack/request.rb#579 def base_url; end + + # source://rack//lib/rack/request.rb#190 def body; end + + # The character set of the request body if a "charset" media type + # parameter was given, or nil if no "charset" was specified. Note + # that, per RFC2616, text/* media types that specify no explicit + # charset are to be considered ISO-8859-1. + # + # source://rack//lib/rack/request.rb#458 def content_charset; end + + # source://rack//lib/rack/request.rb#199 def content_length; end + + # source://rack//lib/rack/request.rb#308 def content_type; end + + # source://rack//lib/rack/request.rb#293 def cookies; end + + # Checks the HTTP request method (or verb) to see if it was of type DELETE + # + # @return [Boolean] + # + # source://rack//lib/rack/request.rb#220 def delete?; end + + # Destructively delete a parameter, whether it's in GET or POST. Returns the value of the deleted parameter. + # + # If the parameter is in both GET and POST, the POST value takes precedence since that's how #params works. + # + # env['rack.input'] is not touched. + # + # source://rack//lib/rack/request.rb#574 def delete_param(k); end + + # Determine whether the request body contains form-data by checking + # the request content-type for one of the media-types: + # "application/x-www-form-urlencoded" or "multipart/form-data". The + # list of form-data media types can be modified through the + # +FORM_DATA_MEDIA_TYPES+ array. + # + # A request body is also assumed to contain form-data when no + # content-type header is provided and the request_method is POST. + # + # @return [Boolean] + # + # source://rack//lib/rack/request.rb#470 def form_data?; end + + # source://rack//lib/rack/request.rb#393 def forwarded_authority; end + + # source://rack//lib/rack/request.rb#353 def forwarded_for; end + + # source://rack//lib/rack/request.rb#374 def forwarded_port; end + + # source://rack//lib/rack/request.rb#592 def fullpath; end + + # Checks the HTTP request method (or verb) to see if it was of type GET + # + # @return [Boolean] + # + # source://rack//lib/rack/request.rb#223 def get?; end + + # Checks the HTTP request method (or verb) to see if it was of type HEAD + # + # @return [Boolean] + # + # source://rack//lib/rack/request.rb#226 def head?; end + + # Returns a formatted host, suitable for being used in a URI. + # + # source://rack//lib/rack/request.rb#333 def host; end + + # The `HTTP_HOST` header. + # + # source://rack//lib/rack/request.rb#318 def host_authority; end + + # source://rack//lib/rack/request.rb#322 def host_with_port(authority = T.unsafe(nil)); end + + # Returns an address suitable for being to resolve to an address. + # In the case of a domain name or IPv4 address, the result is the same + # as +host+. In the case of IPv6 or future address formats, the square + # brackets are removed. + # + # source://rack//lib/rack/request.rb#341 def hostname; end + + # source://rack//lib/rack/request.rb#414 def ip; end + + # Checks the HTTP request method (or verb) to see if it was of type LINK + # + # @return [Boolean] + # + # source://rack//lib/rack/request.rb#232 def link?; end + + # source://rack//lib/rack/request.rb#200 def logger; end + + # The media type (type/subtype) portion of the CONTENT_TYPE header + # without any media type parameters. e.g., when CONTENT_TYPE is + # "text/plain;charset=utf-8", the media-type is "text/plain". + # + # For more information on the use of media types in HTTP, see: + # http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7 + # + # source://rack//lib/rack/request.rb#441 def media_type; end + + # The media type parameters provided in CONTENT_TYPE as a Hash, or + # an empty Hash if no CONTENT_TYPE or media-type parameters were + # provided. e.g., when the CONTENT_TYPE is "text/plain;charset=utf-8", + # this method responds with the following Hash: + # { 'charset' => 'utf-8' } + # + # source://rack//lib/rack/request.rb#450 def media_type_params; end + + # Checks the HTTP request method (or verb) to see if it was of type OPTIONS + # + # @return [Boolean] + # + # source://rack//lib/rack/request.rb#229 def options?; end + + # The union of GET and POST data. + # + # Note that modifications will not be persisted in the env. Use update_param or delete_param if you want to destructively modify params. + # + # source://rack//lib/rack/request.rb#545 def params; end + + # Determine whether the request body contains data by checking + # the request media_type against registered parse-data media-types + # + # @return [Boolean] + # + # source://rack//lib/rack/request.rb#479 def parseable_data?; end + + # Checks the HTTP request method (or verb) to see if it was of type PATCH + # + # @return [Boolean] + # + # source://rack//lib/rack/request.rb#235 def patch?; end + + # source://rack//lib/rack/request.rb#588 def path; end + + # source://rack//lib/rack/request.rb#194 def path_info; end + + # source://rack//lib/rack/request.rb#195 def path_info=(s); end + + # source://rack//lib/rack/request.rb#345 def port; end + + # Checks the HTTP request method (or verb) to see if it was of type POST + # + # @return [Boolean] + # + # source://rack//lib/rack/request.rb#238 def post?; end + + # Checks the HTTP request method (or verb) to see if it was of type PUT + # + # @return [Boolean] + # + # source://rack//lib/rack/request.rb#241 def put?; end + + # source://rack//lib/rack/request.rb#198 def query_string; end + + # the referer of the client + # + # source://rack//lib/rack/request.rb#204 def referer; end + + # the referer of the client + # + # source://rack//lib/rack/request.rb#204 def referrer; end + + # source://rack//lib/rack/request.rb#197 def request_method; end + + # source://rack//lib/rack/request.rb#249 def scheme; end + + # source://rack//lib/rack/request.rb#191 def script_name; end + + # source://rack//lib/rack/request.rb#192 def script_name=(s); end + + # The authority as defined by the `SERVER_NAME` and `SERVER_PORT` + # variables. + # + # source://rack//lib/rack/request.rb#272 def server_authority; end + + # source://rack//lib/rack/request.rb#285 def server_name; end + + # source://rack//lib/rack/request.rb#289 def server_port; end + + # source://rack//lib/rack/request.rb#207 def session; end + + # source://rack//lib/rack/request.rb#213 def session_options; end + + # @return [Boolean] + # + # source://rack//lib/rack/request.rb#410 def ssl?; end + + # Checks the HTTP request method (or verb) to see if it was of type TRACE + # + # @return [Boolean] + # + # source://rack//lib/rack/request.rb#244 def trace?; end + + # @return [Boolean] + # + # source://rack//lib/rack/request.rb#604 def trusted_proxy?(ip); end + + # Checks the HTTP request method (or verb) to see if it was of type UNLINK + # + # @return [Boolean] + # + # source://rack//lib/rack/request.rb#247 def unlink?; end + + # Destructively update a parameter, whether it's in GET and/or POST. Returns nil. + # + # The parameter is updated wherever it was previous defined, so GET, POST, or both. If it wasn't previously defined, it's inserted into GET. + # + # env['rack.input'] is not touched. + # + # source://rack//lib/rack/request.rb#554 def update_param(k, v); end + + # Tries to return a remake of the original request URL as a string. + # + # source://rack//lib/rack/request.rb#584 def url; end + + # source://rack//lib/rack/request.rb#201 def user_agent; end + + # like Hash#values_at + # + # source://rack//lib/rack/request.rb#625 def values_at(*keys); end + + # @return [Boolean] + # + # source://rack//lib/rack/request.rb#313 def xhr?; end private + # source://rack//lib/rack/request.rb#757 def allowed_scheme(header); end + + # source://rack//lib/rack/request.rb#631 def default_session; end + + # source://rack//lib/rack/request.rb#761 def forwarded_priority; end + + # source://rack//lib/rack/request.rb#733 def forwarded_scheme; end + + # Get an array of values set in the RFC 7239 `Forwarded` request header. + # + # source://rack//lib/rack/request.rb#659 def get_http_forwarded(token); end + + # source://rack//lib/rack/request.rb#647 def parse_http_accept_header(header); end + + # source://rack//lib/rack/request.rb#671 def parse_multipart; end + + # source://rack//lib/rack/request.rb#667 def parse_query(qs, d = T.unsafe(nil)); end + + # source://rack//lib/rack/request.rb#663 def query_parser; end + + # source://rack//lib/rack/request.rb#724 def reject_trusted_ip_addresses(ip_addresses); end + + # source://rack//lib/rack/request.rb#718 def split_authority(authority); end + + # source://rack//lib/rack/request.rb#675 def split_header(value); end + + # Assist with compatibility when processing `X-Forwarded-For`. + # + # source://rack//lib/rack/request.rb#634 def wrap_ipv6(host); end + + # source://rack//lib/rack/request.rb#765 def x_forwarded_proto_priority; end end +# source://rack//lib/rack/request.rb#703 Rack::Request::Helpers::AUTHORITY = T.let(T.unsafe(nil), Regexp) + +# Default ports depending on scheme. Used to decide whether or not +# to include the port in a generated URI. +# +# source://rack//lib/rack/request.rb#168 Rack::Request::Helpers::DEFAULT_PORTS = T.let(T.unsafe(nil), Hash) + +# The set of form-data media-types. Requests that do not indicate +# one of the media types present in this list will not be eligible +# for form-data / param parsing. +# +# source://rack//lib/rack/request.rb#153 Rack::Request::Helpers::FORM_DATA_MEDIA_TYPES = T.let(T.unsafe(nil), Array) + +# source://rack//lib/rack/request.rb#728 Rack::Request::Helpers::FORWARDED_SCHEME_HEADERS = T.let(T.unsafe(nil), Hash) + +# source://rack//lib/rack/request.rb#176 Rack::Request::Helpers::HTTP_FORWARDED = T.let(T.unsafe(nil), String) + +# The address of the client which connected to the proxy. +# +# source://rack//lib/rack/request.rb#171 Rack::Request::Helpers::HTTP_X_FORWARDED_FOR = T.let(T.unsafe(nil), String) + +# The contents of the host/:authority header sent to the proxy. +# +# source://rack//lib/rack/request.rb#174 Rack::Request::Helpers::HTTP_X_FORWARDED_HOST = T.let(T.unsafe(nil), String) + +# The port used to connect to the proxy. +# +# source://rack//lib/rack/request.rb#185 Rack::Request::Helpers::HTTP_X_FORWARDED_PORT = T.let(T.unsafe(nil), String) + +# The protocol used to connect to the proxy. +# +# source://rack//lib/rack/request.rb#182 Rack::Request::Helpers::HTTP_X_FORWARDED_PROTO = T.let(T.unsafe(nil), String) + +# The value of the scheme sent to the proxy. +# +# source://rack//lib/rack/request.rb#179 Rack::Request::Helpers::HTTP_X_FORWARDED_SCHEME = T.let(T.unsafe(nil), String) + +# Another way for specifying https scheme was used. +# +# source://rack//lib/rack/request.rb#188 Rack::Request::Helpers::HTTP_X_FORWARDED_SSL = T.let(T.unsafe(nil), String) + +# The set of media-types. Requests that do not indicate +# one of the media types present in this list will not be eligible +# for param parsing like soap attachments or generic multiparts +# +# source://rack//lib/rack/request.rb#161 Rack::Request::Helpers::PARSEABLE_DATA_MEDIA_TYPES = T.let(T.unsafe(nil), Array) +# Rack::Response provides a convenient interface to create a Rack +# response. +# +# It allows setting of headers and cookies, and provides useful +# defaults (an OK response with empty headers and body). +# +# You can use Response#write to iteratively generate your response, +# but note that this is buffered by Rack::Response until you call +# +finish+. +finish+ however can take a block inside which calls to +# +write+ are synchronous with the Rack response. +# +# Your application's +call+ should end returning Response#finish. +# +# source://rack//lib/rack/response.rb#23 class Rack::Response include ::Rack::Response::Helpers + # Initialize the response object with the specified +body+, +status+ + # and +headers+. + # + # If the +body+ is +nil+, construct an empty response object with internal + # buffering. + # + # If the +body+ responds to +to_str+, assume it's a string-like object and + # construct a buffered response object containing using that string as the + # initial contents of the buffer. + # + # Otherwise it is expected +body+ conforms to the normal requirements of a + # Rack response body, typically implementing one of +each+ (enumerable + # body) or +call+ (streaming body). + # + # The +status+ defaults to +200+ which is the "OK" HTTP status code. You + # can provide any other valid status code. + # + # The +headers+ must be a +Hash+ of key-value header pairs which conform to + # the Rack specification for response headers. The key must be a +String+ + # instance and the value can be either a +String+ or +Array+ instance. + # + # @return [Response] a new instance of Response + # @yield [_self] + # @yieldparam _self [Rack::Response] the object that the method was called on + # + # source://rack//lib/rack/response.rb#61 def initialize(body = T.unsafe(nil), status = T.unsafe(nil), headers = T.unsafe(nil)); end + # @raise [ArgumentError] + # + # source://rack//lib/rack/response.rb#163 def [](key); end + + # @raise [ArgumentError] + # + # source://rack//lib/rack/response.rb#167 def []=(key, value); end + + # Returns the value of attribute body. + # + # source://rack//lib/rack/response.rb#31 def body; end + + # Sets the attribute body + # + # @param value the value to set the attribute body to. + # + # source://rack//lib/rack/response.rb#31 def body=(_arg0); end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#101 def chunked?; end + + # source://rack//lib/rack/response.rb#151 def close; end + + # @raise [ArgumentError] + # + # source://rack//lib/rack/response.rb#171 def delete_header(key); end + + # source://rack//lib/rack/response.rb#131 def each(&callback); end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#155 def empty?; end + + # Generate a response array consistent with the requirements of the SPEC. + # which is suitable to be returned from the middleware `#call(env)` method. + # + # @return [Array] a 3-tuple suitable of `[status, headers, body]` + # + # source://rack//lib/rack/response.rb#113 def finish(&block); end + + # @raise [ArgumentError] + # + # source://rack//lib/rack/response.rb#163 def get_header(key); end + + # @raise [ArgumentError] + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#159 def has_header?(key); end + + # Deprecated, use headers instead. + # + # source://rack//lib/rack/response.rb#35 def header; end + + # Returns the value of attribute headers. + # + # source://rack//lib/rack/response.rb#32 def headers; end + + # Returns the value of attribute length. + # + # source://rack//lib/rack/response.rb#31 def length; end + + # Sets the attribute length + # + # @param value the value to set the attribute length to. + # + # source://rack//lib/rack/response.rb#31 def length=(_arg0); end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#105 def no_entity_body?; end + + # source://rack//lib/rack/response.rb#96 def redirect(target, status = T.unsafe(nil)); end + + # @raise [ArgumentError] + # + # source://rack//lib/rack/response.rb#167 def set_header(key, value); end + + # Returns the value of attribute status. + # + # source://rack//lib/rack/response.rb#31 def status; end + + # Sets the attribute status + # + # @param value the value to set the attribute status to. + # + # source://rack//lib/rack/response.rb#31 def status=(_arg0); end + + # Generate a response array consistent with the requirements of the SPEC. + # which is suitable to be returned from the middleware `#call(env)` method. + # For *response + # + # @return [Array] a 3-tuple suitable of `[status, headers, body]` + # + # source://rack//lib/rack/response.rb#113 def to_a(&block); end + + # Append to body and update content-length. + # + # NOTE: Do not mix #write and direct #body access! + # + # source://rack//lib/rack/response.rb#145 def write(chunk); end class << self + # source://rack//lib/rack/response.rb#24 def [](status, headers, body); end end end +# source://rack//lib/rack/response.rb#28 Rack::Response::CHUNKED = T.let(T.unsafe(nil), String) +# source://rack//lib/rack/response.rb#179 module Rack::Response::Helpers + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#190 def accepted?; end + + # Add a header that may have multiple values. + # + # Example: + # response.add_header 'vary', 'accept-encoding' + # response.add_header 'vary', 'cookie' + # + # assert_equal 'accept-encoding,cookie', response.get_header('vary') + # + # http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2 + # + # @raise [ArgumentError] + # + # source://rack//lib/rack/response.rb#218 def add_header(key, value); end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#193 def bad_request?; end + + # Specify that the content should be cached. + # + # @option directive + # @param duration [Integer] The number of seconds until the cache expires. + # @param directive [Hash] a customizable set of options + # + # source://rack//lib/rack/response.rb#306 def cache!(duration = T.unsafe(nil), directive: T.unsafe(nil)); end + + # source://rack//lib/rack/response.rb#289 def cache_control; end + + # source://rack//lib/rack/response.rb#293 def cache_control=(value); end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#185 def client_error?; end + + # source://rack//lib/rack/response.rb#256 def content_length; end + + # Get the content type of the response. + # + # source://rack//lib/rack/response.rb#239 def content_type; end + + # Set the content type of the response. + # + # source://rack//lib/rack/response.rb#244 def content_type=(content_type); end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#189 def created?; end + + # source://rack//lib/rack/response.rb#273 def delete_cookie(key, value = T.unsafe(nil)); end + + # Specifies that the content shouldn't be cached. Overrides `cache!` if already called. + # + # source://rack//lib/rack/response.rb#298 def do_not_cache!; end + + # source://rack//lib/rack/response.rb#313 def etag; end + + # source://rack//lib/rack/response.rb#317 def etag=(value); end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#195 def forbidden?; end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#205 def include?(header); end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#182 def informational?; end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#180 def invalid?; end + + # source://rack//lib/rack/response.rb#261 def location; end + + # source://rack//lib/rack/response.rb#265 def location=(location); end + + # source://rack//lib/rack/response.rb#248 def media_type; end + + # source://rack//lib/rack/response.rb#252 def media_type_params; end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#197 def method_not_allowed?; end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#192 def moved_permanently?; end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#191 def no_content?; end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#198 def not_acceptable?; end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#196 def not_found?; end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#188 def ok?; end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#200 def precondition_failed?; end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#203 def redirect?; end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#184 def redirection?; end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#199 def request_timeout?; end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#186 def server_error?; end + + # source://rack//lib/rack/response.rb#269 def set_cookie(key, value); end + + # source://rack//lib/rack/response.rb#281 def set_cookie_header; end + + # source://rack//lib/rack/response.rb#285 def set_cookie_header=(value); end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#183 def successful?; end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#194 def unauthorized?; end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#201 def unprocessable?; end protected + # source://rack//lib/rack/response.rb#351 def append(chunk); end + + # source://rack//lib/rack/response.rb#323 def buffered_body!; end end +# source://rack//lib/rack/response.rb#365 class Rack::Response::Raw include ::Rack::Response::Helpers + # @return [Raw] a new instance of Raw + # + # source://rack//lib/rack/response.rb#371 def initialize(status, headers); end + # source://rack//lib/rack/response.rb#388 def delete_header(key); end + + # source://rack//lib/rack/response.rb#380 def get_header(key); end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#376 def has_header?(key); end + + # Returns the value of attribute headers. + # + # source://rack//lib/rack/response.rb#368 def headers; end + + # source://rack//lib/rack/response.rb#384 def set_header(key, value); end + + # Returns the value of attribute status. + # + # source://rack//lib/rack/response.rb#369 def status; end + + # Sets the attribute status + # + # @param value the value to set the attribute status to. + # + # source://rack//lib/rack/response.rb#369 def status=(_arg0); end end +# source://rack//lib/rack/response.rb#29 Rack::Response::STATUS_WITH_NO_ENTITY_BODY = T.let(T.unsafe(nil), Hash) +# Class which can make any IO object rewindable, including non-rewindable ones. It does +# this by buffering the data into a tempfile, which is rewindable. +# +# Don't forget to call #close when you're done. This frees up temporary resources that +# RewindableInput uses, though it does *not* close the original IO object. +# +# source://rack//lib/rack/rewindable_input.rb#14 class Rack::RewindableInput + # @return [RewindableInput] a new instance of RewindableInput + # + # source://rack//lib/rack/rewindable_input.rb#29 def initialize(io); end + # Closes this RewindableInput object without closing the originally + # wrapped IO object. Cleans up any temporary resources that this RewindableInput + # has created. + # + # This method may be called multiple times. It does nothing on subsequent calls. + # + # source://rack//lib/rack/rewindable_input.rb#65 def close; end + + # source://rack//lib/rack/rewindable_input.rb#45 def each(&block); end + + # source://rack//lib/rack/rewindable_input.rb#35 def gets; end + + # source://rack//lib/rack/rewindable_input.rb#40 def read(*args); end + + # source://rack//lib/rack/rewindable_input.rb#50 def rewind; end + + # source://rack//lib/rack/rewindable_input.rb#55 def size; end private + # @return [Boolean] + # + # source://rack//lib/rack/rewindable_input.rb#109 def filesystem_has_posix_semantics?; end + + # source://rack//lib/rack/rewindable_input.rb#78 def make_rewindable; end end +# Makes rack.input rewindable, for compatibility with applications and middleware +# designed for earlier versions of Rack (where rack.input was required to be +# rewindable). +# +# source://rack//lib/rack/rewindable_input.rb#18 class Rack::RewindableInput::Middleware + # @return [Middleware] a new instance of Middleware + # + # source://rack//lib/rack/rewindable_input.rb#19 def initialize(app); end + # source://rack//lib/rack/rewindable_input.rb#23 def call(env); end end +# Sets an "x-runtime" response header, indicating the response +# time of the request, in seconds +# +# You can put it right before the application to see the processing +# time, or before all the other middlewares to include time for them, +# too. +# +# source://rack//lib/rack/runtime.rb#12 class Rack::Runtime + # @return [Runtime] a new instance of Runtime + # + # source://rack//lib/rack/runtime.rb#16 def initialize(app, name = T.unsafe(nil)); end + # source://rack//lib/rack/runtime.rb#22 def call(env); end end +# source://rack//lib/rack/runtime.rb#13 Rack::Runtime::FORMAT_STRING = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/runtime.rb#14 Rack::Runtime::HEADER_NAME = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#11 Rack::SCRIPT_NAME = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#14 Rack::SERVER_NAME = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#15 Rack::SERVER_PORT = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#13 Rack::SERVER_PROTOCOL = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#24 Rack::SET_COOKIE = T.let(T.unsafe(nil), String) +# = Sendfile +# +# The Sendfile middleware intercepts responses whose body is being +# served from a file and replaces it with a server specific x-sendfile +# header. The web server is then responsible for writing the file contents +# to the client. This can dramatically reduce the amount of work required +# by the Ruby backend and takes advantage of the web server's optimized file +# delivery code. +# +# In order to take advantage of this middleware, the response body must +# respond to +to_path+ and the request must include an x-sendfile-type +# header. Rack::Files and other components implement +to_path+ so there's +# rarely anything you need to do in your application. The x-sendfile-type +# header is typically set in your web servers configuration. The following +# sections attempt to document +# +# === Nginx +# +# Nginx supports the x-accel-redirect header. This is similar to x-sendfile +# but requires parts of the filesystem to be mapped into a private URL +# hierarchy. +# +# The following example shows the Nginx configuration required to create +# a private "/files/" area, enable x-accel-redirect, and pass the special +# x-sendfile-type and x-accel-mapping headers to the backend: +# +# location ~ /files/(.*) { +# internal; +# alias /var/www/$1; +# } +# +# location / { +# proxy_redirect off; +# +# proxy_set_header Host $host; +# proxy_set_header X-Real-IP $remote_addr; +# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; +# +# proxy_set_header x-sendfile-type x-accel-redirect; +# proxy_set_header x-accel-mapping /var/www/=/files/; +# +# proxy_pass http://127.0.0.1:8080/; +# } +# +# Note that the x-sendfile-type header must be set exactly as shown above. +# The x-accel-mapping header should specify the location on the file system, +# followed by an equals sign (=), followed name of the private URL pattern +# that it maps to. The middleware performs a simple substitution on the +# resulting path. +# +# See Also: https://www.nginx.com/resources/wiki/start/topics/examples/xsendfile +# +# === lighttpd +# +# Lighttpd has supported some variation of the x-sendfile header for some +# time, although only recent version support x-sendfile in a reverse proxy +# configuration. +# +# $HTTP["host"] == "example.com" { +# proxy-core.protocol = "http" +# proxy-core.balancer = "round-robin" +# proxy-core.backends = ( +# "127.0.0.1:8000", +# "127.0.0.1:8001", +# ... +# ) +# +# proxy-core.allow-x-sendfile = "enable" +# proxy-core.rewrite-request = ( +# "x-sendfile-type" => (".*" => "x-sendfile") +# ) +# } +# +# See Also: http://redmine.lighttpd.net/wiki/lighttpd/Docs:ModProxyCore +# +# === Apache +# +# x-sendfile is supported under Apache 2.x using a separate module: +# +# https://tn123.org/mod_xsendfile/ +# +# Once the module is compiled and installed, you can enable it using +# XSendFile config directive: +# +# RequestHeader Set x-sendfile-type x-sendfile +# ProxyPassReverse / http://localhost:8001/ +# XSendFile on +# +# === Mapping parameter +# +# The third parameter allows for an overriding extension of the +# x-accel-mapping header. Mappings should be provided in tuples of internal to +# external. The internal values may contain regular expression syntax, they +# will be matched with case indifference. +# +# source://rack//lib/rack/sendfile.rb#104 class Rack::Sendfile + # @return [Sendfile] a new instance of Sendfile + # + # source://rack//lib/rack/sendfile.rb#105 def initialize(app, variation = T.unsafe(nil), mappings = T.unsafe(nil)); end + # source://rack//lib/rack/sendfile.rb#113 def call(env); end private + # source://rack//lib/rack/sendfile.rb#154 def map_accel_path(env, path); end + + # source://rack//lib/rack/sendfile.rb#148 def variation(env); end end +# Rack::ShowExceptions catches all exceptions raised from the app it +# wraps. It shows a useful backtrace with the sourcefile and +# clickable context, the whole Rack environment and the request +# data. +# +# Be careful when you use this on public-facing sites as it could +# reveal information helpful to attackers. +# +# source://rack//lib/rack/show_exceptions.rb#19 class Rack::ShowExceptions + # @return [ShowExceptions] a new instance of ShowExceptions + # + # source://rack//lib/rack/show_exceptions.rb#22 def initialize(app); end + # source://rack//lib/rack/show_exceptions.rb#26 def call(env); end + + # source://rack//lib/rack/show_exceptions.rb#61 def dump_exception(exception); end + + # source://rack//lib/rack/show_exceptions.rb#112 def h(obj); end + + # @return [Boolean] + # + # source://rack//lib/rack/show_exceptions.rb#52 def prefers_plaintext?(env); end + + # source://rack//lib/rack/show_exceptions.rb#72 def pretty(env, exception); end + + # source://rack//lib/rack/show_exceptions.rb#108 def template; end private + # @return [Boolean] + # + # source://rack//lib/rack/show_exceptions.rb#56 def accepts_html?(env); end end +# source://rack//lib/rack/show_exceptions.rb#20 Rack::ShowExceptions::CONTEXT = T.let(T.unsafe(nil), Integer) + +# source://rack//lib/rack/show_exceptions.rb#127 Rack::ShowExceptions::TEMPLATE = T.let(T.unsafe(nil), ERB) +# Rack::ShowStatus catches all empty responses and replaces them +# with a site explaining the error. +# +# Additional details can be put into rack.showstatus.detail +# and will be shown as HTML. If such details exist, the error page +# is always rendered, even if the reply was not empty. +# +# source://rack//lib/rack/show_status.rb#18 class Rack::ShowStatus + # @return [ShowStatus] a new instance of ShowStatus + # + # source://rack//lib/rack/show_status.rb#19 def initialize(app); end + # source://rack//lib/rack/show_status.rb#24 def call(env); end + + # source://rack//lib/rack/show_status.rb#54 def h(obj); end end +# source://rack//lib/rack/show_status.rb#69 Rack::ShowStatus::TEMPLATE = T.let(T.unsafe(nil), String) +# The Rack::Static middleware intercepts requests for static files +# (javascript files, images, stylesheets, etc) based on the url prefixes or +# route mappings passed in the options, and serves them using a Rack::Files +# object. This allows a Rack stack to serve both static and dynamic content. +# +# Examples: +# +# Serve all requests beginning with /media from the "media" folder located +# in the current directory (ie media/*): +# +# use Rack::Static, :urls => ["/media"] +# +# Same as previous, but instead of returning 404 for missing files under +# /media, call the next middleware: +# +# use Rack::Static, :urls => ["/media"], :cascade => true +# +# Serve all requests beginning with /css or /images from the folder "public" +# in the current directory (ie public/css/* and public/images/*): +# +# use Rack::Static, :urls => ["/css", "/images"], :root => "public" +# +# Serve all requests to / with "index.html" from the folder "public" in the +# current directory (ie public/index.html): +# +# use Rack::Static, :urls => {"/" => 'index.html'}, :root => 'public' +# +# Serve all requests normally from the folder "public" in the current +# directory but uses index.html as default route for "/" +# +# use Rack::Static, :urls => [""], :root => 'public', :index => +# 'index.html' +# +# Set custom HTTP Headers for based on rules: +# +# use Rack::Static, :root => 'public', +# :header_rules => [ +# [rule, {header_field => content, header_field => content}], +# [rule, {header_field => content}] +# ] +# +# Rules for selecting files: +# +# 1) All files +# Provide the :all symbol +# :all => Matches every file +# +# 2) Folders +# Provide the folder path as a string +# '/folder' or '/folder/subfolder' => Matches files in a certain folder +# +# 3) File Extensions +# Provide the file extensions as an array +# ['css', 'js'] or %w(css js) => Matches files ending in .css or .js +# +# 4) Regular Expressions / Regexp +# Provide a regular expression +# %r{\.(?:css|js)\z} => Matches files ending in .css or .js +# /\.(?:eot|ttf|otf|woff2|woff|svg)\z/ => Matches files ending in +# the most common web font formats (.eot, .ttf, .otf, .woff2, .woff, .svg) +# Note: This Regexp is available as a shortcut, using the :fonts rule +# +# 5) Font Shortcut +# Provide the :fonts symbol +# :fonts => Uses the Regexp rule stated right above to match all common web font endings +# +# Rule Ordering: +# Rules are applied in the order that they are provided. +# List rather general rules above special ones. +# +# Complete example use case including HTTP header rules: +# +# use Rack::Static, :root => 'public', +# :header_rules => [ +# # Cache all static files in public caches (e.g. Rack::Cache) +# # as well as in the browser +# [:all, {'cache-control' => 'public, max-age=31536000'}], +# +# # Provide web fonts with cross-origin access-control-headers +# # Firefox requires this when serving assets using a Content Delivery Network +# [:fonts, {'access-control-allow-origin' => '*'}] +# ] +# +# source://rack//lib/rack/static.rb#92 class Rack::Static + # @return [Static] a new instance of Static + # + # source://rack//lib/rack/static.rb#93 def initialize(app, options = T.unsafe(nil)); end + # @return [Boolean] + # + # source://rack//lib/rack/static.rb#109 def add_index_root?(path); end + + # Convert HTTP header rules to HTTP headers + # + # source://rack//lib/rack/static.rb#166 def applicable_rules(path); end + + # source://rack//lib/rack/static.rb#125 def call(env); end + + # source://rack//lib/rack/static.rb#121 def can_serve(path); end + + # source://rack//lib/rack/static.rb#113 def overwrite_file_path(path); end + + # source://rack//lib/rack/static.rb#117 def route_file(path); end end +# source://rack//lib/rack/constants.rb#37 Rack::TRACE = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#25 Rack::TRANSFER_ENCODING = T.let(T.unsafe(nil), String) +# Middleware tracks and cleans Tempfiles created throughout a request (i.e. Rack::Multipart) +# Ideas/strategy based on posts by Eric Wong and Charles Oliver Nutter +# https://groups.google.com/forum/#!searchin/rack-devel/temp/rack-devel/brK8eh-MByw/sw61oJJCGRMJ +# +# source://rack//lib/rack/tempfile_reaper.rb#11 class Rack::TempfileReaper + # @return [TempfileReaper] a new instance of TempfileReaper + # + # source://rack//lib/rack/tempfile_reaper.rb#12 def initialize(app); end + # source://rack//lib/rack/tempfile_reaper.rb#16 def call(env); end end +# source://rack//lib/rack/constants.rb#36 Rack::UNLINK = T.let(T.unsafe(nil), String) +# Rack::URLMap takes a hash mapping urls or paths to apps, and +# dispatches accordingly. Support for HTTP/1.1 host names exists if +# the URLs start with http:// or https://. +# +# URLMap modifies the SCRIPT_NAME and PATH_INFO such that the part +# relevant for dispatch is in the SCRIPT_NAME, and the rest in the +# PATH_INFO. This should be taken care of when you need to +# reconstruct the URL in order to create links. +# +# URLMap dispatches in such a way that the longest paths are tried +# first, since they are most specific. +# +# source://rack//lib/rack/urlmap.rb#20 class Rack::URLMap + # @return [URLMap] a new instance of URLMap + # + # source://rack//lib/rack/urlmap.rb#21 def initialize(map = T.unsafe(nil)); end + # source://rack//lib/rack/urlmap.rb#48 def call(env); end + + # source://rack//lib/rack/urlmap.rb#25 def remap(map); end private + # @return [Boolean] + # + # source://rack//lib/rack/urlmap.rb#87 def casecmp?(v1, v2); end end +# Rack::Utils contains a grab-bag of useful methods for writing web +# applications adopted from all kinds of Ruby libraries. +# +# source://rack//lib/rack/utils.rb#19 module Rack::Utils private + # source://rack//lib/rack/utils.rb#254 def add_cookie_to_header(header, key, value); end + + # source://rack//lib/rack/utils.rb#389 def add_remove_cookie_to_header(header, key, value = T.unsafe(nil)); end + + # Return best accept value to use, based on the algorithm + # in RFC 2616 Section 14. If there are multiple best + # matches (same specificity and quality), the value returned + # is arbitrary. + # + # source://rack//lib/rack/utils.rb#173 def best_q_match(q_value_header, available_mimes); end + + # source://rack//lib/rack/utils.rb#127 def build_nested_query(value, prefix = T.unsafe(nil)); end + + # source://rack//lib/rack/utils.rb#117 def build_query(params); end + + # Parses the "Range:" header, if present, into an array of Range objects. + # Returns nil if the header is missing or syntactically invalid. + # Returns an empty array if none of the ranges are satisfiable. + # + # source://rack//lib/rack/utils.rb#431 def byte_ranges(env, size); end + + # source://rack//lib/rack/utils.rb#632 def clean_path_info(path_info); end + + # :nocov: + # + # source://rack//lib/rack/utils.rb#98 def clock_time; end + + # source://rack//lib/rack/utils.rb#383 def delete_cookie_header!(headers, key, value = T.unsafe(nil)); end + + # :call-seq: + # delete_set_cookie_header(key, value = {}) -> encoded string + # + # Generate an encoded string based on the given +key+ and +value+ using + # set_cookie_header for the purpose of causing the specified cookie to be + # deleted. The +value+ may be an instance of +Hash+ and can include + # attributes as outlined by set_cookie_header. The encoded cookie will have + # a +max_age+ of 0 seconds, an +expires+ date in the past and an empty + # +value+. When used with the +set-cookie+ header, it will cause the client + # to *remove* any matching cookie. + # + # delete_set_cookie_header("myname") + # # => "myname=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT" + # + # source://rack//lib/rack/utils.rb#373 def delete_set_cookie_header(key, value = T.unsafe(nil)); end + + # :call-seq: + # delete_set_cookie_header!(header, key, value = {}) -> header value + # + # Set an expired cookie in the specified headers with the given cookie + # +key+ and +value+ using delete_set_cookie_header. This causes + # the client to immediately delete the specified cookie. + # + # delete_set_cookie_header!(nil, "mycookie") + # # => "mycookie=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT" + # + # If the header is non-nil, it will be modified in place. + # + # header = [] + # delete_set_cookie_header!(header, "mycookie") + # # => ["mycookie=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT"] + # header + # # => ["mycookie=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT"] + # + # source://rack//lib/rack/utils.rb#413 def delete_set_cookie_header!(header, key, value = T.unsafe(nil)); end + + # URI escapes. (CGI style space to +) + # + # source://rack//lib/rack/utils.rb#38 def escape(s); end + + # Escape ampersands, brackets and quotes to their HTML/XML entities. + # + # source://rack//lib/rack/utils.rb#198 def escape_html(string); end + + # Like URI escaping, but with %20 instead of +. Strictly speaking this is + # true URI escaping. + # + # source://rack//lib/rack/utils.rb#44 def escape_path(s); end + + # source://rack//lib/rack/utils.rb#156 def forwarded_values(forwarded_header); end + + # source://rack//lib/rack/utils.rb#435 def get_byte_ranges(http_range, size); end + + # source://rack//lib/rack/utils.rb#377 def make_delete_cookie_header(header, key, value); end + + # :call-seq: + # parse_cookies(env) -> hash + # + # Parse cookies from the provided request environment using + # parse_cookies_header. Returns a map of cookie +key+ to cookie +value+. + # + # parse_cookies({'HTTP_COOKIE' => 'myname=myvalue'}) + # # => {'myname' => 'myvalue'} + # + # source://rack//lib/rack/utils.rb#278 def parse_cookies(env); end + + # :call-seq: + # parse_cookies_header(value) -> hash + # + # Parse cookies from the provided header +value+ according to RFC6265. The + # syntax for cookie headers only supports semicolons. Returns a map of + # cookie +key+ to cookie +value+. + # + # parse_cookies_header('myname=myvalue; max-age=0') + # # => {"myname"=>"myvalue", "max-age"=>"0"} + # + # source://rack//lib/rack/utils.rb#244 def parse_cookies_header(value); end + + # source://rack//lib/rack/utils.rb#113 def parse_nested_query(qs, d = T.unsafe(nil)); end + + # source://rack//lib/rack/utils.rb#109 def parse_query(qs, d = T.unsafe(nil), &unescaper); end + + # source://rack//lib/rack/utils.rb#145 def q_values(q_value_header); end + + # source://rack//lib/rack/utils.rb#424 def rfc2822(time); end + + # :nocov: + # + # source://rack//lib/rack/utils.rb#472 def secure_compare(a, b); end + + # source://rack//lib/rack/utils.rb#202 def select_best_encoding(available_encodings, accept_encoding); end + + # :call-seq: + # set_cookie_header(key, value) -> encoded string + # + # Generate an encoded string using the provided +key+ and +value+ suitable + # for the +set-cookie+ header according to RFC6265. The +value+ may be an + # instance of either +String+ or +Hash+. + # + # If the cookie +value+ is an instance of +Hash+, it considers the following + # cookie attribute keys: +domain+, +max_age+, +expires+ (must be instance + # of +Time+), +secure+, +http_only+, +same_site+ and +value+. For more + # details about the interpretation of these fields, consult + # [RFC6265 Section 5.2](https://datatracker.ietf.org/doc/html/rfc6265#section-5.2). + # + # An extra cookie attribute +escape_key+ can be provided to control whether + # or not the cookie key is URL encoded. If explicitly set to +false+, the + # cookie key name will not be url encoded (escaped). The default is +true+. + # + # set_cookie_header("myname", "myvalue") + # # => "myname=myvalue" + # + # set_cookie_header("myname", {value: "myvalue", max_age: 10}) + # # => "myname=myvalue; max-age=10" + # + # source://rack//lib/rack/utils.rb#305 def set_cookie_header(key, value); end + + # :call-seq: + # set_cookie_header!(headers, key, value) -> header value + # + # Append a cookie in the specified headers with the given cookie +key+ and + # +value+ using set_cookie_header. + # + # If the headers already contains a +set-cookie+ key, it will be converted + # to an +Array+ if not already, and appended to. + # + # source://rack//lib/rack/utils.rb#347 def set_cookie_header!(headers, key, value); end + + # source://rack//lib/rack/utils.rb#622 def status_code(status); end + + # Unescapes a URI escaped string with +encoding+. +encoding+ will be the + # target encoding of the string returned, and it defaults to UTF-8 + # + # source://rack//lib/rack/utils.rb#56 def unescape(s, encoding = T.unsafe(nil)); end + + # Unescapes the **path** component of a URI. See Rack::Utils.unescape for + # unescaping query parameters or form components. + # + # source://rack//lib/rack/utils.rb#50 def unescape_path(s); end + + # source://rack//lib/rack/utils.rb#649 def valid_path?(path); end class << self + # source://rack//lib/rack/utils.rb#254 def add_cookie_to_header(header, key, value); end + + # source://rack//lib/rack/utils.rb#389 def add_remove_cookie_to_header(header, key, value = T.unsafe(nil)); end + + # Return best accept value to use, based on the algorithm + # in RFC 2616 Section 14. If there are multiple best + # matches (same specificity and quality), the value returned + # is arbitrary. + # + # source://rack//lib/rack/utils.rb#173 def best_q_match(q_value_header, available_mimes); end + + # source://rack//lib/rack/utils.rb#127 def build_nested_query(value, prefix = T.unsafe(nil)); end + + # source://rack//lib/rack/utils.rb#117 def build_query(params); end + + # Parses the "Range:" header, if present, into an array of Range objects. + # Returns nil if the header is missing or syntactically invalid. + # Returns an empty array if none of the ranges are satisfiable. + # + # source://rack//lib/rack/utils.rb#431 def byte_ranges(env, size); end + + # source://rack//lib/rack/utils.rb#632 def clean_path_info(path_info); end + + # source://rack//lib/rack/utils.rb#98 def clock_time; end + + # Returns the value of attribute default_query_parser. + # + # source://rack//lib/rack/utils.rb#28 def default_query_parser; end + + # Sets the attribute default_query_parser + # + # @param value the value to set the attribute default_query_parser to. + # + # source://rack//lib/rack/utils.rb#28 def default_query_parser=(_arg0); end + + # source://rack//lib/rack/utils.rb#383 def delete_cookie_header!(headers, key, value = T.unsafe(nil)); end + + # :call-seq: + # delete_set_cookie_header(key, value = {}) -> encoded string + # + # Generate an encoded string based on the given +key+ and +value+ using + # set_cookie_header for the purpose of causing the specified cookie to be + # deleted. The +value+ may be an instance of +Hash+ and can include + # attributes as outlined by set_cookie_header. The encoded cookie will have + # a +max_age+ of 0 seconds, an +expires+ date in the past and an empty + # +value+. When used with the +set-cookie+ header, it will cause the client + # to *remove* any matching cookie. + # + # delete_set_cookie_header("myname") + # # => "myname=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT" + # + # source://rack//lib/rack/utils.rb#373 def delete_set_cookie_header(key, value = T.unsafe(nil)); end + + # :call-seq: + # delete_set_cookie_header!(header, key, value = {}) -> header value + # + # Set an expired cookie in the specified headers with the given cookie + # +key+ and +value+ using delete_set_cookie_header. This causes + # the client to immediately delete the specified cookie. + # + # delete_set_cookie_header!(nil, "mycookie") + # # => "mycookie=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT" + # + # If the header is non-nil, it will be modified in place. + # + # header = [] + # delete_set_cookie_header!(header, "mycookie") + # # => ["mycookie=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT"] + # header + # # => ["mycookie=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT"] + # + # source://rack//lib/rack/utils.rb#413 def delete_set_cookie_header!(header, key, value = T.unsafe(nil)); end + + # URI escapes. (CGI style space to +) + # + # source://rack//lib/rack/utils.rb#38 def escape(s); end + + # Escape ampersands, brackets and quotes to their HTML/XML entities. + # + # source://rack//lib/rack/utils.rb#198 def escape_html(string); end + + # Like URI escaping, but with %20 instead of +. Strictly speaking this is + # true URI escaping. + # + # source://rack//lib/rack/utils.rb#44 def escape_path(s); end + + # source://rack//lib/rack/utils.rb#156 def forwarded_values(forwarded_header); end + + # source://rack//lib/rack/utils.rb#435 def get_byte_ranges(http_range, size); end + + # source://rack//lib/rack/utils.rb#88 def key_space_limit; end + + # source://rack//lib/rack/utils.rb#93 def key_space_limit=(v); end + + # source://rack//lib/rack/utils.rb#377 def make_delete_cookie_header(header, key, value); end + + # Returns the value of attribute multipart_file_limit. + # + # source://rack//lib/rack/utils.rb#63 def multipart_file_limit; end + + # Sets the attribute multipart_file_limit + # + # @param value the value to set the attribute multipart_file_limit to. + # + # source://rack//lib/rack/utils.rb#63 def multipart_file_limit=(_arg0); end + + # Returns the value of attribute multipart_file_limit. + # multipart_part_limit is the original name of multipart_file_limit, but + # the limit only counts parts with filenames. + # + # source://rack//lib/rack/utils.rb#63 def multipart_part_limit; end + + # Sets the attribute multipart_file_limit + # + # @param value the value to set the attribute multipart_file_limit to. + # + # source://rack//lib/rack/utils.rb#63 def multipart_part_limit=(_arg0); end + + # Returns the value of attribute multipart_total_part_limit. + # + # source://rack//lib/rack/utils.rb#61 def multipart_total_part_limit; end + + # Sets the attribute multipart_total_part_limit + # + # @param value the value to set the attribute multipart_total_part_limit to. + # + # source://rack//lib/rack/utils.rb#61 def multipart_total_part_limit=(_arg0); end + + # source://rack//lib/rack/utils.rb#80 def param_depth_limit; end + + # source://rack//lib/rack/utils.rb#84 def param_depth_limit=(v); end + + # :call-seq: + # parse_cookies(env) -> hash + # + # Parse cookies from the provided request environment using + # parse_cookies_header. Returns a map of cookie +key+ to cookie +value+. + # + # parse_cookies({'HTTP_COOKIE' => 'myname=myvalue'}) + # # => {'myname' => 'myvalue'} + # + # source://rack//lib/rack/utils.rb#278 def parse_cookies(env); end + + # :call-seq: + # parse_cookies_header(value) -> hash + # + # Parse cookies from the provided header +value+ according to RFC6265. The + # syntax for cookie headers only supports semicolons. Returns a map of + # cookie +key+ to cookie +value+. + # + # parse_cookies_header('myname=myvalue; max-age=0') + # # => {"myname"=>"myvalue", "max-age"=>"0"} + # + # source://rack//lib/rack/utils.rb#244 def parse_cookies_header(value); end + + # source://rack//lib/rack/utils.rb#113 def parse_nested_query(qs, d = T.unsafe(nil)); end + + # source://rack//lib/rack/utils.rb#109 def parse_query(qs, d = T.unsafe(nil), &unescaper); end + + # source://rack//lib/rack/utils.rb#145 def q_values(q_value_header); end + + # source://rack//lib/rack/utils.rb#424 def rfc2822(time); end + + # source://rack//lib/rack/utils.rb#472 def secure_compare(a, b); end + + # source://rack//lib/rack/utils.rb#202 def select_best_encoding(available_encodings, accept_encoding); end + + # :call-seq: + # set_cookie_header(key, value) -> encoded string + # + # Generate an encoded string using the provided +key+ and +value+ suitable + # for the +set-cookie+ header according to RFC6265. The +value+ may be an + # instance of either +String+ or +Hash+. + # + # If the cookie +value+ is an instance of +Hash+, it considers the following + # cookie attribute keys: +domain+, +max_age+, +expires+ (must be instance + # of +Time+), +secure+, +http_only+, +same_site+ and +value+. For more + # details about the interpretation of these fields, consult + # [RFC6265 Section 5.2](https://datatracker.ietf.org/doc/html/rfc6265#section-5.2). + # + # An extra cookie attribute +escape_key+ can be provided to control whether + # or not the cookie key is URL encoded. If explicitly set to +false+, the + # cookie key name will not be url encoded (escaped). The default is +true+. + # + # set_cookie_header("myname", "myvalue") + # # => "myname=myvalue" + # + # set_cookie_header("myname", {value: "myvalue", max_age: 10}) + # # => "myname=myvalue; max-age=10" + # + # source://rack//lib/rack/utils.rb#305 def set_cookie_header(key, value); end + + # :call-seq: + # set_cookie_header!(headers, key, value) -> header value + # + # Append a cookie in the specified headers with the given cookie +key+ and + # +value+ using set_cookie_header. + # + # If the headers already contains a +set-cookie+ key, it will be converted + # to an +Array+ if not already, and appended to. + # + # source://rack//lib/rack/utils.rb#347 def set_cookie_header!(headers, key, value); end + + # source://rack//lib/rack/utils.rb#622 def status_code(status); end + + # Unescapes a URI escaped string with +encoding+. +encoding+ will be the + # target encoding of the string returned, and it defaults to UTF-8 + # + # source://rack//lib/rack/utils.rb#56 def unescape(s, encoding = T.unsafe(nil)); end + + # Unescapes the **path** component of a URI. See Rack::Utils.unescape for + # unescaping query parameters or form components. + # + # source://rack//lib/rack/utils.rb#50 def unescape_path(s); end + + # @return [Boolean] + # + # source://rack//lib/rack/utils.rb#649 def valid_path?(path); end end end +# source://rack//lib/rack/utils.rb#24 Rack::Utils::COMMON_SEP = T.let(T.unsafe(nil), Hash) +# Context allows the use of a compatible middleware at different points +# in a request handling stack. A compatible middleware must define +# #context which should take the arguments env and app. The first of which +# would be the request environment. The second of which would be the rack +# application that the request would be forwarded to. +# +# source://rack//lib/rack/utils.rb#495 class Rack::Utils::Context + # @return [Context] a new instance of Context + # + # source://rack//lib/rack/utils.rb#498 def initialize(app_f, app_r); end + # Returns the value of attribute app. + # + # source://rack//lib/rack/utils.rb#496 def app; end + + # source://rack//lib/rack/utils.rb#503 def call(env); end + + # source://rack//lib/rack/utils.rb#511 def context(env, app = T.unsafe(nil)); end + + # Returns the value of attribute for. + # + # source://rack//lib/rack/utils.rb#496 def for; end + + # source://rack//lib/rack/utils.rb#507 def recontext(app); end end +# source://rack//lib/rack/utils.rb#23 Rack::Utils::DEFAULT_SEP = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/utils.rb#186 Rack::Utils::ESCAPE_HTML = T.let(T.unsafe(nil), Hash) + +# source://rack//lib/rack/utils.rb#195 Rack::Utils::ESCAPE_HTML_PATTERN = T.let(T.unsafe(nil), Regexp) + +# Every standard HTTP code mapped to the appropriate message. +# Generated with: +# curl -s https://www.iana.org/assignments/http-status-codes/http-status-codes-1.csv | \ +# ruby -ne 'm = /^(\d{3}),(?!Unassigned|\(Unused\))([^,]+)/.match($_) and \ +# puts "#{m[1]} => \x27#{m[2].strip}\x27,"' +# +# source://rack//lib/rack/utils.rb#549 Rack::Utils::HTTP_STATUS_CODES = T.let(T.unsafe(nil), Hash) +# A wrapper around Headers +# header when set. +# +# @api private +# +# source://rack//lib/rack/utils.rb#520 class Rack::Utils::HeaderHash < ::Hash class << self + # @api private + # + # source://rack//lib/rack/utils.rb#521 def [](headers); end + + # @api private + # @raise [TypeError] + # + # source://rack//lib/rack/utils.rb#539 def allocate; end + + # @api private + # + # source://rack//lib/rack/utils.rb#532 def new(hash = T.unsafe(nil)); end end end +# source://rack//lib/rack/utils.rb#21 Rack::Utils::InvalidParameterError = Rack::QueryParser::InvalidParameterError + +# source://rack//lib/rack/utils.rb#25 Rack::Utils::KeySpaceConstrainedParams = Rack::QueryParser::Params + +# source://rack//lib/rack/utils.rb#647 Rack::Utils::NULL_BYTE = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/utils.rb#630 Rack::Utils::PATH_SEPS = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/utils.rb#20 Rack::Utils::ParameterTypeError = Rack::QueryParser::ParameterTypeError + +# source://rack//lib/rack/utils.rb#22 Rack::Utils::ParamsTooDeepError = Rack::QueryParser::ParamsTooDeepError + +# Responses with HTTP status codes that should not have an entity body +# +# source://rack//lib/rack/utils.rb#616 Rack::Utils::STATUS_WITH_NO_ENTITY_BODY = T.let(T.unsafe(nil), Hash) + +# source://rack//lib/rack/utils.rb#618 Rack::Utils::SYMBOL_TO_STATUS_CODE = T.let(T.unsafe(nil), Hash) + +# The Rack protocol version number implemented. +# +# source://rack//lib/rack/version.rb#16 Rack::VERSION = T.let(T.unsafe(nil), Array) + +# source://rack//lib/rack/version.rb#19 Rack::VERSION_STRING = T.let(T.unsafe(nil), String) diff --git a/Library/Homebrew/sorbet/rbi/gems/rainbow@3.1.1.rbi b/Library/Homebrew/sorbet/rbi/gems/rainbow@3.1.1.rbi index e704587b974be1..e12c5edf9b4bea 100644 --- a/Library/Homebrew/sorbet/rbi/gems/rainbow@3.1.1.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/rainbow@3.1.1.rbi @@ -4,154 +4,400 @@ # This is an autogenerated file for types exported from the `rainbow` gem. # Please instead update this file by running `bin/tapioca gem rainbow`. +class Object < ::BasicObject + include ::ActiveSupport::ForkTracker::CoreExt + include ::Kernel + include ::PP::ObjectMixin + + private + + # source://rainbow//lib/rainbow/global.rb#23 + def Rainbow(string); end +end + +# source://rainbow//lib/rainbow/string_utils.rb#3 module Rainbow class << self + # source://rainbow//lib/rainbow/global.rb#10 def enabled; end + + # source://rainbow//lib/rainbow/global.rb#14 def enabled=(value); end + + # source://rainbow//lib/rainbow/global.rb#6 def global; end + + # source://rainbow//lib/rainbow.rb#6 def new; end + + # source://rainbow//lib/rainbow/global.rb#18 def uncolor(string); end end end +# source://rainbow//lib/rainbow/color.rb#4 class Rainbow::Color + # Returns the value of attribute ground. + # + # source://rainbow//lib/rainbow/color.rb#5 def ground; end class << self + # source://rainbow//lib/rainbow/color.rb#7 def build(ground, values); end + + # source://rainbow//lib/rainbow/color.rb#40 def parse_hex_color(hex); end end end +# source://rainbow//lib/rainbow/color.rb#54 class Rainbow::Color::Indexed < ::Rainbow::Color + # @return [Indexed] a new instance of Indexed + # + # source://rainbow//lib/rainbow/color.rb#57 def initialize(ground, num); end + # source://rainbow//lib/rainbow/color.rb#62 def codes; end + + # Returns the value of attribute num. + # + # source://rainbow//lib/rainbow/color.rb#55 def num; end end +# source://rainbow//lib/rainbow/color.rb#69 class Rainbow::Color::Named < ::Rainbow::Color::Indexed + # @return [Named] a new instance of Named + # + # source://rainbow//lib/rainbow/color.rb#90 def initialize(ground, name); end class << self + # source://rainbow//lib/rainbow/color.rb#82 def color_names; end + + # source://rainbow//lib/rainbow/color.rb#86 def valid_names; end end end +# source://rainbow//lib/rainbow/color.rb#70 Rainbow::Color::Named::NAMES = T.let(T.unsafe(nil), Hash) +# source://rainbow//lib/rainbow/color.rb#100 class Rainbow::Color::RGB < ::Rainbow::Color::Indexed + # @return [RGB] a new instance of RGB + # + # source://rainbow//lib/rainbow/color.rb#107 def initialize(ground, *values); end + # Returns the value of attribute b. + # + # source://rainbow//lib/rainbow/color.rb#101 def b; end + + # source://rainbow//lib/rainbow/color.rb#116 def codes; end + + # Returns the value of attribute g. + # + # source://rainbow//lib/rainbow/color.rb#101 def g; end + + # Returns the value of attribute r. + # + # source://rainbow//lib/rainbow/color.rb#101 def r; end private + # source://rainbow//lib/rainbow/color.rb#122 def code_from_rgb; end class << self + # source://rainbow//lib/rainbow/color.rb#103 def to_ansi_domain(value); end end end +# source://rainbow//lib/rainbow/color.rb#129 class Rainbow::Color::X11Named < ::Rainbow::Color::RGB include ::Rainbow::X11ColorNames + # @return [X11Named] a new instance of X11Named + # + # source://rainbow//lib/rainbow/color.rb#140 def initialize(ground, name); end class << self + # source://rainbow//lib/rainbow/color.rb#132 def color_names; end + + # source://rainbow//lib/rainbow/color.rb#136 def valid_names; end end end +# source://rainbow//lib/rainbow/null_presenter.rb#4 class Rainbow::NullPresenter < ::String + # source://rainbow//lib/rainbow/null_presenter.rb#9 def background(*_values); end + + # source://rainbow//lib/rainbow/null_presenter.rb#9 def bg(*_values); end + + # source://rainbow//lib/rainbow/null_presenter.rb#49 def black; end + + # source://rainbow//lib/rainbow/null_presenter.rb#33 def blink; end + + # source://rainbow//lib/rainbow/null_presenter.rb#65 def blue; end + + # source://rainbow//lib/rainbow/null_presenter.rb#17 def bold; end + + # source://rainbow//lib/rainbow/null_presenter.rb#17 def bright; end + + # source://rainbow//lib/rainbow/null_presenter.rb#5 def color(*_values); end + + # source://rainbow//lib/rainbow/null_presenter.rb#45 def cross_out; end + + # source://rainbow//lib/rainbow/null_presenter.rb#73 def cyan; end + + # source://rainbow//lib/rainbow/null_presenter.rb#21 def dark; end + + # source://rainbow//lib/rainbow/null_presenter.rb#21 def faint; end + + # source://rainbow//lib/rainbow/null_presenter.rb#5 def fg(*_values); end + + # source://rainbow//lib/rainbow/null_presenter.rb#5 def foreground(*_values); end + + # source://rainbow//lib/rainbow/null_presenter.rb#57 def green; end + + # source://rainbow//lib/rainbow/null_presenter.rb#41 def hide; end + + # source://rainbow//lib/rainbow/null_presenter.rb#37 def inverse; end + + # source://rainbow//lib/rainbow/null_presenter.rb#25 def italic; end + + # source://rainbow//lib/rainbow/null_presenter.rb#69 def magenta; end + + # source://rainbow//lib/rainbow/null_presenter.rb#81 def method_missing(method_name, *args); end + + # source://rainbow//lib/rainbow/null_presenter.rb#53 def red; end + + # source://rainbow//lib/rainbow/null_presenter.rb#13 def reset; end + + # source://rainbow//lib/rainbow/null_presenter.rb#45 def strike; end + + # source://rainbow//lib/rainbow/null_presenter.rb#29 def underline; end + + # source://rainbow//lib/rainbow/null_presenter.rb#77 def white; end + + # source://rainbow//lib/rainbow/null_presenter.rb#61 def yellow; end private + # @return [Boolean] + # + # source://rainbow//lib/rainbow/null_presenter.rb#89 def respond_to_missing?(method_name, *args); end end +# source://rainbow//lib/rainbow/presenter.rb#8 class Rainbow::Presenter < ::String + # Sets background color of this text. + # + # source://rainbow//lib/rainbow/presenter.rb#30 def background(*values); end + + # Sets background color of this text. + # + # source://rainbow//lib/rainbow/presenter.rb#30 def bg(*values); end + + # source://rainbow//lib/rainbow/presenter.rb#92 def black; end + + # Turns on blinking attribute for this text (not well supported by terminal + # emulators). + # + # source://rainbow//lib/rainbow/presenter.rb#72 def blink; end + + # source://rainbow//lib/rainbow/presenter.rb#108 def blue; end + + # Turns on bright/bold for this text. + # + # source://rainbow//lib/rainbow/presenter.rb#45 def bold; end + + # Turns on bright/bold for this text. + # + # source://rainbow//lib/rainbow/presenter.rb#45 def bright; end + + # Sets color of this text. + # + # source://rainbow//lib/rainbow/presenter.rb#22 def color(*values); end + + # source://rainbow//lib/rainbow/presenter.rb#86 def cross_out; end + + # source://rainbow//lib/rainbow/presenter.rb#116 def cyan; end + + # Turns on faint/dark for this text (not well supported by terminal + # emulators). + # + # source://rainbow//lib/rainbow/presenter.rb#53 def dark; end + + # Turns on faint/dark for this text (not well supported by terminal + # emulators). + # + # source://rainbow//lib/rainbow/presenter.rb#53 def faint; end + + # Sets color of this text. + # + # source://rainbow//lib/rainbow/presenter.rb#22 def fg(*values); end + + # Sets color of this text. + # + # source://rainbow//lib/rainbow/presenter.rb#22 def foreground(*values); end + + # source://rainbow//lib/rainbow/presenter.rb#100 def green; end + + # Hides this text (set its color to the same as background). + # + # source://rainbow//lib/rainbow/presenter.rb#82 def hide; end + + # Inverses current foreground/background colors. + # + # source://rainbow//lib/rainbow/presenter.rb#77 def inverse; end + + # Turns on italic style for this text (not well supported by terminal + # emulators). + # + # source://rainbow//lib/rainbow/presenter.rb#61 def italic; end + + # source://rainbow//lib/rainbow/presenter.rb#112 def magenta; end + + # We take care of X11 color method call here. + # Such as #aqua, #ghostwhite. + # + # source://rainbow//lib/rainbow/presenter.rb#126 def method_missing(method_name, *args); end + + # source://rainbow//lib/rainbow/presenter.rb#96 def red; end + + # Resets terminal to default colors/backgrounds. + # + # It shouldn't be needed to use this method because all methods + # append terminal reset code to end of string. + # + # source://rainbow//lib/rainbow/presenter.rb#40 def reset; end + + # source://rainbow//lib/rainbow/presenter.rb#86 def strike; end + + # Turns on underline decoration for this text. + # + # source://rainbow//lib/rainbow/presenter.rb#66 def underline; end + + # source://rainbow//lib/rainbow/presenter.rb#120 def white; end + + # source://rainbow//lib/rainbow/presenter.rb#104 def yellow; end private + # @return [Boolean] + # + # source://rainbow//lib/rainbow/presenter.rb#134 def respond_to_missing?(method_name, *args); end + + # source://rainbow//lib/rainbow/presenter.rb#140 def wrap_with_sgr(codes); end end +# source://rainbow//lib/rainbow/presenter.rb#9 Rainbow::Presenter::TERM_EFFECTS = T.let(T.unsafe(nil), Hash) +# source://rainbow//lib/rainbow/string_utils.rb#4 class Rainbow::StringUtils class << self + # source://rainbow//lib/rainbow/string_utils.rb#17 def uncolor(string); end + + # source://rainbow//lib/rainbow/string_utils.rb#5 def wrap_with_sgr(string, codes); end end end +# source://rainbow//lib/rainbow/wrapper.rb#7 class Rainbow::Wrapper + # @return [Wrapper] a new instance of Wrapper + # + # source://rainbow//lib/rainbow/wrapper.rb#10 def initialize(enabled = T.unsafe(nil)); end + # Returns the value of attribute enabled. + # + # source://rainbow//lib/rainbow/wrapper.rb#8 def enabled; end + + # Sets the attribute enabled + # + # @param value the value to set the attribute enabled to. + # + # source://rainbow//lib/rainbow/wrapper.rb#8 def enabled=(_arg0); end + + # source://rainbow//lib/rainbow/wrapper.rb#14 def wrap(string); end end +# source://rainbow//lib/rainbow/x11_color_names.rb#4 module Rainbow::X11ColorNames; end + +# source://rainbow//lib/rainbow/x11_color_names.rb#5 Rainbow::X11ColorNames::NAMES = T.let(T.unsafe(nil), Hash) diff --git a/Library/Homebrew/sorbet/rbi/gems/rbi@0.0.14.rbi b/Library/Homebrew/sorbet/rbi/gems/rbi@0.1.5.rbi similarity index 59% rename from Library/Homebrew/sorbet/rbi/gems/rbi@0.0.14.rbi rename to Library/Homebrew/sorbet/rbi/gems/rbi@0.1.5.rbi index c11faca967cd98..380bda126ae5dd 100644 --- a/Library/Homebrew/sorbet/rbi/gems/rbi@0.0.14.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/rbi@0.1.5.rbi @@ -4,50 +4,43 @@ # This is an autogenerated file for types exported from the `rbi` gem. # Please instead update this file by running `bin/tapioca gem rbi`. +# source://rbi//lib/rbi/loc.rb#4 module RBI; end -class RBI::ASTVisitor - abstract! - - def initialize(*args, &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 - +# source://rbi//lib/rbi/model.rb#968 class RBI::Arg < ::RBI::Node + # source://rbi//lib/rbi/model.rb#980 sig { params(value: ::String, loc: T.nilable(::RBI::Loc)).void } def initialize(value, loc: T.unsafe(nil)); end + # source://rbi//lib/rbi/model.rb#986 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end + # source://rbi//lib/rbi/printer.rb#613 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end + # source://rbi//lib/rbi/model.rb#991 sig { returns(::String) } def to_s; end + # source://rbi//lib/rbi/model.rb#972 sig { returns(::String) } def value; end end +# Attributes +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/model.rb#349 class RBI::Attr < ::RBI::NodeWithComments include ::RBI::Indexable abstract! + # source://rbi//lib/rbi/model.rb#374 sig do params( name: ::Symbol, @@ -60,39 +53,53 @@ class RBI::Attr < ::RBI::NodeWithComments end def initialize(name, names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil)); end + # source://rbi//lib/rbi/printer.rb#348 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end + # source://rbi//lib/rbi/rewriters/merge_trees.rb#412 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end + # @abstract + # + # source://rbi//lib/rbi/model.rb#382 sig { abstract.returns(T::Array[::String]) } def fully_qualified_names; end + # source://rbi//lib/rbi/index.rb#113 sig { override.returns(T::Array[::String]) } def index_ids; end + # source://rbi//lib/rbi/rewriters/merge_trees.rb#420 sig { override.params(other: ::RBI::Node).void } def merge_with(other); end + # source://rbi//lib/rbi/model.rb#356 sig { returns(T::Array[::Symbol]) } def names; end - def names=(_arg0); end - + # source://rbi//lib/rbi/printer.rb#375 sig { override.returns(T::Boolean) } def oneline?; end + # source://rbi//lib/rbi/model.rb#362 sig { returns(T::Array[::RBI::Sig]) } def sigs; end + # source://rbi//lib/rbi/model.rb#359 sig { returns(::RBI::Visibility) } def visibility; end + # @return [Visibility] + # + # source://rbi//lib/rbi/model.rb#359 def visibility=(_arg0); end end +# source://rbi//lib/rbi/model.rb#385 class RBI::AttrAccessor < ::RBI::Attr + # source://rbi//lib/rbi/model.rb#399 sig do params( name: ::Symbol, @@ -106,17 +113,22 @@ class RBI::AttrAccessor < ::RBI::Attr end def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + # source://rbi//lib/rbi/rewriters/merge_trees.rb#452 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end + # source://rbi//lib/rbi/model.rb#405 sig { override.returns(T::Array[::String]) } def fully_qualified_names; end + # source://rbi//lib/rbi/model.rb#411 sig { override.returns(::String) } def to_s; end end +# source://rbi//lib/rbi/model.rb#417 class RBI::AttrReader < ::RBI::Attr + # source://rbi//lib/rbi/model.rb#431 sig do params( name: ::Symbol, @@ -130,17 +142,22 @@ class RBI::AttrReader < ::RBI::Attr end def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + # source://rbi//lib/rbi/rewriters/merge_trees.rb#434 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end + # source://rbi//lib/rbi/model.rb#437 sig { override.returns(T::Array[::String]) } def fully_qualified_names; end + # source://rbi//lib/rbi/model.rb#443 sig { override.returns(::String) } def to_s; end end +# source://rbi//lib/rbi/model.rb#449 class RBI::AttrWriter < ::RBI::Attr + # source://rbi//lib/rbi/model.rb#463 sig do params( name: ::Symbol, @@ -154,25 +171,35 @@ class RBI::AttrWriter < ::RBI::Attr end def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + # source://rbi//lib/rbi/rewriters/merge_trees.rb#443 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end + # source://rbi//lib/rbi/model.rb#469 sig { override.returns(T::Array[::String]) } def fully_qualified_names; end + # source://rbi//lib/rbi/model.rb#475 sig { override.returns(::String) } def to_s; end end +# An arbitrary blank line that can be added both in trees and comments +# +# source://rbi//lib/rbi/model.rb#74 class RBI::BlankLine < ::RBI::Comment + # source://rbi//lib/rbi/model.rb#78 sig { params(loc: T.nilable(::RBI::Loc)).void } def initialize(loc: T.unsafe(nil)); end + # source://rbi//lib/rbi/printer.rb#217 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end end +# source://rbi//lib/rbi/model.rb#741 class RBI::BlockParam < ::RBI::Param + # source://rbi//lib/rbi/model.rb#752 sig do params( name: ::String, @@ -183,20 +210,26 @@ class RBI::BlockParam < ::RBI::Param end def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + # source://rbi//lib/rbi/model.rb#763 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end + # source://rbi//lib/rbi/printer.rb#543 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end + # source://rbi//lib/rbi/printer.rb#548 sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } def print_comment_leading_space(v, last:); end + # source://rbi//lib/rbi/model.rb#758 sig { override.returns(::String) } def to_s; end end +# source://rbi//lib/rbi/model.rb#218 class RBI::Class < ::RBI::Scope + # source://rbi//lib/rbi/model.rb#236 sig do params( name: ::String, @@ -208,58 +241,103 @@ class RBI::Class < ::RBI::Scope end def initialize(name, superclass_name: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + # source://rbi//lib/rbi/rewriters/merge_trees.rb#376 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end + # source://rbi//lib/rbi/model.rb#244 sig { override.returns(::String) } def fully_qualified_name; end + # source://rbi//lib/rbi/model.rb#222 sig { returns(::String) } def name; end + # @return [String] + # + # source://rbi//lib/rbi/model.rb#222 def name=(_arg0); end + # source://rbi//lib/rbi/printer.rb#284 sig { override.params(v: ::RBI::Printer).void } def print_header(v); end + # source://rbi//lib/rbi/model.rb#225 sig { returns(T.nilable(::String)) } def superclass_name; end + # @return [String, nil] + # + # source://rbi//lib/rbi/model.rb#225 def superclass_name=(_arg0); end end +# source://rbi//lib/rbi/model.rb#53 class RBI::Comment < ::RBI::Node + # source://rbi//lib/rbi/model.rb#60 sig { params(text: ::String, loc: T.nilable(::RBI::Loc)).void } def initialize(text, loc: T.unsafe(nil)); end + # source://rbi//lib/rbi/model.rb#66 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end + # source://rbi//lib/rbi/printer.rb#197 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end + # source://rbi//lib/rbi/model.rb#57 sig { returns(::String) } def text; end + # @return [String] + # + # source://rbi//lib/rbi/model.rb#57 def text=(_arg0); end end +# A tree showing incompatibles nodes +# +# Is rendered as a merge conflict between `left` and` right`: +# ~~~rb +# class Foo +# <<<<<<< left +# def m1; end +# def m2(a); end +# ======= +# def m1(a); end +# def m2; end +# >>>>>>> right +# end +# ~~~ +# +# source://rbi//lib/rbi/rewriters/merge_trees.rb#589 class RBI::ConflictTree < ::RBI::Tree + # source://rbi//lib/rbi/rewriters/merge_trees.rb#596 sig { params(left_name: ::String, right_name: ::String).void } def initialize(left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end + # source://rbi//lib/rbi/rewriters/merge_trees.rb#607 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end + # source://rbi//lib/rbi/rewriters/merge_trees.rb#593 sig { returns(::RBI::Tree) } def left; end + # @return [Tree] + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#593 def right; end end +# Consts +# +# source://rbi//lib/rbi/model.rb#312 class RBI::Const < ::RBI::NodeWithComments include ::RBI::Indexable + # source://rbi//lib/rbi/model.rb#327 sig do params( name: ::String, @@ -271,50 +349,41 @@ class RBI::Const < ::RBI::NodeWithComments end def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + # source://rbi//lib/rbi/printer.rb#335 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end + # source://rbi//lib/rbi/rewriters/merge_trees.rb#403 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end + # source://rbi//lib/rbi/model.rb#335 sig { returns(::String) } def fully_qualified_name; end + # source://rbi//lib/rbi/index.rb#103 sig { override.returns(T::Array[::String]) } def index_ids; end + # source://rbi//lib/rbi/model.rb#316 sig { returns(::String) } def name; end + # source://rbi//lib/rbi/model.rb#342 sig { override.returns(::String) } def to_s; end + # @return [String] + # + # source://rbi//lib/rbi/model.rb#316 def value; end end -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 - +# source://rbi//lib/rbi/model.rb#816 class RBI::Extend < ::RBI::Mixin include ::RBI::Indexable + # source://rbi//lib/rbi/model.rb#828 sig do params( name: ::String, @@ -326,17 +395,22 @@ class RBI::Extend < ::RBI::Mixin end def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + # source://rbi//lib/rbi/rewriters/merge_trees.rb#502 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end + # source://rbi//lib/rbi/index.rb#143 sig { override.returns(T::Array[::String]) } def index_ids; end + # source://rbi//lib/rbi/model.rb#834 sig { override.returns(::String) } def to_s; end end +# source://rbi//lib/rbi/model.rb#137 class RBI::File + # source://rbi//lib/rbi/model.rb#156 sig do params( strictness: T.nilable(::String), @@ -346,20 +420,28 @@ class RBI::File end def initialize(strictness: T.unsafe(nil), comments: T.unsafe(nil), &block); end + # source://rbi//lib/rbi/model.rb#164 sig { params(node: ::RBI::Node).void } def <<(node); end + # source://rbi//lib/rbi/printer.rb#105 sig { params(v: ::RBI::Printer).void } def accept_printer(v); end + # source://rbi//lib/rbi/model.rb#147 sig { returns(T::Array[::RBI::Comment]) } def comments; end + # @return [Array] + # + # source://rbi//lib/rbi/model.rb#147 def comments=(_arg0); end + # source://rbi//lib/rbi/model.rb#169 sig { returns(T::Boolean) } def empty?; end + # source://rbi//lib/rbi/printer.rb#129 sig do params( out: T.any(::IO, ::StringIO), @@ -370,21 +452,32 @@ class RBI::File end def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end + # source://rbi//lib/rbi/model.rb#141 sig { returns(::RBI::Tree) } def root; end + # @return [Tree] + # + # source://rbi//lib/rbi/model.rb#141 def root=(_arg0); end + # source://rbi//lib/rbi/model.rb#144 sig { returns(T.nilable(::String)) } def strictness; end + # @return [String, nil] + # + # source://rbi//lib/rbi/model.rb#144 def strictness=(_arg0); end + # source://rbi//lib/rbi/printer.rb#135 sig { params(indent: ::Integer, print_locs: T::Boolean, max_line_length: T.nilable(::Integer)).returns(::String) } def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end end +# source://rbi//lib/rbi/formatter.rb#5 class RBI::Formatter + # source://rbi//lib/rbi/formatter.rb#36 sig do params( add_sig_templates: T::Boolean, @@ -397,50 +490,64 @@ class RBI::Formatter end def initialize(add_sig_templates: T.unsafe(nil), group_nodes: T.unsafe(nil), max_line_length: T.unsafe(nil), nest_singleton_methods: T.unsafe(nil), nest_non_public_methods: T.unsafe(nil), sort_nodes: T.unsafe(nil)); end - sig { returns(T::Boolean) } - def add_sig_templates; end - - def add_sig_templates=(_arg0); end + # source://rbi//lib/rbi/formatter.rb#15 + sig { params(add_sig_templates: T::Boolean).returns(T::Boolean) } + def add_sig_templates=(add_sig_templates); end + # source://rbi//lib/rbi/formatter.rb#59 sig { params(file: ::RBI::File).void } def format_file(file); end + # source://rbi//lib/rbi/formatter.rb#64 sig { params(tree: ::RBI::Tree).void } def format_tree(tree); end - def group_nodes; end - def group_nodes=(_arg0); end + # source://rbi//lib/rbi/formatter.rb#18 + sig { params(group_nodes: T::Boolean).returns(T::Boolean) } + def group_nodes=(group_nodes); end + # source://rbi//lib/rbi/formatter.rb#24 sig { returns(T.nilable(::Integer)) } def max_line_length; end + # @return [Integer, nil] + # + # source://rbi//lib/rbi/formatter.rb#24 def max_line_length=(_arg0); end - def nest_non_public_methods; end - def nest_non_public_methods=(_arg0); end - def nest_singleton_methods; end - def nest_singleton_methods=(_arg0); end + # source://rbi//lib/rbi/formatter.rb#21 + sig { params(nest_non_public_methods: T::Boolean).returns(T::Boolean) } + def nest_non_public_methods=(nest_non_public_methods); end + + # source://rbi//lib/rbi/formatter.rb#12 + sig { params(nest_singleton_methods: T::Boolean).returns(T::Boolean) } + def nest_singleton_methods=(nest_singleton_methods); end + + # source://rbi//lib/rbi/formatter.rb#53 sig { params(file: ::RBI::File).returns(::String) } def print_file(file); end - sig { params(tree: ::RBI::Tree).returns(::String) } - def print_tree(tree); end - - def sort_nodes; end - def sort_nodes=(_arg0); end + # source://rbi//lib/rbi/formatter.rb#9 + sig { params(sort_nodes: T::Boolean).returns(T::Boolean) } + def sort_nodes=(sort_nodes); end end +# source://rbi//lib/rbi/rewriters/group_nodes.rb#88 class RBI::Group < ::RBI::Tree + # source://rbi//lib/rbi/rewriters/group_nodes.rb#95 sig { params(kind: ::RBI::Group::Kind).void } def initialize(kind); end + # source://rbi//lib/rbi/printer.rb#838 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end + # source://rbi//lib/rbi/rewriters/group_nodes.rb#92 sig { returns(::RBI::Group::Kind) } def kind; end end +# source://rbi//lib/rbi/rewriters/group_nodes.rb#100 class RBI::Group::Kind < ::T::Enum enums do Mixins = new @@ -459,9 +566,13 @@ class RBI::Group::Kind < ::T::Enum end end +# Sorbet's misc. +# +# source://rbi//lib/rbi/model.rb#1294 class RBI::Helper < ::RBI::NodeWithComments include ::RBI::Indexable + # source://rbi//lib/rbi/model.rb#1308 sig do params( name: ::String, @@ -472,25 +583,32 @@ class RBI::Helper < ::RBI::NodeWithComments end def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + # source://rbi//lib/rbi/printer.rb#825 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end + # source://rbi//lib/rbi/rewriters/merge_trees.rb#520 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end + # source://rbi//lib/rbi/index.rb#173 sig { override.returns(T::Array[::String]) } def index_ids; end + # source://rbi//lib/rbi/model.rb#1298 sig { returns(::String) } def name; end + # source://rbi//lib/rbi/model.rb#1315 sig { override.returns(::String) } def to_s; end end +# source://rbi//lib/rbi/model.rb#793 class RBI::Include < ::RBI::Mixin include ::RBI::Indexable + # source://rbi//lib/rbi/model.rb#805 sig do params( name: ::String, @@ -502,68 +620,100 @@ class RBI::Include < ::RBI::Mixin end def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + # source://rbi//lib/rbi/rewriters/merge_trees.rb#493 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end + # source://rbi//lib/rbi/index.rb#133 sig { override.returns(T::Array[::String]) } def index_ids; end + # source://rbi//lib/rbi/model.rb#811 sig { override.returns(::String) } def to_s; end end +# source://rbi//lib/rbi/index.rb#5 class RBI::Index < ::RBI::Visitor + # source://rbi//lib/rbi/index.rb#21 sig { void } def initialize; end + # source://rbi//lib/rbi/index.rb#32 sig { params(id: ::String).returns(T::Array[::RBI::Node]) } def [](id); end + # source://rbi//lib/rbi/index.rb#37 sig { params(nodes: ::RBI::Node).void } def index(*nodes); end + # source://rbi//lib/rbi/index.rb#27 sig { returns(T::Array[::String]) } def keys; end + # source://rbi//lib/rbi/index.rb#42 sig { override.params(node: T.nilable(::RBI::Node)).void } def visit(node); end private + # source://rbi//lib/rbi/index.rb#59 sig { params(node: T.all(::RBI::Indexable, ::RBI::Node)).void } def index_node(node); end class << self + # source://rbi//lib/rbi/index.rb#13 sig { params(node: ::RBI::Node).returns(::RBI::Index) } def index(*node); end end end +# A Node that can be refered to by a unique ID inside an index +# +# @abstract Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/index.rb#74 module RBI::Indexable interface! + # Unique IDs that refer to this node. + # + # Some nodes can have multiple ids, for example an attribute accessor matches the ID of the + # getter and the setter. + # + # @abstract + # + # source://rbi//lib/rbi/index.rb#85 sig { abstract.returns(T::Array[::String]) } def index_ids; end end +# source://rbi//lib/rbi/model.rb#996 class RBI::KwArg < ::RBI::Arg + # source://rbi//lib/rbi/model.rb#1009 sig { params(keyword: ::String, value: ::String, loc: T.nilable(::RBI::Loc)).void } def initialize(keyword, value, loc: T.unsafe(nil)); end + # source://rbi//lib/rbi/model.rb#1015 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end + # source://rbi//lib/rbi/printer.rb#622 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end + # source://rbi//lib/rbi/model.rb#1000 sig { returns(::String) } def keyword; end + # source://rbi//lib/rbi/model.rb#1020 sig { returns(::String) } def to_s; end end +# source://rbi//lib/rbi/model.rb#682 class RBI::KwOptParam < ::RBI::Param + # source://rbi//lib/rbi/model.rb#697 sig do params( name: ::String, @@ -575,23 +725,30 @@ class RBI::KwOptParam < ::RBI::Param end def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + # source://rbi//lib/rbi/model.rb#709 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end + # source://rbi//lib/rbi/printer.rb#513 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end + # source://rbi//lib/rbi/printer.rb#518 sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } def print_comment_leading_space(v, last:); end + # source://rbi//lib/rbi/model.rb#704 sig { override.returns(::String) } def to_s; end + # source://rbi//lib/rbi/model.rb#686 sig { returns(::String) } def value; end end +# source://rbi//lib/rbi/model.rb#655 class RBI::KwParam < ::RBI::Param + # source://rbi//lib/rbi/model.rb#666 sig do params( name: ::String, @@ -602,20 +759,26 @@ class RBI::KwParam < ::RBI::Param end def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + # source://rbi//lib/rbi/model.rb#677 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end + # source://rbi//lib/rbi/printer.rb#498 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end + # source://rbi//lib/rbi/printer.rb#503 sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } def print_comment_leading_space(v, last:); end + # source://rbi//lib/rbi/model.rb#672 sig { override.returns(::String) } def to_s; end end +# source://rbi//lib/rbi/model.rb#714 class RBI::KwRestParam < ::RBI::Param + # source://rbi//lib/rbi/model.rb#725 sig do params( name: ::String, @@ -626,20 +789,26 @@ class RBI::KwRestParam < ::RBI::Param end def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + # source://rbi//lib/rbi/model.rb#736 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end + # source://rbi//lib/rbi/printer.rb#528 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end + # source://rbi//lib/rbi/printer.rb#533 sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } def print_comment_leading_space(v, last:); end + # source://rbi//lib/rbi/model.rb#731 sig { override.returns(::String) } def to_s; end end +# source://rbi//lib/rbi/loc.rb#5 class RBI::Loc + # source://rbi//lib/rbi/loc.rb#38 sig do params( file: T.nilable(::String), @@ -651,30 +820,49 @@ class RBI::Loc end def initialize(file: T.unsafe(nil), begin_line: T.unsafe(nil), end_line: T.unsafe(nil), begin_column: T.unsafe(nil), end_column: T.unsafe(nil)); end + # @return [Integer, nil] + # + # source://rbi//lib/rbi/loc.rb#27 def begin_column; end + # source://rbi//lib/rbi/loc.rb#27 sig { returns(T.nilable(::Integer)) } def begin_line; end + # @return [Integer, nil] + # + # source://rbi//lib/rbi/loc.rb#27 def end_column; end + + # @return [Integer, nil] + # + # source://rbi//lib/rbi/loc.rb#27 def end_line; end + # source://rbi//lib/rbi/loc.rb#24 sig { returns(T.nilable(::String)) } def file; end + # source://rbi//lib/rbi/loc.rb#56 sig { returns(T.nilable(::String)) } def source; end + # source://rbi//lib/rbi/loc.rb#47 sig { returns(::String) } def to_s; end class << self - 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 + # source://rbi//lib/rbi/loc.rb#12 + sig { params(file: ::String, prism_location: ::Prism::Location).returns(::RBI::Loc) } + def from_prism(file, prism_location); end end end +# A tree that _might_ contain conflicts +# +# source://rbi//lib/rbi/rewriters/merge_trees.rb#330 class RBI::MergeTree < ::RBI::Tree + # source://rbi//lib/rbi/rewriters/merge_trees.rb#344 sig do params( loc: T.nilable(::RBI::Loc), @@ -685,13 +873,18 @@ class RBI::MergeTree < ::RBI::Tree end def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), conflicts: T.unsafe(nil), &block); end + # source://rbi//lib/rbi/rewriters/merge_trees.rb#334 sig { returns(T::Array[::RBI::Rewriters::Merge::Conflict]) } def conflicts; end end +# Methods and args +# +# source://rbi//lib/rbi/model.rb#483 class RBI::Method < ::RBI::NodeWithComments include ::RBI::Indexable + # source://rbi//lib/rbi/model.rb#513 sig do params( name: ::String, @@ -706,60 +899,88 @@ class RBI::Method < ::RBI::NodeWithComments end def initialize(name, params: T.unsafe(nil), is_singleton: T.unsafe(nil), visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + # source://rbi//lib/rbi/model.rb#533 sig { params(param: ::RBI::Param).void } def <<(param); end + # source://rbi//lib/rbi/printer.rb#384 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end + # source://rbi//lib/rbi/rewriters/merge_trees.rb#461 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end + # source://rbi//lib/rbi/model.rb#538 sig { returns(::String) } def fully_qualified_name; end + # source://rbi//lib/rbi/index.rb#123 sig { override.returns(T::Array[::String]) } def index_ids; end + # source://rbi//lib/rbi/printer.rb#437 sig { returns(T::Boolean) } def inline_params?; end + # source://rbi//lib/rbi/model.rb#493 sig { returns(T::Boolean) } def is_singleton; end + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#493 def is_singleton=(_arg0); end + # source://rbi//lib/rbi/rewriters/merge_trees.rb#470 sig { override.params(other: ::RBI::Node).void } def merge_with(other); end + # source://rbi//lib/rbi/model.rb#487 sig { returns(::String) } def name; end + # @return [String] + # + # source://rbi//lib/rbi/model.rb#487 def name=(_arg0); end + # source://rbi//lib/rbi/printer.rb#432 sig { override.returns(T::Boolean) } def oneline?; end + # source://rbi//lib/rbi/model.rb#490 sig { returns(T::Array[::RBI::Param]) } def params; end + # source://rbi//lib/rbi/model.rb#499 sig { returns(T::Array[::RBI::Sig]) } def sigs; end + # @return [Array] + # + # source://rbi//lib/rbi/model.rb#499 def sigs=(_arg0); end + # source://rbi//lib/rbi/model.rb#547 sig { override.returns(::String) } def to_s; end + # source://rbi//lib/rbi/model.rb#496 sig { returns(::RBI::Visibility) } def visibility; end + # @return [Visibility] + # + # source://rbi//lib/rbi/model.rb#496 def visibility=(_arg0); end end +# source://rbi//lib/rbi/model.rb#1355 class RBI::MixesInClassMethods < ::RBI::Mixin include ::RBI::Indexable + # source://rbi//lib/rbi/model.rb#1367 sig do params( name: ::String, @@ -771,19 +992,28 @@ class RBI::MixesInClassMethods < ::RBI::Mixin end def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + # source://rbi//lib/rbi/rewriters/merge_trees.rb#511 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end + # source://rbi//lib/rbi/index.rb#153 sig { override.returns(T::Array[::String]) } def index_ids; end + # source://rbi//lib/rbi/model.rb#1373 sig { override.returns(::String) } def to_s; end end +# Mixins +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/model.rb#770 class RBI::Mixin < ::RBI::NodeWithComments abstract! + # source://rbi//lib/rbi/model.rb#787 sig do params( name: ::String, @@ -794,19 +1024,22 @@ class RBI::Mixin < ::RBI::NodeWithComments end def initialize(name, names, loc: T.unsafe(nil), comments: T.unsafe(nil)); end + # source://rbi//lib/rbi/printer.rb#558 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end + # source://rbi//lib/rbi/rewriters/merge_trees.rb#484 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end + # source://rbi//lib/rbi/model.rb#777 sig { returns(T::Array[::String]) } def names; end - - def names=(_arg0); end end +# source://rbi//lib/rbi/model.rb#190 class RBI::Module < ::RBI::Scope + # source://rbi//lib/rbi/model.rb#204 sig do params( name: ::String, @@ -817,61 +1050,95 @@ class RBI::Module < ::RBI::Scope end def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + # source://rbi//lib/rbi/rewriters/merge_trees.rb#385 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end + # source://rbi//lib/rbi/model.rb#211 sig { override.returns(::String) } def fully_qualified_name; end + # source://rbi//lib/rbi/model.rb#194 sig { returns(::String) } def name; end + # @return [String] + # + # source://rbi//lib/rbi/model.rb#194 def name=(_arg0); end + # source://rbi//lib/rbi/printer.rb#270 sig { override.params(v: ::RBI::Printer).void } def print_header(v); end end +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/model.rb#5 class RBI::Node abstract! + # source://rbi//lib/rbi/model.rb#18 sig { params(loc: T.nilable(::RBI::Loc)).void } def initialize(loc: T.unsafe(nil)); end + # @abstract + # + # source://rbi//lib/rbi/printer.rb#146 sig { abstract.params(v: ::RBI::Printer).void } def accept_printer(v); end + # Can `self` and `_other` be merged into a single definition? + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#287 sig { params(_other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(_other); end + # source://rbi//lib/rbi/model.rb#24 sig { void } def detach; end + # source://rbi//lib/rbi/rewriters/group_nodes.rb#48 sig { returns(::RBI::Group::Kind) } def group_kind; end + # source://rbi//lib/rbi/model.rb#15 sig { returns(T.nilable(::RBI::Loc)) } def loc; end + # @return [Loc, nil] + # + # source://rbi//lib/rbi/model.rb#15 def loc=(_arg0); end + # Merge `self` and `other` into a single definition + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#293 sig { params(other: ::RBI::Node).void } def merge_with(other); end + # source://rbi//lib/rbi/printer.rb#179 sig { returns(T::Boolean) } def oneline?; end + # source://rbi//lib/rbi/rewriters/merge_trees.rb#296 sig { returns(T.nilable(::RBI::ConflictTree)) } def parent_conflict_tree; end + # source://rbi//lib/rbi/model.rb#46 sig { returns(T.nilable(::RBI::Scope)) } def parent_scope; end + # source://rbi//lib/rbi/model.rb#12 sig { returns(T.nilable(::RBI::Tree)) } def parent_tree; end + # @return [Tree, nil] + # + # source://rbi//lib/rbi/model.rb#12 def parent_tree=(_arg0); end + # source://rbi//lib/rbi/printer.rb#156 sig do params( out: T.any(::IO, ::StringIO), @@ -882,38 +1149,54 @@ class RBI::Node end def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end + # source://rbi//lib/rbi/printer.rb#169 sig { params(v: ::RBI::Printer).void } def print_blank_line_before(v); end + # source://rbi//lib/rbi/model.rb#33 sig { params(node: ::RBI::Node).void } def replace(node); end + # source://rbi//lib/rbi/printer.rb#162 sig { params(indent: ::Integer, print_locs: T::Boolean, max_line_length: T.nilable(::Integer)).returns(::String) } def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end end +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/model.rb#83 class RBI::NodeWithComments < ::RBI::Node abstract! + # source://rbi//lib/rbi/model.rb#93 sig { params(loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil)); end + # source://rbi//lib/rbi/model.rb#99 sig { returns(T::Array[::String]) } def annotations; end + # source://rbi//lib/rbi/model.rb#90 sig { returns(T::Array[::RBI::Comment]) } def comments; end + # @return [Array] + # + # source://rbi//lib/rbi/model.rb#90 def comments=(_arg0); end + # source://rbi//lib/rbi/rewriters/merge_trees.rb#311 sig { override.params(other: ::RBI::Node).void } def merge_with(other); end + # source://rbi//lib/rbi/printer.rb#188 sig { override.returns(T::Boolean) } def oneline?; end end +# source://rbi//lib/rbi/model.rb#601 class RBI::OptParam < ::RBI::Param + # source://rbi//lib/rbi/model.rb#616 sig do params( name: ::String, @@ -925,80 +1208,268 @@ class RBI::OptParam < ::RBI::Param end def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + # source://rbi//lib/rbi/model.rb#623 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end + # source://rbi//lib/rbi/printer.rb#468 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end + # source://rbi//lib/rbi/printer.rb#473 sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } def print_comment_leading_space(v, last:); end + # source://rbi//lib/rbi/model.rb#605 sig { returns(::String) } def value; end end +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/model.rb#552 class RBI::Param < ::RBI::NodeWithComments abstract! + # source://rbi//lib/rbi/model.rb#568 sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end + # source://rbi//lib/rbi/printer.rb#446 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end + # source://rbi//lib/rbi/printer.rb#459 sig { returns(T::Array[::String]) } def comments_lines; end + # source://rbi//lib/rbi/model.rb#559 sig { returns(::String) } def name; end + # source://rbi//lib/rbi/printer.rb#451 sig { params(v: ::RBI::Printer, last: T::Boolean).void } def print_comment_leading_space(v, last:); end + # source://rbi//lib/rbi/model.rb#574 sig { override.returns(::String) } def to_s; end end +# source://rbi//lib/rbi/parser.rb#7 class RBI::ParseError < ::StandardError + # source://rbi//lib/rbi/parser.rb#14 sig { params(message: ::String, location: ::RBI::Loc).void } def initialize(message, location); end + # source://rbi//lib/rbi/parser.rb#11 sig { returns(::RBI::Loc) } def location; end end +# source://rbi//lib/rbi/parser.rb#53 class RBI::Parser - sig { void } - def initialize; end - + # source://rbi//lib/rbi/parser.rb#88 sig { params(path: ::String).returns(::RBI::Tree) } def parse_file(path); end + # source://rbi//lib/rbi/parser.rb#83 sig { params(string: ::String).returns(::RBI::Tree) } def parse_string(string); end private - sig { params(content: ::String, file: ::String).returns(::RBI::Tree) } - def parse(content, file:); end + # source://rbi//lib/rbi/parser.rb#95 + sig { params(source: ::String, file: ::String).returns(::RBI::Tree) } + def parse(source, file:); end class << self + # source://rbi//lib/rbi/parser.rb#65 sig { params(path: ::String).returns(::RBI::Tree) } def parse_file(path); end + # source://rbi//lib/rbi/parser.rb#70 sig { params(paths: T::Array[::String]).returns(T::Array[::RBI::Tree]) } def parse_files(paths); end + # source://rbi//lib/rbi/parser.rb#60 sig { params(string: ::String).returns(::RBI::Tree) } def parse_string(string); end + # source://rbi//lib/rbi/parser.rb#76 sig { params(strings: T::Array[::String]).returns(T::Array[::RBI::Tree]) } def parse_strings(strings); end end end +# source://rbi//lib/rbi/parser.rb#791 +class RBI::Parser::SigBuilder < ::RBI::Parser::Visitor + # source://rbi//lib/rbi/parser.rb#798 + sig { params(content: ::String, file: ::String).void } + def initialize(content, file:); end + + # source://rbi//lib/rbi/parser.rb#795 + sig { returns(::RBI::Sig) } + def current; end + + # source://rbi//lib/rbi/parser.rb#850 + sig { override.params(node: ::Prism::AssocNode).void } + def visit_assoc_node(node); end + + # source://rbi//lib/rbi/parser.rb#805 + sig { override.params(node: ::Prism::CallNode).void } + def visit_call_node(node); end +end + +# source://rbi//lib/rbi/parser.rb#153 +class RBI::Parser::TreeBuilder < ::RBI::Parser::Visitor + # source://rbi//lib/rbi/parser.rb#163 + sig { params(source: ::String, comments: T::Array[::Prism::Comment], file: ::String).void } + def initialize(source, comments:, file:); end + + # source://rbi//lib/rbi/parser.rb#160 + sig { returns(T.nilable(::Prism::Node)) } + def last_node; end + + # source://rbi//lib/rbi/parser.rb#157 + sig { returns(::RBI::Tree) } + def tree; end + + # source://rbi//lib/rbi/parser.rb#299 + sig { params(node: ::Prism::CallNode).void } + def visit_call_node(node); end + + # source://rbi//lib/rbi/parser.rb#176 + sig { override.params(node: ::Prism::ClassNode).void } + def visit_class_node(node); end + + # source://rbi//lib/rbi/parser.rb#208 + sig { params(node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode)).void } + def visit_constant_assign(node); end + + # source://rbi//lib/rbi/parser.rb#201 + sig { override.params(node: ::Prism::ConstantPathWriteNode).void } + def visit_constant_path_write_node(node); end + + # source://rbi//lib/rbi/parser.rb#194 + sig { override.params(node: ::Prism::ConstantWriteNode).void } + def visit_constant_write_node(node); end + + # source://rbi//lib/rbi/parser.rb#241 + sig { override.params(node: ::Prism::DefNode).void } + def visit_def_node(node); end + + # source://rbi//lib/rbi/parser.rb#255 + sig { override.params(node: ::Prism::ModuleNode).void } + def visit_module_node(node); end + + # source://rbi//lib/rbi/parser.rb#272 + sig { override.params(node: ::Prism::ProgramNode).void } + def visit_program_node(node); end + + # source://rbi//lib/rbi/parser.rb#283 + sig { override.params(node: ::Prism::SingletonClassNode).void } + def visit_singleton_class_node(node); end + + private + + # Collect all the remaining comments within a node + # + # source://rbi//lib/rbi/parser.rb#467 + sig { params(node: ::Prism::Node).void } + def collect_dangling_comments(node); end + + # Collect all the remaining comments after visiting the tree + # + # source://rbi//lib/rbi/parser.rb#485 + sig { void } + def collect_orphan_comments; end + + # source://rbi//lib/rbi/parser.rb#508 + sig { returns(::RBI::Tree) } + def current_scope; end + + # source://rbi//lib/rbi/parser.rb#513 + sig { returns(T::Array[::RBI::Sig]) } + def current_sigs; end + + # source://rbi//lib/rbi/parser.rb#520 + sig { returns(T::Array[::RBI::Comment]) } + def current_sigs_comments; end + + # source://rbi//lib/rbi/parser.rb#527 + sig { params(node: ::Prism::Node).returns(T::Array[::RBI::Comment]) } + def node_comments(node); end + + # source://rbi//lib/rbi/parser.rb#545 + sig { params(node: ::Prism::Comment).returns(::RBI::Comment) } + def parse_comment(node); end + + # source://rbi//lib/rbi/parser.rb#574 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Param]) } + def parse_params(node); end + + # source://rbi//lib/rbi/parser.rb#550 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Arg]) } + def parse_send_args(node); end + + # source://rbi//lib/rbi/parser.rb#648 + sig { params(node: ::Prism::CallNode).returns(::RBI::Sig) } + def parse_sig(node); end + + # source://rbi//lib/rbi/parser.rb#658 + sig do + params( + node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode) + ).returns(T.nilable(::RBI::Struct)) + end + def parse_struct(node); end + + # source://rbi//lib/rbi/parser.rb#708 + sig { params(send: ::Prism::CallNode).void } + def parse_tstruct_field(send); end + + # source://rbi//lib/rbi/parser.rb#745 + sig { params(name: ::String, node: ::Prism::Node).returns(::RBI::Visibility) } + def parse_visibility(name, node); end + + # source://rbi//lib/rbi/parser.rb#759 + sig { void } + def separate_header_comments; end + + # source://rbi//lib/rbi/parser.rb#769 + sig { void } + def set_root_tree_loc; end + + # source://rbi//lib/rbi/parser.rb#783 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def type_variable_definition?(node); end +end + +# source://rbi//lib/rbi/parser.rb#122 +class RBI::Parser::Visitor < ::Prism::Visitor + # source://rbi//lib/rbi/parser.rb#126 + sig { params(source: ::String, file: ::String).void } + def initialize(source, file:); end + + private + + # source://rbi//lib/rbi/parser.rb#136 + sig { params(node: ::Prism::Node).returns(::RBI::Loc) } + def node_loc(node); end + + # source://rbi//lib/rbi/parser.rb#141 + sig { params(node: T.nilable(::Prism::Node)).returns(T.nilable(::String)) } + def node_string(node); end + + # source://rbi//lib/rbi/parser.rb#148 + sig { params(node: ::Prism::Node).returns(::String) } + def node_string!(node); end +end + +# source://rbi//lib/rbi/printer.rb#5 class RBI::Printer < ::RBI::Visitor + # source://rbi//lib/rbi/printer.rb#28 sig do params( out: T.any(::IO, ::StringIO), @@ -1009,52 +1480,87 @@ class RBI::Printer < ::RBI::Visitor end def initialize(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end + # source://rbi//lib/rbi/printer.rb#15 sig { returns(::Integer) } def current_indent; end + # source://rbi//lib/rbi/printer.rb#46 sig { void } def dedent; end + # @return [Boolean] + # + # source://rbi//lib/rbi/printer.rb#9 def in_visibility_group; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/printer.rb#9 def in_visibility_group=(_arg0); end + # Printing + # + # source://rbi//lib/rbi/printer.rb#41 sig { void } def indent; end + # source://rbi//lib/rbi/printer.rb#18 sig { returns(T.nilable(::Integer)) } def max_line_length; end + # source://rbi//lib/rbi/printer.rb#12 sig { returns(T.nilable(::RBI::Node)) } def previous_node; end + # Print a string without indentation nor `\n` at the end. + # + # source://rbi//lib/rbi/printer.rb#52 sig { params(string: ::String).void } def print(string); end + # source://rbi//lib/rbi/printer.rb#9 sig { returns(T::Boolean) } def print_locs; end + # @return [Boolean] + # + # source://rbi//lib/rbi/printer.rb#9 def print_locs=(_arg0); end + # Print a string with indentation and `\n` at the end. + # + # source://rbi//lib/rbi/printer.rb#72 sig { params(string: ::String).void } def printl(string); end + # Print a string without indentation but with a `\n` at the end. + # + # source://rbi//lib/rbi/printer.rb#58 sig { params(string: T.nilable(::String)).void } def printn(string = T.unsafe(nil)); end + # Print a string with indentation but without a `\n` at the end. + # + # source://rbi//lib/rbi/printer.rb#65 sig { params(string: T.nilable(::String)).void } def printt(string = T.unsafe(nil)); end + # source://rbi//lib/rbi/printer.rb#83 sig { override.params(node: T.nilable(::RBI::Node)).void } def visit(node); end + # source://rbi//lib/rbi/printer.rb#90 sig { override.params(nodes: T::Array[::RBI::Node]).void } def visit_all(nodes); end + # source://rbi//lib/rbi/printer.rb#78 sig { params(file: ::RBI::File).void } def visit_file(file); end end +# source://rbi//lib/rbi/model.rb#909 class RBI::Private < ::RBI::Visibility + # source://rbi//lib/rbi/model.rb#919 sig do params( loc: T.nilable(::RBI::Loc), @@ -1065,7 +1571,9 @@ class RBI::Private < ::RBI::Visibility def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end end +# source://rbi//lib/rbi/model.rb#893 class RBI::Protected < ::RBI::Visibility + # source://rbi//lib/rbi/model.rb#903 sig do params( loc: T.nilable(::RBI::Loc), @@ -1076,7 +1584,9 @@ class RBI::Protected < ::RBI::Visibility def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end end +# source://rbi//lib/rbi/model.rb#877 class RBI::Public < ::RBI::Visibility + # source://rbi//lib/rbi/model.rb#887 sig do params( loc: T.nilable(::RBI::Loc), @@ -1087,7 +1597,9 @@ class RBI::Public < ::RBI::Visibility def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end end +# source://rbi//lib/rbi/model.rb#579 class RBI::ReqParam < ::RBI::Param + # source://rbi//lib/rbi/model.rb#590 sig do params( name: ::String, @@ -1098,30 +1610,39 @@ class RBI::ReqParam < ::RBI::Param end def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + # source://rbi//lib/rbi/model.rb#596 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end end +# source://rbi//lib/rbi/model.rb#1378 class RBI::RequiresAncestor < ::RBI::NodeWithComments include ::RBI::Indexable + # source://rbi//lib/rbi/model.rb#1391 sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end + # source://rbi//lib/rbi/printer.rb#870 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end + # source://rbi//lib/rbi/index.rb#163 sig { override.returns(T::Array[::String]) } def index_ids; end + # source://rbi//lib/rbi/model.rb#1382 sig { returns(::String) } def name; end + # source://rbi//lib/rbi/model.rb#1397 sig { override.returns(::String) } def to_s; end end +# source://rbi//lib/rbi/model.rb#628 class RBI::RestParam < ::RBI::Param + # source://rbi//lib/rbi/model.rb#639 sig do params( name: ::String, @@ -1132,85 +1653,146 @@ class RBI::RestParam < ::RBI::Param end def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + # source://rbi//lib/rbi/model.rb#650 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end + # source://rbi//lib/rbi/printer.rb#483 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end + # source://rbi//lib/rbi/printer.rb#488 sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } def print_comment_leading_space(v, last:); end + # source://rbi//lib/rbi/model.rb#645 sig { override.returns(::String) } def to_s; end end +# source://rbi//lib/rbi/rewriters/add_sig_templates.rb#5 module RBI::Rewriters; end +# source://rbi//lib/rbi/rewriters/add_sig_templates.rb#6 class RBI::Rewriters::AddSigTemplates < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#10 sig { params(with_todo_comment: T::Boolean).void } def initialize(with_todo_comment: T.unsafe(nil)); end + # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#16 sig { override.params(node: T.nilable(::RBI::Node)).void } def visit(node); end private + # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#30 sig { params(attr: ::RBI::Attr).void } def add_attr_sig(attr); end + # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#45 sig { params(method: ::RBI::Method).void } def add_method_sig(method); end + # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#56 sig { params(node: ::RBI::NodeWithComments).void } def add_todo_comment(node); end end +# source://rbi//lib/rbi/rewriters/annotate.rb#6 class RBI::Rewriters::Annotate < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/annotate.rb#10 sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void } def initialize(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end + # source://rbi//lib/rbi/rewriters/annotate.rb#18 sig { override.params(node: T.nilable(::RBI::Node)).void } def visit(node); end private + # source://rbi//lib/rbi/rewriters/annotate.rb#31 sig { params(node: ::RBI::NodeWithComments).void } def annotate_node(node); end + # source://rbi//lib/rbi/rewriters/annotate.rb#38 sig { params(node: ::RBI::Node).returns(T::Boolean) } def root?(node); end end +# source://rbi//lib/rbi/rewriters/deannotate.rb#6 class RBI::Rewriters::Deannotate < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/deannotate.rb#10 sig { params(annotation: ::String).void } def initialize(annotation); end + # source://rbi//lib/rbi/rewriters/deannotate.rb#16 sig { override.params(node: T.nilable(::RBI::Node)).void } def visit(node); end private + # source://rbi//lib/rbi/rewriters/deannotate.rb#27 sig { params(node: ::RBI::NodeWithComments).void } def deannotate_node(node); end end +# source://rbi//lib/rbi/rewriters/group_nodes.rb#6 class RBI::Rewriters::GroupNodes < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/group_nodes.rb#10 sig { override.params(node: T.nilable(::RBI::Node)).void } def visit(node); end end +# Merge two RBI trees together +# +# Be this `Tree`: +# ~~~rb +# class Foo +# attr_accessor :a +# def m; end +# C = 10 +# end +# ~~~ +# +# Merged with this one: +# ~~~rb +# class Foo +# attr_reader :a +# def m(x); end +# C = 10 +# end +# ~~~ +# +# Compatible definitions are merged together while incompatible definitions are moved into a `ConflictTree`: +# ~~~rb +# class Foo +# <<<<<<< left +# attr_accessor :a +# def m; end +# ======= +# attr_reader :a +# def m(x); end +# >>>>>>> right +# C = 10 +# end +# ~~~ +# +# source://rbi//lib/rbi/rewriters/merge_trees.rb#39 class RBI::Rewriters::Merge + # source://rbi//lib/rbi/rewriters/merge_trees.rb#70 sig { params(left_name: ::String, right_name: ::String, keep: ::RBI::Rewriters::Merge::Keep).void } def initialize(left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end + # source://rbi//lib/rbi/rewriters/merge_trees.rb#79 sig { params(tree: ::RBI::Tree).void } def merge(tree); end + # source://rbi//lib/rbi/rewriters/merge_trees.rb#67 sig { returns(::RBI::MergeTree) } def tree; end class << self + # source://rbi//lib/rbi/rewriters/merge_trees.rb#54 sig do params( left: ::RBI::Tree, @@ -1224,33 +1806,74 @@ class RBI::Rewriters::Merge end end +# Used for logging / error displaying purpose +# +# source://rbi//lib/rbi/rewriters/merge_trees.rb#86 class RBI::Rewriters::Merge::Conflict < ::T::Struct const :left, ::RBI::Node - const :left_name, ::String const :right, ::RBI::Node + const :left_name, ::String const :right_name, ::String + # source://rbi//lib/rbi/rewriters/merge_trees.rb#95 sig { returns(::String) } def to_s; end class << self + # source://sorbet-runtime/0.5.11150/lib/types/struct.rb#13 def inherited(s); end end end +# Merge adjacent conflict trees +# +# Transform this: +# ~~~rb +# class Foo +# <<<<<<< left +# def m1; end +# ======= +# def m1(a); end +# >>>>>>> right +# <<<<<<< left +# def m2(a); end +# ======= +# def m2; end +# >>>>>>> right +# end +# ~~~ +# +# Into this: +# ~~~rb +# class Foo +# <<<<<<< left +# def m1; end +# def m2(a); end +# ======= +# def m1(a); end +# def m2; end +# >>>>>>> right +# end +# ~~~ +# +# source://rbi//lib/rbi/rewriters/merge_trees.rb#245 class RBI::Rewriters::Merge::ConflictTreeMerger < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/merge_trees.rb#247 sig { override.params(node: T.nilable(::RBI::Node)).void } def visit(node); end + # source://rbi//lib/rbi/rewriters/merge_trees.rb#252 sig { override.params(nodes: T::Array[::RBI::Node]).void } def visit_all(nodes); end private + # source://rbi//lib/rbi/rewriters/merge_trees.rb#273 sig { params(left: ::RBI::Tree, right: ::RBI::Tree).void } def merge_conflict_trees(left, right); end end +# source://rbi//lib/rbi/rewriters/merge_trees.rb#42 class RBI::Rewriters::Merge::Keep < ::T::Enum enums do NONE = new @@ -1259,7 +1882,9 @@ class RBI::Rewriters::Merge::Keep < ::T::Enum end end +# source://rbi//lib/rbi/rewriters/merge_trees.rb#100 class RBI::Rewriters::Merge::TreeMerger < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/merge_trees.rb#107 sig do params( output: ::RBI::Tree, @@ -1270,65 +1895,128 @@ class RBI::Rewriters::Merge::TreeMerger < ::RBI::Visitor end def initialize(output, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end + # source://rbi//lib/rbi/rewriters/merge_trees.rb#104 sig { returns(T::Array[::RBI::Rewriters::Merge::Conflict]) } def conflicts; end + # source://rbi//lib/rbi/rewriters/merge_trees.rb#119 sig { override.params(node: T.nilable(::RBI::Node)).void } def visit(node); end private + # source://rbi//lib/rbi/rewriters/merge_trees.rb#168 sig { returns(::RBI::Tree) } def current_scope; end + # source://rbi//lib/rbi/rewriters/merge_trees.rb#185 sig { params(left: ::RBI::Scope, right: ::RBI::Scope).void } def make_conflict_scope(left, right); end + # source://rbi//lib/rbi/rewriters/merge_trees.rb#192 sig { params(left: ::RBI::Node, right: ::RBI::Node).void } def make_conflict_tree(left, right); end + # source://rbi//lib/rbi/rewriters/merge_trees.rb#173 sig { params(node: ::RBI::Node).returns(T.nilable(::RBI::Node)) } def previous_definition(node); end + # source://rbi//lib/rbi/rewriters/merge_trees.rb#204 sig { params(left: ::RBI::Scope, right: ::RBI::Scope).returns(::RBI::Scope) } def replace_scope_header(left, right); end end +# source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#6 class RBI::Rewriters::NestNonPublicMethods < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#10 sig { override.params(node: T.nilable(::RBI::Node)).void } def visit(node); end end +# source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#6 class RBI::Rewriters::NestSingletonMethods < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#10 sig { override.params(node: T.nilable(::RBI::Node)).void } def visit(node); end end +# Remove all definitions existing in the index from the current tree +# +# Let's create an `Index` from two different `Tree`s: +# ~~~rb +# tree1 = Parse.parse_string(<<~RBI) +# class Foo +# def foo; end +# end +# RBI +# +# tree2 = Parse.parse_string(<<~RBI) +# FOO = 10 +# RBI +# +# index = Index.index(tree1, tree2) +# ~~~ +# +# We can use `RemoveKnownDefinitions` to remove the definitions found in the `index` from the `Tree` to clean: +# ~~~rb +# tree_to_clean = Parser.parse_string(<<~RBI) +# class Foo +# def foo; end +# def bar; end +# end +# FOO = 10 +# BAR = 42 +# RBI +# +# cleaned_tree, operations = RemoveKnownDefinitions.remove(tree_to_clean, index) +# +# assert_equal(<<~RBI, cleaned_tree) +# class Foo +# def bar; end +# end +# BAR = 42 +# RBI +# +# assert_equal(<<~OPERATIONS, operations.join("\n")) +# Deleted ::Foo#foo at -:2:2-2-16 (duplicate from -:2:2-2:16) +# Deleted ::FOO at -:5:0-5:8 (duplicate from -:1:0-1:8) +# OPERATIONS +# ~~~ +# +# source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#48 class RBI::Rewriters::RemoveKnownDefinitions < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#55 sig { params(index: ::RBI::Index).void } def initialize(index); end + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#52 sig { returns(T::Array[::RBI::Rewriters::RemoveKnownDefinitions::Operation]) } def operations; end + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#83 sig { override.params(node: T.nilable(::RBI::Node)).void } def visit(node); end + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#78 sig { params(nodes: T::Array[::RBI::Node]).void } def visit_all(nodes); end private + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#111 sig { params(node: ::RBI::Node, previous: ::RBI::Node).returns(T::Boolean) } def can_delete_node?(node, previous); end + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#129 sig { params(node: ::RBI::Node, previous: ::RBI::Node).void } def delete_node(node, previous); end + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#102 sig { params(node: ::RBI::Indexable).returns(T.nilable(::RBI::Node)) } def previous_definition_for(node); end class << self + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#70 sig do params( tree: ::RBI::Tree, @@ -1339,85 +2027,135 @@ class RBI::Rewriters::RemoveKnownDefinitions < ::RBI::Visitor end end +# source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#134 class RBI::Rewriters::RemoveKnownDefinitions::Operation < ::T::Struct const :deleted_node, ::RBI::Node const :duplicate_of, ::RBI::Node + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#141 sig { returns(::String) } def to_s; end class << self + # source://sorbet-runtime/0.5.11150/lib/types/struct.rb#13 def inherited(s); end end end +# source://rbi//lib/rbi/rewriters/sort_nodes.rb#6 class RBI::Rewriters::SortNodes < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#10 sig { override.params(node: T.nilable(::RBI::Node)).void } def visit(node); end private + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#73 sig { params(kind: ::RBI::Group::Kind).returns(::Integer) } def group_rank(kind); end + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#94 sig { params(node: ::RBI::Node).returns(T.nilable(::String)) } def node_name(node); end + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#45 sig { params(node: ::RBI::Node).returns(::Integer) } def node_rank(node); end + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#106 sig { params(node: ::RBI::Node).void } def sort_node_names!(node); end end +# Scopes +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/model.rb#176 class RBI::Scope < ::RBI::Tree include ::RBI::Indexable abstract! - def initialize(*args, &blk); end - + # source://rbi//lib/rbi/printer.rb#242 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end + # Duplicate `self` scope without its body + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#356 sig { returns(T.self_type) } def dup_empty; end + # @abstract + # + # source://rbi//lib/rbi/model.rb#182 sig { abstract.returns(::String) } def fully_qualified_name; end + # source://rbi//lib/rbi/index.rb#93 sig { override.returns(T::Array[::String]) } def index_ids; end + # source://rbi//lib/rbi/printer.rb#256 sig { params(v: ::RBI::Printer).void } def print_body(v); end + # @abstract + # + # source://rbi//lib/rbi/printer.rb#253 sig { abstract.params(v: ::RBI::Printer).void } def print_header(v); end + # source://rbi//lib/rbi/model.rb#185 sig { override.returns(::String) } def to_s; end end +# A conflict between two scope headers +# +# Is rendered as a merge conflict between `left` and` right` for scope definitions: +# ~~~rb +# <<<<<<< left +# class Foo +# ======= +# module Foo +# >>>>>>> right +# def m1; end +# end +# ~~~ +# +# source://rbi//lib/rbi/rewriters/merge_trees.rb#628 class RBI::ScopeConflict < ::RBI::Tree + # source://rbi//lib/rbi/rewriters/merge_trees.rb#642 sig { params(left: ::RBI::Scope, right: ::RBI::Scope, left_name: ::String, right_name: ::String).void } def initialize(left:, right:, left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end + # source://rbi//lib/rbi/rewriters/merge_trees.rb#651 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end + # source://rbi//lib/rbi/rewriters/merge_trees.rb#632 sig { returns(::RBI::Scope) } def left; end + # source://rbi//lib/rbi/rewriters/merge_trees.rb#667 sig { override.returns(T::Boolean) } def oneline?; end + # @return [Scope] + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#632 def right; end end +# Sends +# +# source://rbi//lib/rbi/model.rb#927 class RBI::Send < ::RBI::NodeWithComments include ::RBI::Indexable + # source://rbi//lib/rbi/model.rb#945 sig do params( method: ::String, @@ -1429,32 +2167,44 @@ class RBI::Send < ::RBI::NodeWithComments end def initialize(method, args = T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + # source://rbi//lib/rbi/model.rb#953 sig { params(arg: ::RBI::Arg).void } def <<(arg); end + # source://rbi//lib/rbi/model.rb#958 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end + # source://rbi//lib/rbi/printer.rb#592 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end + # source://rbi//lib/rbi/model.rb#934 sig { returns(T::Array[::RBI::Arg]) } def args; end + # source://rbi//lib/rbi/rewriters/merge_trees.rb#529 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end + # source://rbi//lib/rbi/index.rb#193 sig { override.returns(T::Array[::String]) } def index_ids; end + # source://rbi//lib/rbi/model.rb#931 sig { returns(::String) } def method; end + # source://rbi//lib/rbi/model.rb#963 sig { returns(::String) } def to_s; end end +# Sorbet's sigs +# +# source://rbi//lib/rbi/model.rb#1027 class RBI::Sig < ::RBI::Node + # source://rbi//lib/rbi/model.rb#1059 sig do params( params: T::Array[::RBI::SigParam], @@ -1471,82 +2221,109 @@ class RBI::Sig < ::RBI::Node end def initialize(params: T.unsafe(nil), return_type: T.unsafe(nil), is_abstract: T.unsafe(nil), is_override: T.unsafe(nil), is_overridable: T.unsafe(nil), is_final: T.unsafe(nil), type_params: T.unsafe(nil), checked: T.unsafe(nil), loc: T.unsafe(nil), &block); end + # source://rbi//lib/rbi/model.rb#1084 sig { params(param: ::RBI::SigParam).void } def <<(param); end + # source://rbi//lib/rbi/model.rb#1089 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end + # source://rbi//lib/rbi/printer.rb#633 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end + # source://rbi//lib/rbi/model.rb#1043 sig { returns(T.nilable(::Symbol)) } def checked; end + # @return [Symbol, nil] + # + # source://rbi//lib/rbi/model.rb#1043 def checked=(_arg0); end + # source://rbi//lib/rbi/printer.rb#656 sig { returns(T::Boolean) } def inline_params?; end + # source://rbi//lib/rbi/model.rb#1037 sig { returns(T::Boolean) } def is_abstract; end + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#1037 def is_abstract=(_arg0); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#1037 def is_final; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#1037 def is_final=(_arg0); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#1037 def is_overridable; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#1037 def is_overridable=(_arg0); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#1037 def is_override; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#1037 def is_override=(_arg0); end + # source://rbi//lib/rbi/printer.rb#651 sig { override.returns(T::Boolean) } def oneline?; end + # source://rbi//lib/rbi/model.rb#1031 sig { returns(T::Array[::RBI::SigParam]) } def params; end + # source://rbi//lib/rbi/model.rb#1034 sig { returns(T.nilable(::String)) } def return_type; end + # @return [String, nil] + # + # source://rbi//lib/rbi/model.rb#1034 def return_type=(_arg0); end + # source://rbi//lib/rbi/model.rb#1040 sig { returns(T::Array[::String]) } def type_params; end private + # source://rbi//lib/rbi/printer.rb#698 sig { params(v: ::RBI::Printer).void } def print_as_block(v); end + # source://rbi//lib/rbi/printer.rb#674 sig { params(v: ::RBI::Printer).void } def print_as_line(v); end + # source://rbi//lib/rbi/printer.rb#663 sig { returns(T::Array[::String]) } def sig_modifiers; end end -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 - +# source://rbi//lib/rbi/model.rb#1098 class RBI::SigParam < ::RBI::NodeWithComments + # source://rbi//lib/rbi/model.rb#1113 sig do params( name: ::String, @@ -1558,25 +2335,35 @@ class RBI::SigParam < ::RBI::NodeWithComments end def initialize(name, type, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + # source://rbi//lib/rbi/model.rb#1121 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end + # source://rbi//lib/rbi/printer.rb#751 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end + # source://rbi//lib/rbi/printer.rb#764 sig { returns(T::Array[::String]) } def comments_lines; end + # source://rbi//lib/rbi/model.rb#1102 sig { returns(::String) } def name; end + # source://rbi//lib/rbi/printer.rb#756 sig { params(v: ::RBI::Printer, last: T::Boolean).void } def print_comment_leading_space(v, last:); end + # @return [String] + # + # source://rbi//lib/rbi/model.rb#1102 def type; end end +# source://rbi//lib/rbi/model.rb#251 class RBI::SingletonClass < ::RBI::Scope + # source://rbi//lib/rbi/model.rb#261 sig do params( loc: T.nilable(::RBI::Loc), @@ -1586,14 +2373,18 @@ class RBI::SingletonClass < ::RBI::Scope end def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + # source://rbi//lib/rbi/model.rb#267 sig { override.returns(::String) } def fully_qualified_name; end + # source://rbi//lib/rbi/printer.rb#321 sig { override.params(v: ::RBI::Printer).void } def print_header(v); end end +# source://rbi//lib/rbi/model.rb#272 class RBI::Struct < ::RBI::Scope + # source://rbi//lib/rbi/model.rb#294 sig do params( name: ::String, @@ -1606,32 +2397,51 @@ class RBI::Struct < ::RBI::Scope end def initialize(name, members: T.unsafe(nil), keyword_init: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + # source://rbi//lib/rbi/rewriters/merge_trees.rb#394 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end + # source://rbi//lib/rbi/model.rb#303 sig { override.returns(::String) } def fully_qualified_name; end + # source://rbi//lib/rbi/model.rb#282 sig { returns(T::Boolean) } def keyword_init; end + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#282 def keyword_init=(_arg0); end + # source://rbi//lib/rbi/model.rb#279 sig { returns(T::Array[::Symbol]) } def members; end + # @return [Array] + # + # source://rbi//lib/rbi/model.rb#279 def members=(_arg0); end + # source://rbi//lib/rbi/model.rb#276 sig { returns(::String) } def name; end + # @return [String] + # + # source://rbi//lib/rbi/model.rb#276 def name=(_arg0); end + # source://rbi//lib/rbi/printer.rb#300 sig { override.params(v: ::RBI::Printer).void } def print_header(v); end end +# Sorbet's T::Enum +# +# source://rbi//lib/rbi/model.rb#1239 class RBI::TEnum < ::RBI::Class + # source://rbi//lib/rbi/model.rb#1250 sig do params( name: ::String, @@ -1643,9 +2453,11 @@ class RBI::TEnum < ::RBI::Class def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end end +# source://rbi//lib/rbi/model.rb#1256 class RBI::TEnumBlock < ::RBI::NodeWithComments include ::RBI::Indexable + # source://rbi//lib/rbi/model.rb#1270 sig do params( names: T::Array[::String], @@ -1656,29 +2468,40 @@ class RBI::TEnumBlock < ::RBI::NodeWithComments end def initialize(names = T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + # source://rbi//lib/rbi/model.rb#1282 sig { params(name: ::String).void } def <<(name); end + # source://rbi//lib/rbi/printer.rb#795 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end + # source://rbi//lib/rbi/model.rb#1277 sig { returns(T::Boolean) } def empty?; end + # source://rbi//lib/rbi/index.rb#223 sig { override.returns(T::Array[::String]) } def index_ids; end + # source://rbi//lib/rbi/rewriters/merge_trees.rb#556 sig { override.params(other: ::RBI::Node).void } def merge_with(other); end + # source://rbi//lib/rbi/model.rb#1260 sig { returns(T::Array[::String]) } def names; end + # source://rbi//lib/rbi/model.rb#1287 sig { override.returns(::String) } def to_s; end end +# Sorbet's T::Struct +# +# source://rbi//lib/rbi/model.rb#1128 class RBI::TStruct < ::RBI::Class + # source://rbi//lib/rbi/model.rb#1139 sig do params( name: ::String, @@ -1690,9 +2513,11 @@ class RBI::TStruct < ::RBI::Class def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end end +# source://rbi//lib/rbi/model.rb#1177 class RBI::TStructConst < ::RBI::TStructField include ::RBI::Indexable + # source://rbi//lib/rbi/model.rb#1190 sig do params( name: ::String, @@ -1705,22 +2530,30 @@ class RBI::TStructConst < ::RBI::TStructField end def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + # source://rbi//lib/rbi/rewriters/merge_trees.rb#547 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end + # source://rbi//lib/rbi/model.rb#1196 sig { override.returns(T::Array[::String]) } def fully_qualified_names; end + # source://rbi//lib/rbi/index.rb#203 sig { override.returns(T::Array[::String]) } def index_ids; end + # source://rbi//lib/rbi/model.rb#1202 sig { override.returns(::String) } def to_s; end end +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/model.rb#1145 class RBI::TStructField < ::RBI::NodeWithComments abstract! + # source://rbi//lib/rbi/model.rb#1166 sig do params( name: ::String, @@ -1732,31 +2565,54 @@ class RBI::TStructField < ::RBI::NodeWithComments end def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil)); end + # source://rbi//lib/rbi/printer.rb#773 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end + # source://rbi//lib/rbi/rewriters/merge_trees.rb#538 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end + # source://rbi//lib/rbi/model.rb#1155 sig { returns(T.nilable(::String)) } def default; end + # @return [String, nil] + # + # source://rbi//lib/rbi/model.rb#1155 def default=(_arg0); end + # @abstract + # + # source://rbi//lib/rbi/model.rb#1174 sig { abstract.returns(T::Array[::String]) } def fully_qualified_names; end + # source://rbi//lib/rbi/model.rb#1152 sig { returns(::String) } def name; end + # @return [String] + # + # source://rbi//lib/rbi/model.rb#1152 def name=(_arg0); end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#1152 def type; end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#1152 def type=(_arg0); end end +# source://rbi//lib/rbi/model.rb#1207 class RBI::TStructProp < ::RBI::TStructField include ::RBI::Indexable + # source://rbi//lib/rbi/model.rb#1220 sig do params( name: ::String, @@ -1769,20 +2625,26 @@ class RBI::TStructProp < ::RBI::TStructField end def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + # source://rbi//lib/rbi/rewriters/merge_trees.rb#570 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end + # source://rbi//lib/rbi/model.rb#1226 sig { override.returns(T::Array[::String]) } def fully_qualified_names; end + # source://rbi//lib/rbi/index.rb#213 sig { override.returns(T::Array[::String]) } def index_ids; end + # source://rbi//lib/rbi/model.rb#1232 sig { override.returns(::String) } def to_s; end end +# source://rbi//lib/rbi/model.rb#106 class RBI::Tree < ::RBI::NodeWithComments + # source://rbi//lib/rbi/model.rb#119 sig do params( loc: T.nilable(::RBI::Loc), @@ -1792,18 +2654,23 @@ class RBI::Tree < ::RBI::NodeWithComments end def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + # source://rbi//lib/rbi/model.rb#126 sig { params(node: ::RBI::Node).void } def <<(node); end + # source://rbi//lib/rbi/printer.rb#226 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end + # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#66 sig { params(with_todo_comment: T::Boolean).void } def add_sig_templates!(with_todo_comment: T.unsafe(nil)); end + # source://rbi//lib/rbi/rewriters/annotate.rb#49 sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void } def annotate!(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end + # source://tapioca/0.11.13/lib/tapioca/rbi_ext/model.rb#38 sig do params( name: ::String, @@ -1813,35 +2680,44 @@ class RBI::Tree < ::RBI::NodeWithComments end def create_class(name, superclass_name: T.unsafe(nil), &block); end + # source://tapioca/0.11.13/lib/tapioca/rbi_ext/model.rb#45 sig { params(name: ::String, value: ::String).void } def create_constant(name, value:); end + # source://tapioca/0.11.13/lib/tapioca/rbi_ext/model.rb#55 sig { params(name: ::String).void } def create_extend(name); end + # source://tapioca/0.11.13/lib/tapioca/rbi_ext/model.rb#50 sig { params(name: ::String).void } def create_include(name); end + # source://tapioca/0.11.13/lib/tapioca/rbi_ext/model.rb#89 sig do params( name: ::String, parameters: T::Array[::RBI::TypedParam], return_type: ::String, class_method: T::Boolean, - visibility: ::RBI::Visibility + visibility: ::RBI::Visibility, + comments: T::Array[::RBI::Comment] ).void end - def create_method(name, parameters: T.unsafe(nil), return_type: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil)); end + def create_method(name, parameters: T.unsafe(nil), return_type: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil), comments: T.unsafe(nil)); end + # source://tapioca/0.11.13/lib/tapioca/rbi_ext/model.rb#60 sig { params(name: ::String).void } def create_mixes_in_class_methods(name); end + # source://tapioca/0.11.13/lib/tapioca/rbi_ext/model.rb#25 sig { params(name: ::String, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) } def create_module(name, &block); end - sig { params(constant: ::Module, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).void } + # source://tapioca/0.11.13/lib/tapioca/rbi_ext/model.rb#9 + sig { params(constant: ::Module, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) } def create_path(constant, &block); end + # source://tapioca/0.11.13/lib/tapioca/rbi_ext/model.rb#74 sig do params( name: ::String, @@ -1854,18 +2730,23 @@ class RBI::Tree < ::RBI::NodeWithComments end def create_type_variable(name, type:, variance: T.unsafe(nil), fixed: T.unsafe(nil), upper: T.unsafe(nil), lower: T.unsafe(nil)); end + # source://rbi//lib/rbi/rewriters/deannotate.rb#41 sig { params(annotation: ::String).void } def deannotate!(annotation); end + # source://rbi//lib/rbi/model.rb#132 sig { returns(T::Boolean) } def empty?; end + # source://rbi//lib/rbi/rewriters/group_nodes.rb#38 sig { void } def group_nodes!; end + # source://rbi//lib/rbi/index.rb#68 sig { returns(::RBI::Index) } def index; end + # source://rbi//lib/rbi/rewriters/merge_trees.rb#324 sig do params( other: ::RBI::Tree, @@ -1876,121 +2757,42 @@ class RBI::Tree < ::RBI::NodeWithComments end def merge(other, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end + # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#46 sig { void } def nest_non_public_methods!; end + # source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#36 sig { void } def nest_singleton_methods!; end + # source://rbi//lib/rbi/model.rb#110 sig { returns(T::Array[::RBI::Node]) } def nodes; end + # source://rbi//lib/rbi/printer.rb#233 sig { override.returns(T::Boolean) } def oneline?; end + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#119 sig { void } def sort_nodes!; end private + # source://tapioca/0.11.13/lib/tapioca/rbi_ext/model.rb#116 sig { params(node: ::RBI::Node).returns(::RBI::Node) } def create_node(node); end + # source://tapioca/0.11.13/lib/tapioca/rbi_ext/model.rb#111 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 do - params( - file: ::String, - comments: T::Array[::Parser::Source::Comment], - nodes_comments_assoc: T::Hash[::Parser::Source::Map, T::Array[::Parser::Source::Comment]] - ).void - end - def initialize(file:, comments: T.unsafe(nil), nodes_comments_assoc: T.unsafe(nil)); end - - sig { returns(T.nilable(::AST::Node)) } - def last_node; 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::RequiresAncestor) } - def parse_requires_ancestor(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 +# source://rbi//lib/rbi/model.rb#1320 class RBI::TypeMember < ::RBI::NodeWithComments + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#1335 sig do params( name: ::String, @@ -2002,81 +2804,119 @@ class RBI::TypeMember < ::RBI::NodeWithComments end def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + # source://rbi//lib/rbi/printer.rb#812 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end + # source://rbi//lib/rbi/model.rb#1343 sig { returns(::String) } def fully_qualified_name; end + # source://rbi//lib/rbi/index.rb#183 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#1324 sig { returns(::String) } def name; end + # source://rbi//lib/rbi/model.rb#1350 sig { override.returns(::String) } def to_s; end + # @return [String] + # + # source://rbi//lib/rbi/model.rb#1324 def value; end end +# source://rbi//lib/rbi/parser.rb#20 class RBI::UnexpectedParserError < ::StandardError + # source://rbi//lib/rbi/parser.rb#27 sig { params(parent_exception: ::Exception, last_location: ::RBI::Loc).void } def initialize(parent_exception, last_location); end + # source://rbi//lib/rbi/parser.rb#24 sig { returns(::RBI::Loc) } def last_location; end + # source://rbi//lib/rbi/parser.rb#34 sig { params(io: T.any(::IO, ::StringIO)).void } def print_debug(io: T.unsafe(nil)); end end +# source://rbi//lib/rbi/version.rb#5 RBI::VERSION = T.let(T.unsafe(nil), String) +# Visibility +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/model.rb#841 class RBI::Visibility < ::RBI::NodeWithComments abstract! + # source://rbi//lib/rbi/model.rb#851 sig { params(visibility: ::Symbol, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } def initialize(visibility, loc: T.unsafe(nil), comments: T.unsafe(nil)); end + # source://rbi//lib/rbi/model.rb#857 sig { params(other: ::RBI::Visibility).returns(T::Boolean) } def ==(other); end + # source://rbi//lib/rbi/printer.rb#579 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end + # source://rbi//lib/rbi/model.rb#872 sig { returns(T::Boolean) } def private?; end + # source://rbi//lib/rbi/model.rb#867 sig { returns(T::Boolean) } def protected?; end + # source://rbi//lib/rbi/model.rb#862 sig { returns(T::Boolean) } def public?; end + # source://rbi//lib/rbi/model.rb#848 sig { returns(::Symbol) } def visibility; end end +# source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#52 class RBI::VisibilityGroup < ::RBI::Tree + # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#59 sig { params(visibility: ::RBI::Visibility).void } def initialize(visibility); end + # source://rbi//lib/rbi/printer.rb#848 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end + # source://rbi//lib/rbi/printer.rb#861 sig { override.returns(T::Boolean) } def oneline?; end + # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#56 sig { returns(::RBI::Visibility) } def visibility; end end +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/visitor.rb#5 class RBI::Visitor abstract! - def initialize(*args, &blk); end - + # @abstract + # + # source://rbi//lib/rbi/visitor.rb#12 sig { abstract.params(node: T.nilable(::RBI::Node)).void } def visit(node); end + # source://rbi//lib/rbi/visitor.rb#15 sig { params(nodes: T::Array[::RBI::Node]).void } def visit_all(nodes); end end diff --git a/Library/Homebrew/sorbet/rbi/gems/rdiscount@2.2.7.1.rbi b/Library/Homebrew/sorbet/rbi/gems/rdiscount@2.2.7.1.rbi index 2e8bf58645e5fa..870ddb8f5b6e98 100644 --- a/Library/Homebrew/sorbet/rbi/gems/rdiscount@2.2.7.1.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/rdiscount@2.2.7.1.rbi @@ -4,50 +4,254 @@ # This is an autogenerated file for types exported from the `rdiscount` gem. # Please instead update this file by running `bin/tapioca gem rdiscount`. +# source://rdiscount//lib/rdiscount.rb#117 Markdown = RDiscount +# Discount is an implementation of John Gruber's Markdown markup +# language in C. It implements all of the language as described in +# {Markdown Syntax}[http://daringfireball.net/projects/markdown/syntax] +# and passes the Markdown 1.0 test suite. The RDiscount extension makes +# the Discount processor available via a Ruby C Extension library. +# +# == Usage +# +# RDiscount implements the basic protocol popularized by RedCloth and adopted +# by BlueCloth: +# require 'rdiscount' +# markdown = RDiscount.new("Hello World!") +# puts markdown.to_html +# +# == Replacing BlueCloth +# +# Inject RDiscount into your BlueCloth-using code by replacing your bluecloth +# require statements with the following: +# begin +# require 'rdiscount' +# BlueCloth = RDiscount +# rescue LoadError +# require 'bluecloth' +# end +# +# source://rdiscount//lib/rdiscount.rb#26 class RDiscount + # Create a RDiscount Markdown processor. The +text+ argument + # should be a string containing Markdown text. Additional arguments may be + # supplied to set various processing options: + # + # * :smart - Enable SmartyPants processing. + # * :filter_styles - Do not output