From e37aa7f61a12e6044c2ff36b9e4dd9d426044ac2 Mon Sep 17 00:00:00 2001 From: Olivier Bellone Date: Mon, 5 Aug 2024 10:09:00 -0700 Subject: [PATCH] Bump dependencies and update RBI signatures --- .rubocop.yml | 2 +- .ruby-version | 2 +- Gemfile.lock | 44 +- rbi/grape.rbi | 6 +- sorbet/rbi/annotations/activesupport.rbi | 448 +++++ sorbet/rbi/gems/activesupport@7.1.3.4.rbi | 1668 ++++++++++++++++- .../{docile@1.4.0.rbi => docile@1.4.1.rbi} | 0 sorbet/rbi/gems/grape-entity@1.0.1.rbi | 4 +- .../gems/{grape@2.1.2.rbi => grape@2.1.3.rbi} | 86 +- sorbet/rbi/gems/mustermann-grape@1.1.0.rbi | 12 +- ...termann@3.0.0.rbi => mustermann@3.0.1.rbi} | 0 .../gems/{racc@1.8.0.rbi => racc@1.8.1.rbi} | 0 sorbet/rbi/gems/rake@13.2.1.rbi | 105 ++ .../gems/{rbi@0.1.13.rbi => rbi@0.1.14.rbi} | 1451 ++++++++------ .../gems/{rexml@3.3.1.rbi => rexml@3.3.4.rbi} | 125 +- ...-ast@1.31.3.rbi => rubocop-ast@1.32.0.rbi} | 802 ++++---- sorbet/rbi/gems/rubocop-minitest@0.35.1.rbi | 2 +- .../rbi/gems/rubocop-performance@1.21.1.rbi | 12 +- ...bet@0.8.3.rbi => rubocop-sorbet@0.8.5.rbi} | 192 +- ...{rubocop@1.65.0.rbi => rubocop@1.65.1.rbi} | 1502 +++++++-------- .../gems/{spoom@1.3.3.rbi => spoom@1.4.2.rbi} | 74 +- sorbet/rbi/gems/tapioca@0.15.1.rbi | 50 +- sorbet/rbi/gems/yard-sorbet@0.9.0.rbi | 2 +- ...eitwerk@2.6.16.rbi => zeitwerk@2.6.17.rbi} | 0 24 files changed, 4537 insertions(+), 2052 deletions(-) create mode 100644 sorbet/rbi/annotations/activesupport.rbi rename sorbet/rbi/gems/{docile@1.4.0.rbi => docile@1.4.1.rbi} (100%) rename sorbet/rbi/gems/{grape@2.1.2.rbi => grape@2.1.3.rbi} (98%) rename sorbet/rbi/gems/{mustermann@3.0.0.rbi => mustermann@3.0.1.rbi} (100%) rename sorbet/rbi/gems/{racc@1.8.0.rbi => racc@1.8.1.rbi} (100%) rename sorbet/rbi/gems/{rbi@0.1.13.rbi => rbi@0.1.14.rbi} (70%) rename sorbet/rbi/gems/{rexml@3.3.1.rbi => rexml@3.3.4.rbi} (98%) rename sorbet/rbi/gems/{rubocop-ast@1.31.3.rbi => rubocop-ast@1.32.0.rbi} (92%) rename sorbet/rbi/gems/{rubocop-sorbet@0.8.3.rbi => rubocop-sorbet@0.8.5.rbi} (93%) rename sorbet/rbi/gems/{rubocop@1.65.0.rbi => rubocop@1.65.1.rbi} (99%) rename sorbet/rbi/gems/{spoom@1.3.3.rbi => spoom@1.4.2.rbi} (98%) rename sorbet/rbi/gems/{zeitwerk@2.6.16.rbi => zeitwerk@2.6.17.rbi} (100%) diff --git a/.rubocop.yml b/.rubocop.yml index a47bed6..4aae489 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -11,7 +11,7 @@ require: AllCops: NewCops: enable SuggestExtensions: false - TargetRubyVersion: 3.0 + TargetRubyVersion: 3.1 Naming/ConstantName: Enabled: false diff --git a/.ruby-version b/.ruby-version index 619b537..a0891f5 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.3.3 +3.3.4 diff --git a/Gemfile.lock b/Gemfile.lock index 8d14a99..d00c66e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -29,7 +29,7 @@ GEM thor (~> 1.0) concurrent-ruby (1.3.3) connection_pool (2.4.1) - docile (1.4.0) + docile (1.4.1) drb (2.2.1) dry-core (1.0.1) concurrent-ruby (~> 1.0) @@ -47,7 +47,7 @@ GEM dry-logic (~> 1.4) zeitwerk (~> 2.6) erubi (1.13.0) - grape (2.1.2) + grape (2.1.3) activesupport (>= 6) dry-types (>= 1.1) mustermann-grape (~> 1.1.0) @@ -71,7 +71,7 @@ GEM minitest (>= 5.0) ruby-progressbar multi_json (1.15.0) - mustermann (3.0.0) + mustermann (3.0.1) ruby2_keywords (~> 0.0.1) mustermann-grape (1.1.0) mustermann (>= 1.0.0) @@ -84,11 +84,11 @@ GEM prism (0.30.0) psych (5.1.2) stringio - racc (1.8.0) + racc (1.8.1) rack (3.1.7) rainbow (3.1.1) rake (13.2.1) - rbi (0.1.13) + rbi (0.1.14) prism (>= 0.18.0, < 1.0.0) sorbet-runtime (>= 0.5.9204) rdoc (6.7.0) @@ -96,9 +96,9 @@ GEM regexp_parser (2.9.2) reline (0.5.9) io-console (~> 0.5) - rexml (3.3.1) + rexml (3.3.4) strscan - rubocop (1.65.0) + rubocop (1.65.1) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) @@ -109,7 +109,7 @@ GEM rubocop-ast (>= 1.31.1, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.31.3) + rubocop-ast (1.32.0) parser (>= 3.3.1.0) rubocop-minitest (0.35.1) rubocop (>= 1.61, < 2.0) @@ -121,8 +121,8 @@ GEM rubocop (~> 1.0) rubocop-shopify (2.15.1) rubocop (~> 1.51) - rubocop-sorbet (0.8.3) - rubocop (>= 0.90.0) + rubocop-sorbet (0.8.5) + rubocop (>= 1) ruby-progressbar (1.13.0) ruby2_keywords (0.0.5) simplecov (0.22.0) @@ -131,16 +131,16 @@ GEM simplecov_json_formatter (~> 0.1) simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) - sorbet (0.5.11481) - sorbet-static (= 0.5.11481) - sorbet-runtime (0.5.11481) - sorbet-static (0.5.11481-aarch64-linux) - sorbet-static (0.5.11481-universal-darwin) - sorbet-static (0.5.11481-x86_64-linux) - sorbet-static-and-runtime (0.5.11481) - sorbet (= 0.5.11481) - sorbet-runtime (= 0.5.11481) - spoom (1.3.3) + sorbet (0.5.11506) + sorbet-static (= 0.5.11506) + sorbet-runtime (0.5.11506) + sorbet-static (0.5.11506-aarch64-linux) + sorbet-static (0.5.11506-universal-darwin) + sorbet-static (0.5.11506-x86_64-linux) + sorbet-static-and-runtime (0.5.11506) + sorbet (= 0.5.11506) + sorbet-runtime (= 0.5.11506) + spoom (1.4.2) erubi (>= 1.10.0) prism (>= 0.28.0) sorbet-static-and-runtime (>= 0.5.10187) @@ -164,7 +164,7 @@ GEM yard-sorbet (0.9.0) sorbet-runtime yard - zeitwerk (2.6.16) + zeitwerk (2.6.17) PLATFORMS aarch64-linux @@ -190,4 +190,4 @@ DEPENDENCIES tapioca BUNDLED WITH - 2.5.15 + 2.5.17 diff --git a/rbi/grape.rbi b/rbi/grape.rbi index baf51ae..bbb0dd8 100644 --- a/rbi/grape.rbi +++ b/rbi/grape.rbi @@ -45,9 +45,13 @@ module Grape message: T.any(String, T::Hash[Symbol, T.untyped]), status: T.nilable(T.any(Integer, Symbol)), additional_headers: T.nilable(T::Hash[String, String]), + backtrace: T.nilable(T::Array[String]), + original_exception: T.nilable(Exception), ).returns(T.noreturn) end - def error!(message, status = nil, additional_headers = nil); end + def error!(message, status = T.unsafe(nil), additional_headers = T.unsafe(nil), backtrace = T.unsafe(nil), + original_exception = T.unsafe(nil)) + end sig { params(status: T.nilable(T.any(Integer, Symbol))).returns(Integer) } def status(status = nil); end diff --git a/sorbet/rbi/annotations/activesupport.rbi b/sorbet/rbi/annotations/activesupport.rbi new file mode 100644 index 0000000..3659478 --- /dev/null +++ b/sorbet/rbi/annotations/activesupport.rbi @@ -0,0 +1,448 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This file was pulled from a central RBI files repository. +# Please run `bin/tapioca annotations` to update it. + +module ActiveSupport::Testing::Declarative + sig { params(name: String, block: T.proc.bind(T.untyped).void).void } + def test(name, &block); end +end + +class ActiveSupport::EnvironmentInquirer + sig { returns(T::Boolean) } + def development?; end + + sig { returns(T::Boolean) } + def production?; end + + sig { returns(T::Boolean) } + def test?; end + + # @method_missing: delegated to String through ActiveSupport::StringInquirer + sig { returns(T::Boolean) } + def staging?; end +end + +module ActiveSupport::Testing::SetupAndTeardown::ClassMethods + sig { params(args: T.untyped, block: T.nilable(T.proc.bind(T.untyped).void)).void } + def setup(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.bind(T.untyped).void)).void } + def teardown(*args, &block); end +end + +class ActiveSupport::TestCase + sig { params(args: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).void)).void } + def self.setup(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).void)).void } + def self.teardown(*args, &block); end + + sig { params(name: String, block: T.proc.bind(T.attached_class).void).void } + def self.test(name, &block); end +end + +class ActiveSupport::TimeWithZone + # @shim: Methods on ActiveSupport::TimeWithZone are delegated to `Time` using `method_missing + include ::DateAndTime::Zones + + # @shim: Methods on ActiveSupport::TimeWithZone are delegated to `Time` using `method_missing + include ::DateAndTime::Calculations + + sig { returns(FalseClass) } + def blank?; end + + # @shim: since `present?` is always true, `presence` always returns `self` + sig { returns(T.self_type) } + def presence; end + + # @shim: since `blank?` is always false, `present?` always returns `true` + sig { returns(TrueClass) } + def present?; end +end + +class Object + sig { returns(T::Boolean) } + def blank?; end + + sig { returns(FalseClass) } + def html_safe?; end + + sig { returns(T.nilable(T.self_type)) } + def presence; end + + sig { params(another_object: T.untyped).returns(T.nilable(T.self_type)) } + def presence_in(another_object); end + + sig { returns(T::Boolean) } + def present?; end +end + +class Hash + sig { returns(T::Boolean) } + def blank?; end + + sig { returns(T::Boolean) } + def present?; end + + sig { returns(T::Boolean) } + def extractable_options?; end +end + +class Array + sig { returns(T::Boolean) } + def blank?; end + + sig { returns(T::Boolean) } + def present?; end + + sig { params(position: Integer).returns(T.self_type) } + def from(position); end + + sig { params(position: Integer).returns(T.self_type) } + def to(position); end + + sig { params(elements: T.untyped).returns(T::Array[T.untyped]) } + def including(*elements); end + + sig { params(elements: T.untyped).returns(T.self_type) } + def excluding(*elements); end + + sig { params(elements: T.untyped).returns(T.self_type) } + def without(*elements); end + + sig { returns(T.nilable(Elem)) } + def second; end + + sig { returns(T.nilable(Elem)) } + def third; end + + sig { returns(T.nilable(Elem)) } + def fourth; end + + sig { returns(T.nilable(Elem)) } + def fifth; end + + sig { returns(T.nilable(Elem)) } + def forty_two; end + + sig { returns(T.nilable(Elem)) } + def third_to_last; end + + sig { returns(T.nilable(Elem)) } + def second_to_last; end + + sig { params(options: T::Hash[T.untyped, T.untyped]).returns(String) } + def to_sentence(options = {}); end + + sig { params(format: Symbol).returns(String) } + def to_fs(format = :default); end + + sig { params(format: Symbol).returns(String) } + def to_formatted_s(format = :default); end + + sig { returns(String) } + def to_xml; end + + sig { returns(T::Hash[T.untyped, T.untyped]) } + def extract_options!; end + + sig { type_parameters(:FillType).params(number: Integer, fill_with: T.type_parameter(:FillType), block: T.nilable(T.proc.params(group: T::Array[T.any(Elem, T.type_parameter(:FillType))]).void)).returns(T::Array[T::Array[T.any(Elem, T.type_parameter(:FillType))]]) } + def in_groups(number, fill_with = T.unsafe(nil), &block); end + + sig { type_parameters(:FillType).params(number: Integer, fill_with: T.type_parameter(:FillType), block: T.nilable(T.proc.params(group: T::Array[T.any(Elem, T.type_parameter(:FillType))]).void)).returns(T::Array[T::Array[T.any(Elem, T.type_parameter(:FillType))]]) } + def in_groups_of(number, fill_with = T.unsafe(nil), &block); end + + sig { params(value: T.untyped, block: T.nilable(T.proc.params(element: Elem).returns(T.untyped))).returns(T::Array[T::Array[Elem]]) } + def split(value = nil, &block); end + + sig { params(block: T.nilable(T.proc.params(element: Elem).returns(T.untyped))).returns(T.any(T::Array[Elem], T::Enumerator[Elem])) } + def extract!(&block); end + + sig { returns(ActiveSupport::ArrayInquirer) } + def inquiry; end + + sig { params(object: T.untyped).returns(T::Array[T.untyped]) } + def self.wrap(object); end +end + +class Date + sig { returns(FalseClass) } + def blank?; end + + # @shim: since `present?` is always true, `presence` always returns `self` + sig { returns(T.self_type) } + def presence; end + + # @shim: since `blank?` is always false, `present?` always returns `true` + sig { returns(TrueClass) } + def present?; end +end + +class DateTime + sig { returns(FalseClass) } + def blank?; end + + # @shim: since `present?` is always true, `presence` always returns `self` + sig { returns(T.self_type) } + def presence; end + + # @shim: since `blank?` is always false, `present?` always returns `true` + sig { returns(TrueClass) } + def present?; end +end + +class NilClass + sig { returns(TrueClass) } + def blank?; end + + # @shim: since `present?` is always false, `presence` always returns `nil` + sig { returns(NilClass) } + def presence; end + + # @shim: since `blank?` is always true, `present?` always returns `false` + sig { returns(FalseClass) } + def present?; end +end + +class FalseClass + sig { returns(TrueClass) } + def blank?; end + + # @shim: since `present?` is always false, `presence` always returns `nil` + sig { returns(NilClass) } + def presence; end + + # @shim: since `blank?` is always true, `present?` always returns `false` + sig { returns(FalseClass) } + def present?; end +end + +class TrueClass + sig { returns(FalseClass) } + def blank?; end + + # @shim: since `present?` is always true, `presence` always returns `self` + sig { returns(T.self_type) } + def presence; end + + # @shim: since `blank?` is always false, `present?` always returns `true` + sig { returns(TrueClass) } + def present?; end +end + +class Numeric + sig { returns(FalseClass) } + def blank?; end + + sig { returns(TrueClass) } + def html_safe?; end + + # @shim: since `present?` is always true, `presence` always returns `self` + sig { returns(T.self_type) } + def presence; end + + # @shim: since `blank?` is always false, `present?` always returns `true` + sig { returns(TrueClass) } + def present?; end +end + +class Time + sig { returns(FalseClass) } + def blank?; end + + # @shim: since `present?` is always true, `presence` always returns `self` + sig { returns(T.self_type) } + def presence; end + + # @shim: since `blank?` is always false, `present?` always returns `true` + sig { returns(TrueClass) } + def present?; end + + sig { returns(ActiveSupport::TimeZone) } + def self.zone; end + + sig { returns(T.any(ActiveSupport::TimeWithZone, ::Time)) } + def self.current; end +end + +class Symbol + sig { returns(T::Boolean) } + def blank?; end + + sig { returns(T::Boolean) } + def present?; end + + # alias for `#start_with?` + sig { params(string_or_regexp: T.any(String, Regexp)).returns(T::Boolean) } + def starts_with?(*string_or_regexp); end + + # alias for `#end_with?` + sig { params(string_or_regexp: T.any(String, Regexp)).returns(T::Boolean) } + def ends_with?(*string_or_regexp); end +end + +class String + sig { returns(TrueClass) } + def acts_like_string?; end + + sig { params(position: Integer).returns(T.nilable(String)) } + sig { params(position: T.any(T::Range[Integer], Regexp)).returns(T.nilable(String)) } + sig { params(position: String).returns(T.nilable(String)) } + def at(position); end + + sig { returns(String) } + def as_json; end + + sig { returns(T::Boolean) } + def blank?; end + + sig { params(first_letter: Symbol).returns(String) } + def camelcase(first_letter = :upper); end + + sig { params(first_letter: Symbol).returns(String) } + def camelize(first_letter = :upper); end + + sig { returns(String) } + def classify; end + + sig { returns(T.untyped) } + def constantize; end + + sig { returns(String) } + def dasherize; end + + sig { returns(String) } + def deconstantize; end + + sig { returns(String) } + def demodulize; end + + # alias for `#end_with?` + sig { params(string_or_regexp: T.any(String, Regexp)).returns(T::Boolean) } + def ends_with?(*string_or_regexp); end + + sig { returns(String) } + def downcase_first; end + + sig { params(string: String).returns(T::Boolean) } + def exclude?(string); end + + sig { params(limit: Integer).returns(String) } + def first(limit = 1); end + + sig { params(separate_class_name_and_id_with_underscore: T::Boolean).returns(String) } + def foreign_key(separate_class_name_and_id_with_underscore = true); end + + sig { params(position: Integer).returns(String) } + def from(position); end + + sig { returns(ActiveSupport::SafeBuffer) } + def html_safe; end + + sig { params(capitalize: T::Boolean, keep_id_suffix: T::Boolean).returns(String) } + def humanize(capitalize: true, keep_id_suffix: false); end + + sig { params(zone: T.nilable(T.any(ActiveSupport::TimeZone, String))).returns(T.any(ActiveSupport::TimeWithZone, Time)) } + def in_time_zone(zone = ::Time.zone); end + + sig { params(amount: Integer, indent_string: T.nilable(String), indent_empty_lines: T::Boolean).returns(String) } + def indent(amount, indent_string = nil, indent_empty_lines = false); end + + sig { params(amount: Integer, indent_string: T.nilable(String), indent_empty_lines: T::Boolean).returns(T.nilable(String)) } + def indent!(amount, indent_string = nil, indent_empty_lines = false); end + + sig { returns(ActiveSupport::StringInquirer) } + def inquiry; end + + sig { returns(T::Boolean) } + def is_utf8?; end + + sig { params(limit: Integer).returns(String) } + def last(limit = 1); end + + sig { returns(ActiveSupport::Multibyte::Chars) } + def mb_chars; end + + sig { params(separator: String, preserve_case: T::Boolean, locale: T.nilable(Symbol)).returns(String) } + def parameterize(separator: "-", preserve_case: false, locale: nil); end + + sig { params(count: T.nilable(T.any(Integer, Symbol)), locale: T.nilable(Symbol)).returns(String) } + def pluralize(count = nil, locale = :en); end + + sig { returns(T::Boolean) } + def present?; end + + sig { params(patterns: T.any(String, Regexp)).returns(String) } + def remove(*patterns); end + + sig { params(patterns: T.any(String, Regexp)).returns(String) } + def remove!(*patterns); end + + sig { returns(T.untyped) } + def safe_constantize; end + + sig { params(locale: Symbol).returns(String) } + def singularize(locale = :en); end + + sig { returns(String) } + def squish; end + + sig { returns(String) } + def squish!; end + + # alias for `#start_with?` + sig { params(string_or_regexp: T.any(String, Regexp)).returns(T::Boolean) } + def starts_with?(*string_or_regexp); end + + sig { returns(String) } + def strip_heredoc; end + + sig { returns(String) } + def tableize; end + + sig { params(keep_id_suffix: T::Boolean).returns(String) } + def titlecase(keep_id_suffix: false); end + + sig { params(keep_id_suffix: T::Boolean).returns(String) } + def titleize(keep_id_suffix: false); end + + sig { params(position: Integer).returns(String) } + def to(position); end + + sig { returns(::Date) } + def to_date; end + + sig { returns(::DateTime) } + def to_datetime; end + + sig { params(form: T.nilable(Symbol)).returns(T.nilable(Time)) } + def to_time(form = :local); end + + sig { params(truncate_to: Integer, options: T::Hash[Symbol, T.anything]).returns(String) } + def truncate(truncate_to, options = {}); end + + sig { params(truncate_to: Integer, omission: T.nilable(String)).returns(String) } + def truncate_bytes(truncate_to, omission: "…"); end + + sig { params(words_count: Integer, options: T::Hash[Symbol, T.anything]).returns(String) } + def truncate_words(words_count, options = {}); end + + sig { returns(String) } + def underscore; end + + sig { returns(String) } + def upcase_first; end +end + +class ActiveSupport::ErrorReporter + sig { type_parameters(:Block, :Fallback).params(error_classes: T.class_of(Exception), severity: T.nilable(Symbol), context: T.nilable(T::Hash[Symbol, T.untyped]), fallback: T.nilable(T.proc.returns(T.type_parameter(:Fallback))), source: T.nilable(String), blk: T.proc.returns(T.type_parameter(:Block))).returns(T.any(T.type_parameter(:Block), T.type_parameter(:Fallback))) } + def handle(*error_classes, severity: T.unsafe(nil), context: T.unsafe(nil), fallback: T.unsafe(nil), source: T.unsafe(nil), &blk); end + + sig { type_parameters(:Block).params(error_classes: T.class_of(Exception), severity: T.nilable(Symbol), context: T.nilable(T::Hash[Symbol, T.untyped]), source: T.nilable(String), blk: T.proc.returns(T.type_parameter(:Block))).returns(T.type_parameter(:Block)) } + def record(*error_classes, severity: T.unsafe(nil), context: T.unsafe(nil), source: T.unsafe(nil), &blk); end + + sig { params(error: Exception, handled: T::Boolean, severity: T.nilable(Symbol), context: T::Hash[Symbol, T.untyped], source: T.nilable(String)).void } + def report(error, handled: true, severity: T.unsafe(nil), context: T.unsafe(nil), source: T.unsafe(nil)); end +end diff --git a/sorbet/rbi/gems/activesupport@7.1.3.4.rbi b/sorbet/rbi/gems/activesupport@7.1.3.4.rbi index 01c629a..b6bf0ea 100644 --- a/sorbet/rbi/gems/activesupport@7.1.3.4.rbi +++ b/sorbet/rbi/gems/activesupport@7.1.3.4.rbi @@ -7,7 +7,7 @@ # :include: activesupport/README.rdoc # -# source://activesupport//lib/active_support/deep_mergeable.rb#3 +# source://activesupport//lib/active_support/gem_version.rb#3 module ActiveSupport extend ::ActiveSupport::LazyLoadHooks extend ::ActiveSupport::Autoload @@ -3016,6 +3016,41 @@ end # source://activesupport//lib/active_support/code_generator.rb#6 ActiveSupport::CodeGenerator::MethodSet::METHOD_CACHES = T.let(T.unsafe(nil), Hash) +# 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#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 + # = Active Support \Concern # # A typical module looks like this: @@ -5291,6 +5326,22 @@ end # source://activesupport//lib/active_support/duration.rb#131 ActiveSupport::Duration::VARIABLE_PARTS = T.let(T.unsafe(nil), Array) +# 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/core_ext/enumerable.rb#4 module ActiveSupport::EnumerableCoreExt; end @@ -10344,6 +10395,227 @@ class ActiveSupport::NumberHelper::RoundingHelper def convert_to_decimal(number); end end +# source://activesupport//lib/active_support/core_ext/numeric/conversions.rb#7 +module ActiveSupport::NumericWithFormat + # \Numeric With Format + # + # Provides options for converting numbers into formatted strings. + # Options are provided for phone numbers, currency, percentage, + # precision, positional notation, file size, and pretty printing. + # + # This method is aliased to to_formatted_s. + # + # ==== Options + # + # For details on which formats use which options, see ActiveSupport::NumberHelper + # + # ==== Examples + # + # Phone Numbers: + # 5551234.to_fs(:phone) # => "555-1234" + # 1235551234.to_fs(:phone) # => "123-555-1234" + # 1235551234.to_fs(:phone, area_code: true) # => "(123) 555-1234" + # 1235551234.to_fs(:phone, delimiter: ' ') # => "123 555 1234" + # 1235551234.to_fs(:phone, area_code: true, extension: 555) # => "(123) 555-1234 x 555" + # 1235551234.to_fs(:phone, country_code: 1) # => "+1-123-555-1234" + # 1235551234.to_fs(:phone, country_code: 1, extension: 1343, delimiter: '.') + # # => "+1.123.555.1234 x 1343" + # + # Currency: + # 1234567890.50.to_fs(:currency) # => "$1,234,567,890.50" + # 1234567890.506.to_fs(:currency) # => "$1,234,567,890.51" + # 1234567890.506.to_fs(:currency, precision: 3) # => "$1,234,567,890.506" + # 1234567890.506.to_fs(:currency, round_mode: :down) # => "$1,234,567,890.50" + # 1234567890.506.to_fs(:currency, locale: :fr) # => "1 234 567 890,51 €" + # -1234567890.50.to_fs(:currency, negative_format: '(%u%n)') + # # => "($1,234,567,890.50)" + # 1234567890.50.to_fs(:currency, unit: '£', separator: ',', delimiter: '') + # # => "£1234567890,50" + # 1234567890.50.to_fs(:currency, unit: '£', separator: ',', delimiter: '', format: '%n %u') + # # => "1234567890,50 £" + # + # Percentage: + # 100.to_fs(:percentage) # => "100.000%" + # 100.to_fs(:percentage, precision: 0) # => "100%" + # 1000.to_fs(:percentage, delimiter: '.', separator: ',') # => "1.000,000%" + # 302.24398923423.to_fs(:percentage, precision: 5) # => "302.24399%" + # 302.24398923423.to_fs(:percentage, round_mode: :down) # => "302.243%" + # 1000.to_fs(:percentage, locale: :fr) # => "1 000,000%" + # 100.to_fs(:percentage, format: '%n %') # => "100.000 %" + # + # Delimited: + # 12345678.to_fs(:delimited) # => "12,345,678" + # 12345678.05.to_fs(:delimited) # => "12,345,678.05" + # 12345678.to_fs(:delimited, delimiter: '.') # => "12.345.678" + # 12345678.to_fs(:delimited, delimiter: ',') # => "12,345,678" + # 12345678.05.to_fs(:delimited, separator: ' ') # => "12,345,678 05" + # 12345678.05.to_fs(:delimited, locale: :fr) # => "12 345 678,05" + # 98765432.98.to_fs(:delimited, delimiter: ' ', separator: ',') + # # => "98 765 432,98" + # + # Rounded: + # 111.2345.to_fs(:rounded) # => "111.235" + # 111.2345.to_fs(:rounded, precision: 2) # => "111.23" + # 111.2345.to_fs(:rounded, precision: 2, round_mode: :up) # => "111.24" + # 13.to_fs(:rounded, precision: 5) # => "13.00000" + # 389.32314.to_fs(:rounded, precision: 0) # => "389" + # 111.2345.to_fs(:rounded, significant: true) # => "111" + # 111.2345.to_fs(:rounded, precision: 1, significant: true) # => "100" + # 13.to_fs(:rounded, precision: 5, significant: true) # => "13.000" + # 111.234.to_fs(:rounded, locale: :fr) # => "111,234" + # 13.to_fs(:rounded, precision: 5, significant: true, strip_insignificant_zeros: true) + # # => "13" + # 389.32314.to_fs(:rounded, precision: 4, significant: true) # => "389.3" + # 1111.2345.to_fs(:rounded, precision: 2, separator: ',', delimiter: '.') + # # => "1.111,23" + # + # Human-friendly size in Bytes: + # 123.to_fs(:human_size) # => "123 Bytes" + # 1234.to_fs(:human_size) # => "1.21 KB" + # 12345.to_fs(:human_size) # => "12.1 KB" + # 1234567.to_fs(:human_size) # => "1.18 MB" + # 1234567890.to_fs(:human_size) # => "1.15 GB" + # 1234567890123.to_fs(:human_size) # => "1.12 TB" + # 1234567890123456.to_fs(:human_size) # => "1.1 PB" + # 1234567890123456789.to_fs(:human_size) # => "1.07 EB" + # 1234567.to_fs(:human_size, precision: 2) # => "1.2 MB" + # 1234567.to_fs(:human_size, precision: 2, round_mode: :up) # => "1.3 MB" + # 483989.to_fs(:human_size, precision: 2) # => "470 KB" + # 1234567.to_fs(:human_size, precision: 2, separator: ',') # => "1,2 MB" + # 1234567890123.to_fs(:human_size, precision: 5) # => "1.1228 TB" + # 524288000.to_fs(:human_size, precision: 5) # => "500 MB" + # + # Human-friendly format: + # 123.to_fs(:human) # => "123" + # 1234.to_fs(:human) # => "1.23 Thousand" + # 12345.to_fs(:human) # => "12.3 Thousand" + # 1234567.to_fs(:human) # => "1.23 Million" + # 1234567890.to_fs(:human) # => "1.23 Billion" + # 1234567890123.to_fs(:human) # => "1.23 Trillion" + # 1234567890123456.to_fs(:human) # => "1.23 Quadrillion" + # 1234567890123456789.to_fs(:human) # => "1230 Quadrillion" + # 489939.to_fs(:human, precision: 2) # => "490 Thousand" + # 489939.to_fs(:human, precision: 2, round_mode: :down) # => "480 Thousand" + # 489939.to_fs(:human, precision: 4) # => "489.9 Thousand" + # 1234567.to_fs(:human, precision: 4, + # significant: false) # => "1.2346 Million" + # 1234567.to_fs(:human, precision: 1, + # separator: ',', + # significant: false) # => "1,2 Million" + # + # source://activesupport//lib/active_support/core_ext/numeric/conversions.rb#113 + def to_formatted_s(format = T.unsafe(nil), options = T.unsafe(nil)); end + + # \Numeric With Format + # + # Provides options for converting numbers into formatted strings. + # Options are provided for phone numbers, currency, percentage, + # precision, positional notation, file size, and pretty printing. + # + # This method is aliased to to_formatted_s. + # + # ==== Options + # + # For details on which formats use which options, see ActiveSupport::NumberHelper + # + # ==== Examples + # + # Phone Numbers: + # 5551234.to_fs(:phone) # => "555-1234" + # 1235551234.to_fs(:phone) # => "123-555-1234" + # 1235551234.to_fs(:phone, area_code: true) # => "(123) 555-1234" + # 1235551234.to_fs(:phone, delimiter: ' ') # => "123 555 1234" + # 1235551234.to_fs(:phone, area_code: true, extension: 555) # => "(123) 555-1234 x 555" + # 1235551234.to_fs(:phone, country_code: 1) # => "+1-123-555-1234" + # 1235551234.to_fs(:phone, country_code: 1, extension: 1343, delimiter: '.') + # # => "+1.123.555.1234 x 1343" + # + # Currency: + # 1234567890.50.to_fs(:currency) # => "$1,234,567,890.50" + # 1234567890.506.to_fs(:currency) # => "$1,234,567,890.51" + # 1234567890.506.to_fs(:currency, precision: 3) # => "$1,234,567,890.506" + # 1234567890.506.to_fs(:currency, round_mode: :down) # => "$1,234,567,890.50" + # 1234567890.506.to_fs(:currency, locale: :fr) # => "1 234 567 890,51 €" + # -1234567890.50.to_fs(:currency, negative_format: '(%u%n)') + # # => "($1,234,567,890.50)" + # 1234567890.50.to_fs(:currency, unit: '£', separator: ',', delimiter: '') + # # => "£1234567890,50" + # 1234567890.50.to_fs(:currency, unit: '£', separator: ',', delimiter: '', format: '%n %u') + # # => "1234567890,50 £" + # + # Percentage: + # 100.to_fs(:percentage) # => "100.000%" + # 100.to_fs(:percentage, precision: 0) # => "100%" + # 1000.to_fs(:percentage, delimiter: '.', separator: ',') # => "1.000,000%" + # 302.24398923423.to_fs(:percentage, precision: 5) # => "302.24399%" + # 302.24398923423.to_fs(:percentage, round_mode: :down) # => "302.243%" + # 1000.to_fs(:percentage, locale: :fr) # => "1 000,000%" + # 100.to_fs(:percentage, format: '%n %') # => "100.000 %" + # + # Delimited: + # 12345678.to_fs(:delimited) # => "12,345,678" + # 12345678.05.to_fs(:delimited) # => "12,345,678.05" + # 12345678.to_fs(:delimited, delimiter: '.') # => "12.345.678" + # 12345678.to_fs(:delimited, delimiter: ',') # => "12,345,678" + # 12345678.05.to_fs(:delimited, separator: ' ') # => "12,345,678 05" + # 12345678.05.to_fs(:delimited, locale: :fr) # => "12 345 678,05" + # 98765432.98.to_fs(:delimited, delimiter: ' ', separator: ',') + # # => "98 765 432,98" + # + # Rounded: + # 111.2345.to_fs(:rounded) # => "111.235" + # 111.2345.to_fs(:rounded, precision: 2) # => "111.23" + # 111.2345.to_fs(:rounded, precision: 2, round_mode: :up) # => "111.24" + # 13.to_fs(:rounded, precision: 5) # => "13.00000" + # 389.32314.to_fs(:rounded, precision: 0) # => "389" + # 111.2345.to_fs(:rounded, significant: true) # => "111" + # 111.2345.to_fs(:rounded, precision: 1, significant: true) # => "100" + # 13.to_fs(:rounded, precision: 5, significant: true) # => "13.000" + # 111.234.to_fs(:rounded, locale: :fr) # => "111,234" + # 13.to_fs(:rounded, precision: 5, significant: true, strip_insignificant_zeros: true) + # # => "13" + # 389.32314.to_fs(:rounded, precision: 4, significant: true) # => "389.3" + # 1111.2345.to_fs(:rounded, precision: 2, separator: ',', delimiter: '.') + # # => "1.111,23" + # + # Human-friendly size in Bytes: + # 123.to_fs(:human_size) # => "123 Bytes" + # 1234.to_fs(:human_size) # => "1.21 KB" + # 12345.to_fs(:human_size) # => "12.1 KB" + # 1234567.to_fs(:human_size) # => "1.18 MB" + # 1234567890.to_fs(:human_size) # => "1.15 GB" + # 1234567890123.to_fs(:human_size) # => "1.12 TB" + # 1234567890123456.to_fs(:human_size) # => "1.1 PB" + # 1234567890123456789.to_fs(:human_size) # => "1.07 EB" + # 1234567.to_fs(:human_size, precision: 2) # => "1.2 MB" + # 1234567.to_fs(:human_size, precision: 2, round_mode: :up) # => "1.3 MB" + # 483989.to_fs(:human_size, precision: 2) # => "470 KB" + # 1234567.to_fs(:human_size, precision: 2, separator: ',') # => "1,2 MB" + # 1234567890123.to_fs(:human_size, precision: 5) # => "1.1228 TB" + # 524288000.to_fs(:human_size, precision: 5) # => "500 MB" + # + # Human-friendly format: + # 123.to_fs(:human) # => "123" + # 1234.to_fs(:human) # => "1.23 Thousand" + # 12345.to_fs(:human) # => "12.3 Thousand" + # 1234567.to_fs(:human) # => "1.23 Million" + # 1234567890.to_fs(:human) # => "1.23 Billion" + # 1234567890123.to_fs(:human) # => "1.23 Trillion" + # 1234567890123456.to_fs(:human) # => "1.23 Quadrillion" + # 1234567890123456789.to_fs(:human) # => "1230 Quadrillion" + # 489939.to_fs(:human, precision: 2) # => "490 Thousand" + # 489939.to_fs(:human, precision: 2, round_mode: :down) # => "480 Thousand" + # 489939.to_fs(:human, precision: 4) # => "489.9 Thousand" + # 1234567.to_fs(:human, precision: 4, + # significant: false) # => "1.2346 Million" + # 1234567.to_fs(:human, precision: 1, + # separator: ',', + # significant: false) # => "1,2 Million" + # + # source://activesupport//lib/active_support/core_ext/numeric/conversions.rb#113 + def to_fs(format = T.unsafe(nil), options = T.unsafe(nil)); end +end + # source://activesupport//lib/active_support/option_merger.rb#6 class ActiveSupport::OptionMerger # @return [OptionMerger] a new instance of OptionMerger @@ -10477,6 +10749,64 @@ class ActiveSupport::ProxyObject < ::BasicObject def raise(*args); end end +# = \Range With Format +# +# source://activesupport//lib/active_support/core_ext/range/conversions.rb#5 +module ActiveSupport::RangeWithFormat + # Convert range to a formatted string. See RANGE_FORMATS for predefined formats. + # + # This method is aliased to to_formatted_s. + # + # range = (1..100) # => 1..100 + # + # range.to_s # => "1..100" + # range.to_fs(:db) # => "BETWEEN '1' AND '100'" + # + # range = (1..) # => 1.. + # range.to_fs(:db) # => ">= '1'" + # + # range = (..100) # => ..100 + # range.to_fs(:db) # => "<= '100'" + # + # == Adding your own range formats to to_fs + # 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_fs(:db)} and #{stop.to_fs(:db)}" } + # + # source://activesupport//lib/active_support/core_ext/range/conversions.rb#51 + def to_formatted_s(format = T.unsafe(nil)); end + + # Convert range to a formatted string. See RANGE_FORMATS for predefined formats. + # + # This method is aliased to to_formatted_s. + # + # range = (1..100) # => 1..100 + # + # range.to_s # => "1..100" + # range.to_fs(:db) # => "BETWEEN '1' AND '100'" + # + # range = (1..) # => 1.. + # range.to_fs(:db) # => ">= '1'" + # + # range = (..100) # => ..100 + # range.to_fs(:db) # => "<= '100'" + # + # == Adding your own range formats to to_fs + # 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_fs(:db)} and #{stop.to_fs(:db)}" } + # + # source://activesupport//lib/active_support/core_ext/range/conversions.rb#51 + def to_fs(format = T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/core_ext/range/conversions.rb#6 +ActiveSupport::RangeWithFormat::RANGE_FORMATS = T.let(T.unsafe(nil), Hash) + # = Active Support \Reloader # # This class defines several callbacks: @@ -13884,7 +14214,7 @@ 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 +# source://activesupport//lib/active_support/core_ext/array/wrap.rb#3 class Array include ::Enumerable @@ -13913,6 +14243,27 @@ class Array # 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. # @@ -13926,6 +14277,153 @@ class Array # source://activesupport//lib/active_support/core_ext/array/extract_options.rb#24 def extract_options!; end + # Equal to self[4]. + # + # %w( a b c d e ).fifth # => "e" + # + # source://activesupport//lib/active_support/core_ext/array/access.rb#76 + def fifth; end + + # Equal to self[41]. Also known as accessing "the reddit". + # + # (1..42).to_a.forty_two # => 42 + # + # source://activesupport//lib/active_support/core_ext/array/access.rb#83 + def forty_two; end + + # Equal to self[3]. + # + # %w( a b c d e ).fourth # => "d" + # + # source://activesupport//lib/active_support/core_ext/array/access.rb#69 + def fourth; end + + # Returns the tail of the array from +position+. + # + # %w( a b c d ).from(0) # => ["a", "b", "c", "d"] + # %w( a b c d ).from(2) # => ["c", "d"] + # %w( a b c d ).from(10) # => [] + # %w().from(0) # => [] + # %w( a b c d ).from(-2) # => ["c", "d"] + # %w( a b c ).from(-10) # => [] + # + # source://activesupport//lib/active_support/core_ext/array/access.rb#12 + def from(position); end + + # 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), &block); 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), &block); 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 ActiveSupport::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#55 + def second; end + + # Equal to self[-2]. + # + # %w( a b c d e ).second_to_last # => "d" + # + # source://activesupport//lib/active_support/core_ext/array/access.rb#97 + def second_to_last; end + + # 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), &block); end + + # Equal to self[2]. + # + # %w( a b c d e ).third # => "c" + # + # source://activesupport//lib/active_support/core_ext/array/access.rb#62 + def third; end + + # Equal to self[-3]. + # + # %w( a b c d e ).third_to_last # => "c" + # + # source://activesupport//lib/active_support/core_ext/array/access.rb#90 + def third_to_last; end + + # Returns the beginning of the array up to +position+. + # + # %w( a b c d ).to(0) # => ["a"] + # %w( a b c d ).to(2) # => ["a", "b", "c"] + # %w( a b c d ).to(10) # => ["a", "b", "c", "d"] + # %w().to(0) # => [] + # %w( a b c d ).to(-2) # => ["a", "b", "c"] + # %w( a b c ).to(-10) # => [] + # + # source://activesupport//lib/active_support/core_ext/array/access.rb#24 + def to(position); end + # source://activesupport//lib/active_support/deprecation/method_wrappers.rb#46 def to_default_s(*args, **_arg1, &block); end @@ -14100,6 +14598,17 @@ class Array # source://activesupport//lib/active_support/core_ext/array/conversions.rb#185 def to_xml(options = T.unsafe(nil)); end + # Returns a copy of the Array excluding the specified elements. + # + # ["David", "Rafael", "Aaron", "Todd"].excluding("Aaron", "Todd") # => ["David", "Rafael"] + # [ [ 0, 1 ], [ 1, 0 ] ].excluding([ [ 1, 0 ] ]) # => [ [ 0, 1 ] ] + # + # Note: This is an optimization of Enumerable#excluding that uses Array#- + # instead of Array#reject for performance reasons. + # + # source://activesupport//lib/active_support/core_ext/array/access.rb#47 + def without(*elements); end + class << self # Wraps its argument in an array unless it is already an array (or array-like). # @@ -14145,6 +14654,7 @@ end # source://activesupport//lib/active_support/core_ext/object/json.rb#126 class BigDecimal < ::Numeric include ::ActiveSupport::BigDecimalWithDefaultFormat + include ::ActiveSupport::NumericWithFormat # A BigDecimal would be naturally represented as a JSON number. Most libraries, # however, parse non-integer JSON numbers directly as floats. Clients using @@ -14163,7 +14673,7 @@ class BigDecimal < ::Numeric def to_s(format = T.unsafe(nil)); end end -# source://activesupport//lib/active_support/core_ext/class/subclasses.rb#6 +# source://activesupport//lib/active_support/core_ext/class/attribute.rb#5 class Class < ::Module include ::ActiveSupport::DescendantsTracker::ReloadedClassesFiltering @@ -14285,7 +14795,7 @@ class Data def as_json(options = T.unsafe(nil)); end end -# source://activesupport//lib/active_support/core_ext/date/zones.rb#6 +# source://activesupport//lib/active_support/core_ext/date/acts_like.rb#5 class Date include ::Comparable include ::DateAndTime::Zones @@ -14302,6 +14812,13 @@ class Date # source://activesupport//lib/active_support/core_ext/date/calculations.rb#152 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. # @@ -14366,6 +14883,15 @@ class Date # 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. # @@ -15088,12 +15614,28 @@ 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#208 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, @@ -15180,6 +15722,15 @@ class DateTime < ::Date # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#158 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 @@ -15401,6 +15952,14 @@ class DateTime < ::Date # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#88 def to_i; 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#93 @@ -15460,6 +16019,53 @@ 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 OpenSSL::Digest::MD5 generates version 3 UUIDs; OpenSSL::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, namespace, name); end + + # Convenience method for uuid_from_hash using OpenSSL::Digest::MD5. + # + # source://activesupport//lib/active_support/core_ext/digest/uuid.rb#42 + def uuid_v3(uuid_namespace, name); end + + # Convenience method for SecureRandom.uuid. + # + # source://activesupport//lib/active_support/core_ext/digest/uuid.rb#52 + def uuid_v4; end + + # Convenience method for uuid_from_hash using OpenSSL::Digest::SHA1. + # + # source://activesupport//lib/active_support/core_ext/digest/uuid.rb#47 + def uuid_v5(uuid_namespace, name); end + + private + + # source://activesupport//lib/active_support/core_ext/digest/uuid.rb#56 + def pack_uuid_namespace(namespace); 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/erb/util.rb#39 module ERB::Util include ::ActiveSupport::CoreExt::ERBUtil @@ -15856,7 +16462,7 @@ class Exception def as_json(options = T.unsafe(nil)); end end -# source://activesupport//lib/active_support/core_ext/object/blank.rb#61 +# source://activesupport//lib/active_support/core_ext/object/to_query.rb#32 class FalseClass # source://activesupport//lib/active_support/core_ext/object/json.rb#89 def as_json(options = T.unsafe(nil)); end @@ -15907,6 +16513,8 @@ end # source://activesupport//lib/active_support/core_ext/object/json.rb#118 class Float < ::Numeric + include ::ActiveSupport::NumericWithFormat + # Encoding Infinity or NaN to JSON should return "null". The default returns # "Infinity" or "NaN" which are not valid JSON. # @@ -16032,6 +16640,25 @@ class Hash # 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 + # Removes the given keys from hash and returns it. # hash = { a: true, b: false, c: nil } # hash.except!(:c) # => { a: true, b: false } @@ -16297,6 +16924,14 @@ class Hash # 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. # @@ -16476,12 +17111,94 @@ class IPAddr def as_json(options = T.unsafe(nil)); end end -class Integer < ::Numeric; end +# source://activesupport//lib/active_support/core_ext/integer/multiple.rb#3 +class Integer < ::Numeric + include ::ActiveSupport::NumericWithFormat + + # 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 + + # Returns a Duration instance matching the number of years provided. + # + # 2.years # => 2 years + # + # source://activesupport//lib/active_support/core_ext/integer/time.rb#18 + def year; end + + # Returns a Duration instance matching the number of years provided. + # + # 2.years # => 2 years + # + # source://activesupport//lib/active_support/core_ext/integer/time.rb#18 + def years; end +end + +Integer::GMP_VERSION = T.let(T.unsafe(nil), String) -# source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#3 +# source://activesupport//lib/active_support/core_ext/kernel/concern.rb#5 module Kernel + # 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. # @@ -16519,6 +17236,13 @@ module Kernel 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. # @@ -16557,6 +17281,19 @@ module Kernel end end +# source://activesupport//lib/active_support/core_ext/load_error.rb#3 +class LoadError < ::ScriptError + include ::DidYouMean::Correctable + + # Returns true if the given path name (except perhaps for the ".rb" + # extension) is the missing file which caused the exception to be raised. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/load_error.rb#6 + def is_missing?(location); end +end + # source://activesupport//lib/active_support/core_ext/object/duplicable.rb#31 class Method # Methods are not duplicable: @@ -16584,33 +17321,107 @@ end # # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#8 class Module - # source://activesupport//lib/active_support/core_ext/object/json.rb#53 - def as_json(options = T.unsafe(nil)); end + include ::Module::Concerning - # 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. + # Allows you to make aliases for attributes, which includes + # getter, setter, and a predicate. # - # module HairColors - # mattr_accessor :hair_colors + # class Content < ActiveRecord::Base + # # has a title attribute # end # - # class Person - # include HairColors + # class Email < Content + # alias_attribute :subject, :title # end # - # HairColors.hair_colors = [:brown, :black, :blonde, :red] - # HairColors.hair_colors # => [:brown, :black, :blonde, :red] - # Person.new.hair_colors # => [:brown, :black, :blonde, :red] + # e = Email.find(1) + # e.title # => "Superstars" + # e.subject # => "Superstars" + # e.subject? # => true + # e.subject = "Megastars" + # e.title # => "Megastars" # - # 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. + # 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. # - # class Citizen < Person - # end + # module M; end + # M.name # => "M" # - # Citizen.new.hair_colors << :blue + # m = Module.new + # m.name # => nil + # + # +anonymous?+ method returns true if module does not have a name, false otherwise: + # + # Module.new.anonymous? # => true + # + # module M; end + # M.anonymous? # => false + # + # A module gets a name when it is first assigned to a constant. Either + # via the +module+ or +class+ keyword or by an explicit assignment: + # + # m = Module.new # creates an anonymous module + # m.anonymous? # => true + # M = m # m gets a name here as a side-effect + # m.name # => "M" + # m.anonymous? # => false + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/module/anonymous.rb#27 + def anonymous?; end + + # source://activesupport//lib/active_support/core_ext/object/json.rb#53 + def as_json(options = T.unsafe(nil)); end + + # Declares an attribute reader and writer backed by an internally-named instance + # variable. + # + # source://activesupport//lib/active_support/core_ext/module/attr_internal.rb#16 + def attr_internal(*attrs); end + + # Declares an attribute reader and writer backed by an internally-named instance + # variable. + # + # source://activesupport//lib/active_support/core_ext/module/attr_internal.rb#16 + def attr_internal_accessor(*attrs); end + + # Declares an attribute reader backed by an internally-named instance variable. + # + # source://activesupport//lib/active_support/core_ext/module/attr_internal.rb#5 + def attr_internal_reader(*attrs); end + + # Declares an attribute writer backed by an internally-named instance variable. + # + # source://activesupport//lib/active_support/core_ext/module/attr_internal.rb#10 + def attr_internal_writer(*attrs); end + + # Defines both class and instance accessors for class attributes. + # All class and instance methods created will be public, even if + # this method is called with a private or protected access modifier. + # + # module HairColors + # mattr_accessor :hair_colors + # end + # + # class Person + # include HairColors + # end + # + # HairColors.hair_colors = [:brown, :black, :blonde, :red] + # HairColors.hair_colors # => [:brown, :black, :blonde, :red] + # Person.new.hair_colors # => [:brown, :black, :blonde, :red] + # + # If a subclass changes the value then that would also change the value for + # parent class. Similarly if parent class changes the value then that would + # change the value of subclasses too. + # + # class Citizen < Person + # end + # + # Citizen.new.hair_colors << :blue # Person.new.hair_colors # => [:brown, :black, :blonde, :red, :blue] # # To omit the instance writer method, pass instance_writer: false. @@ -17168,6 +17979,48 @@ class Module # 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#34 + def module_parent; end + + # Returns the name of the module containing this one. + # + # M::N.module_parent_name # => "M" + # + # source://activesupport//lib/active_support/core_ext/module/introspection.rb#9 + def module_parent_name; end + + # Returns all the parents of this module according to its name, ordered from + # nested outwards. The receiver is not contained within the result. + # + # module M + # module N + # end + # end + # X = M::N + # + # M.module_parents # => [Object] + # M::N.module_parents # => [M, Object] + # X.module_parents # => [M, Object] + # + # source://activesupport//lib/active_support/core_ext/module/introspection.rb#50 + def module_parents; end + # Replaces the existing method definition, if there is one, with the passed # block as its body. # @@ -17196,6 +18049,362 @@ class Module # # source://activesupport//lib/active_support/core_ext/module/redefine_method.rb#7 def silence_redefinition_of_method(method); end + + # Defines both class and instance accessors for class attributes. + # + # class Account + # thread_mattr_accessor :user + # end + # + # Account.user = "DHH" + # Account.user # => "DHH" + # Account.new.user # => "DHH" + # + # Unlike +mattr_accessor+, values are *not* shared with subclasses or parent classes. + # If a subclass changes the value, the parent class' value is not changed. + # If the parent class changes the value, the value of subclasses is not changed. + # + # class Customer < Account + # end + # + # Account.user # => "DHH" + # Customer.user # => nil + # Customer.user = "Rafael" + # Customer.user # => "Rafael" + # Account.user # => "DHH" + # + # To omit the instance writer method, pass instance_writer: false. + # To omit the instance reader method, pass instance_reader: false. + # + # class Current + # thread_mattr_accessor :user, instance_writer: false, instance_reader: false + # end + # + # Current.new.user = "DHH" # => NoMethodError + # Current.new.user # => NoMethodError + # + # Or pass instance_accessor: false, to omit both instance methods. + # + # class Current + # thread_mattr_accessor :user, instance_accessor: false + # end + # + # Current.new.user = "DHH" # => NoMethodError + # Current.new.user # => NoMethodError + # + # A default value may be specified using the +:default+ option. Because + # multiple threads can access the default value, non-frozen default values + # will be duped and frozen. + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#170 + def thread_cattr_accessor(*syms, instance_reader: T.unsafe(nil), instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil)); end + + # Defines a per-thread class attribute and creates class and instance reader methods. + # The underlying per-thread class variable is set to +nil+, if it is not previously defined. + # + # module Current + # thread_mattr_reader :user + # end + # + # Current.user = "DHH" + # Current.user # => "DHH" + # Thread.new { Current.user }.value # => nil + # + # The attribute name must be a valid method name in Ruby. + # + # module Foo + # thread_mattr_reader :"1_Badname" + # end + # # => NameError: invalid attribute name: 1_Badname + # + # To omit the instance reader method, pass + # instance_reader: false or instance_accessor: false. + # + # class Current + # thread_mattr_reader :user, instance_reader: false + # end + # + # Current.new.user # => NoMethodError + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#41 + def thread_cattr_reader(*syms, instance_reader: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil)); end + + # Defines a per-thread class attribute and creates a class and instance writer methods to + # allow assignment to the attribute. + # + # module Current + # thread_mattr_writer :user + # end + # + # Current.user = "DHH" + # Thread.current[:attr_Current_user] # => "DHH" + # + # To omit the instance writer method, pass + # instance_writer: false or instance_accessor: false. + # + # class Current + # thread_mattr_writer :user, instance_writer: false + # end + # + # Current.new.user = "DHH" # => NoMethodError + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#101 + def thread_cattr_writer(*syms, instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil)); end + + # Defines both class and instance accessors for class attributes. + # + # class Account + # thread_mattr_accessor :user + # end + # + # Account.user = "DHH" + # Account.user # => "DHH" + # Account.new.user # => "DHH" + # + # Unlike +mattr_accessor+, values are *not* shared with subclasses or parent classes. + # If a subclass changes the value, the parent class' value is not changed. + # If the parent class changes the value, the value of subclasses is not changed. + # + # class Customer < Account + # end + # + # Account.user # => "DHH" + # Customer.user # => nil + # Customer.user = "Rafael" + # Customer.user # => "Rafael" + # Account.user # => "DHH" + # + # To omit the instance writer method, pass instance_writer: false. + # To omit the instance reader method, pass instance_reader: false. + # + # class Current + # thread_mattr_accessor :user, instance_writer: false, instance_reader: false + # end + # + # Current.new.user = "DHH" # => NoMethodError + # Current.new.user # => NoMethodError + # + # Or pass instance_accessor: false, to omit both instance methods. + # + # class Current + # thread_mattr_accessor :user, instance_accessor: false + # end + # + # Current.new.user = "DHH" # => NoMethodError + # Current.new.user # => NoMethodError + # + # A default value may be specified using the +:default+ option. Because + # multiple threads can access the default value, non-frozen default values + # will be duped and frozen. + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#170 + def thread_mattr_accessor(*syms, instance_reader: T.unsafe(nil), instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil)); end + + # Defines a per-thread class attribute and creates class and instance reader methods. + # The underlying per-thread class variable is set to +nil+, if it is not previously defined. + # + # module Current + # thread_mattr_reader :user + # end + # + # Current.user = "DHH" + # Current.user # => "DHH" + # Thread.new { Current.user }.value # => nil + # + # The attribute name must be a valid method name in Ruby. + # + # module Foo + # thread_mattr_reader :"1_Badname" + # end + # # => NameError: invalid attribute name: 1_Badname + # + # To omit the instance reader method, pass + # instance_reader: false or instance_accessor: false. + # + # class Current + # thread_mattr_reader :user, instance_reader: false + # end + # + # Current.new.user # => NoMethodError + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#41 + def thread_mattr_reader(*syms, instance_reader: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil)); end + + # Defines a per-thread class attribute and creates a class and instance writer methods to + # allow assignment to the attribute. + # + # module Current + # thread_mattr_writer :user + # end + # + # Current.user = "DHH" + # Thread.current[:attr_Current_user] # => "DHH" + # + # To omit the instance writer method, pass + # instance_writer: false or instance_accessor: false. + # + # class Current + # thread_mattr_writer :user, instance_writer: false + # end + # + # Current.new.user = "DHH" # => NoMethodError + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#101 + def thread_mattr_writer(*syms, instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil)); end + + private + + # source://activesupport//lib/active_support/core_ext/module/attr_internal.rb#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 @@ -17213,12 +18422,47 @@ class Module::DelegationError < ::NoMethodError; end # source://activesupport//lib/active_support/core_ext/module/delegation.rb#10 Module::RUBY_RESERVED_KEYWORDS = T.let(T.unsafe(nil), Array) +# source://activesupport//lib/active_support/core_ext/name_error.rb#3 class NameError < ::StandardError include ::ErrorHighlight::CoreExt include ::DidYouMean::Correctable + + # Extract the name of the missing constant from the exception message. + # + # begin + # HelloWorld + # rescue NameError => e + # e.missing_name + # end + # # => "HelloWorld" + # + # source://activesupport//lib/active_support/core_ext/name_error.rb#12 + def missing_name; end + + # Was this exception raised because the given name was missing? + # + # begin + # HelloWorld + # rescue NameError => e + # e.missing_name?("HelloWorld") + # end + # # => true + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/name_error.rb#44 + def missing_name?(name); end + + private + + # source://activesupport//lib/active_support/core_ext/name_error.rb#56 + def real_mod_name(mod); end end -# source://activesupport//lib/active_support/core_ext/object/blank.rb#50 +# 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/try.rb#137 class NilClass # source://activesupport//lib/active_support/core_ext/object/json.rb#95 def as_json(options = T.unsafe(nil)); end @@ -17290,6 +18534,20 @@ class Numeric # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#15 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 @@ -17304,6 +18562,20 @@ class Numeric # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#63 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 @@ -17318,11 +18590,34 @@ class Numeric # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#39 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#13 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 @@ -17351,6 +18646,20 @@ class Numeric # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#31 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 @@ -17365,6 +18674,20 @@ class Numeric # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#55 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 @@ -17379,6 +18702,20 @@ class Numeric # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#47 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 + # Returns the number of bytes equivalent to the zettabytes provided. # # 2.zettabytes # => 2_361_183_241_434_822_606_848 @@ -17434,7 +18771,7 @@ Numeric::ZETTABYTE = T.let(T.unsafe(nil), Integer) # using that rescue idiom. # ++ # -# source://activesupport//lib/active_support/core_ext/object/blank.rb#5 +# source://activesupport//lib/active_support/core_ext/object/try.rb#35 class Object < ::BasicObject include ::ActiveSupport::ToJsonWithActiveSupportEncoder include ::ActiveSupport::Dependencies::RequireDependency @@ -17616,12 +18953,154 @@ class Object < ::BasicObject # # source://activesupport//lib/active_support/core_ext/object/to_query.rb#13 def to_query(key); end + + # Set and restore public attributes around a block. + # + # client.timeout # => 5 + # client.with(timeout: 1) do + # client.timeout # => 1 + # end + # client.timeout # => 5 + # + # This method is a shorthand for the common begin/ensure pattern: + # + # old_value = object.attribute + # begin + # object.attribute = new_value + # # do things + # ensure + # object.attribute = old_value + # end + # + # It can be used on any object as long as both the reader and writer methods + # are public. + # + # source://activesupport//lib/active_support/core_ext/object/with.rb#24 + def with(**attributes); end + + # An elegant way to factor duplication out of options passed to a series of + # method calls. Each method called in the block, with the block variable as + # the receiver, will have its options merged with the default +options+ + # Hash or Hash-like object provided. Each method called on + # the block variable must take an options hash as its final argument. + # + # Without with_options, this code contains duplication: + # + # class Account < ActiveRecord::Base + # has_many :customers, dependent: :destroy + # has_many :products, dependent: :destroy + # has_many :invoices, dependent: :destroy + # has_many :expenses, dependent: :destroy + # end + # + # Using with_options, we can remove the duplication: + # + # class Account < ActiveRecord::Base + # with_options dependent: :destroy do |assoc| + # assoc.has_many :customers + # assoc.has_many :products + # assoc.has_many :invoices + # assoc.has_many :expenses + # end + # end + # + # It can also be used with an explicit receiver: + # + # I18n.with_options locale: user.locale, scope: 'newsletter' do |i18n| + # subject i18n.t :subject + # body i18n.t :body, user_name: user.name + # end + # + # When you don't pass an explicit receiver, it executes the whole block + # in merging options context: + # + # class Account < ActiveRecord::Base + # with_options dependent: :destroy do + # has_many :customers + # has_many :products + # has_many :invoices + # has_many :expenses + # end + # end + # + # with_options can also be nested since the call is forwarded to its receiver. + # + # NOTE: Each nesting level will merge inherited defaults in addition to their own. + # + # class Post < ActiveRecord::Base + # with_options if: :persisted?, length: { minimum: 50 } do + # validates :content, if: -> { content.present? } + # end + # end + # + # The code is equivalent to: + # + # validates :content, length: { minimum: 50 }, if: -> { content.present? } + # + # Hence the inherited default for +if+ key is ignored. + # + # NOTE: You cannot call class methods implicitly inside of +with_options+. + # You can access these methods using the class name instead: + # + # class Phone < ActiveRecord::Base + # enum :phone_number_type, { home: 0, office: 1, mobile: 2 } + # + # with_options presence: true do + # validates :phone_number_type, inclusion: { in: Phone.phone_number_types.keys } + # end + # end + # + # When the block argument is omitted, the decorated Object instance is returned: + # + # module MyStyledHelpers + # def styled + # with_options style: "color: red;" + # end + # end + # + # styled.link_to "I'm red", "/" + # # => I'm red + # + # styled.button_tag "I'm red too!" + # # => + # + # source://activesupport//lib/active_support/core_ext/object/with_options.rb#92 + def with_options(options, &block); end end # source://activesupport//lib/active_support/core_ext/object/json.rb#230 class Pathname # source://activesupport//lib/active_support/core_ext/object/json.rb#231 def as_json(options = T.unsafe(nil)); end + + # An Pathname is blank if it's empty: + # + # Pathname.new("").blank? # => true + # Pathname.new(" ").blank? # => false + # Pathname.new("test").blank? # => false + # + # @return [true, false] + # + # source://activesupport//lib/active_support/core_ext/pathname/blank.rb#13 + def blank?; end + + # Returns the receiver if the named file exists otherwise returns +nil+. + # pathname.existence is equivalent to + # + # pathname.exist? ? pathname : nil + # + # For example, something like + # + # content = pathname.read if pathname.exist? + # + # becomes + # + # content = pathname.existence&.read + # + # @return [Pathname] + # + # source://activesupport//lib/active_support/core_ext/pathname/existence.rb#20 + def existence; end end module Process @@ -17641,11 +19120,26 @@ end # source://activesupport//lib/active_support/core_ext/enumerable.rb#233 class Range + include ::ActiveSupport::RangeWithFormat + include ::ActiveSupport::CompareWithRange + 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#160 def as_json(options = T.unsafe(nil)); end + # source://activesupport//lib/active_support/core_ext/range/each.rb#7 + def each(&block); end + + # source://activesupport//lib/active_support/core_ext/range/compare_range.rb#41 + def include?(value); 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. # @@ -17657,8 +19151,38 @@ end class Regexp # source://activesupport//lib/active_support/core_ext/object/json.rb#142 def as_json(options = T.unsafe(nil)); end + + # Returns +true+ if the regexp has the multiline flag set. + # + # (/./).multiline? # => false + # (/./m).multiline? # => true + # + # Regexp.new(".").multiline? # => false + # Regexp.new(".", Regexp::MULTILINE).multiline? # => true + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/regexp.rb#11 + def multiline?; end end +# source://activesupport//lib/active_support/core_ext/securerandom.rb#5 +module SecureRandom + class << self + # source://activesupport//lib/active_support/core_ext/securerandom.rb#45 + def base36(n = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/core_ext/securerandom.rb#20 + 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) + # source://activesupport//lib/active_support/core_ext/object/duplicable.rb#53 module Singleton mixes_in_class_methods ::Singleton::SingletonClassMethods @@ -17678,7 +19202,7 @@ end # # 'ScaleScore'.tableize # => "scale_scores" # -# source://activesupport//lib/active_support/core_ext/object/blank.rb#103 +# source://activesupport//lib/active_support/core_ext/string/multibyte.rb#5 class String include ::Comparable @@ -17929,6 +19453,61 @@ class String # source://activesupport//lib/active_support/core_ext/string/inflections.rb#262 def humanize(capitalize: T.unsafe(nil), keep_id_suffix: T.unsafe(nil)); end + # Converts String to a TimeWithZone in the current zone if Time.zone or Time.zone_default + # is set, otherwise converts String to a Time via String#to_time + # + # source://activesupport//lib/active_support/core_ext/string/zones.rb#9 + def in_time_zone(zone = T.unsafe(nil)); end + + # Indents the lines in the receiver: + # + # < + # def some_method + # some_code + # end + # + # The second argument, +indent_string+, specifies which indent string to + # use. The default is +nil+, which tells the method to make a guess by + # peeking at the first indented line, and fall back to a space if there is + # none. + # + # " foo".indent(2) # => " foo" + # "foo\n\t\tbar".indent(2) # => "\t\tfoo\n\t\t\t\tbar" + # "foo".indent(2, "\t") # => "\t\tfoo" + # + # While +indent_string+ is typically one space or tab, it may be any string. + # + # The third argument, +indent_empty_lines+, is a flag that says whether + # empty lines should be indented. Default is false. + # + # "foo\n\nbar".indent(2) # => " foo\n\n bar" + # "foo\n\nbar".indent(2, nil, true) # => " foo\n \n bar" + # + # source://activesupport//lib/active_support/core_ext/string/indent.rb#42 + def indent(amount, indent_string = T.unsafe(nil), indent_empty_lines = T.unsafe(nil)); end + + # Same as +indent+, except it indents the receiver in-place. + # + # Returns the indented string, or +nil+ if there was nothing to indent. + # + # source://activesupport//lib/active_support/core_ext/string/indent.rb#7 + def indent!(amount, indent_string = T.unsafe(nil), indent_empty_lines = T.unsafe(nil)); end + + # Wraps the current string in the ActiveSupport::StringInquirer class, + # which gives you a prettier way to test for equality. + # + # env = 'production'.inquiry + # env.production? # => true + # env.development? # => false + # + # source://activesupport//lib/active_support/core_ext/string/inquiry.rb#13 + def inquiry; end + # Returns +true+ if string has utf_8 encoding. # # utf_8_str = "some string".encode "UTF-8" @@ -18127,6 +19706,28 @@ class String # 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. # @@ -18347,11 +19948,12 @@ class Thread def active_support_execution_state=(_arg0); end end -# source://activesupport//lib/active_support/core_ext/object/blank.rb#146 +# source://activesupport//lib/active_support/core_ext/time/acts_like.rb#5 class Time include ::Comparable include ::DateAndTime::Zones include ::DateAndTime::Calculations + include ::DateAndTime::Compatibility # source://activesupport//lib/active_support/core_ext/time/calculations.rb#300 def +(other); end @@ -18699,6 +20301,12 @@ class Time # source://activesupport//lib/active_support/core_ext/time/conversions.rb#53 def to_fs(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 # @@ -18844,7 +20452,7 @@ 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 +# source://activesupport//lib/active_support/core_ext/object/to_query.rb#25 class TrueClass # source://activesupport//lib/active_support/core_ext/object/json.rb#83 def as_json(options = T.unsafe(nil)); end diff --git a/sorbet/rbi/gems/docile@1.4.0.rbi b/sorbet/rbi/gems/docile@1.4.1.rbi similarity index 100% rename from sorbet/rbi/gems/docile@1.4.0.rbi rename to sorbet/rbi/gems/docile@1.4.1.rbi diff --git a/sorbet/rbi/gems/grape-entity@1.0.1.rbi b/sorbet/rbi/gems/grape-entity@1.0.1.rbi index d71f2a3..86622c6 100644 --- a/sorbet/rbi/gems/grape-entity@1.0.1.rbi +++ b/sorbet/rbi/gems/grape-entity@1.0.1.rbi @@ -8,7 +8,7 @@ # source://grape-entity//lib/grape_entity/entity.rb#5 module Grape class << self - # source://grape/2.1.2/lib/grape.rb#61 + # source://grape/2.1.3/lib/grape.rb#61 def deprecator; end end end @@ -91,6 +91,8 @@ class Grape::Entity def formatters; end # Prevent default serialization of :options or :delegator. + # + # source://grape-entity//lib/grape_entity/entity.rb#474 def inspect; end # @return [Boolean] diff --git a/sorbet/rbi/gems/grape@2.1.2.rbi b/sorbet/rbi/gems/grape@2.1.3.rbi similarity index 98% rename from sorbet/rbi/gems/grape@2.1.2.rbi rename to sorbet/rbi/gems/grape@2.1.3.rbi index 5f45a95..571b0c6 100644 --- a/sorbet/rbi/gems/grape@2.1.2.rbi +++ b/sorbet/rbi/gems/grape@2.1.3.rbi @@ -729,7 +729,7 @@ module Grape::DSL::InsideRoute # # GET /body # => "Body" # - # source://grape//lib/grape/dsl/inside_route.rb#276 + # source://grape//lib/grape/dsl/inside_route.rb#278 def body(value = T.unsafe(nil)); end # source://grape//lib/grape/dsl/inside_route.rb#158 @@ -737,10 +737,10 @@ module Grape::DSL::InsideRoute # Set response content-type # - # source://grape//lib/grape/dsl/inside_route.rb#246 + # source://grape//lib/grape/dsl/inside_route.rb#248 def content_type(val = T.unsafe(nil)); end - # source://grape//lib/grape/dsl/inside_route.rb#465 + # source://grape//lib/grape/dsl/inside_route.rb#467 def context; end # Set or get a cookie @@ -751,7 +751,7 @@ module Grape::DSL::InsideRoute # cookies[:more] = { value: '123', expires: Time.at(0) } # cookies.delete :more # - # source://grape//lib/grape/dsl/inside_route.rb#262 + # source://grape//lib/grape/dsl/inside_route.rb#264 def cookies; end # A filtering method that will return a hash @@ -780,31 +780,33 @@ module Grape::DSL::InsideRoute # @param options [Hash] # @return [Class] the located Entity class, or nil if none is found # - # source://grape//lib/grape/dsl/inside_route.rb#432 + # source://grape//lib/grape/dsl/inside_route.rb#434 def entity_class_for_obj(object, options); end # @return the representation of the given object as done through # the given entity_class. # - # source://grape//lib/grape/dsl/inside_route.rb#455 + # source://grape//lib/grape/dsl/inside_route.rb#457 def entity_representation_for(entity_class, object, options); end # End the request and display an error to the # end user with the specified message. # # @param message [String] The message to display. - # @param status [Integer] the HTTP Status Code. Defaults to default_error_status, 500 if not set. + # @param status [Integer] The HTTP Status Code. Defaults to default_error_status, 500 if not set. # @param additional_headers [Hash] Addtional headers for the response. + # @param backtrace [Array] The backtrace of the exception that caused the error. + # @param original_exception [Exception] The original exception that caused the error. # - # source://grape//lib/grape/dsl/inside_route.rb#168 - def error!(message, status = T.unsafe(nil), additional_headers = T.unsafe(nil)); end + # source://grape//lib/grape/dsl/inside_route.rb#170 + def error!(message, status = T.unsafe(nil), additional_headers = T.unsafe(nil), backtrace = T.unsafe(nil), original_exception = T.unsafe(nil)); end # Deprecated method to send files to the client. Use `sendfile` or `stream` # - # source://grape//lib/grape/dsl/inside_route.rb#302 + # source://grape//lib/grape/dsl/inside_route.rb#304 def file(value = T.unsafe(nil)); end - # source://grape//lib/grape/dsl/inside_route.rb#461 + # source://grape//lib/grape/dsl/inside_route.rb#463 def http_version; end # Allows you to make use of Grape Entities by setting @@ -823,7 +825,7 @@ module Grape::DSL::InsideRoute # admin: current_user.admin? # end # - # source://grape//lib/grape/dsl/inside_route.rb#382 + # source://grape//lib/grape/dsl/inside_route.rb#384 def present(*args); end # Creates a Rack response based on the provided message, status, and headers. @@ -836,7 +838,7 @@ module Grape::DSL::InsideRoute # @param message [String] The content of the response. # @param status [Integer] The HTTP status code. # - # source://grape//lib/grape/dsl/inside_route.rb#186 + # source://grape//lib/grape/dsl/inside_route.rb#188 def rack_response(message, status = T.unsafe(nil), headers = T.unsafe(nil)); end # Redirect to a new url. @@ -846,7 +848,7 @@ module Grape::DSL::InsideRoute # :permanent, default false. # :body, default a short message including the URL. # - # source://grape//lib/grape/dsl/inside_route.rb#198 + # source://grape//lib/grape/dsl/inside_route.rb#200 def redirect(url, permanent: T.unsafe(nil), body: T.unsafe(nil), **_options); end # Allows you to explicitly return no content. @@ -859,7 +861,7 @@ module Grape::DSL::InsideRoute # # DELETE /12 # => 204 No Content, "" # - # source://grape//lib/grape/dsl/inside_route.rb#296 + # source://grape//lib/grape/dsl/inside_route.rb#298 def return_no_content; end # Returns route information for the current request. @@ -871,7 +873,7 @@ module Grape::DSL::InsideRoute # route.description # end # - # source://grape//lib/grape/dsl/inside_route.rb#420 + # source://grape//lib/grape/dsl/inside_route.rb#422 def route; end # Allows you to send a file to the client via sendfile. @@ -883,14 +885,14 @@ module Grape::DSL::InsideRoute # # GET /file # => "contents of file" # - # source://grape//lib/grape/dsl/inside_route.rb#323 + # source://grape//lib/grape/dsl/inside_route.rb#325 def sendfile(value = T.unsafe(nil)); end # Set or retrieve the HTTP status code. # # @param status [Integer] The HTTP Status Code to return for this request. # - # source://grape//lib/grape/dsl/inside_route.rb#218 + # source://grape//lib/grape/dsl/inside_route.rb#220 def status(status = T.unsafe(nil)); end # Allows you to define the response as a streamable object. @@ -909,7 +911,7 @@ module Grape::DSL::InsideRoute # # GET /stream # => "chunked contents of file" # - # source://grape//lib/grape/dsl/inside_route.rb#349 + # source://grape//lib/grape/dsl/inside_route.rb#351 def stream(value = T.unsafe(nil)); end # The API version as specified in the URL. @@ -2646,8 +2648,8 @@ Grape::Http::Headers::TRANSFER_ENCODING = T.let(T.unsafe(nil), String) # source://grape//lib/grape/http/headers.rb#12 Grape::Http::Headers::X_CASCADE = T.let(T.unsafe(nil), String) -# source://grape//lib/grape/json.rb#7 -Grape::Json = JSON +# source://grape//lib/grape/json.rb#5 +Grape::Json = MultiJson # source://grape//lib/grape/dsl/api.rb#0 module Grape::Middleware; end @@ -4808,7 +4810,7 @@ class Grape::Validations::ParamsScope # @return [Boolean] # - # source://grape//lib/grape/validations/params_scope.rb#508 + # source://grape//lib/grape/validations/params_scope.rb#514 def all_element_blank?(scoped_params); end # Enforce correct usage of :coerce_with parameter. @@ -4818,12 +4820,12 @@ class Grape::Validations::ParamsScope # # @raise [ArgumentError] # - # source://grape//lib/grape/validations/params_scope.rb#414 + # source://grape//lib/grape/validations/params_scope.rb#420 def check_coerce_with(validations); end # @raise [Grape::Exceptions::IncompatibleOptionValues] # - # source://grape//lib/grape/validations/params_scope.rb#458 + # source://grape//lib/grape/validations/params_scope.rb#464 def check_incompatible_option_values(default, values, except_values, excepts); end # Add type coercion validation to this scope, @@ -4833,24 +4835,24 @@ class Grape::Validations::ParamsScope # parameter, and needs to be run before most other # validations. # - # source://grape//lib/grape/validations/params_scope.rb#432 + # source://grape//lib/grape/validations/params_scope.rb#438 def coerce_type(validations, attrs, doc, opts); end # Pushes declared params to parent or settings # - # source://grape//lib/grape/validations/params_scope.rb#305 + # source://grape//lib/grape/validations/params_scope.rb#311 def configure_declared_params; end # Validators don't have access to each other and they don't need, however, # some validators might influence others, so their options should be shared # - # source://grape//lib/grape/validations/params_scope.rb#514 + # source://grape//lib/grape/validations/params_scope.rb#520 def derive_validator_options(validations); end - # source://grape//lib/grape/validations/params_scope.rb#497 + # source://grape//lib/grape/validations/params_scope.rb#503 def extract_message_option(attrs); end - # source://grape//lib/grape/validations/params_scope.rb#448 + # source://grape//lib/grape/validations/params_scope.rb#454 def guess_coerce_type(coerce_type, *values_list); end # Validate and comprehend the +:type+, +:types+, and +:coerce_with+ @@ -4867,7 +4869,7 @@ class Grape::Validations::ParamsScope # @raise [ArgumentError] if the given type options are invalid # @return [class-like] type to which the parameter will be coerced # - # source://grape//lib/grape/validations/params_scope.rb#385 + # source://grape//lib/grape/validations/params_scope.rb#391 def infer_coercion(validations); end # Returns a new parameter scope, subordinate to the current one and nested @@ -4877,7 +4879,7 @@ class Grape::Validations::ParamsScope # `optional` invocation that opened this scope. # @yield parameter scope # - # source://grape//lib/grape/validations/params_scope.rb#300 + # source://grape//lib/grape/validations/params_scope.rb#306 def new_group_scope(attrs, &block); end # Returns a new parameter scope, not nested under any current-level param @@ -4887,7 +4889,7 @@ class Grape::Validations::ParamsScope # @param options [Hash] options to control how this new scope behaves # @yield parameter scope # - # source://grape//lib/grape/validations/params_scope.rb#283 + # source://grape//lib/grape/validations/params_scope.rb#289 def new_lateral_scope(options, &block); end # Returns a new parameter scope, subordinate to the current one and nested @@ -4899,12 +4901,12 @@ class Grape::Validations::ParamsScope # is optional or not (and hence, whether this block's params will be). # @yield parameter scope # - # source://grape//lib/grape/validations/params_scope.rb#256 + # source://grape//lib/grape/validations/params_scope.rb#262 def new_scope(attrs, optional = T.unsafe(nil), &block); end # @return [Boolean] # - # source://grape//lib/grape/validations/params_scope.rb#504 + # source://grape//lib/grape/validations/params_scope.rb#510 def options_key?(type, key, validations); end # Add a new parameter which should be renamed when using the +#declared+ @@ -4915,28 +4917,28 @@ class Grape::Validations::ParamsScope # @param new_name [String, Symbol] the new name of the parameter (the # renamed name, with the +as: ...+ semantic) # - # source://grape//lib/grape/validations/params_scope.rb#205 + # source://grape//lib/grape/validations/params_scope.rb#211 def push_renamed_param(path, new_name); end - # source://grape//lib/grape/validations/params_scope.rb#231 + # source://grape//lib/grape/validations/params_scope.rb#237 def require_optional_fields(context, opts); end - # source://grape//lib/grape/validations/params_scope.rb#211 + # source://grape//lib/grape/validations/params_scope.rb#217 def require_required_and_optional_fields(context, opts); end - # source://grape//lib/grape/validations/params_scope.rb#472 + # source://grape//lib/grape/validations/params_scope.rb#478 def validate(type, options, attrs, doc, opts); end - # source://grape//lib/grape/validations/params_scope.rb#243 + # source://grape//lib/grape/validations/params_scope.rb#249 def validate_attributes(attrs, opts, &block); end - # source://grape//lib/grape/validations/params_scope.rb#484 + # source://grape//lib/grape/validations/params_scope.rb#490 def validate_value_coercion(coerce_type, *values_list); end - # source://grape//lib/grape/validations/params_scope.rb#318 + # source://grape//lib/grape/validations/params_scope.rb#324 def validates(attrs, validations); end - # source://grape//lib/grape/validations/params_scope.rb#523 + # source://grape//lib/grape/validations/params_scope.rb#529 def validates_presence(validations, attrs, doc, opts); end end diff --git a/sorbet/rbi/gems/mustermann-grape@1.1.0.rbi b/sorbet/rbi/gems/mustermann-grape@1.1.0.rbi index 7b96448..78452bc 100644 --- a/sorbet/rbi/gems/mustermann-grape@1.1.0.rbi +++ b/sorbet/rbi/gems/mustermann-grape@1.1.0.rbi @@ -8,22 +8,22 @@ # source://mustermann-grape//lib/mustermann/grape.rb#6 module Mustermann class << self - # source://mustermann/3.0.0/lib/mustermann.rb#89 + # source://mustermann/3.0.1/lib/mustermann.rb#89 def [](name); end - # source://mustermann/3.0.0/lib/mustermann.rb#120 + # source://mustermann/3.0.1/lib/mustermann.rb#120 def extend_object(object); end - # source://mustermann/3.0.0/lib/mustermann.rb#62 + # source://mustermann/3.0.1/lib/mustermann.rb#62 def new(*input, type: T.unsafe(nil), operator: T.unsafe(nil), **options); end - # source://mustermann/3.0.0/lib/mustermann.rb#115 + # source://mustermann/3.0.1/lib/mustermann.rb#115 def normalized_type(type); end - # source://mustermann/3.0.0/lib/mustermann.rb#110 + # source://mustermann/3.0.1/lib/mustermann.rb#110 def register(name, type); end - # source://mustermann/3.0.0/lib/mustermann.rb#101 + # source://mustermann/3.0.1/lib/mustermann.rb#101 def try_require(path); end end end diff --git a/sorbet/rbi/gems/mustermann@3.0.0.rbi b/sorbet/rbi/gems/mustermann@3.0.1.rbi similarity index 100% rename from sorbet/rbi/gems/mustermann@3.0.0.rbi rename to sorbet/rbi/gems/mustermann@3.0.1.rbi diff --git a/sorbet/rbi/gems/racc@1.8.0.rbi b/sorbet/rbi/gems/racc@1.8.1.rbi similarity index 100% rename from sorbet/rbi/gems/racc@1.8.0.rbi rename to sorbet/rbi/gems/racc@1.8.1.rbi diff --git a/sorbet/rbi/gems/rake@13.2.1.rbi b/sorbet/rbi/gems/rake@13.2.1.rbi index e3337e3..b7c41d4 100644 --- a/sorbet/rbi/gems/rake@13.2.1.rbi +++ b/sorbet/rbi/gems/rake@13.2.1.rbi @@ -1014,6 +1014,12 @@ class Rake::FileList # source://rake//lib/rake/file_list.rb#77 def compact!(*args, &block); end + # source://rake//lib/rake/file_list.rb#77 + def compact_blank(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def compact_blank!(*args, &block); end + # source://rake//lib/rake/file_list.rb#77 def concat(*args, &block); end @@ -1109,6 +1115,9 @@ class Rake::FileList # source://rake//lib/rake/file_list.rb#150 def exclude(*patterns, &block); end + # source://rake//lib/rake/file_list.rb#77 + def exclude?(*args, &block); end + # Should the given file name be excluded from the list? # # NOTE: This method was formerly named "exclude?", but Rails @@ -1122,6 +1131,9 @@ class Rake::FileList # source://rake//lib/rake/file_list.rb#364 def excluded_from_list?(fn); end + # source://rake//lib/rake/file_list.rb#77 + def excluding(*args, &block); end + # Return a new file list that only contains file names from the current # file list that exist on the file system. # @@ -1146,9 +1158,18 @@ class Rake::FileList # source://rake//lib/rake/file_list.rb#284 def ext(newext = T.unsafe(nil)); end + # source://rake//lib/rake/file_list.rb#77 + def extract!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def extract_options!(*args, &block); end + # source://rake//lib/rake/file_list.rb#77 def fetch(*args, &block); end + # source://rake//lib/rake/file_list.rb#77 + def fifth(*args, &block); end + # source://rake//lib/rake/file_list.rb#77 def fill(*args, &block); end @@ -1182,6 +1203,15 @@ class Rake::FileList # source://rake//lib/rake/file_list.rb#77 def flatten!(*args, &block); end + # source://rake//lib/rake/file_list.rb#77 + def forty_two(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def fourth(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def from(*args, &block); end + # source://rake//lib/rake/file_list.rb#68 def grep(*args, &block); end @@ -1209,6 +1239,15 @@ class Rake::FileList # source://rake//lib/rake/file_list.rb#391 def import(array); end + # source://rake//lib/rake/file_list.rb#77 + def in_groups(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def in_groups_of(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def in_order_of(*args, &block); end + # Add file names defined by glob patterns to the file list. If an array # is given, add each element of the array. # @@ -1222,12 +1261,24 @@ class Rake::FileList # source://rake//lib/rake/file_list.rb#77 def include?(*args, &block); end + # source://rake//lib/rake/file_list.rb#77 + def including(*args, &block); end + # source://rake//lib/rake/file_list.rb#77 def index(*args, &block); end + # source://rake//lib/rake/file_list.rb#77 + def index_by(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def index_with(*args, &block); end + # source://rake//lib/rake/file_list.rb#77 def inject(*args, &block); end + # source://rake//lib/rake/file_list.rb#77 + def inquiry(*args, &block); end + # source://rake//lib/rake/file_list.rb#77 def insert(*args, &block); end @@ -1269,6 +1320,9 @@ class Rake::FileList # source://rake//lib/rake/file_list.rb#77 def length(*args, &block); end + # source://rake//lib/rake/file_list.rb#77 + def many?(*args, &block); end + # source://rake//lib/rake/file_list.rb#68 def map(*args, &block); end @@ -1281,6 +1335,9 @@ class Rake::FileList # source://rake//lib/rake/file_list.rb#77 def max_by(*args, &block); end + # source://rake//lib/rake/file_list.rb#77 + def maximum(*args, &block); end + # source://rake//lib/rake/file_list.rb#77 def member?(*args, &block); end @@ -1290,6 +1347,9 @@ class Rake::FileList # source://rake//lib/rake/file_list.rb#77 def min_by(*args, &block); end + # source://rake//lib/rake/file_list.rb#77 + def minimum(*args, &block); end + # source://rake//lib/rake/file_list.rb#77 def minmax(*args, &block); end @@ -1321,9 +1381,15 @@ class Rake::FileList # source://rake//lib/rake/file_list.rb#77 def permutation(*args, &block); end + # source://rake//lib/rake/file_list.rb#77 + def pick(*args, &block); end + # source://rake//lib/rake/file_list.rb#77 def place(*args, &block); end + # source://rake//lib/rake/file_list.rb#77 + def pluck(*args, &block); end + # source://rake//lib/rake/file_list.rb#77 def pop(*args, &block); end @@ -1383,6 +1449,12 @@ class Rake::FileList # source://rake//lib/rake/file_list.rb#77 def sample(*args, &block); end + # source://rake//lib/rake/file_list.rb#77 + def second(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def second_to_last(*args, &block); end + # source://rake//lib/rake/file_list.rb#68 def select(*args, &block); end @@ -1419,6 +1491,9 @@ class Rake::FileList # source://rake//lib/rake/file_list.rb#77 def slice_when(*args, &block); end + # source://rake//lib/rake/file_list.rb#77 + def sole(*args, &block); end + # source://rake//lib/rake/file_list.rb#68 def sort(*args, &block); end @@ -1431,6 +1506,9 @@ class Rake::FileList # source://rake//lib/rake/file_list.rb#77 def sort_by!(*args, &block); end + # source://rake//lib/rake/file_list.rb#77 + def split(*args, &block); end + # Return a new FileList with the results of running +sub+ against each # element of the original list. # @@ -1457,6 +1535,15 @@ class Rake::FileList # source://rake//lib/rake/file_list.rb#77 def tally(*args, &block); end + # source://rake//lib/rake/file_list.rb#77 + def third(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def third_to_last(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def to(*args, &block); end + # Return the internal array object. # # source://rake//lib/rake/file_list.rb#176 @@ -1467,6 +1554,15 @@ class Rake::FileList # source://rake//lib/rake/file_list.rb#182 def to_ary; end + # source://rake//lib/rake/file_list.rb#77 + def to_default_s(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def to_formatted_s(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def to_fs(*args, &block); end + # source://rake//lib/rake/file_list.rb#77 def to_h(*args, &block); end @@ -1475,9 +1571,15 @@ class Rake::FileList # source://rake//lib/rake/file_list.rb#344 def to_s; end + # source://rake//lib/rake/file_list.rb#77 + def to_sentence(*args, &block); end + # source://rake//lib/rake/file_list.rb#77 def to_set(*args, &block); end + # source://rake//lib/rake/file_list.rb#77 + def to_xml(*args, &block); end + # source://rake//lib/rake/file_list.rb#77 def transpose(*args, &block); end @@ -1496,6 +1598,9 @@ class Rake::FileList # source://rake//lib/rake/file_list.rb#68 def values_at(*args, &block); end + # source://rake//lib/rake/file_list.rb#77 + def without(*args, &block); end + # source://rake//lib/rake/file_list.rb#77 def zip(*args, &block); end diff --git a/sorbet/rbi/gems/rbi@0.1.13.rbi b/sorbet/rbi/gems/rbi@0.1.14.rbi similarity index 70% rename from sorbet/rbi/gems/rbi@0.1.13.rbi rename to sorbet/rbi/gems/rbi@0.1.14.rbi index 9069c35..d397fcd 100644 --- a/sorbet/rbi/gems/rbi@0.1.13.rbi +++ b/sorbet/rbi/gems/rbi@0.1.14.rbi @@ -5,28 +5,24 @@ # Please instead update this file by running `bin/tapioca gem rbi`. -# source://rbi//lib/rbi/loc.rb#4 +# source://rbi//lib/rbi.rb#7 module RBI; end -# source://rbi//lib/rbi/model.rb#1041 +# source://rbi//lib/rbi/model.rb#1043 class RBI::Arg < ::RBI::Node - # source://rbi//lib/rbi/model.rb#1053 + # source://rbi//lib/rbi/model.rb#1055 sig { params(value: ::String, loc: T.nilable(::RBI::Loc)).void } def initialize(value, loc: T.unsafe(nil)); end - # source://rbi//lib/rbi/model.rb#1059 + # source://rbi//lib/rbi/model.rb#1061 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#1064 + # source://rbi//lib/rbi/model.rb#1066 sig { returns(::String) } def to_s; end - # source://rbi//lib/rbi/model.rb#1045 + # source://rbi//lib/rbi/model.rb#1047 sig { returns(::String) } def value; end end @@ -35,13 +31,13 @@ end # # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://rbi//lib/rbi/model.rb#349 +# source://rbi//lib/rbi/model.rb#351 class RBI::Attr < ::RBI::NodeWithComments include ::RBI::Indexable abstract! - # source://rbi//lib/rbi/model.rb#374 + # source://rbi//lib/rbi/model.rb#376 sig do params( name: ::Symbol, @@ -54,17 +50,19 @@ 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 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#414 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end # @abstract # - # source://rbi//lib/rbi/model.rb#382 + # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#61 + sig { abstract.returns(T::Array[::RBI::Method]) } + def convert_to_methods; end + + # @abstract + # + # source://rbi//lib/rbi/model.rb#384 sig { abstract.returns(T::Array[::String]) } def fully_qualified_names; end @@ -72,35 +70,64 @@ class RBI::Attr < ::RBI::NodeWithComments sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#420 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#422 sig { override.params(other: ::RBI::Node).void } def merge_with(other); end - # source://rbi//lib/rbi/model.rb#356 + # source://rbi//lib/rbi/model.rb#358 sig { returns(T::Array[::Symbol]) } def names; end - # source://rbi//lib/rbi/printer.rb#375 - sig { override.returns(T::Boolean) } - def oneline?; end - - # source://rbi//lib/rbi/model.rb#362 + # source://rbi//lib/rbi/model.rb#364 sig { returns(T::Array[::RBI::Sig]) } def sigs; end - # source://rbi//lib/rbi/model.rb#359 + # source://rbi//lib/rbi/model.rb#361 sig { returns(::RBI::Visibility) } def visibility; end # @return [Visibility] # - # source://rbi//lib/rbi/model.rb#359 + # source://rbi//lib/rbi/model.rb#361 def visibility=(_arg0); end + + private + + # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#89 + sig do + params( + name: ::String, + sig: T.nilable(::RBI::Sig), + visibility: ::RBI::Visibility, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment] + ).returns(::RBI::Method) + end + def create_getter_method(name, sig, visibility, loc, comments); end + + # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#110 + sig do + params( + name: ::String, + sig: T.nilable(::RBI::Sig), + attribute_type: T.nilable(::String), + visibility: ::RBI::Visibility, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment] + ).returns(::RBI::Method) + end + def create_setter_method(name, sig, attribute_type, visibility, loc, comments); end + + # @raise [UnexpectedMultipleSigsError] + # + # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#66 + sig(:final) { returns([T.nilable(::RBI::Sig), T.nilable(::String)]) } + def parse_sig; end end -# source://rbi//lib/rbi/model.rb#385 +# source://rbi//lib/rbi/model.rb#387 class RBI::AttrAccessor < ::RBI::Attr - # source://rbi//lib/rbi/model.rb#399 + # source://rbi//lib/rbi/model.rb#401 sig do params( name: ::Symbol, @@ -114,22 +141,26 @@ 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 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#454 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/model.rb#405 + # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#140 + sig { override.returns(T::Array[::RBI::Method]) } + def convert_to_methods; end + + # source://rbi//lib/rbi/model.rb#407 sig { override.returns(T::Array[::String]) } def fully_qualified_names; end - # source://rbi//lib/rbi/model.rb#411 + # source://rbi//lib/rbi/model.rb#413 sig { override.returns(::String) } def to_s; end end -# source://rbi//lib/rbi/model.rb#417 +# source://rbi//lib/rbi/model.rb#419 class RBI::AttrReader < ::RBI::Attr - # source://rbi//lib/rbi/model.rb#431 + # source://rbi//lib/rbi/model.rb#433 sig do params( name: ::Symbol, @@ -143,22 +174,26 @@ 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 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#436 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/model.rb#437 + # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#154 + sig { override.returns(T::Array[::RBI::Method]) } + def convert_to_methods; end + + # source://rbi//lib/rbi/model.rb#439 sig { override.returns(T::Array[::String]) } def fully_qualified_names; end - # source://rbi//lib/rbi/model.rb#443 + # source://rbi//lib/rbi/model.rb#445 sig { override.returns(::String) } def to_s; end end -# source://rbi//lib/rbi/model.rb#449 +# source://rbi//lib/rbi/model.rb#451 class RBI::AttrWriter < ::RBI::Attr - # source://rbi//lib/rbi/model.rb#463 + # source://rbi//lib/rbi/model.rb#465 sig do params( name: ::Symbol, @@ -172,35 +207,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 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#445 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/model.rb#469 + # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#163 + sig { override.returns(T::Array[::RBI::Method]) } + def convert_to_methods; end + + # source://rbi//lib/rbi/model.rb#471 sig { override.returns(T::Array[::String]) } def fully_qualified_names; end - # source://rbi//lib/rbi/model.rb#475 + # source://rbi//lib/rbi/model.rb#477 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 +# source://rbi//lib/rbi/model.rb#76 class RBI::BlankLine < ::RBI::Comment - # source://rbi//lib/rbi/model.rb#78 + # source://rbi//lib/rbi/model.rb#80 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#814 +# source://rbi//lib/rbi/model.rb#816 class RBI::BlockParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#825 + # source://rbi//lib/rbi/model.rb#827 sig do params( name: ::String, @@ -211,26 +246,18 @@ 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#836 + # source://rbi//lib/rbi/model.rb#838 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#831 + # source://rbi//lib/rbi/model.rb#833 sig { override.returns(::String) } def to_s; end end -# source://rbi//lib/rbi/model.rb#218 +# source://rbi//lib/rbi/model.rb#220 class RBI::Class < ::RBI::Scope - # source://rbi//lib/rbi/model.rb#236 + # source://rbi//lib/rbi/model.rb#238 sig do params( name: ::String, @@ -242,58 +269,50 @@ 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 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#378 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/model.rb#244 + # source://rbi//lib/rbi/model.rb#246 sig { override.returns(::String) } def fully_qualified_name; end - # source://rbi//lib/rbi/model.rb#222 + # source://rbi//lib/rbi/model.rb#224 sig { returns(::String) } def name; end # @return [String] # - # source://rbi//lib/rbi/model.rb#222 + # source://rbi//lib/rbi/model.rb#224 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 + # source://rbi//lib/rbi/model.rb#227 sig { returns(T.nilable(::String)) } def superclass_name; end # @return [String, nil] # - # source://rbi//lib/rbi/model.rb#225 + # source://rbi//lib/rbi/model.rb#227 def superclass_name=(_arg0); end end -# source://rbi//lib/rbi/model.rb#53 +# source://rbi//lib/rbi/model.rb#55 class RBI::Comment < ::RBI::Node - # source://rbi//lib/rbi/model.rb#60 + # source://rbi//lib/rbi/model.rb#62 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 + # source://rbi//lib/rbi/model.rb#68 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 + # source://rbi//lib/rbi/model.rb#59 sig { returns(::String) } def text; end # @return [String] # - # source://rbi//lib/rbi/model.rb#57 + # source://rbi//lib/rbi/model.rb#59 def text=(_arg0); end end @@ -312,33 +331,38 @@ end # end # ~~~ # -# source://rbi//lib/rbi/rewriters/merge_trees.rb#589 +# source://rbi//lib/rbi/rewriters/merge_trees.rb#591 class RBI::ConflictTree < ::RBI::Tree - # source://rbi//lib/rbi/rewriters/merge_trees.rb#596 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#601 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 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#595 sig { returns(::RBI::Tree) } def left; end + # source://rbi//lib/rbi/rewriters/merge_trees.rb#598 + sig { returns(::String) } + def left_name; end + # @return [Tree] # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#593 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#595 def right; end + + # @return [String] + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#598 + def right_name; end end # Consts # -# source://rbi//lib/rbi/model.rb#312 +# source://rbi//lib/rbi/model.rb#314 class RBI::Const < ::RBI::NodeWithComments include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#327 + # source://rbi//lib/rbi/model.rb#329 sig do params( name: ::String, @@ -350,15 +374,11 @@ 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 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#405 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/model.rb#335 + # source://rbi//lib/rbi/model.rb#337 sig { returns(::String) } def fully_qualified_name; end @@ -366,25 +386,31 @@ class RBI::Const < ::RBI::NodeWithComments sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/model.rb#316 + # source://rbi//lib/rbi/model.rb#318 sig { returns(::String) } def name; end - # source://rbi//lib/rbi/model.rb#342 + # source://rbi//lib/rbi/model.rb#344 sig { override.returns(::String) } def to_s; end # @return [String] # - # source://rbi//lib/rbi/model.rb#316 + # source://rbi//lib/rbi/model.rb#318 def value; end end -# source://rbi//lib/rbi/model.rb#889 +# source://rbi//lib/rbi/rewriters/merge_trees.rb#351 +class RBI::DuplicateNodeError < ::RBI::Error; end + +# source://rbi//lib/rbi.rb#8 +class RBI::Error < ::StandardError; end + +# source://rbi//lib/rbi/model.rb#891 class RBI::Extend < ::RBI::Mixin include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#901 + # source://rbi//lib/rbi/model.rb#903 sig do params( name: ::String, @@ -396,7 +422,7 @@ 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 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#504 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end @@ -404,14 +430,14 @@ class RBI::Extend < ::RBI::Mixin sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/model.rb#907 + # source://rbi//lib/rbi/model.rb#909 sig { override.returns(::String) } def to_s; end end -# source://rbi//lib/rbi/model.rb#137 +# source://rbi//lib/rbi/model.rb#139 class RBI::File - # source://rbi//lib/rbi/model.rb#156 + # source://rbi//lib/rbi/model.rb#158 sig do params( strictness: T.nilable(::String), @@ -421,28 +447,24 @@ class RBI::File end def initialize(strictness: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#164 + # source://rbi//lib/rbi/model.rb#166 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 + # source://rbi//lib/rbi/model.rb#149 sig { returns(T::Array[::RBI::Comment]) } def comments; end # @return [Array] # - # source://rbi//lib/rbi/model.rb#147 + # source://rbi//lib/rbi/model.rb#149 def comments=(_arg0); end - # source://rbi//lib/rbi/model.rb#169 + # source://rbi//lib/rbi/model.rb#171 sig { returns(T::Boolean) } def empty?; end - # source://rbi//lib/rbi/printer.rb#129 + # source://rbi//lib/rbi/printer.rb#744 sig do params( out: T.any(::IO, ::StringIO), @@ -453,32 +475,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 + # source://rbi//lib/rbi/model.rb#143 sig { returns(::RBI::Tree) } def root; end # @return [Tree] # - # source://rbi//lib/rbi/model.rb#141 + # source://rbi//lib/rbi/model.rb#143 def root=(_arg0); end - # source://rbi//lib/rbi/model.rb#144 + # source://rbi//lib/rbi/model.rb#146 sig { returns(T.nilable(::String)) } def strictness; end # @return [String, nil] # - # source://rbi//lib/rbi/model.rb#144 + # source://rbi//lib/rbi/model.rb#146 def strictness=(_arg0); end - # source://rbi//lib/rbi/printer.rb#135 + # source://rbi//lib/rbi/printer.rb#750 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 + # source://rbi//lib/rbi/formatter.rb#24 sig do params( add_sig_templates: T::Boolean, @@ -491,40 +513,24 @@ 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 - # 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 + # source://rbi//lib/rbi/formatter.rb#47 sig { params(file: ::RBI::File).void } def format_file(file); end - # source://rbi//lib/rbi/formatter.rb#64 + # source://rbi//lib/rbi/formatter.rb#52 sig { params(tree: ::RBI::Tree).void } def format_tree(tree); end - # source://rbi//lib/rbi/formatter.rb#18 - sig { params(group_nodes: T::Boolean).returns(T::Boolean) } - def group_nodes=(group_nodes); end - - # source://rbi//lib/rbi/formatter.rb#24 + # source://rbi//lib/rbi/formatter.rb#12 sig { returns(T.nilable(::Integer)) } def max_line_length; end # @return [Integer, nil] # - # source://rbi//lib/rbi/formatter.rb#24 - def max_line_length=(_arg0); end - - # source://rbi//lib/rbi/formatter.rb#21 - sig { params(nest_non_public_methods: T::Boolean).returns(T::Boolean) } - def nest_non_public_methods=(nest_non_public_methods); end - # source://rbi//lib/rbi/formatter.rb#12 - sig { params(nest_singleton_methods: T::Boolean).returns(T::Boolean) } - def nest_singleton_methods=(nest_singleton_methods); end + def max_line_length=(_arg0); end - # source://rbi//lib/rbi/formatter.rb#53 + # source://rbi//lib/rbi/formatter.rb#41 sig { params(file: ::RBI::File).returns(::String) } def print_file(file); end @@ -533,22 +539,18 @@ class RBI::Formatter def sort_nodes=(sort_nodes); end end -# source://rbi//lib/rbi/rewriters/group_nodes.rb#88 +# source://rbi//lib/rbi/rewriters/group_nodes.rb#87 class RBI::Group < ::RBI::Tree - # source://rbi//lib/rbi/rewriters/group_nodes.rb#95 + # source://rbi//lib/rbi/rewriters/group_nodes.rb#94 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 + # source://rbi//lib/rbi/rewriters/group_nodes.rb#91 sig { returns(::RBI::Group::Kind) } def kind; end end -# source://rbi//lib/rbi/rewriters/group_nodes.rb#100 +# source://rbi//lib/rbi/rewriters/group_nodes.rb#99 class RBI::Group::Kind < ::T::Enum enums do Mixins = new @@ -567,13 +569,16 @@ class RBI::Group::Kind < ::T::Enum end end +# source://rbi//lib/rbi/rewriters/group_nodes.rb#5 +class RBI::GroupNodesError < ::RBI::Error; end + # Sorbet's misc. # -# source://rbi//lib/rbi/model.rb#1372 +# source://rbi//lib/rbi/model.rb#1374 class RBI::Helper < ::RBI::NodeWithComments include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#1386 + # source://rbi//lib/rbi/model.rb#1388 sig do params( name: ::String, @@ -584,11 +589,7 @@ 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 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#522 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end @@ -596,20 +597,20 @@ class RBI::Helper < ::RBI::NodeWithComments sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/model.rb#1376 + # source://rbi//lib/rbi/model.rb#1378 sig { returns(::String) } def name; end - # source://rbi//lib/rbi/model.rb#1393 + # source://rbi//lib/rbi/model.rb#1395 sig { override.returns(::String) } def to_s; end end -# source://rbi//lib/rbi/model.rb#866 +# source://rbi//lib/rbi/model.rb#868 class RBI::Include < ::RBI::Mixin include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#878 + # source://rbi//lib/rbi/model.rb#880 sig do params( name: ::String, @@ -621,7 +622,7 @@ 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 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#495 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end @@ -629,7 +630,7 @@ class RBI::Include < ::RBI::Mixin sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/model.rb#884 + # source://rbi//lib/rbi/model.rb#886 sig { override.returns(::String) } def to_s; end end @@ -689,32 +690,28 @@ module RBI::Indexable def index_ids; end end -# source://rbi//lib/rbi/model.rb#1069 +# source://rbi//lib/rbi/model.rb#1071 class RBI::KwArg < ::RBI::Arg - # source://rbi//lib/rbi/model.rb#1082 + # source://rbi//lib/rbi/model.rb#1084 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#1088 + # source://rbi//lib/rbi/model.rb#1090 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#1073 + # source://rbi//lib/rbi/model.rb#1075 sig { returns(::String) } def keyword; end - # source://rbi//lib/rbi/model.rb#1093 + # source://rbi//lib/rbi/model.rb#1095 sig { returns(::String) } def to_s; end end -# source://rbi//lib/rbi/model.rb#755 +# source://rbi//lib/rbi/model.rb#757 class RBI::KwOptParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#770 + # source://rbi//lib/rbi/model.rb#772 sig do params( name: ::String, @@ -726,30 +723,22 @@ 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#782 + # source://rbi//lib/rbi/model.rb#784 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#777 + # source://rbi//lib/rbi/model.rb#779 sig { override.returns(::String) } def to_s; end - # source://rbi//lib/rbi/model.rb#759 + # source://rbi//lib/rbi/model.rb#761 sig { returns(::String) } def value; end end -# source://rbi//lib/rbi/model.rb#728 +# source://rbi//lib/rbi/model.rb#730 class RBI::KwParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#739 + # source://rbi//lib/rbi/model.rb#741 sig do params( name: ::String, @@ -760,26 +749,18 @@ 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#750 + # source://rbi//lib/rbi/model.rb#752 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#745 + # source://rbi//lib/rbi/model.rb#747 sig { override.returns(::String) } def to_s; end end -# source://rbi//lib/rbi/model.rb#787 +# source://rbi//lib/rbi/model.rb#789 class RBI::KwRestParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#798 + # source://rbi//lib/rbi/model.rb#800 sig do params( name: ::String, @@ -790,19 +771,11 @@ 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#809 + # source://rbi//lib/rbi/model.rb#811 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#804 + # source://rbi//lib/rbi/model.rb#806 sig { override.returns(::String) } def to_s; end end @@ -881,11 +854,11 @@ end # Methods and args # -# source://rbi//lib/rbi/model.rb#483 +# source://rbi//lib/rbi/model.rb#485 class RBI::Method < ::RBI::NodeWithComments include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#513 + # source://rbi//lib/rbi/model.rb#515 sig do params( name: ::String, @@ -900,43 +873,39 @@ 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 + # source://rbi//lib/rbi/model.rb#535 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/model.rb#568 + # source://rbi//lib/rbi/model.rb#570 sig { params(name: ::String).void } def add_block_param(name); end - # source://rbi//lib/rbi/model.rb#558 + # source://rbi//lib/rbi/model.rb#560 sig { params(name: ::String, default_value: ::String).void } def add_kw_opt_param(name, default_value); end - # source://rbi//lib/rbi/model.rb#553 + # source://rbi//lib/rbi/model.rb#555 sig { params(name: ::String).void } def add_kw_param(name); end - # source://rbi//lib/rbi/model.rb#563 + # source://rbi//lib/rbi/model.rb#565 sig { params(name: ::String).void } def add_kw_rest_param(name); end - # source://rbi//lib/rbi/model.rb#543 + # source://rbi//lib/rbi/model.rb#545 sig { params(name: ::String, default_value: ::String).void } def add_opt_param(name, default_value); end - # source://rbi//lib/rbi/model.rb#538 + # source://rbi//lib/rbi/model.rb#540 sig { params(name: ::String).void } def add_param(name); end - # source://rbi//lib/rbi/model.rb#548 + # source://rbi//lib/rbi/model.rb#550 sig { params(name: ::String).void } def add_rest_param(name); end - # source://rbi//lib/rbi/model.rb#585 + # source://rbi//lib/rbi/model.rb#587 sig do params( params: T::Array[::RBI::SigParam], @@ -952,11 +921,11 @@ class RBI::Method < ::RBI::NodeWithComments end def add_sig(params: T.unsafe(nil), return_type: T.unsafe(nil), is_abstract: T.unsafe(nil), is_override: T.unsafe(nil), is_overridable: T.unsafe(nil), is_final: T.unsafe(nil), type_params: T.unsafe(nil), checked: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#461 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#463 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/model.rb#611 + # source://rbi//lib/rbi/model.rb#613 sig { returns(::String) } def fully_qualified_name; end @@ -964,68 +933,60 @@ class RBI::Method < ::RBI::NodeWithComments 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 + # source://rbi//lib/rbi/model.rb#495 sig { returns(T::Boolean) } def is_singleton; end # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#493 + # source://rbi//lib/rbi/model.rb#495 def is_singleton=(_arg0); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#470 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#472 sig { override.params(other: ::RBI::Node).void } def merge_with(other); end - # source://rbi//lib/rbi/model.rb#487 + # source://rbi//lib/rbi/model.rb#489 sig { returns(::String) } def name; end # @return [String] # - # source://rbi//lib/rbi/model.rb#487 + # source://rbi//lib/rbi/model.rb#489 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 + # source://rbi//lib/rbi/model.rb#492 sig { returns(T::Array[::RBI::Param]) } def params; end - # source://rbi//lib/rbi/model.rb#499 + # source://rbi//lib/rbi/model.rb#501 sig { returns(T::Array[::RBI::Sig]) } def sigs; end # @return [Array] # - # source://rbi//lib/rbi/model.rb#499 + # source://rbi//lib/rbi/model.rb#501 def sigs=(_arg0); end - # source://rbi//lib/rbi/model.rb#620 + # source://rbi//lib/rbi/model.rb#622 sig { override.returns(::String) } def to_s; end - # source://rbi//lib/rbi/model.rb#496 + # source://rbi//lib/rbi/model.rb#498 sig { returns(::RBI::Visibility) } def visibility; end # @return [Visibility] # - # source://rbi//lib/rbi/model.rb#496 + # source://rbi//lib/rbi/model.rb#498 def visibility=(_arg0); end end -# source://rbi//lib/rbi/model.rb#1433 +# source://rbi//lib/rbi/model.rb#1435 class RBI::MixesInClassMethods < ::RBI::Mixin include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#1445 + # source://rbi//lib/rbi/model.rb#1447 sig do params( name: ::String, @@ -1037,7 +998,7 @@ 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 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#513 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end @@ -1045,7 +1006,7 @@ class RBI::MixesInClassMethods < ::RBI::Mixin sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/model.rb#1451 + # source://rbi//lib/rbi/model.rb#1453 sig { override.returns(::String) } def to_s; end end @@ -1054,11 +1015,11 @@ end # # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://rbi//lib/rbi/model.rb#843 +# source://rbi//lib/rbi/model.rb#845 class RBI::Mixin < ::RBI::NodeWithComments abstract! - # source://rbi//lib/rbi/model.rb#860 + # source://rbi//lib/rbi/model.rb#862 sig do params( name: ::String, @@ -1069,22 +1030,18 @@ 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 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#486 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/model.rb#850 + # source://rbi//lib/rbi/model.rb#852 sig { returns(T::Array[::String]) } def names; end end -# source://rbi//lib/rbi/model.rb#190 +# source://rbi//lib/rbi/model.rb#192 class RBI::Module < ::RBI::Scope - # source://rbi//lib/rbi/model.rb#204 + # source://rbi//lib/rbi/model.rb#206 sig do params( name: ::String, @@ -1095,65 +1052,51 @@ 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 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#387 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/model.rb#211 + # source://rbi//lib/rbi/model.rb#213 sig { override.returns(::String) } def fully_qualified_name; end - # source://rbi//lib/rbi/model.rb#194 + # source://rbi//lib/rbi/model.rb#196 sig { returns(::String) } def name; end # @return [String] # - # source://rbi//lib/rbi/model.rb#194 + # source://rbi//lib/rbi/model.rb#196 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 +# source://rbi//lib/rbi/model.rb#7 class RBI::Node abstract! - # source://rbi//lib/rbi/model.rb#18 + # source://rbi//lib/rbi/model.rb#20 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 + # source://rbi//lib/rbi/model.rb#26 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 + # source://rbi//lib/rbi/model.rb#17 sig { returns(T.nilable(::RBI::Loc)) } def loc; end # @return [Loc, nil] # - # source://rbi//lib/rbi/model.rb#15 + # source://rbi//lib/rbi/model.rb#17 def loc=(_arg0); end # Merge `self` and `other` into a single definition @@ -1162,28 +1105,24 @@ class RBI::Node 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 + # source://rbi//lib/rbi/model.rb#48 sig { returns(T.nilable(::RBI::Scope)) } def parent_scope; end - # source://rbi//lib/rbi/model.rb#12 + # source://rbi//lib/rbi/model.rb#14 sig { returns(T.nilable(::RBI::Tree)) } def parent_tree; end # @return [Tree, nil] # - # source://rbi//lib/rbi/model.rb#12 + # source://rbi//lib/rbi/model.rb#14 def parent_tree=(_arg0); end - # source://rbi//lib/rbi/printer.rb#156 + # source://rbi//lib/rbi/printer.rb#768 sig do params( out: T.any(::IO, ::StringIO), @@ -1194,11 +1133,9 @@ 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 + # @raise [ReplaceNodeError] + # + # source://rbi//lib/rbi/model.rb#35 sig { params(node: ::RBI::Node).void } def replace(node); end @@ -1206,50 +1143,46 @@ class RBI::Node sig { params(version: ::Gem::Version).returns(T::Boolean) } def satisfies_version?(version); end - # source://rbi//lib/rbi/printer.rb#162 + # source://rbi//lib/rbi/printer.rb#774 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 +# source://rbi//lib/rbi/model.rb#85 class RBI::NodeWithComments < ::RBI::Node abstract! - # source://rbi//lib/rbi/model.rb#93 + # source://rbi//lib/rbi/model.rb#95 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 + # source://rbi//lib/rbi/model.rb#101 sig { returns(T::Array[::String]) } def annotations; end - # source://rbi//lib/rbi/model.rb#90 + # source://rbi//lib/rbi/model.rb#92 sig { returns(T::Array[::RBI::Comment]) } def comments; end # @return [Array] # - # source://rbi//lib/rbi/model.rb#90 + # source://rbi//lib/rbi/model.rb#92 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 - # source://rbi//lib/rbi/rewriters/filter_versions.rb#104 sig { returns(T::Array[::Gem::Requirement]) } def version_requirements; end end -# source://rbi//lib/rbi/model.rb#674 +# source://rbi//lib/rbi/model.rb#676 class RBI::OptParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#689 + # source://rbi//lib/rbi/model.rb#691 sig do params( name: ::String, @@ -1261,56 +1194,36 @@ 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#696 + # source://rbi//lib/rbi/model.rb#698 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#678 + # source://rbi//lib/rbi/model.rb#680 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#625 +# source://rbi//lib/rbi/model.rb#627 class RBI::Param < ::RBI::NodeWithComments abstract! - # source://rbi//lib/rbi/model.rb#641 + # source://rbi//lib/rbi/model.rb#643 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#632 + # source://rbi//lib/rbi/model.rb#634 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#647 + # source://rbi//lib/rbi/model.rb#649 sig { override.returns(::String) } def to_s; end end # source://rbi//lib/rbi/parser.rb#7 -class RBI::ParseError < ::StandardError +class RBI::ParseError < ::RBI::Error # source://rbi//lib/rbi/parser.rb#14 sig { params(message: ::String, location: ::RBI::Loc).void } def initialize(message, location); end @@ -1520,9 +1433,9 @@ class RBI::Parser::Visitor < ::Prism::Visitor def node_string!(node); end end -# source://rbi//lib/rbi/printer.rb#5 +# source://rbi//lib/rbi/printer.rb#7 class RBI::Printer < ::RBI::Visitor - # source://rbi//lib/rbi/printer.rb#28 + # source://rbi//lib/rbi/printer.rb#30 sig do params( out: T.any(::IO, ::StringIO), @@ -1533,87 +1446,316 @@ 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 + # source://rbi//lib/rbi/printer.rb#17 sig { returns(::Integer) } def current_indent; end - # source://rbi//lib/rbi/printer.rb#46 + # source://rbi//lib/rbi/printer.rb#48 sig { void } def dedent; end # @return [Boolean] # - # source://rbi//lib/rbi/printer.rb#9 + # source://rbi//lib/rbi/printer.rb#11 def in_visibility_group; end # @return [Boolean] # - # source://rbi//lib/rbi/printer.rb#9 + # source://rbi//lib/rbi/printer.rb#11 def in_visibility_group=(_arg0); end # Printing # - # source://rbi//lib/rbi/printer.rb#41 + # source://rbi//lib/rbi/printer.rb#43 sig { void } def indent; end - # source://rbi//lib/rbi/printer.rb#18 + # source://rbi//lib/rbi/printer.rb#20 sig { returns(T.nilable(::Integer)) } def max_line_length; end - # source://rbi//lib/rbi/printer.rb#12 + # source://rbi//lib/rbi/printer.rb#14 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 + # source://rbi//lib/rbi/printer.rb#54 sig { params(string: ::String).void } def print(string); end - # source://rbi//lib/rbi/printer.rb#9 + # source://rbi//lib/rbi/printer.rb#11 sig { returns(T::Boolean) } def print_locs; end # @return [Boolean] # - # source://rbi//lib/rbi/printer.rb#9 + # source://rbi//lib/rbi/printer.rb#11 def print_locs=(_arg0); end # Print a string with indentation and `\n` at the end. # - # source://rbi//lib/rbi/printer.rb#72 + # source://rbi//lib/rbi/printer.rb#74 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 + # source://rbi//lib/rbi/printer.rb#60 sig { params(string: T.nilable(::String)).void } def printn(string = T.unsafe(nil)); end # Print a string with indentation but without a `\n` at the end. # - # source://rbi//lib/rbi/printer.rb#65 + # source://rbi//lib/rbi/printer.rb#67 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 + # source://rbi//lib/rbi/printer.rb#80 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 } + # source://rbi//lib/rbi/printer.rb#91 + sig { override.params(file: ::RBI::File).void } def visit_file(file); end + + private + + # source://rbi//lib/rbi/printer.rb#619 + sig { params(node: ::RBI::Node).returns(T::Boolean) } + def oneline?(node); end + + # source://rbi//lib/rbi/printer.rb#577 + sig { params(node: ::RBI::Node).void } + def print_blank_line_before(node); end + + # source://rbi//lib/rbi/printer.rb#587 + sig { params(node: ::RBI::Node).void } + def print_loc(node); end + + # source://rbi//lib/rbi/printer.rb#593 + sig { params(node: ::RBI::Param, last: T::Boolean).void } + def print_param_comment_leading_space(node, last:); end + + # source://rbi//lib/rbi/printer.rb#666 + sig { params(node: ::RBI::Sig).void } + def print_sig_as_block(node); end + + # source://rbi//lib/rbi/printer.rb#641 + sig { params(node: ::RBI::Sig).void } + def print_sig_as_line(node); end + + # source://rbi//lib/rbi/printer.rb#611 + sig { params(node: ::RBI::SigParam, last: T::Boolean).void } + def print_sig_param_comment_leading_space(node, last:); end + + # source://rbi//lib/rbi/printer.rb#722 + sig { params(node: ::RBI::Sig).returns(T::Array[::String]) } + def sig_modifiers(node); end + + # source://rbi//lib/rbi/printer.rb#417 + sig { override.params(node: ::RBI::Arg).void } + def visit_arg(node); end + + # source://rbi//lib/rbi/printer.rb#237 + sig { params(node: ::RBI::Attr).void } + def visit_attr(node); end + + # source://rbi//lib/rbi/printer.rb#222 + sig { override.params(node: ::RBI::AttrAccessor).void } + def visit_attr_accessor(node); end + + # source://rbi//lib/rbi/printer.rb#227 + sig { override.params(node: ::RBI::AttrReader).void } + def visit_attr_reader(node); end + + # source://rbi//lib/rbi/printer.rb#232 + sig { override.params(node: ::RBI::AttrWriter).void } + def visit_attr_writer(node); end + + # source://rbi//lib/rbi/printer.rb#126 + sig { override.params(node: ::RBI::BlankLine).void } + def visit_blank_line(node); end + + # source://rbi//lib/rbi/printer.rb#344 + sig { override.params(node: ::RBI::BlockParam).void } + def visit_block_param(node); end + + # source://rbi//lib/rbi/printer.rb#143 + sig { override.params(node: ::RBI::Class).void } + def visit_class(node); end + + # source://rbi//lib/rbi/printer.rb#110 + sig { override.params(node: ::RBI::Comment).void } + def visit_comment(node); end + + # source://rbi//lib/rbi/printer.rb#554 + sig { override.params(node: ::RBI::ConflictTree).void } + def visit_conflict_tree(node); end + + # source://rbi//lib/rbi/printer.rb#213 + sig { override.params(node: ::RBI::Const).void } + def visit_const(node); end + + # source://rbi//lib/rbi/printer.rb#354 + sig { override.params(node: ::RBI::Extend).void } + def visit_extend(node); end + + # source://rbi//lib/rbi/printer.rb#526 + sig { override.params(node: ::RBI::Group).void } + def visit_group(node); end + + # source://rbi//lib/rbi/printer.rb#512 + sig { override.params(node: ::RBI::Helper).void } + def visit_helper(node); end + + # source://rbi//lib/rbi/printer.rb#349 + sig { override.params(node: ::RBI::Include).void } + def visit_include(node); end + + # source://rbi//lib/rbi/printer.rb#422 + sig { override.params(node: ::RBI::KwArg).void } + def visit_kw_arg(node); end + + # source://rbi//lib/rbi/printer.rb#334 + sig { override.params(node: ::RBI::KwOptParam).void } + def visit_kw_opt_param(node); end + + # source://rbi//lib/rbi/printer.rb#329 + sig { override.params(node: ::RBI::KwParam).void } + def visit_kw_param(node); end + + # source://rbi//lib/rbi/printer.rb#339 + sig { override.params(node: ::RBI::KwRestParam).void } + def visit_kw_rest_param(node); end + + # source://rbi//lib/rbi/printer.rb#265 + sig { override.params(node: ::RBI::Method).void } + def visit_method(node); end + + # source://rbi//lib/rbi/printer.rb#521 + sig { override.params(node: ::RBI::MixesInClassMethods).void } + def visit_mixes_in_class_methods(node); end + + # source://rbi//lib/rbi/printer.rb#359 + sig { params(node: ::RBI::Mixin).void } + def visit_mixin(node); end + + # source://rbi//lib/rbi/printer.rb#138 + sig { override.params(node: ::RBI::Module).void } + def visit_module(node); end + + # source://rbi//lib/rbi/printer.rb#319 + sig { override.params(node: ::RBI::OptParam).void } + def visit_opt_param(node); end + + # source://rbi//lib/rbi/printer.rb#386 + sig { override.params(node: ::RBI::Private).void } + def visit_private(node); end + + # source://rbi//lib/rbi/printer.rb#381 + sig { override.params(node: ::RBI::Protected).void } + def visit_protected(node); end + + # source://rbi//lib/rbi/printer.rb#376 + sig { override.params(node: ::RBI::Public).void } + def visit_public(node); end + + # source://rbi//lib/rbi/printer.rb#314 + sig { override.params(node: ::RBI::ReqParam).void } + def visit_req_param(node); end + + # source://rbi//lib/rbi/printer.rb#545 + sig { override.params(node: ::RBI::RequiresAncestor).void } + def visit_requires_ancestor(node); end + + # source://rbi//lib/rbi/printer.rb#324 + sig { override.params(node: ::RBI::RestParam).void } + def visit_rest_param(node); end + + # source://rbi//lib/rbi/printer.rb#158 + sig { params(node: ::RBI::Scope).void } + def visit_scope(node); end + + # source://rbi//lib/rbi/printer.rb#203 + sig { params(node: ::RBI::Scope).void } + def visit_scope_body(node); end + + # source://rbi//lib/rbi/printer.rb#563 + sig { override.params(node: ::RBI::ScopeConflict).void } + def visit_scope_conflict(node); end + + # source://rbi//lib/rbi/printer.rb#168 + sig { params(node: ::RBI::Scope).void } + def visit_scope_header(node); end + + # source://rbi//lib/rbi/printer.rb#400 + sig { override.params(node: ::RBI::Send).void } + def visit_send(node); end + + # source://rbi//lib/rbi/printer.rb#427 + sig { override.params(node: ::RBI::Sig).void } + def visit_sig(node); end + + # source://rbi//lib/rbi/printer.rb#446 + sig { override.params(node: ::RBI::SigParam).void } + def visit_sig_param(node); end + + # source://rbi//lib/rbi/printer.rb#153 + sig { override.params(node: ::RBI::SingletonClass).void } + def visit_singleton_class(node); end + + # source://rbi//lib/rbi/printer.rb#148 + sig { override.params(node: ::RBI::Struct).void } + def visit_struct(node); end + + # source://rbi//lib/rbi/printer.rb#466 + sig { params(node: ::RBI::TStructField).void } + def visit_t_struct_field(node); end + + # source://rbi//lib/rbi/printer.rb#484 + sig { override.params(node: ::RBI::TEnum).void } + def visit_tenum(node); end + + # source://rbi//lib/rbi/printer.rb#489 + sig { override.params(node: ::RBI::TEnumBlock).void } + def visit_tenum_block(node); end + + # source://rbi//lib/rbi/printer.rb#131 + sig { override.params(node: ::RBI::Tree).void } + def visit_tree(node); end + + # source://rbi//lib/rbi/printer.rb#451 + sig { override.params(node: ::RBI::TStruct).void } + def visit_tstruct(node); end + + # source://rbi//lib/rbi/printer.rb#456 + sig { override.params(node: ::RBI::TStructConst).void } + def visit_tstruct_const(node); end + + # source://rbi//lib/rbi/printer.rb#461 + sig { override.params(node: ::RBI::TStructProp).void } + def visit_tstruct_prop(node); end + + # source://rbi//lib/rbi/printer.rb#503 + sig { override.params(node: ::RBI::TypeMember).void } + def visit_type_member(node); end + + # source://rbi//lib/rbi/printer.rb#391 + sig { params(node: ::RBI::Visibility).void } + def visit_visibility(node); end + + # source://rbi//lib/rbi/printer.rb#532 + sig { override.params(node: ::RBI::VisibilityGroup).void } + def visit_visibility_group(node); end end -# source://rbi//lib/rbi/model.rb#982 +# source://rbi//lib/rbi/printer.rb#5 +class RBI::PrinterError < ::RBI::Error; end + +# source://rbi//lib/rbi/model.rb#984 class RBI::Private < ::RBI::Visibility - # source://rbi//lib/rbi/model.rb#992 + # source://rbi//lib/rbi/model.rb#994 sig do params( loc: T.nilable(::RBI::Loc), @@ -1624,9 +1766,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#966 +# source://rbi//lib/rbi/model.rb#968 class RBI::Protected < ::RBI::Visibility - # source://rbi//lib/rbi/model.rb#976 + # source://rbi//lib/rbi/model.rb#978 sig do params( loc: T.nilable(::RBI::Loc), @@ -1637,9 +1779,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#950 +# source://rbi//lib/rbi/model.rb#952 class RBI::Public < ::RBI::Visibility - # source://rbi//lib/rbi/model.rb#960 + # source://rbi//lib/rbi/model.rb#962 sig do params( loc: T.nilable(::RBI::Loc), @@ -1650,9 +1792,12 @@ class RBI::Public < ::RBI::Visibility def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end end -# source://rbi//lib/rbi/model.rb#652 +# source://rbi//lib/rbi/model.rb#5 +class RBI::ReplaceNodeError < ::RBI::Error; end + +# source://rbi//lib/rbi/model.rb#654 class RBI::ReqParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#663 + # source://rbi//lib/rbi/model.rb#665 sig do params( name: ::String, @@ -1663,39 +1808,35 @@ 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#669 + # source://rbi//lib/rbi/model.rb#671 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end end -# source://rbi//lib/rbi/model.rb#1456 +# source://rbi//lib/rbi/model.rb#1458 class RBI::RequiresAncestor < ::RBI::NodeWithComments include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#1469 + # source://rbi//lib/rbi/model.rb#1471 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#1460 + # source://rbi//lib/rbi/model.rb#1462 sig { returns(::String) } def name; end - # source://rbi//lib/rbi/model.rb#1475 + # source://rbi//lib/rbi/model.rb#1477 sig { override.returns(::String) } def to_s; end end -# source://rbi//lib/rbi/model.rb#701 +# source://rbi//lib/rbi/model.rb#703 class RBI::RestParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#712 + # source://rbi//lib/rbi/model.rb#714 sig do params( name: ::String, @@ -1706,19 +1847,11 @@ 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#723 + # source://rbi//lib/rbi/model.rb#725 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#718 + # source://rbi//lib/rbi/model.rb#720 sig { override.returns(::String) } def to_s; end end @@ -1772,6 +1905,21 @@ class RBI::Rewriters::Annotate < ::RBI::Visitor def root?(node); end end +# source://rbi//lib/rbi/rewriters/attr_to_methods.rb#22 +class RBI::Rewriters::AttrToMethods < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#26 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # @raise [ReplaceNodeError] + # + # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#39 + sig { params(node: ::RBI::Node, with: T::Array[::RBI::Node]).void } + def replace(node, with:); end +end + # source://rbi//lib/rbi/rewriters/deannotate.rb#6 class RBI::Rewriters::Deannotate < ::RBI::Visitor # source://rbi//lib/rbi/rewriters/deannotate.rb#10 @@ -1861,11 +2009,17 @@ end # source://rbi//lib/rbi/rewriters/filter_versions.rb#60 RBI::Rewriters::FilterVersions::VERSION_PREFIX = T.let(T.unsafe(nil), String) -# source://rbi//lib/rbi/rewriters/group_nodes.rb#6 +# source://rbi//lib/rbi/rewriters/group_nodes.rb#8 class RBI::Rewriters::GroupNodes < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/group_nodes.rb#10 + # source://rbi//lib/rbi/rewriters/group_nodes.rb#12 sig { override.params(node: T.nilable(::RBI::Node)).void } def visit(node); end + + private + + # source://rbi//lib/rbi/rewriters/group_nodes.rb#36 + sig { params(node: ::RBI::Node).returns(::RBI::Group::Kind) } + def group_kind(node); end end # Merge two RBI trees together @@ -1945,7 +2099,7 @@ class RBI::Rewriters::Merge::Conflict < ::T::Struct def to_s; end class << self - # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11506/lib/types/struct.rb#13 def inherited(s); end end end @@ -2162,7 +2316,7 @@ class RBI::Rewriters::RemoveKnownDefinitions::Operation < ::T::Struct def to_s; end class << self - # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11506/lib/types/struct.rb#13 def inherited(s); end end end @@ -2196,25 +2350,21 @@ end # # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://rbi//lib/rbi/model.rb#176 +# source://rbi//lib/rbi/model.rb#178 class RBI::Scope < ::RBI::Tree include ::RBI::Indexable abstract! - # source://rbi//lib/rbi/printer.rb#242 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - # Duplicate `self` scope without its body # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#356 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#358 sig { returns(T.self_type) } def dup_empty; end # @abstract # - # source://rbi//lib/rbi/model.rb#182 + # source://rbi//lib/rbi/model.rb#184 sig { abstract.returns(::String) } def fully_qualified_name; end @@ -2222,17 +2372,7 @@ class RBI::Scope < ::RBI::Tree 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 + # source://rbi//lib/rbi/model.rb#187 sig { override.returns(::String) } def to_s; end end @@ -2250,37 +2390,38 @@ end # end # ~~~ # -# source://rbi//lib/rbi/rewriters/merge_trees.rb#628 +# source://rbi//lib/rbi/rewriters/merge_trees.rb#624 class RBI::ScopeConflict < ::RBI::Tree - # source://rbi//lib/rbi/rewriters/merge_trees.rb#642 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#641 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 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#628 sig { returns(::RBI::Scope) } def left; end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#667 - sig { override.returns(T::Boolean) } - def oneline?; end + # source://rbi//lib/rbi/rewriters/merge_trees.rb#631 + sig { returns(::String) } + def left_name; end # @return [Scope] # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#632 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#628 def right; end + + # @return [String] + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#631 + def right_name; end end # Sends # -# source://rbi//lib/rbi/model.rb#1000 +# source://rbi//lib/rbi/model.rb#1002 class RBI::Send < ::RBI::NodeWithComments include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#1018 + # source://rbi//lib/rbi/model.rb#1020 sig do params( method: ::String, @@ -2292,23 +2433,19 @@ 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#1026 + # source://rbi//lib/rbi/model.rb#1028 sig { params(arg: ::RBI::Arg).void } def <<(arg); end - # source://rbi//lib/rbi/model.rb#1031 + # source://rbi//lib/rbi/model.rb#1033 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#1007 + # source://rbi//lib/rbi/model.rb#1009 sig { returns(T::Array[::RBI::Arg]) } def args; end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#529 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#531 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end @@ -2316,20 +2453,20 @@ class RBI::Send < ::RBI::NodeWithComments sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/model.rb#1004 + # source://rbi//lib/rbi/model.rb#1006 sig { returns(::String) } def method; end - # source://rbi//lib/rbi/model.rb#1036 + # source://rbi//lib/rbi/model.rb#1038 sig { returns(::String) } def to_s; end end # Sorbet's sigs # -# source://rbi//lib/rbi/model.rb#1100 +# source://rbi//lib/rbi/model.rb#1102 class RBI::Sig < ::RBI::Node - # source://rbi//lib/rbi/model.rb#1132 + # source://rbi//lib/rbi/model.rb#1134 sig do params( params: T::Array[::RBI::SigParam], @@ -2346,113 +2483,87 @@ 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#1157 + # source://rbi//lib/rbi/model.rb#1159 sig { params(param: ::RBI::SigParam).void } def <<(param); end - # source://rbi//lib/rbi/model.rb#1167 + # source://rbi//lib/rbi/model.rb#1169 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#1162 + # source://rbi//lib/rbi/model.rb#1164 sig { params(name: ::String, type: ::String).void } def add_param(name, type); end - # source://rbi//lib/rbi/model.rb#1116 + # source://rbi//lib/rbi/model.rb#1118 sig { returns(T.nilable(::Symbol)) } def checked; end # @return [Symbol, nil] # - # source://rbi//lib/rbi/model.rb#1116 + # source://rbi//lib/rbi/model.rb#1118 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#1110 + # source://rbi//lib/rbi/model.rb#1112 sig { returns(T::Boolean) } def is_abstract; end # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#1110 + # source://rbi//lib/rbi/model.rb#1112 def is_abstract=(_arg0); end # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#1110 + # source://rbi//lib/rbi/model.rb#1112 def is_final; end # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#1110 + # source://rbi//lib/rbi/model.rb#1112 def is_final=(_arg0); end # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#1110 + # source://rbi//lib/rbi/model.rb#1112 def is_overridable; end # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#1110 + # source://rbi//lib/rbi/model.rb#1112 def is_overridable=(_arg0); end # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#1110 + # source://rbi//lib/rbi/model.rb#1112 def is_override; end # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#1110 + # source://rbi//lib/rbi/model.rb#1112 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#1104 + # source://rbi//lib/rbi/model.rb#1106 sig { returns(T::Array[::RBI::SigParam]) } def params; end - # source://rbi//lib/rbi/model.rb#1107 + # source://rbi//lib/rbi/model.rb#1109 sig { returns(T.nilable(::String)) } def return_type; end # @return [String, nil] # - # source://rbi//lib/rbi/model.rb#1107 + # source://rbi//lib/rbi/model.rb#1109 def return_type=(_arg0); end - # source://rbi//lib/rbi/model.rb#1113 + # source://rbi//lib/rbi/model.rb#1115 sig { returns(T::Array[::String]) } def type_params; end - - private - - # source://rbi//lib/rbi/printer.rb#698 - sig { params(v: ::RBI::Printer).void } - def print_as_block(v); end - - # source://rbi//lib/rbi/printer.rb#674 - sig { params(v: ::RBI::Printer).void } - def print_as_line(v); end - - # source://rbi//lib/rbi/printer.rb#663 - sig { returns(T::Array[::String]) } - def sig_modifiers; end end -# source://rbi//lib/rbi/model.rb#1176 +# source://rbi//lib/rbi/model.rb#1178 class RBI::SigParam < ::RBI::NodeWithComments - # source://rbi//lib/rbi/model.rb#1191 + # source://rbi//lib/rbi/model.rb#1193 sig do params( name: ::String, @@ -2464,35 +2575,23 @@ 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#1199 + # source://rbi//lib/rbi/model.rb#1201 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#1180 + # source://rbi//lib/rbi/model.rb#1182 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#1180 + # source://rbi//lib/rbi/model.rb#1182 def type; end end -# source://rbi//lib/rbi/model.rb#251 +# source://rbi//lib/rbi/model.rb#253 class RBI::SingletonClass < ::RBI::Scope - # source://rbi//lib/rbi/model.rb#261 + # source://rbi//lib/rbi/model.rb#263 sig do params( loc: T.nilable(::RBI::Loc), @@ -2502,18 +2601,14 @@ 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 + # source://rbi//lib/rbi/model.rb#269 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 +# source://rbi//lib/rbi/model.rb#274 class RBI::Struct < ::RBI::Scope - # source://rbi//lib/rbi/model.rb#294 + # source://rbi//lib/rbi/model.rb#296 sig do params( name: ::String, @@ -2526,51 +2621,47 @@ 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 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#396 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/model.rb#303 + # source://rbi//lib/rbi/model.rb#305 sig { override.returns(::String) } def fully_qualified_name; end - # source://rbi//lib/rbi/model.rb#282 + # source://rbi//lib/rbi/model.rb#284 sig { returns(T::Boolean) } def keyword_init; end # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#282 + # source://rbi//lib/rbi/model.rb#284 def keyword_init=(_arg0); end - # source://rbi//lib/rbi/model.rb#279 + # source://rbi//lib/rbi/model.rb#281 sig { returns(T::Array[::Symbol]) } def members; end # @return [Array] # - # source://rbi//lib/rbi/model.rb#279 + # source://rbi//lib/rbi/model.rb#281 def members=(_arg0); end - # source://rbi//lib/rbi/model.rb#276 + # source://rbi//lib/rbi/model.rb#278 sig { returns(::String) } def name; end # @return [String] # - # source://rbi//lib/rbi/model.rb#276 + # source://rbi//lib/rbi/model.rb#278 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#1317 +# source://rbi//lib/rbi/model.rb#1319 class RBI::TEnum < ::RBI::Class - # source://rbi//lib/rbi/model.rb#1328 + # source://rbi//lib/rbi/model.rb#1330 sig do params( name: ::String, @@ -2582,11 +2673,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#1334 +# source://rbi//lib/rbi/model.rb#1336 class RBI::TEnumBlock < ::RBI::NodeWithComments include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#1348 + # source://rbi//lib/rbi/model.rb#1350 sig do params( names: T::Array[::String], @@ -2597,15 +2688,11 @@ 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#1360 + # source://rbi//lib/rbi/model.rb#1362 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#1355 + # source://rbi//lib/rbi/model.rb#1357 sig { returns(T::Boolean) } def empty?; end @@ -2613,24 +2700,24 @@ class RBI::TEnumBlock < ::RBI::NodeWithComments sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#556 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#558 sig { override.params(other: ::RBI::Node).void } def merge_with(other); end - # source://rbi//lib/rbi/model.rb#1338 + # source://rbi//lib/rbi/model.rb#1340 sig { returns(T::Array[::String]) } def names; end - # source://rbi//lib/rbi/model.rb#1365 + # source://rbi//lib/rbi/model.rb#1367 sig { override.returns(::String) } def to_s; end end # Sorbet's T::Struct # -# source://rbi//lib/rbi/model.rb#1206 +# source://rbi//lib/rbi/model.rb#1208 class RBI::TStruct < ::RBI::Class - # source://rbi//lib/rbi/model.rb#1217 + # source://rbi//lib/rbi/model.rb#1219 sig do params( name: ::String, @@ -2642,11 +2729,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#1255 +# source://rbi//lib/rbi/model.rb#1257 class RBI::TStructConst < ::RBI::TStructField include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#1268 + # source://rbi//lib/rbi/model.rb#1270 sig do params( name: ::String, @@ -2659,11 +2746,11 @@ 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 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#549 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/model.rb#1274 + # source://rbi//lib/rbi/model.rb#1276 sig { override.returns(T::Array[::String]) } def fully_qualified_names; end @@ -2671,18 +2758,18 @@ class RBI::TStructConst < ::RBI::TStructField sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/model.rb#1280 + # source://rbi//lib/rbi/model.rb#1282 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#1223 +# source://rbi//lib/rbi/model.rb#1225 class RBI::TStructField < ::RBI::NodeWithComments abstract! - # source://rbi//lib/rbi/model.rb#1244 + # source://rbi//lib/rbi/model.rb#1246 sig do params( name: ::String, @@ -2694,54 +2781,50 @@ 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 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#540 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/model.rb#1233 + # source://rbi//lib/rbi/model.rb#1235 sig { returns(T.nilable(::String)) } def default; end # @return [String, nil] # - # source://rbi//lib/rbi/model.rb#1233 + # source://rbi//lib/rbi/model.rb#1235 def default=(_arg0); end # @abstract # - # source://rbi//lib/rbi/model.rb#1252 + # source://rbi//lib/rbi/model.rb#1254 sig { abstract.returns(T::Array[::String]) } def fully_qualified_names; end - # source://rbi//lib/rbi/model.rb#1230 + # source://rbi//lib/rbi/model.rb#1232 sig { returns(::String) } def name; end # @return [String] # - # source://rbi//lib/rbi/model.rb#1230 + # source://rbi//lib/rbi/model.rb#1232 def name=(_arg0); end # @return [String] # - # source://rbi//lib/rbi/model.rb#1230 + # source://rbi//lib/rbi/model.rb#1232 def type; end # @return [String] # - # source://rbi//lib/rbi/model.rb#1230 + # source://rbi//lib/rbi/model.rb#1232 def type=(_arg0); end end -# source://rbi//lib/rbi/model.rb#1285 +# source://rbi//lib/rbi/model.rb#1287 class RBI::TStructProp < ::RBI::TStructField include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#1298 + # source://rbi//lib/rbi/model.rb#1300 sig do params( name: ::String, @@ -2754,11 +2837,11 @@ 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 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#572 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/model.rb#1304 + # source://rbi//lib/rbi/model.rb#1306 sig { override.returns(T::Array[::String]) } def fully_qualified_names; end @@ -2766,14 +2849,14 @@ class RBI::TStructProp < ::RBI::TStructField sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/model.rb#1310 + # source://rbi//lib/rbi/model.rb#1312 sig { override.returns(::String) } def to_s; end end -# source://rbi//lib/rbi/model.rb#106 +# source://rbi//lib/rbi/model.rb#108 class RBI::Tree < ::RBI::NodeWithComments - # source://rbi//lib/rbi/model.rb#119 + # source://rbi//lib/rbi/model.rb#121 sig do params( loc: T.nilable(::RBI::Loc), @@ -2783,14 +2866,10 @@ 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 + # source://rbi//lib/rbi/model.rb#128 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 @@ -2886,7 +2965,7 @@ class RBI::Tree < ::RBI::NodeWithComments sig { params(annotation: ::String).void } def deannotate!(annotation); end - # source://rbi//lib/rbi/model.rb#132 + # source://rbi//lib/rbi/model.rb#134 sig { returns(T::Boolean) } def empty?; end @@ -2894,7 +2973,7 @@ class RBI::Tree < ::RBI::NodeWithComments sig { params(version: ::Gem::Version).void } def filter_versions!(version); end - # source://rbi//lib/rbi/rewriters/group_nodes.rb#38 + # source://rbi//lib/rbi/rewriters/group_nodes.rb#81 sig { void } def group_nodes!; end @@ -2921,13 +3000,13 @@ class RBI::Tree < ::RBI::NodeWithComments sig { void } def nest_singleton_methods!; end - # source://rbi//lib/rbi/model.rb#110 + # source://rbi//lib/rbi/model.rb#112 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/attr_to_methods.rb#53 + sig { void } + def replace_attributes_with_methods!; end # source://rbi//lib/rbi/rewriters/sort_nodes.rb#119 sig { void } @@ -2944,11 +3023,11 @@ class RBI::Tree < ::RBI::NodeWithComments def nodes_cache; end end -# source://rbi//lib/rbi/model.rb#1398 +# source://rbi//lib/rbi/model.rb#1400 class RBI::TypeMember < ::RBI::NodeWithComments include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#1413 + # source://rbi//lib/rbi/model.rb#1415 sig do params( name: ::String, @@ -2960,11 +3039,7 @@ 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#1421 + # source://rbi//lib/rbi/model.rb#1423 sig { returns(::String) } def fully_qualified_name; end @@ -2972,22 +3047,33 @@ class RBI::TypeMember < ::RBI::NodeWithComments sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/model.rb#1402 + # source://rbi//lib/rbi/model.rb#1404 sig { returns(::String) } def name; end - # source://rbi//lib/rbi/model.rb#1428 + # source://rbi//lib/rbi/model.rb#1430 sig { override.returns(::String) } def to_s; end # @return [String] # - # source://rbi//lib/rbi/model.rb#1402 + # source://rbi//lib/rbi/model.rb#1404 def value; end end +# source://rbi//lib/rbi/rewriters/attr_to_methods.rb#5 +class RBI::UnexpectedMultipleSigsError < ::RBI::Error + # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#10 + sig { params(node: ::RBI::Node).void } + def initialize(node); end + + # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#7 + sig { returns(::RBI::Node) } + def node; end +end + # source://rbi//lib/rbi/parser.rb#20 -class RBI::UnexpectedParserError < ::StandardError +class RBI::UnexpectedParserError < ::RBI::Error # source://rbi//lib/rbi/parser.rb#27 sig { params(parent_exception: ::Exception, last_location: ::RBI::Loc).void } def initialize(parent_exception, last_location); end @@ -3008,35 +3094,31 @@ RBI::VERSION = T.let(T.unsafe(nil), String) # # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://rbi//lib/rbi/model.rb#914 +# source://rbi//lib/rbi/model.rb#916 class RBI::Visibility < ::RBI::NodeWithComments abstract! - # source://rbi//lib/rbi/model.rb#924 + # source://rbi//lib/rbi/model.rb#926 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#930 + # source://rbi//lib/rbi/model.rb#932 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#945 + # source://rbi//lib/rbi/model.rb#947 sig { returns(T::Boolean) } def private?; end - # source://rbi//lib/rbi/model.rb#940 + # source://rbi//lib/rbi/model.rb#942 sig { returns(T::Boolean) } def protected?; end - # source://rbi//lib/rbi/model.rb#935 + # source://rbi//lib/rbi/model.rb#937 sig { returns(T::Boolean) } def public?; end - # source://rbi//lib/rbi/model.rb#921 + # source://rbi//lib/rbi/model.rb#923 sig { returns(::Symbol) } def visibility; end end @@ -3047,14 +3129,6 @@ class RBI::VisibilityGroup < ::RBI::Tree 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 @@ -3062,17 +3136,192 @@ end # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://rbi//lib/rbi/visitor.rb#5 +# source://rbi//lib/rbi/visitor.rb#7 class RBI::Visitor abstract! - # @abstract - # - # source://rbi//lib/rbi/visitor.rb#12 - sig { abstract.params(node: T.nilable(::RBI::Node)).void } + # source://rbi//lib/rbi/visitor.rb#14 + sig { params(node: T.nilable(::RBI::Node)).void } def visit(node); end - # source://rbi//lib/rbi/visitor.rb#15 + # source://rbi//lib/rbi/visitor.rb#108 sig { params(nodes: T::Array[::RBI::Node]).void } def visit_all(nodes); end + + # source://rbi//lib/rbi/visitor.rb#113 + sig { params(file: ::RBI::File).void } + def visit_file(file); end + + private + + # source://rbi//lib/rbi/visitor.rb#195 + sig { params(node: ::RBI::Arg).void } + def visit_arg(node); end + + # source://rbi//lib/rbi/visitor.rb#144 + sig { params(node: ::RBI::AttrAccessor).void } + def visit_attr_accessor(node); end + + # source://rbi//lib/rbi/visitor.rb#147 + sig { params(node: ::RBI::AttrReader).void } + def visit_attr_reader(node); end + + # source://rbi//lib/rbi/visitor.rb#150 + sig { params(node: ::RBI::AttrWriter).void } + def visit_attr_writer(node); end + + # source://rbi//lib/rbi/visitor.rb#123 + sig { params(node: ::RBI::BlankLine).void } + def visit_blank_line(node); end + + # source://rbi//lib/rbi/visitor.rb#174 + sig { params(node: ::RBI::BlockParam).void } + def visit_block_param(node); end + + # source://rbi//lib/rbi/visitor.rb#129 + sig { params(node: ::RBI::Class).void } + def visit_class(node); end + + # source://rbi//lib/rbi/visitor.rb#120 + sig { params(node: ::RBI::Comment).void } + def visit_comment(node); end + + # source://rbi//lib/rbi/visitor.rb#240 + sig { params(node: ::RBI::ConflictTree).void } + def visit_conflict_tree(node); end + + # source://rbi//lib/rbi/visitor.rb#141 + sig { params(node: ::RBI::Const).void } + def visit_const(node); end + + # source://rbi//lib/rbi/visitor.rb#180 + sig { params(node: ::RBI::Extend).void } + def visit_extend(node); end + + # source://rbi//lib/rbi/visitor.rb#234 + sig { params(node: ::RBI::Group).void } + def visit_group(node); end + + # source://rbi//lib/rbi/visitor.rb#222 + sig { params(node: ::RBI::Helper).void } + def visit_helper(node); end + + # source://rbi//lib/rbi/visitor.rb#177 + sig { params(node: ::RBI::Include).void } + def visit_include(node); end + + # source://rbi//lib/rbi/visitor.rb#198 + sig { params(node: ::RBI::KwArg).void } + def visit_kw_arg(node); end + + # source://rbi//lib/rbi/visitor.rb#168 + sig { params(node: ::RBI::KwOptParam).void } + def visit_kw_opt_param(node); end + + # source://rbi//lib/rbi/visitor.rb#165 + sig { params(node: ::RBI::KwParam).void } + def visit_kw_param(node); end + + # source://rbi//lib/rbi/visitor.rb#171 + sig { params(node: ::RBI::KwRestParam).void } + def visit_kw_rest_param(node); end + + # source://rbi//lib/rbi/visitor.rb#153 + sig { params(node: ::RBI::Method).void } + def visit_method(node); end + + # source://rbi//lib/rbi/visitor.rb#228 + sig { params(node: ::RBI::MixesInClassMethods).void } + def visit_mixes_in_class_methods(node); end + + # source://rbi//lib/rbi/visitor.rb#126 + sig { params(node: ::RBI::Module).void } + def visit_module(node); end + + # source://rbi//lib/rbi/visitor.rb#159 + sig { params(node: ::RBI::OptParam).void } + def visit_opt_param(node); end + + # source://rbi//lib/rbi/visitor.rb#189 + sig { params(node: ::RBI::Private).void } + def visit_private(node); end + + # source://rbi//lib/rbi/visitor.rb#186 + sig { params(node: ::RBI::Protected).void } + def visit_protected(node); end + + # source://rbi//lib/rbi/visitor.rb#183 + sig { params(node: ::RBI::Public).void } + def visit_public(node); end + + # source://rbi//lib/rbi/visitor.rb#156 + sig { params(node: ::RBI::ReqParam).void } + def visit_req_param(node); end + + # source://rbi//lib/rbi/visitor.rb#231 + sig { params(node: ::RBI::RequiresAncestor).void } + def visit_requires_ancestor(node); end + + # source://rbi//lib/rbi/visitor.rb#162 + sig { params(node: ::RBI::RestParam).void } + def visit_rest_param(node); end + + # source://rbi//lib/rbi/visitor.rb#243 + sig { params(node: ::RBI::ScopeConflict).void } + def visit_scope_conflict(node); end + + # source://rbi//lib/rbi/visitor.rb#192 + sig { params(node: ::RBI::Send).void } + def visit_send(node); end + + # source://rbi//lib/rbi/visitor.rb#201 + sig { params(node: ::RBI::Sig).void } + def visit_sig(node); end + + # source://rbi//lib/rbi/visitor.rb#204 + sig { params(node: ::RBI::SigParam).void } + def visit_sig_param(node); end + + # source://rbi//lib/rbi/visitor.rb#132 + sig { params(node: ::RBI::SingletonClass).void } + def visit_singleton_class(node); end + + # source://rbi//lib/rbi/visitor.rb#135 + sig { params(node: ::RBI::Struct).void } + def visit_struct(node); end + + # source://rbi//lib/rbi/visitor.rb#216 + sig { params(node: ::RBI::TEnum).void } + def visit_tenum(node); end + + # source://rbi//lib/rbi/visitor.rb#219 + sig { params(node: ::RBI::TEnumBlock).void } + def visit_tenum_block(node); end + + # source://rbi//lib/rbi/visitor.rb#138 + sig { params(node: ::RBI::Tree).void } + def visit_tree(node); end + + # source://rbi//lib/rbi/visitor.rb#207 + sig { params(node: ::RBI::TStruct).void } + def visit_tstruct(node); end + + # source://rbi//lib/rbi/visitor.rb#210 + sig { params(node: ::RBI::TStructConst).void } + def visit_tstruct_const(node); end + + # source://rbi//lib/rbi/visitor.rb#213 + sig { params(node: ::RBI::TStructProp).void } + def visit_tstruct_prop(node); end + + # source://rbi//lib/rbi/visitor.rb#225 + sig { params(node: ::RBI::TypeMember).void } + def visit_type_member(node); end + + # source://rbi//lib/rbi/visitor.rb#237 + sig { params(node: ::RBI::VisibilityGroup).void } + def visit_visibility_group(node); end end + +# source://rbi//lib/rbi/visitor.rb#5 +class RBI::VisitorError < ::RBI::Error; end diff --git a/sorbet/rbi/gems/rexml@3.3.1.rbi b/sorbet/rbi/gems/rexml@3.3.4.rbi similarity index 98% rename from sorbet/rbi/gems/rexml@3.3.1.rbi rename to sorbet/rbi/gems/rexml@3.3.4.rbi index 940a06b..2a8a8ed 100644 --- a/sorbet/rbi/gems/rexml@3.3.1.rbi +++ b/sorbet/rbi/gems/rexml@3.3.4.rbi @@ -3465,36 +3465,32 @@ class REXML::IOSource < ::REXML::Source # @return the current line in the source # - # source://rexml//lib/rexml/source.rb#264 + # source://rexml//lib/rexml/source.rb#274 def current_line; end # @return [Boolean] # - # source://rexml//lib/rexml/source.rb#259 + # source://rexml//lib/rexml/source.rb#269 def empty?; end - # source://rexml//lib/rexml/source.rb#236 + # source://rexml//lib/rexml/source.rb#246 def ensure_buffer; end - # Note: When specifying a string for 'pattern', it must not include '>' except in the following formats: - # - ">" - # - "XXX>" (X is any string excluding '>') - # - # source://rexml//lib/rexml/source.rb#243 + # source://rexml//lib/rexml/source.rb#250 def match(pattern, cons = T.unsafe(nil)); end # source://rexml//lib/rexml/source.rb#207 - def read(term = T.unsafe(nil)); end + def read(term = T.unsafe(nil), min_bytes = T.unsafe(nil)); end - # source://rexml//lib/rexml/source.rb#218 + # source://rexml//lib/rexml/source.rb#228 def read_until(term); end private - # source://rexml//lib/rexml/source.rb#306 + # source://rexml//lib/rexml/source.rb#316 def encoding_updated; end - # source://rexml//lib/rexml/source.rb#286 + # source://rexml//lib/rexml/source.rb#296 def readline(term = T.unsafe(nil)); end end @@ -3887,36 +3883,41 @@ end # # Nat Price gave me some good ideas for the API. # -# source://rexml//lib/rexml/parsers/baseparser.rb#40 +# source://rexml//lib/rexml/parsers/baseparser.rb#41 class REXML::Parsers::BaseParser # @return [BaseParser] a new instance of BaseParser # # source://rexml//lib/rexml/parsers/baseparser.rb#145 def initialize(source); end - # source://rexml//lib/rexml/parsers/baseparser.rb#151 + # source://rexml//lib/rexml/parsers/baseparser.rb#152 def add_listener(listener); end # Returns true if there are no more events # # @return [Boolean] # - # source://rexml//lib/rexml/parsers/baseparser.rb#177 + # source://rexml//lib/rexml/parsers/baseparser.rb#180 def empty?; end - # source://rexml//lib/rexml/parsers/baseparser.rb#486 + # source://rexml//lib/rexml/parsers/baseparser.rb#507 def entity(reference, entities); end + # Returns the value of attribute entity_expansion_count. + # + # source://rexml//lib/rexml/parsers/baseparser.rb#157 + def entity_expansion_count; end + # Returns true if there are more events. Synonymous with !empty? # # @return [Boolean] # - # source://rexml//lib/rexml/parsers/baseparser.rb#182 + # source://rexml//lib/rexml/parsers/baseparser.rb#185 def has_next?; end # Escapes all possible entities # - # source://rexml//lib/rexml/parsers/baseparser.rb#497 + # source://rexml//lib/rexml/parsers/baseparser.rb#520 def normalize(input, entities = T.unsafe(nil), entity_filter = T.unsafe(nil)); end # Peek at the +depth+ event in the stack. The first element on the stack @@ -3926,72 +3927,75 @@ class REXML::Parsers::BaseParser # event, so you can effectively pre-parse the entire document (pull the # entire thing into memory) using this method. # - # source://rexml//lib/rexml/parsers/baseparser.rb#198 + # source://rexml//lib/rexml/parsers/baseparser.rb#201 def peek(depth = T.unsafe(nil)); end - # source://rexml//lib/rexml/parsers/baseparser.rb#167 + # source://rexml//lib/rexml/parsers/baseparser.rb#170 def position; end # Returns the next event. This is a +PullEvent+ object. # - # source://rexml//lib/rexml/parsers/baseparser.rb#213 + # source://rexml//lib/rexml/parsers/baseparser.rb#216 def pull; end # Returns the value of attribute source. # - # source://rexml//lib/rexml/parsers/baseparser.rb#155 + # source://rexml//lib/rexml/parsers/baseparser.rb#156 def source; end - # source://rexml//lib/rexml/parsers/baseparser.rb#157 + # source://rexml//lib/rexml/parsers/baseparser.rb#159 def stream=(source); end # Unescapes all possible entities # - # source://rexml//lib/rexml/parsers/baseparser.rb#513 + # source://rexml//lib/rexml/parsers/baseparser.rb#536 def unnormalize(string, entities = T.unsafe(nil), filter = T.unsafe(nil)); end # Push an event back on the head of the stream. This method # has (theoretically) infinite depth. # - # source://rexml//lib/rexml/parsers/baseparser.rb#188 + # source://rexml//lib/rexml/parsers/baseparser.rb#191 def unshift(token); end private # @return [Boolean] # - # source://rexml//lib/rexml/parsers/baseparser.rb#542 + # source://rexml//lib/rexml/parsers/baseparser.rb#582 def need_source_encoding_update?(xml_declaration_encoding); end - # source://rexml//lib/rexml/parsers/baseparser.rb#653 + # source://rexml//lib/rexml/parsers/baseparser.rb#702 def parse_attributes(prefixes, curr_ns); end - # source://rexml//lib/rexml/parsers/baseparser.rb#561 + # source://rexml//lib/rexml/parsers/baseparser.rb#601 def parse_id(base_error_message, accept_external_id:, accept_public_id:); end - # source://rexml//lib/rexml/parsers/baseparser.rb#589 + # source://rexml//lib/rexml/parsers/baseparser.rb#629 def parse_id_invalid_details(accept_external_id:, accept_public_id:); end - # source://rexml//lib/rexml/parsers/baseparser.rb#548 + # source://rexml//lib/rexml/parsers/baseparser.rb#588 def parse_name(base_error_message); end - # source://rexml//lib/rexml/parsers/baseparser.rb#627 - def process_instruction(start_position); end + # source://rexml//lib/rexml/parsers/baseparser.rb#667 + def process_instruction; end - # source://rexml//lib/rexml/parsers/baseparser.rb#223 + # source://rexml//lib/rexml/parsers/baseparser.rb#226 def pull_event; end + + # source://rexml//lib/rexml/parsers/baseparser.rb#575 + def record_entity_expansion; end end -# source://rexml//lib/rexml/parsers/baseparser.rb#113 +# source://rexml//lib/rexml/parsers/baseparser.rb#114 REXML::Parsers::BaseParser::EXTERNAL_ID_PUBLIC = T.let(T.unsafe(nil), Regexp) -# source://rexml//lib/rexml/parsers/baseparser.rb#114 +# source://rexml//lib/rexml/parsers/baseparser.rb#115 REXML::Parsers::BaseParser::EXTERNAL_ID_SYSTEM = T.let(T.unsafe(nil), Regexp) -# source://rexml//lib/rexml/parsers/baseparser.rb#115 +# source://rexml//lib/rexml/parsers/baseparser.rb#116 REXML::Parsers::BaseParser::PUBLIC_ID = T.let(T.unsafe(nil), Regexp) -# source://rexml//lib/rexml/parsers/baseparser.rb#126 +# source://rexml//lib/rexml/parsers/baseparser.rb#127 module REXML::Parsers::BaseParser::Private; end # source://rexml//lib/rexml/parsers/baseparser.rb#130 @@ -4015,9 +4019,6 @@ REXML::Parsers::BaseParser::Private::ENTITYDECL_PATTERN = T.let(T.unsafe(nil), R # source://rexml//lib/rexml/parsers/baseparser.rb#132 REXML::Parsers::BaseParser::Private::GEDECL_PATTERN = T.let(T.unsafe(nil), String) -# source://rexml//lib/rexml/parsers/baseparser.rb#127 -REXML::Parsers::BaseParser::Private::INSTRUCTION_END = T.let(T.unsafe(nil), Regexp) - # source://rexml//lib/rexml/parsers/baseparser.rb#131 REXML::Parsers::BaseParser::Private::NAME_PATTERN = T.let(T.unsafe(nil), Regexp) @@ -4027,10 +4028,10 @@ REXML::Parsers::BaseParser::Private::PEDECL_PATTERN = T.let(T.unsafe(nil), Strin # source://rexml//lib/rexml/parsers/baseparser.rb#128 REXML::Parsers::BaseParser::Private::TAG_PATTERN = T.let(T.unsafe(nil), Regexp) -# source://rexml//lib/rexml/parsers/baseparser.rb#49 +# source://rexml//lib/rexml/parsers/baseparser.rb#50 REXML::Parsers::BaseParser::QNAME = T.let(T.unsafe(nil), Regexp) -# source://rexml//lib/rexml/parsers/baseparser.rb#48 +# source://rexml//lib/rexml/parsers/baseparser.rb#49 REXML::Parsers::BaseParser::QNAME_STR = T.let(T.unsafe(nil), String) # source://rexml//lib/rexml/parsers/streamparser.rb#6 @@ -4366,33 +4367,33 @@ class REXML::Text < ::REXML::Child # +returns+ the text itself to enable method chain like # 'text << "XXX" << "YYY"'. # - # source://rexml//lib/rexml/text.rb#194 + # source://rexml//lib/rexml/text.rb#214 def <<(to_append); end # +other+ a String or a Text # +returns+ the result of (to_s <=> arg.to_s) # - # source://rexml//lib/rexml/text.rb#203 + # source://rexml//lib/rexml/text.rb#223 def <=>(other); end - # source://rexml//lib/rexml/text.rb#184 + # source://rexml//lib/rexml/text.rb#204 def clone; end - # source://rexml//lib/rexml/text.rb#207 + # source://rexml//lib/rexml/text.rb#227 def doctype; end # @return [Boolean] # - # source://rexml//lib/rexml/text.rb#179 + # source://rexml//lib/rexml/text.rb#199 def empty?; end - # source://rexml//lib/rexml/text.rb#278 + # source://rexml//lib/rexml/text.rb#298 def indent_text(string, level = T.unsafe(nil), style = T.unsafe(nil), indentfirstline = T.unsafe(nil)); end - # source://rexml//lib/rexml/text.rb#233 + # source://rexml//lib/rexml/text.rb#253 def inspect; end - # source://rexml//lib/rexml/text.rb#175 + # source://rexml//lib/rexml/text.rb#195 def node_type; end # source://rexml//lib/rexml/text.rb#125 @@ -4422,7 +4423,7 @@ class REXML::Text < ::REXML::Child # u = Text.new( "sean russell", false, nil, true ) # u.to_s #-> "sean russell" # - # source://rexml//lib/rexml/text.rb#228 + # source://rexml//lib/rexml/text.rb#248 def to_s; end # Returns the string value of this text. This is the text without @@ -4439,7 +4440,7 @@ class REXML::Text < ::REXML::Child # u = Text.new( "sean russell", false, nil, true ) # u.value #-> "sean russell" # - # source://rexml//lib/rexml/text.rb#250 + # source://rexml//lib/rexml/text.rb#270 def value; end # Sets the contents of this text node. This expects the text to be @@ -4450,16 +4451,16 @@ class REXML::Text < ::REXML::Child # e[0].value = "bar" # bar # e[0].value = "" # <a> # - # source://rexml//lib/rexml/text.rb#261 + # source://rexml//lib/rexml/text.rb#281 def value=(val); end - # source://rexml//lib/rexml/text.rb#267 + # source://rexml//lib/rexml/text.rb#287 def wrap(string, width, addnewline = T.unsafe(nil)); end # == DEPRECATED # See REXML::Formatters # - # source://rexml//lib/rexml/text.rb#293 + # source://rexml//lib/rexml/text.rb#313 def write(writer, indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end # Writes out text, substituting special characters beforehand. @@ -4477,18 +4478,18 @@ class REXML::Text < ::REXML::Child # } # puts ascOut # - # source://rexml//lib/rexml/text.rb#325 + # source://rexml//lib/rexml/text.rb#345 def write_with_substitution(out, input); end # FIXME # This probably won't work properly # - # source://rexml//lib/rexml/text.rb#305 + # source://rexml//lib/rexml/text.rb#325 def xpath; end private - # source://rexml//lib/rexml/text.rb#338 + # source://rexml//lib/rexml/text.rb#358 def clear_cache; end class << self @@ -4497,22 +4498,22 @@ class REXML::Text < ::REXML::Child # source://rexml//lib/rexml/text.rb#131 def check(string, pattern, doctype); end - # source://rexml//lib/rexml/text.rb#407 + # source://rexml//lib/rexml/text.rb#427 def expand(ref, doctype, filter); end # Escapes all possible entities # - # source://rexml//lib/rexml/text.rb#370 + # source://rexml//lib/rexml/text.rb#390 def normalize(input, doctype = T.unsafe(nil), entity_filter = T.unsafe(nil)); end # Reads text, substituting entities # - # source://rexml//lib/rexml/text.rb#344 + # source://rexml//lib/rexml/text.rb#364 def read_with_substitution(input, illegal = T.unsafe(nil)); end # Unescapes all possible entities # - # source://rexml//lib/rexml/text.rb#394 + # source://rexml//lib/rexml/text.rb#414 def unnormalize(string, doctype = T.unsafe(nil), filter = T.unsafe(nil), illegal = T.unsafe(nil)); end end end diff --git a/sorbet/rbi/gems/rubocop-ast@1.31.3.rbi b/sorbet/rbi/gems/rubocop-ast@1.32.0.rbi similarity index 92% rename from sorbet/rbi/gems/rubocop-ast@1.31.3.rbi rename to sorbet/rbi/gems/rubocop-ast@1.32.0.rbi index 4e38413..880a0af 100644 --- a/sorbet/rbi/gems/rubocop-ast@1.31.3.rbi +++ b/sorbet/rbi/gems/rubocop-ast@1.32.0.rbi @@ -160,12 +160,16 @@ class RuboCop::AST::ArrayNode < ::RuboCop::AST::Node # # @return [Boolean] whether the array is enclosed in percent or square # - # source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#60 + # source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#64 def bracketed?; end - # @deprecated Use `values.each` (a.k.a. `children.each`) + # Calls the given block for each `value` node in the `array` literal. + # If no block is given, an `Enumerator` is returned. + # + # @return [self] if a block is given + # @return [Enumerator] if no block is given # - # source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#21 + # source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#25 def each_value(&block); end # Checks whether the `array` literal is delimited by percent brackets. @@ -174,14 +178,14 @@ class RuboCop::AST::ArrayNode < ::RuboCop::AST::Node # @overload percent_literal? # @return [Boolean] whether the array is enclosed in percent brackets # - # source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#47 + # source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#51 def percent_literal?(type = T.unsafe(nil)); end # Checks whether the `array` literal is delimited by square brackets. # # @return [Boolean] whether the array is enclosed in square brackets # - # source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#32 + # source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#36 def square_brackets?; end # Returns an array of all value nodes in the `array` literal. @@ -217,7 +221,7 @@ class RuboCop::AST::AsgnNode < ::RuboCop::AST::Node end # Common functionality for primitive literal nodes: `sym`, `str`, -# `int`, `float`, ... +# `int`, `float`, `rational`... # # source://rubocop-ast//lib/rubocop/ast/node/mixin/basic_literal_node.rb#7 module RuboCop::AST::BasicLiteralNode @@ -439,18 +443,18 @@ class RuboCop::AST::Builder < ::Parser::Builders::Default # # @return [Node] the generated node # - # source://rubocop-ast//lib/rubocop/ast/builder.rb#98 + # source://rubocop-ast//lib/rubocop/ast/builder.rb#99 def n(type, children, source_map); end # TODO: Figure out what to do about literal encoding handling... # More details here https://github.com/whitequark/parser/issues/283 # - # source://rubocop-ast//lib/rubocop/ast/builder.rb#104 + # source://rubocop-ast//lib/rubocop/ast/builder.rb#105 def string_value(token); end private - # source://rubocop-ast//lib/rubocop/ast/builder.rb#110 + # source://rubocop-ast//lib/rubocop/ast/builder.rb#111 def node_klass(type); end end @@ -698,6 +702,12 @@ module RuboCop::AST::CollectionNode # source://forwardable/1.3.3/forwardable.rb#231 def compact!(*args, **_arg1, &block); end + # source://forwardable/1.3.3/forwardable.rb#231 + def compact_blank(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def compact_blank!(*args, **_arg1, &block); end + # source://forwardable/1.3.3/forwardable.rb#231 def concat(*args, **_arg1, &block); end @@ -761,9 +771,24 @@ module RuboCop::AST::CollectionNode # source://forwardable/1.3.3/forwardable.rb#231 def entries(*args, **_arg1, &block); end + # source://forwardable/1.3.3/forwardable.rb#231 + def exclude?(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def excluding(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def extract!(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def extract_options!(*args, **_arg1, &block); end + # source://forwardable/1.3.3/forwardable.rb#231 def fetch(*args, **_arg1, &block); end + # source://forwardable/1.3.3/forwardable.rb#231 + def fifth(*args, **_arg1, &block); end + # source://forwardable/1.3.3/forwardable.rb#231 def fill(*args, **_arg1, &block); end @@ -797,6 +822,15 @@ module RuboCop::AST::CollectionNode # source://forwardable/1.3.3/forwardable.rb#231 def flatten!(*args, **_arg1, &block); end + # source://forwardable/1.3.3/forwardable.rb#231 + def forty_two(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def fourth(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def from(*args, **_arg1, &block); end + # source://forwardable/1.3.3/forwardable.rb#231 def grep(*args, **_arg1, &block); end @@ -806,15 +840,36 @@ module RuboCop::AST::CollectionNode # source://forwardable/1.3.3/forwardable.rb#231 def group_by(*args, **_arg1, &block); end + # source://forwardable/1.3.3/forwardable.rb#231 + def in_groups(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def in_groups_of(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def in_order_of(*args, **_arg1, &block); end + # source://forwardable/1.3.3/forwardable.rb#231 def include?(*args, **_arg1, &block); end + # source://forwardable/1.3.3/forwardable.rb#231 + def including(*args, **_arg1, &block); end + # source://forwardable/1.3.3/forwardable.rb#231 def index(*args, **_arg1, &block); end + # source://forwardable/1.3.3/forwardable.rb#231 + def index_by(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def index_with(*args, **_arg1, &block); end + # source://forwardable/1.3.3/forwardable.rb#231 def inject(*args, **_arg1, &block); end + # source://forwardable/1.3.3/forwardable.rb#231 + def inquiry(*args, **_arg1, &block); end + # source://forwardable/1.3.3/forwardable.rb#231 def insert(*args, **_arg1, &block); end @@ -839,6 +894,9 @@ module RuboCop::AST::CollectionNode # source://forwardable/1.3.3/forwardable.rb#231 def length(*args, **_arg1, &block); end + # source://forwardable/1.3.3/forwardable.rb#231 + def many?(*args, **_arg1, &block); end + # source://forwardable/1.3.3/forwardable.rb#231 def map(*args, **_arg1, &block); end @@ -851,6 +909,9 @@ module RuboCop::AST::CollectionNode # source://forwardable/1.3.3/forwardable.rb#231 def max_by(*args, **_arg1, &block); end + # source://forwardable/1.3.3/forwardable.rb#231 + def maximum(*args, **_arg1, &block); end + # source://forwardable/1.3.3/forwardable.rb#231 def member?(*args, **_arg1, &block); end @@ -860,6 +921,9 @@ module RuboCop::AST::CollectionNode # source://forwardable/1.3.3/forwardable.rb#231 def min_by(*args, **_arg1, &block); end + # source://forwardable/1.3.3/forwardable.rb#231 + def minimum(*args, **_arg1, &block); end + # source://forwardable/1.3.3/forwardable.rb#231 def minmax(*args, **_arg1, &block); end @@ -881,9 +945,15 @@ module RuboCop::AST::CollectionNode # source://forwardable/1.3.3/forwardable.rb#231 def permutation(*args, **_arg1, &block); end + # source://forwardable/1.3.3/forwardable.rb#231 + def pick(*args, **_arg1, &block); end + # source://forwardable/1.3.3/forwardable.rb#231 def place(*args, **_arg1, &block); end + # source://forwardable/1.3.3/forwardable.rb#231 + def pluck(*args, **_arg1, &block); end + # source://forwardable/1.3.3/forwardable.rb#231 def pop(*args, **_arg1, &block); end @@ -938,6 +1008,12 @@ module RuboCop::AST::CollectionNode # source://forwardable/1.3.3/forwardable.rb#231 def sample(*args, **_arg1, &block); end + # source://forwardable/1.3.3/forwardable.rb#231 + def second(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def second_to_last(*args, **_arg1, &block); end + # source://forwardable/1.3.3/forwardable.rb#231 def select(*args, **_arg1, &block); end @@ -974,6 +1050,9 @@ module RuboCop::AST::CollectionNode # source://forwardable/1.3.3/forwardable.rb#231 def slice_when(*args, **_arg1, &block); end + # source://forwardable/1.3.3/forwardable.rb#231 + def sole(*args, **_arg1, &block); end + # source://forwardable/1.3.3/forwardable.rb#231 def sort(*args, **_arg1, &block); end @@ -986,6 +1065,9 @@ module RuboCop::AST::CollectionNode # source://forwardable/1.3.3/forwardable.rb#231 def sort_by!(*args, **_arg1, &block); end + # source://forwardable/1.3.3/forwardable.rb#231 + def split(*args, **_arg1, &block); end + # source://forwardable/1.3.3/forwardable.rb#231 def sum(*args, **_arg1, &block); end @@ -998,15 +1080,39 @@ module RuboCop::AST::CollectionNode # source://forwardable/1.3.3/forwardable.rb#231 def tally(*args, **_arg1, &block); end + # source://forwardable/1.3.3/forwardable.rb#231 + def third(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def third_to_last(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def to(*args, **_arg1, &block); end + # source://forwardable/1.3.3/forwardable.rb#231 def to_ary(*args, **_arg1, &block); end + # source://forwardable/1.3.3/forwardable.rb#231 + def to_default_s(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def to_formatted_s(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def to_fs(*args, **_arg1, &block); end + # source://forwardable/1.3.3/forwardable.rb#231 def to_h(*args, **_arg1, &block); end + # source://forwardable/1.3.3/forwardable.rb#231 + def to_sentence(*args, **_arg1, &block); end + # source://forwardable/1.3.3/forwardable.rb#231 def to_set(*args, **_arg1, &block); end + # source://forwardable/1.3.3/forwardable.rb#231 + def to_xml(*args, **_arg1, &block); end + # source://forwardable/1.3.3/forwardable.rb#231 def transpose(*args, **_arg1, &block); end @@ -1025,6 +1131,9 @@ module RuboCop::AST::CollectionNode # source://forwardable/1.3.3/forwardable.rb#231 def values_at(*args, **_arg1, &block); end + # source://forwardable/1.3.3/forwardable.rb#231 + def without(*args, **_arg1, &block); end + # source://forwardable/1.3.3/forwardable.rb#231 def zip(*args, **_arg1, &block); end @@ -1338,11 +1447,6 @@ module RuboCop::AST::Ext::Range def line_span(exclude_end: T.unsafe(nil)); end end -# Refinement to circumvent broken `Range#minmax` for infinity ranges in 2.6- -# -# source://rubocop-ast//lib/rubocop/ast/ext/range_min_max.rb#7 -module RuboCop::AST::Ext::RangeMinMax; end - # A node extension for `float` nodes. This will be used in place of a plain # node when the builder constructs the AST, making its methods available to # all `float` nodes within RuboCop. @@ -2541,19 +2645,19 @@ class RuboCop::AST::Node < ::Parser::AST::Node # @return [Node] a new instance of Node # @see https://www.rubydoc.info/gems/ast/AST/Node:initialize # - # source://rubocop-ast//lib/rubocop/ast/node.rb#92 + # source://rubocop-ast//lib/rubocop/ast/node.rb#113 def initialize(type, children = T.unsafe(nil), properties = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def __ENCODING___type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def __FILE___type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def __LINE___type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def alias_type?; end # Returns an array of ancestor nodes. @@ -2561,173 +2665,173 @@ class RuboCop::AST::Node < ::Parser::AST::Node # # @return [Array] an array of ancestor nodes # - # source://rubocop-ast//lib/rubocop/ast/node.rb#247 + # source://rubocop-ast//lib/rubocop/ast/node.rb#268 def ancestors; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def and_asgn_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def and_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def arg_expr_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def arg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def args_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#464 + # source://rubocop-ast//lib/rubocop/ast/node.rb#474 def argument?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#468 + # source://rubocop-ast//lib/rubocop/ast/node.rb#478 def argument_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def array_pattern_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def array_pattern_with_tail_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def array_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#416 + # source://rubocop-ast//lib/rubocop/ast/node.rb#426 def assignment?; end # Some cops treat the shovel operator as a kind of assignment. # - # source://rubocop-ast//lib/rubocop/ast/node.rb#355 + # source://rubocop-ast//lib/rubocop/ast/node.rb#376 def assignment_or_similar?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def back_ref_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#420 + # source://rubocop-ast//lib/rubocop/ast/node.rb#430 def basic_conditional?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#363 + # source://rubocop-ast//lib/rubocop/ast/node.rb#384 def basic_literal?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def begin_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def block_pass_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def block_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def blockarg_expr_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def blockarg_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#472 + # source://rubocop-ast//lib/rubocop/ast/node.rb#482 def boolean_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def break_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#456 + # source://rubocop-ast//lib/rubocop/ast/node.rb#466 def call_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def case_match_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def case_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def casgn_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def cbase_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#460 + # source://rubocop-ast//lib/rubocop/ast/node.rb#470 def chained?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#512 + # source://rubocop-ast//lib/rubocop/ast/node.rb#522 def class_constructor?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#530 + # source://rubocop-ast//lib/rubocop/ast/node.rb#540 def class_definition?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def class_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#144 + # source://rubocop-ast//lib/rubocop/ast/node.rb#165 def complete!; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#149 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def complete?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def complex_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#424 + # source://rubocop-ast//lib/rubocop/ast/node.rb#434 def conditional?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#293 + # source://rubocop-ast//lib/rubocop/ast/node.rb#314 def const_name; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def const_pattern_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def const_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def csend_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def cvar_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def cvasgn_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def def_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#314 + # source://rubocop-ast//lib/rubocop/ast/node.rb#335 def defined_module; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#319 + # source://rubocop-ast//lib/rubocop/ast/node.rb#340 def defined_module_name; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def defined_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def defs_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def dstr_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def dsym_type?; end # Calls the given block for each ancestor node from parent to root. @@ -2740,163 +2844,163 @@ class RuboCop::AST::Node < ::Parser::AST::Node # @return [Enumerator] if no block is given # @yieldparam node [Node] each ancestor node # - # source://rubocop-ast//lib/rubocop/ast/node.rb#235 + # source://rubocop-ast//lib/rubocop/ast/node.rb#256 def each_ancestor(*types, &block); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def eflipflop_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def empty_else_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#349 + # source://rubocop-ast//lib/rubocop/ast/node.rb#370 def empty_source?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def ensure_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#408 + # source://rubocop-ast//lib/rubocop/ast/node.rb#418 def equals_asgn?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def erange_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def false_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#371 + # source://rubocop-ast//lib/rubocop/ast/node.rb#392 def falsey_literal?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def find_pattern_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#261 + # source://rubocop-ast//lib/rubocop/ast/node.rb#282 def first_line; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def float_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def for_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def forward_arg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def forward_args_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def forwarded_args_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def forwarded_kwrestarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def forwarded_restarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#509 + # source://rubocop-ast//lib/rubocop/ast/node.rb#519 def global_const?(param0 = T.unsafe(nil), param1); end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#484 + # source://rubocop-ast//lib/rubocop/ast/node.rb#494 def guard_clause?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def gvar_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def gvasgn_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def hash_pattern_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def hash_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def ident_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def if_guard_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def if_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def iflipflop_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#379 + # source://rubocop-ast//lib/rubocop/ast/node.rb#400 def immutable_literal?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def in_match_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def in_pattern_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def index_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def indexasgn_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def int_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def irange_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def ivar_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def ivasgn_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#437 + # source://rubocop-ast//lib/rubocop/ast/node.rb#447 def keyword?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def kwarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def kwargs_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def kwbegin_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def kwnilarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def kwoptarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def kwrestarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def kwsplat_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#503 + # source://rubocop-ast//lib/rubocop/ast/node.rb#513 def lambda?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#506 + # source://rubocop-ast//lib/rubocop/ast/node.rb#516 def lambda_or_proc?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def lambda_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#265 + # source://rubocop-ast//lib/rubocop/ast/node.rb#286 def last_line; end # Use is discouraged, this is a potentially slow method and can lead @@ -2904,7 +3008,7 @@ class RuboCop::AST::Node < ::Parser::AST::Node # # @return [Node, nil] the left (aka previous) sibling # - # source://rubocop-ast//lib/rubocop/ast/node.rb#187 + # source://rubocop-ast//lib/rubocop/ast/node.rb#208 def left_sibling; end # Use is discouraged, this is a potentially slow method and can lead @@ -2912,94 +3016,94 @@ class RuboCop::AST::Node < ::Parser::AST::Node # # @return [Array] the left (aka previous) siblings # - # source://rubocop-ast//lib/rubocop/ast/node.rb#197 + # source://rubocop-ast//lib/rubocop/ast/node.rb#218 def left_siblings; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#269 + # source://rubocop-ast//lib/rubocop/ast/node.rb#290 def line_count; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#359 + # source://rubocop-ast//lib/rubocop/ast/node.rb#380 def literal?; end # NOTE: `loop { }` is a normal method call and thus not a loop keyword. # # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#433 + # source://rubocop-ast//lib/rubocop/ast/node.rb#443 def loop_keyword?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def lvar_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def lvasgn_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def masgn_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def match_alt_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def match_as_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def match_current_line_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#491 + # source://rubocop-ast//lib/rubocop/ast/node.rb#501 def match_guard_clause?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def match_nil_pattern_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def match_pattern_p_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def match_pattern_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def match_rest_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def match_var_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def match_with_lvasgn_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def match_with_trailing_comma_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def mlhs_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#537 + # source://rubocop-ast//lib/rubocop/ast/node.rb#547 def module_definition?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def module_type?; end # Predicates # # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#341 + # source://rubocop-ast//lib/rubocop/ast/node.rb#362 def multiline?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#375 + # source://rubocop-ast//lib/rubocop/ast/node.rb#396 def mutable_literal?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#671 + # source://rubocop-ast//lib/rubocop/ast/node.rb#679 def new_class_or_module_block?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def next_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def nil_type?; end # Common destructuring method. This can be used to normalize @@ -3012,95 +3116,95 @@ class RuboCop::AST::Node < ::Parser::AST::Node # source://ast/2.4.2/lib/ast/node.rb#56 def node_parts; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#275 + # source://rubocop-ast//lib/rubocop/ast/node.rb#296 def nonempty_line_count; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def not_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def nth_ref_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def numargs_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def numblock_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#476 + # source://rubocop-ast//lib/rubocop/ast/node.rb#486 def numeric_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def objc_kwarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def objc_restarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def objc_varargs_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def op_asgn_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#448 + # source://rubocop-ast//lib/rubocop/ast/node.rb#458 def operator_keyword?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def optarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def or_asgn_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def or_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def pair_type?; end # Returns the parent node, or `nil` if the receiver is a root node. # # @return [Node, nil] the parent node or `nil` # - # source://rubocop-ast//lib/rubocop/ast/node.rb#126 + # source://rubocop-ast//lib/rubocop/ast/node.rb#147 def parent; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#135 + # source://rubocop-ast//lib/rubocop/ast/node.rb#156 def parent?; end # Searching the AST # - # source://rubocop-ast//lib/rubocop/ast/node.rb#325 + # source://rubocop-ast//lib/rubocop/ast/node.rb#346 def parent_module_name; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#452 + # source://rubocop-ast//lib/rubocop/ast/node.rb#462 def parenthesized_call?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def pin_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#428 + # source://rubocop-ast//lib/rubocop/ast/node.rb#438 def post_condition_loop?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def postexe_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def preexe_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#496 + # source://rubocop-ast//lib/rubocop/ast/node.rb#506 def proc?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def procarg0_type?; end # Some expressions are evaluated for their value, some for their side @@ -3113,56 +3217,60 @@ class RuboCop::AST::Node < ::Parser::AST::Node # # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#582 + # source://rubocop-ast//lib/rubocop/ast/node.rb#590 def pure?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#480 + # source://rubocop-ast//lib/rubocop/ast/node.rb#490 def range_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def rational_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#286 + # source://rubocop-ast//lib/rubocop/ast/node.rb#307 def receiver(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#386 + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#97 def recursive_basic_literal?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#386 + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#97 def recursive_literal?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def redo_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#404 + # source://rubocop-ast//lib/rubocop/ast/node.rb#414 def reference?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def regexp_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def regopt_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def resbody_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def rescue_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def restarg_expr_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def restarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def retry_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def return_type?; end # Use is discouraged, this is a potentially slow method and can lead @@ -3170,7 +3278,7 @@ class RuboCop::AST::Node < ::Parser::AST::Node # # @return [Node, nil] the right (aka next) sibling # - # source://rubocop-ast//lib/rubocop/ast/node.rb#178 + # source://rubocop-ast//lib/rubocop/ast/node.rb#199 def right_sibling; end # Use is discouraged, this is a potentially slow method and can lead @@ -3178,18 +3286,18 @@ class RuboCop::AST::Node < ::Parser::AST::Node # # @return [Array] the right (aka next) siblings # - # source://rubocop-ast//lib/rubocop/ast/node.rb#206 + # source://rubocop-ast//lib/rubocop/ast/node.rb#227 def right_siblings; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#140 + # source://rubocop-ast//lib/rubocop/ast/node.rb#161 def root?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def sclass_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def self_type?; end # Most nodes are of 'send' type, so this method is defined @@ -3197,15 +3305,15 @@ class RuboCop::AST::Node < ::Parser::AST::Node # # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#119 + # source://rubocop-ast//lib/rubocop/ast/node.rb#140 def send_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def shadowarg_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#412 + # source://rubocop-ast//lib/rubocop/ast/node.rb#422 def shorthand_asgn?; end # Returns the index of the receiver node in its siblings. (Sibling index @@ -3214,70 +3322,70 @@ class RuboCop::AST::Node < ::Parser::AST::Node # # @return [Integer, nil] the index of the receiver node in its siblings # - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 + # source://rubocop-ast//lib/rubocop/ast/node.rb#192 def sibling_index; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#345 + # source://rubocop-ast//lib/rubocop/ast/node.rb#366 def single_line?; end # NOTE: Some rare nodes may have no source, like `s(:args)` in `foo {}` # # @return [String, nil] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#253 + # source://rubocop-ast//lib/rubocop/ast/node.rb#274 def source; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#279 + # source://rubocop-ast//lib/rubocop/ast/node.rb#300 def source_length; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#257 + # source://rubocop-ast//lib/rubocop/ast/node.rb#278 def source_range; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#444 + # source://rubocop-ast//lib/rubocop/ast/node.rb#454 def special_keyword?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def splat_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#291 + # source://rubocop-ast//lib/rubocop/ast/node.rb#312 def str_content(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def str_type?; end # @deprecated Use `:class_constructor?` # - # source://rubocop-ast//lib/rubocop/ast/node.rb#525 + # source://rubocop-ast//lib/rubocop/ast/node.rb#535 def struct_constructor?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def super_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def sym_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def true_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#367 + # source://rubocop-ast//lib/rubocop/ast/node.rb#388 def truthy_literal?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def undef_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def unless_guard_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def until_post_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def until_type?; end # Override `AST::Node#updated` so that `AST::Processor` does not try to @@ -3286,7 +3394,7 @@ class RuboCop::AST::Node < ::Parser::AST::Node # identical subtrees. Rather, the entire AST must be copied any time any # part of it is changed. # - # source://rubocop-ast//lib/rubocop/ast/node.rb#160 + # source://rubocop-ast//lib/rubocop/ast/node.rb#181 def updated(type = T.unsafe(nil), children = T.unsafe(nil), properties = T.unsafe(nil)); end # Some expressions are evaluated for their value, some for their side @@ -3297,76 +3405,82 @@ class RuboCop::AST::Node < ::Parser::AST::Node # So, does the return value of this node matter? If we changed it to # `(...; nil)`, might that affect anything? # - # # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#551 + # source://rubocop-ast//lib/rubocop/ast/node.rb#560 def value_used?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#400 + # source://rubocop-ast//lib/rubocop/ast/node.rb#410 def variable?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def when_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def while_post_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def while_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def xstr_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def yield_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def zsuper_type?; end protected - # source://rubocop-ast//lib/rubocop/ast/node.rb#130 + # source://rubocop-ast//lib/rubocop/ast/node.rb#151 def parent=(node); end private # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#610 + # source://rubocop-ast//lib/rubocop/ast/node.rb#618 def begin_value_used?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#621 + # source://rubocop-ast//lib/rubocop/ast/node.rb#629 def case_if_value_used?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#305 + # source://rubocop-ast//lib/rubocop/ast/node.rb#326 def defined_module0(param0 = T.unsafe(nil)); end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#615 + # source://rubocop-ast//lib/rubocop/ast/node.rb#623 def for_value_used?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#657 + # source://rubocop-ast//lib/rubocop/ast/node.rb#665 def parent_module_name_for_block(ancestor); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#645 + # source://rubocop-ast//lib/rubocop/ast/node.rb#653 def parent_module_name_for_sclass(sclass_node); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#632 + # source://rubocop-ast//lib/rubocop/ast/node.rb#640 def parent_module_name_part(node); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#600 + # source://rubocop-ast//lib/rubocop/ast/node.rb#608 def visit_ancestors(types); end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#627 + # source://rubocop-ast//lib/rubocop/ast/node.rb#635 def while_until_value_used?; end + + class << self + private + + # source://rubocop-ast//lib/rubocop/ast/node.rb#92 + def def_recursive_literal_predicate(kind); end + end end # @api private @@ -3804,7 +3918,10 @@ class RuboCop::AST::NodePattern::Compiler::Binding # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/binding.rb#16 def bind(name); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/binding.rb#30 + # Yields for each branch of the given union, forbidding unification of + # bindings which only appear in a subset of the union. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/binding.rb#31 def union_bind(enum); end private @@ -4152,7 +4269,6 @@ end # Doc on how this fits in the compiling process: # /docs/modules/ROOT/pages/node_pattern.adoc # -# # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#17 class RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler < ::RuboCop::AST::NodePattern::Compiler::Subcompiler # Calls `compile_sequence`; the actual `compile` method @@ -4306,6 +4422,8 @@ class RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler < ::RuboCop::AST: def within_loop; end end +# Shift of 1 from standard Ruby indices +# # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#18 RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler::DELTA = T.let(T.unsafe(nil), Integer) @@ -4438,7 +4556,7 @@ class RuboCop::AST::NodePattern::LexerRex # The current location in the parse. # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#104 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#103 def location; end # The StringScanner for this lexer. @@ -4453,22 +4571,22 @@ class RuboCop::AST::NodePattern::LexerRex # Lex the next token. # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#113 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#112 def next_token; end # Parse the given string. # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#84 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#83 def parse(str); end # Read in and parse the file at +path+. # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#94 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#93 def parse_file(path); end # The current scanner class. Must be overridden in subclasses. # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#77 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#76 def scanner_class; end # The StringScanner for this lexer. @@ -4618,212 +4736,212 @@ class RuboCop::AST::NodePattern::Node < ::Parser::AST::Node # # @return [Integer, Range] An Integer for fixed length terms, otherwise a Range. # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#29 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#28 def arity; end # @return [Range] arity as a Range # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#69 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#68 def arity_range; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#23 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#22 def capture?; end # @return [Node] most nodes have only one child # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#48 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#47 def child; end # @return [Array] # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#43 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#42 def children_nodes; end # @return [Array, nil] replace node with result, or `nil` if no change requested. # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#34 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#33 def in_sequence_head; end # that matches within a Set (e.g. `42`, `:sym` but not `/regexp/`) # # @return [Boolean] returns true for nodes having a Ruby literal equivalent # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#64 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#63 def matches_within_set?; end # @return [Integer] nb of captures of that node and its descendants # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#53 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#52 def nb_captures; end # To be overridden by subclasses # # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#19 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#18 def rest?; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#78 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#77 def source_range; end # @return [Boolean] returns whether it matches a variable number of elements # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#58 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#57 def variadic?; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#74 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#73 def with(type: T.unsafe(nil), children: T.unsafe(nil), location: T.unsafe(nil)); end end # Node class for `` # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#180 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#179 class RuboCop::AST::NodePattern::Node::AnyOrder < ::RuboCop::AST::NodePattern::Node include ::RuboCop::AST::NodePattern::Node::ForbidInSeqHead - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#198 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#197 def arity; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#190 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#189 def ends_with_rest?; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#194 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#193 def rest_node; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#186 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#185 def term_nodes; end end -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#183 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#182 RuboCop::AST::NodePattern::Node::AnyOrder::ARITIES = T.let(T.unsafe(nil), Hash) # Node class for `$something` # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#97 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#96 class RuboCop::AST::NodePattern::Node::Capture < ::RuboCop::AST::NodePattern::Node # source://forwardable/1.3.3/forwardable.rb#231 def arity(*args, **_arg1, &block); end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#101 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#100 def capture?; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#109 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#108 def in_sequence_head; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#105 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#104 def nb_captures; end # source://forwardable/1.3.3/forwardable.rb#231 def rest?(*args, **_arg1, &block); end end -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#86 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#85 module RuboCop::AST::NodePattern::Node::ForbidInSeqHead # @raise [NodePattern::Invalid] # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#87 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#86 def in_sequence_head; end end -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#140 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#139 RuboCop::AST::NodePattern::Node::FunctionCall = RuboCop::AST::NodePattern::Node::Predicate -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#82 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#81 RuboCop::AST::NodePattern::Node::INT_TO_RANGE = T.let(T.unsafe(nil), Hash) # Registry # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#250 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#249 RuboCop::AST::NodePattern::Node::MAP = T.let(T.unsafe(nil), Hash) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#12 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#11 RuboCop::AST::NodePattern::Node::MATCHES_WITHIN_SET = T.let(T.unsafe(nil), Set) # Node class for `predicate?(:arg, :list)` # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#131 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#130 class RuboCop::AST::NodePattern::Node::Predicate < ::RuboCop::AST::NodePattern::Node - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#136 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#135 def arg_list; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#131 def method_name; end end # Node class for `int+` # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#143 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#142 class RuboCop::AST::NodePattern::Node::Repetition < ::RuboCop::AST::NodePattern::Node include ::RuboCop::AST::NodePattern::Node::ForbidInSeqHead - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#156 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#155 def arity; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#146 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#145 def operator; end end -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#150 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#149 RuboCop::AST::NodePattern::Node::Repetition::ARITIES = T.let(T.unsafe(nil), Hash) # Node class for `...` # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#162 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#161 class RuboCop::AST::NodePattern::Node::Rest < ::RuboCop::AST::NodePattern::Node - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#170 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#169 def arity; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#174 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#173 def in_sequence_head; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#166 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#165 def rest?; end end -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#163 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#162 RuboCop::AST::NodePattern::Node::Rest::ARITY = T.let(T.unsafe(nil), Range) # Node class for `(type first second ...)` # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#118 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#117 class RuboCop::AST::NodePattern::Node::Sequence < ::RuboCop::AST::NodePattern::Node include ::RuboCop::AST::NodePattern::Node::ForbidInSeqHead # @return [Sequence] a new instance of Sequence # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#121 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#120 def initialize(type, children = T.unsafe(nil), properties = T.unsafe(nil)); end end # A list (potentially empty) of nodes; part of a Union # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#206 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#205 class RuboCop::AST::NodePattern::Node::Subsequence < ::RuboCop::AST::NodePattern::Node include ::RuboCop::AST::NodePattern::Node::ForbidInSeqHead - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#209 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#208 def arity; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#214 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#213 def in_sequence_head; end end # Node class for `{ ... }` # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#224 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#223 class RuboCop::AST::NodePattern::Node::Union < ::RuboCop::AST::NodePattern::Node - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#225 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#224 def arity; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#232 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#231 def in_sequence_head; end end @@ -5483,7 +5601,7 @@ RuboCop::AST::NodePattern::Sets::SET_____2 = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#55 RuboCop::AST::NodePattern::VAR = T.let(T.unsafe(nil), String) -# Common functionality for primitive numeric nodes: `int`, `float`, ... +# Common functionality for primitive numeric nodes: `int`, `float`, `rational`... # # source://rubocop-ast//lib/rubocop/ast/node/mixin/numeric_node.rb#6 module RuboCop::AST::NumericNode @@ -5820,42 +5938,42 @@ end # and other information such as disabled lines for cops. # It also provides a convenient way to access source lines. # -# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#11 +# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#10 class RuboCop::AST::ProcessedSource # @return [ProcessedSource] a new instance of ProcessedSource # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#29 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#28 def initialize(source, ruby_version, path = T.unsafe(nil), parser_engine: T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#73 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#72 def [](*args); end # Returns the value of attribute ast. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#21 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20 def ast; end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#51 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#50 def ast_with_comments; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#112 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#111 def blank?; end # Returns the value of attribute buffer. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#21 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20 def buffer; end # Raw source checksum for tracking infinite loops. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#84 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#83 def checksum; end # @return [Comment, nil] the comment at that line, if any. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#117 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#116 def comment_at_line(line); end # Consider using `each_comment_in_lines` instead @@ -5863,181 +5981,181 @@ class RuboCop::AST::ProcessedSource # @deprecated use contains_comment? # @return [Boolean] if any of the lines in the given `source_range` has a comment. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#139 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#138 def commented?(source_range); end # Returns the value of attribute comments. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#21 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20 def comments; end # Should have been called `comments_before_or_at_line`. Doubtful it has of any valid use. # # @deprecated Use `each_comment_in_lines` # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#147 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#146 def comments_before_line(line); end # Consider using `each_comment_in_lines` instead # # @return [Boolean] if any of the lines in the given `source_range` has a comment. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#139 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#138 def contains_comment?(source_range); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#161 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#160 def current_line(token); end # Returns the value of attribute diagnostics. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#21 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20 def diagnostics; end # @deprecated Use `comments.each` # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#89 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#88 def each_comment(&block); end # Enumerates on the comments contained with the given `line_range` # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#127 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#126 def each_comment_in_lines(line_range); end # @deprecated Use `tokens.each` # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#99 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#98 def each_token(&block); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#108 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#107 def file_path; end # @deprecated Use `comment_at_line`, `each_comment_in_lines`, or `comments.find` # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#94 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#93 def find_comment(&block); end # @deprecated Use `tokens.find` # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#104 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#103 def find_token(&block); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#182 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#181 def first_token_of(range_or_node); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#165 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#164 def following_line(token); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#186 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#185 def last_token_of(range_or_node); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#169 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#168 def line_indentation(line_number); end # @return [Boolean] if the given line number has a comment. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#122 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#121 def line_with_comment?(line); end # Returns the source lines, line break characters removed, excluding a # possible __END__ and everything that comes after. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#59 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#58 def lines; end # Returns the value of attribute parser_engine. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#21 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20 def parser_engine; end # Returns the value of attribute parser_error. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#21 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20 def parser_error; end # Returns the value of attribute path. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#21 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20 def path; end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#157 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#156 def preceding_line(token); end # Returns the value of attribute raw_source. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#21 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20 def raw_source; end # Returns the value of attribute ruby_version. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#21 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20 def ruby_version; end # The tokens list is always sorted by token position, except for cases when heredoc # is passed as a method argument. In this case tokens are interleaved by # heredoc contents' tokens. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#193 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#192 def sorted_tokens; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#151 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#150 def start_with?(string); end # Returns the value of attribute tokens. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#21 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20 def tokens; end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#176 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#175 def tokens_within(range_or_node); end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#77 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#76 def valid_syntax?; end private - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#200 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#199 def comment_index; end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#312 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#309 def create_parser(ruby_version, parser_engine); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#328 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#325 def first_token_index(range_or_node); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#333 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#330 def last_token_index(range_or_node); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#206 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#205 def parse(source, ruby_version, parser_engine); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#240 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#238 def parser_class(ruby_version, parser_engine); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#338 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#335 def source_range(range_or_node); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#223 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#222 def tokenize(parser); end class << self - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#24 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#23 def from_file(path, ruby_version, parser_engine: T.unsafe(nil)); end end end -# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#15 +# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#14 RuboCop::AST::ProcessedSource::INVALID_LEVELS = T.let(T.unsafe(nil), Array) -# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#18 +# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#17 RuboCop::AST::ProcessedSource::PARSER_ENGINES = T.let(T.unsafe(nil), Array) # @api private # -# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#13 +# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#12 RuboCop::AST::ProcessedSource::STRING_SOURCE_NAME = T.let(T.unsafe(nil), String) # A node extension for `irange` and `erange` nodes. This will be used in @@ -6053,6 +6171,16 @@ class RuboCop::AST::RangeNode < ::RuboCop::AST::Node def end; end end +# A node extension for `rational` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available to +# all `rational` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/rational_node.rb#8 +class RuboCop::AST::RationalNode < ::RuboCop::AST::Node + include ::RuboCop::AST::BasicLiteralNode + include ::RuboCop::AST::NumericNode +end + # A node extension for `regexp` nodes. This will be used in place of a plain # node when the builder constructs the AST, making its methods available # to all `regexp` nodes within RuboCop. diff --git a/sorbet/rbi/gems/rubocop-minitest@0.35.1.rbi b/sorbet/rbi/gems/rubocop-minitest@0.35.1.rbi index 1b7cca9..2c46584 100644 --- a/sorbet/rbi/gems/rubocop-minitest@0.35.1.rbi +++ b/sorbet/rbi/gems/rubocop-minitest@0.35.1.rbi @@ -1271,7 +1271,7 @@ class RuboCop::Cop::Minitest::MultipleAssertions < ::RuboCop::Cop::Base include ::RuboCop::Cop::DefNode include ::RuboCop::Cop::MinitestExplorationHelpers - # source://rubocop/1.65.0/lib/rubocop/cop/exclude_limit.rb#11 + # source://rubocop/1.65.1/lib/rubocop/cop/exclude_limit.rb#11 def max=(value); end # source://rubocop-minitest//lib/rubocop/cop/minitest/multiple_assertions.rb#37 diff --git a/sorbet/rbi/gems/rubocop-performance@1.21.1.rbi b/sorbet/rbi/gems/rubocop-performance@1.21.1.rbi index 14ae299..b8a19bc 100644 --- a/sorbet/rbi/gems/rubocop-performance@1.21.1.rbi +++ b/sorbet/rbi/gems/rubocop-performance@1.21.1.rbi @@ -14,28 +14,28 @@ module RuboCop::Cop; end module RuboCop::Cop::Lint; end class RuboCop::Cop::Lint::UnusedMethodArgument < ::RuboCop::Cop::Base - # source://rubocop/1.65.0/lib/rubocop/cop/lint/unused_method_argument.rb#66 + # source://rubocop/1.65.1/lib/rubocop/cop/lint/unused_method_argument.rb#66 def not_implemented?(param0 = T.unsafe(nil)); end private - # source://rubocop/1.65.0/lib/rubocop/cop/lint/unused_method_argument.rb#81 + # source://rubocop/1.65.1/lib/rubocop/cop/lint/unused_method_argument.rb#81 def autocorrect(corrector, node); end - # source://rubocop/1.65.0/lib/rubocop/cop/lint/unused_method_argument.rb#85 + # source://rubocop/1.65.1/lib/rubocop/cop/lint/unused_method_argument.rb#85 def check_argument(variable); end - # source://rubocop/1.65.0/lib/rubocop/cop/lint/unused_method_argument.rb#93 + # source://rubocop/1.65.1/lib/rubocop/cop/lint/unused_method_argument.rb#93 def ignored_method?(body); end - # source://rubocop/1.65.0/lib/rubocop/cop/lint/unused_method_argument.rb#98 + # source://rubocop/1.65.1/lib/rubocop/cop/lint/unused_method_argument.rb#98 def message(variable); end class << self # source://rubocop-performance//lib/rubocop-performance.rb#15 def autocorrect_incompatible_with; end - # source://rubocop/1.65.0/lib/rubocop/cop/lint/unused_method_argument.rb#75 + # source://rubocop/1.65.1/lib/rubocop/cop/lint/unused_method_argument.rb#75 def joining_forces; end end end diff --git a/sorbet/rbi/gems/rubocop-sorbet@0.8.3.rbi b/sorbet/rbi/gems/rubocop-sorbet@0.8.5.rbi similarity index 93% rename from sorbet/rbi/gems/rubocop-sorbet@0.8.3.rbi rename to sorbet/rbi/gems/rubocop-sorbet@0.8.5.rbi index b8ffb62..4efc8f3 100644 --- a/sorbet/rbi/gems/rubocop-sorbet@0.8.3.rbi +++ b/sorbet/rbi/gems/rubocop-sorbet@0.8.5.rbi @@ -231,7 +231,7 @@ RuboCop::Cop::Sorbet::CallbackConditionalsBinding::RESTRICT_ON_SEND = T.let(T.un # sig { void } # # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb#19 -class RuboCop::Cop::Sorbet::CheckedTrueInSignature < ::RuboCop::Cop::Cop +class RuboCop::Cop::Sorbet::CheckedTrueInSignature < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::Sorbet::SignatureHelp @@ -322,10 +322,12 @@ end # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb#22 RuboCop::Cop::Sorbet::EmptyLineAfterSig::MSG = T.let(T.unsafe(nil), String) -# Checks that the Sorbet sigil comes as the first magic comment in the file. +# Checks that the Sorbet sigil comes as the first magic comment in the file, after the encoding comment if any. # # The expected order for magic comments is: (en)?coding, typed, warn_indent then frozen_string_literal. # +# The ordering is for consistency only, except for the encoding comment which must be first, if present. +# # For example, the following bad ordering: # # ```ruby @@ -341,42 +343,42 @@ RuboCop::Cop::Sorbet::EmptyLineAfterSig::MSG = T.let(T.unsafe(nil), String) # Only `(en)?coding`, `typed`, `warn_indent` and `frozen_string_literal` magic comments are considered, # other comments or magic comments are left in the same place. # -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#30 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#32 class RuboCop::Cop::Sorbet::EnforceSigilOrder < ::RuboCop::Cop::Sorbet::ValidSigil include ::RuboCop::Cop::RangeHelp - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#42 - def autocorrect(_node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#33 - def investigate(processed_source); end + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#35 + def on_new_investigation; end protected + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#93 + def autocorrect(corrector); end + # checks # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#92 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#70 def check_magic_comments_order(tokens); end # Get all the tokens in `processed_source` that match `MAGIC_REGEX` # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#84 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#62 def extract_magic_comments(processed_source); end end -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#68 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#46 RuboCop::Cop::Sorbet::EnforceSigilOrder::CODING_REGEX = T.let(T.unsafe(nil), Regexp) -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#70 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#48 RuboCop::Cop::Sorbet::EnforceSigilOrder::FROZEN_REGEX = T.let(T.unsafe(nil), Regexp) -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#69 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#47 RuboCop::Cop::Sorbet::EnforceSigilOrder::INDENT_REGEX = T.let(T.unsafe(nil), Regexp) -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#79 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#57 RuboCop::Cop::Sorbet::EnforceSigilOrder::MAGIC_REGEX = T.let(T.unsafe(nil), Regexp) -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#72 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#50 RuboCop::Cop::Sorbet::EnforceSigilOrder::PREFERRED_ORDER = T.let(T.unsafe(nil), Hash) # Checks that every method definition and attribute accessor has a Sorbet signature. @@ -400,87 +402,88 @@ RuboCop::Cop::Sorbet::EnforceSigilOrder::PREFERRED_ORDER = T.let(T.unsafe(nil), # * `ReturnTypePlaceholder`: placeholders used for return types (default: 'T.untyped') # # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#27 -class RuboCop::Cop::Sorbet::EnforceSignatures < ::RuboCop::Cop::Cop +class RuboCop::Cop::Sorbet::EnforceSignatures < ::RuboCop::Cop::Base include ::RuboCop::Cop::Sorbet::SignatureHelp + extend ::RuboCop::Cop::AutoCorrector # @return [EnforceSignatures] a new instance of EnforceSignatures # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#30 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#31 def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#36 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#37 def accessor?(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#56 - def autocorrect(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#40 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#41 def on_def(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#44 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#45 def on_defs(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#48 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#49 def on_send(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#52 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#53 def on_signature(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#75 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#57 def scope(node); end private - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#84 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#79 + def autocorrect(corrector, node); end + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#66 def check_node(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#95 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#96 def param_type_placeholder; end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#99 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#100 def return_type_placeholder; end end -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#103 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#104 class RuboCop::Cop::Sorbet::EnforceSignatures::SigSuggestion # @return [SigSuggestion] a new instance of SigSuggestion # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#106 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#107 def initialize(indent, param_placeholder, return_placeholder); end # Returns the value of attribute params. # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#104 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#105 def params; end # Sets the attribute params # # @param value the value to set the attribute params to. # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#104 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#105 def params=(_arg0); end # Returns the value of attribute returns. # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#104 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#105 def returns; end # Sets the attribute returns # # @param value the value to set the attribute returns to. # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#104 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#105 def returns=(_arg0); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#114 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#115 def to_autocorrect; end private - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#126 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#127 def generate_params; end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#138 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#139 def generate_return; end end @@ -504,15 +507,15 @@ end class RuboCop::Cop::Sorbet::EnforceSingleSigil < ::RuboCop::Cop::Sorbet::ValidSigil include ::RuboCop::Cop::RangeHelp - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_single_sigil.rb#40 - def autocorrect(_node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_single_sigil.rb#29 - def investigate(processed_source); end + def on_new_investigation; end protected - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_single_sigil.rb#56 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_single_sigil.rb#50 + def autocorrect(corrector); end + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_single_sigil.rb#44 def extract_all_sigils(processed_source); end end @@ -667,15 +670,15 @@ RuboCop::Cop::Sorbet::ForbidIncludeConstLiteral::RESTRICT_ON_SEND = T.let(T.unsa # # sorbet/rbi/any/path/for/file.rbi # # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/forbid_rbi_outside_of_allowed_paths.rb#23 -class RuboCop::Cop::Sorbet::ForbidRBIOutsideOfAllowedPaths < ::RuboCop::Cop::Cop +class RuboCop::Cop::Sorbet::ForbidRBIOutsideOfAllowedPaths < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/forbid_rbi_outside_of_allowed_paths.rb#26 - def investigate(processed_source); end + def on_new_investigation; end private - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/forbid_rbi_outside_of_allowed_paths.rb#58 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/forbid_rbi_outside_of_allowed_paths.rb#55 def allowed_paths; end end @@ -996,6 +999,25 @@ end # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb#26 RuboCop::Cop::Sorbet::ForbidUntypedStructProps::MSG = T.let(T.unsafe(nil), String) +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi_versioning/gem_version_annotation_helper.rb#6 +module RuboCop::Cop::Sorbet::GemVersionAnnotationHelper + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi_versioning/gem_version_annotation_helper.rb#9 + def gem_version_annotations; end + + private + + # @return [Boolean] + # + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi_versioning/gem_version_annotation_helper.rb#17 + def gem_version_annotation?(comment); end + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi_versioning/gem_version_annotation_helper.rb#21 + def gem_versions(comment); end +end + +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi_versioning/gem_version_annotation_helper.rb#7 +RuboCop::Cop::Sorbet::GemVersionAnnotationHelper::VERSION_PREFIX = T.let(T.unsafe(nil), String) + # Makes the Sorbet typed sigil mandatory in all files. # # Options: @@ -1009,7 +1031,7 @@ RuboCop::Cop::Sorbet::ForbidUntypedStructProps::MSG = T.let(T.unsafe(nil), Strin class RuboCop::Cop::Sorbet::HasSigil < ::RuboCop::Cop::Sorbet::ValidSigil # @return [Boolean] # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/has_sigil.rb#20 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/has_sigil.rb#18 def require_sigil_on_all_files?; end end @@ -1084,7 +1106,7 @@ RuboCop::Cop::Sorbet::ImplicitConversionMethod::RESTRICT_ON_SEND = T.let(T.unsaf # def foo(b:, a: 1); end # # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/keyword_argument_ordering.rb#20 -class RuboCop::Cop::Sorbet::KeywordArgumentOrdering < ::RuboCop::Cop::Cop +class RuboCop::Cop::Sorbet::KeywordArgumentOrdering < ::RuboCop::Cop::Base include ::RuboCop::Cop::Sorbet::SignatureHelp # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/keyword_argument_ordering.rb#23 @@ -1445,6 +1467,42 @@ end # source://rubocop-sorbet//lib/rubocop/cop/sorbet/type_alias_name.rb#18 RuboCop::Cop::Sorbet::TypeAliasName::MSG = T.let(T.unsafe(nil), String) +# Checks that gem versions in RBI annotations are properly formatted per the Bundler gem specification. +# +# @example +# # bad +# # @version > not a version number +# +# # good +# # @version = 1 +# +# # good +# # @version > 1.2.3 +# +# # good +# # @version <= 4.3-preview +# +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi_versioning/valid_gem_version_annotations.rb#21 +class RuboCop::Cop::Sorbet::ValidGemVersionAnnotations < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Sorbet::GemVersionAnnotationHelper + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi_versioning/valid_gem_version_annotations.rb#27 + def on_new_investigation; end + + private + + # @return [Boolean] + # + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi_versioning/valid_gem_version_annotations.rb#50 + def valid_version?(version_string); end +end + +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi_versioning/valid_gem_version_annotations.rb#24 +RuboCop::Cop::Sorbet::ValidGemVersionAnnotations::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi_versioning/valid_gem_version_annotations.rb#25 +RuboCop::Cop::Sorbet::ValidGemVersionAnnotations::VALID_OPERATORS = T.let(T.unsafe(nil), Array) + # Checks that every Ruby file contains a valid Sorbet sigil. # Adapted from: https://gist.github.com/clarkdave/85aca4e16f33fd52aceb6a0a29936e52 # @@ -1459,69 +1517,69 @@ RuboCop::Cop::Sorbet::TypeAliasName::MSG = T.let(T.unsafe(nil), String) # Otherwise, if a `MinimumStrictness` level is specified, it will be used in offense messages and autocorrect. # # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#20 -class RuboCop::Cop::Sorbet::ValidSigil < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#36 - def autocorrect(_node); end +class RuboCop::Cop::Sorbet::ValidSigil < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector - # So we can properly subclass this cop - # # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#23 - def investigate(processed_source); end + def on_new_investigation; end protected + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#150 + def autocorrect(corrector); end + # checks # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#71 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#55 def check_sigil_present(sigil); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#131 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#118 def check_strictness_level(sigil, strictness); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#109 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#94 def check_strictness_not_empty(sigil, strictness); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#120 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#106 def check_strictness_valid(sigil, strictness); end # Default is `nil` # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#181 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#184 def exact_strictness; end # extraction # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#59 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#43 def extract_sigil(processed_source); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#65 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#49 def extract_strictness(sigil); end # Default is `nil` # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#175 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#178 def minimum_strictness; end # Default is `false` # # @return [Boolean] # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#164 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#167 def require_sigil_on_all_files?; end # Default is `'false'` # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#169 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#172 def suggested_strictness; end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#87 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#72 def suggested_strictness_level; end end -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#55 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#39 RuboCop::Cop::Sorbet::ValidSigil::SIGIL_REGEX = T.let(T.unsafe(nil), Regexp) -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#54 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#38 RuboCop::Cop::Sorbet::ValidSigil::STRICTNESS_LEVELS = T.let(T.unsafe(nil), Array) # Disallows the usage of `.void.checked(:tests)`. diff --git a/sorbet/rbi/gems/rubocop@1.65.0.rbi b/sorbet/rbi/gems/rubocop@1.65.1.rbi similarity index 99% rename from sorbet/rbi/gems/rubocop@1.65.0.rbi rename to sorbet/rbi/gems/rubocop@1.65.1.rbi index 21b7562..8c93490 100644 --- a/sorbet/rbi/gems/rubocop@1.65.0.rbi +++ b/sorbet/rbi/gems/rubocop@1.65.1.rbi @@ -7497,7 +7497,7 @@ RuboCop::Cop::Layout::ArrayAlignment::FIXED_INDENT_MSG = T.let(T.unsafe(nil), St # right-hand-side of a multi-line assignment. # # The indentation of the remaining lines can be corrected with -# other cops such as `IndentationConsistency` and `EndAlignment`. +# other cops such as `Layout/IndentationConsistency` and `Layout/EndAlignment`. # # @example # # bad @@ -7512,7 +7512,7 @@ RuboCop::Cop::Layout::ArrayAlignment::FIXED_INDENT_MSG = T.let(T.unsafe(nil), St # 'bar' # end # -# source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#24 +# source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#25 class RuboCop::Cop::Layout::AssignmentIndentation < ::RuboCop::Cop::Base include ::RuboCop::Cop::CheckAssignment include ::RuboCop::Cop::Alignment @@ -7520,17 +7520,17 @@ class RuboCop::Cop::Layout::AssignmentIndentation < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#42 + # source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#43 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#33 + # source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#34 def check_assignment(node, rhs); end - # source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#46 + # source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#47 def leftmost_multiple_assignment(node); end end -# source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#29 +# source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#30 RuboCop::Cop::Layout::AssignmentIndentation::MSG = T.let(T.unsafe(nil), String) # Checks whether the end keyword of `begin` is aligned properly. @@ -8518,43 +8518,40 @@ RuboCop::Cop::Layout::CommentIndentation::MSG = T.let(T.unsafe(nil), String) # @example # # # bad -# # if # some_condition # do_something # end -# @example # # # good -# # if some_condition # do_something # end # -# source://rubocop//lib/rubocop/cop/layout/condition_position.rb#25 +# source://rubocop//lib/rubocop/cop/layout/condition_position.rb#21 class RuboCop::Cop::Layout::ConditionPosition < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#31 + # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#27 def on_if(node); end - # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#37 + # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#33 def on_until(node); end - # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#37 + # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#33 def on_while(node); end private - # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#44 + # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#40 def check(node); end - # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#58 + # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#54 def message(condition); end end -# source://rubocop//lib/rubocop/cop/layout/condition_position.rb#29 +# source://rubocop//lib/rubocop/cop/layout/condition_position.rb#25 RuboCop::Cop::Layout::ConditionPosition::MSG = T.let(T.unsafe(nil), String) # Checks whether the end keywords of method definitions are @@ -16677,7 +16674,6 @@ RuboCop::Cop::Lint::AmbiguousAssignment::SIMPLE_ASSIGNMENT_TYPES = T.let(T.unsaf # # # bad # some_method a { |val| puts val } -# @example # # # good # # With parentheses, there's no ambiguity. @@ -16710,38 +16706,38 @@ RuboCop::Cop::Lint::AmbiguousAssignment::SIMPLE_ASSIGNMENT_TYPES = T.let(T.unsaf # expect { do_something }.to change { object.attribute } # expect { do_something }.to not_change { object.attribute } # -# source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#54 +# source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#52 class RuboCop::Cop::Lint::AmbiguousBlockAssociation < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedMethods include ::RuboCop::Cop::AllowedPattern extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#64 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#62 def on_csend(node); end - # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#64 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#62 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#85 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#83 def allowed_method_pattern?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#81 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#79 def ambiguous_block_association?(send_node); end - # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#91 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#89 def message(send_node); end - # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#97 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#95 def wrap_in_parentheses(corrector, node); end end -# source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#60 +# source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#58 RuboCop::Cop::Lint::AmbiguousBlockAssociation::MSG = T.let(T.unsafe(nil), String) # Checks for ambiguous operators in the first argument of a @@ -16754,51 +16750,50 @@ RuboCop::Cop::Lint::AmbiguousBlockAssociation::MSG = T.let(T.unsafe(nil), String # # The `*` is interpreted as a splat operator but it could possibly be # # a `*` method invocation (i.e. `do_something.*(some_array)`). # do_something *some_array -# @example # # # good # # # With parentheses, there's no ambiguity. # do_something(*some_array) # -# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#23 +# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#21 class RuboCop::Cop::Lint::AmbiguousOperator < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#45 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#43 def on_new_investigation; end private - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#64 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#62 def find_offense_node_by(diagnostic); end - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#82 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#80 def message(diagnostic); end - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#92 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#90 def offense_node(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#88 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#86 def offense_position?(node, diagnostic); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#101 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#99 def unary_operator?(node, diagnostic); end class << self - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#41 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#39 def autocorrect_incompatible_with; end end end -# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#26 +# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#24 RuboCop::Cop::Lint::AmbiguousOperator::AMBIGUITIES = T.let(T.unsafe(nil), Hash) -# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#36 +# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#34 RuboCop::Cop::Lint::AmbiguousOperator::MSG_FORMAT = T.let(T.unsafe(nil), String) # Looks for expressions containing multiple binary operators @@ -16964,40 +16959,39 @@ RuboCop::Cop::Lint::AmbiguousRange::MSG = T.let(T.unsafe(nil), String) # # but it could possibly be `/` method invocations. # # (i.e. `do_something./(pattern)./(i)`) # do_something /pattern/i -# @example # # # good # # # With parentheses, there's no ambiguity. # do_something(/pattern/i) # -# source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#24 +# source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#22 class RuboCop::Cop::Lint::AmbiguousRegexpLiteral < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#31 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#29 def on_new_investigation; end private - # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#56 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#54 def find_offense_node(node, regexp_receiver); end - # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#49 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#47 def find_offense_node_by(diagnostic); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#67 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#65 def first_argument_is_regexp?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#71 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#69 def method_chain_to_regexp_receiver?(node, regexp_receiver); end end -# source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#27 +# source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#25 RuboCop::Cop::Lint::AmbiguousRegexpLiteral::MSG = T.let(T.unsafe(nil), String) # Checks for assignments in the conditions of @@ -17163,7 +17157,6 @@ RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands::MSG = T.let(T.unsafe(ni # # # good # true -# @example # # # bad # :false @@ -17171,23 +17164,23 @@ RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands::MSG = T.let(T.unsafe(ni # # good # false # -# source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#29 +# source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#27 class RuboCop::Cop::Lint::BooleanSymbol < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#35 + # source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#33 def boolean_symbol?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#37 + # source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#35 def on_sym(node); end private - # source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#50 + # source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#48 def autocorrect(corrector, node); end end -# source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#32 +# source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#30 RuboCop::Cop::Lint::BooleanSymbol::MSG = T.let(T.unsafe(nil), String) # Checks for circular argument references in optional keyword @@ -17198,54 +17191,45 @@ RuboCop::Cop::Lint::BooleanSymbol::MSG = T.let(T.unsafe(nil), String) # @example # # # bad -# # def bake(pie: pie) # pie.heat_up # end -# @example # # # good -# # def bake(pie:) # pie.refrigerate # end -# @example # # # good -# # def bake(pie: self.pie) # pie.feed_to(user) # end -# @example # # # bad -# # def cook(dry_ingredients = dry_ingredients) # dry_ingredients.reduce(&:+) # end -# @example # # # good -# # def cook(dry_ingredients = self.dry_ingredients) # dry_ingredients.combine # end # -# source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#50 +# source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#37 class RuboCop::Cop::Lint::CircularArgumentReference < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#53 + # source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#40 def on_kwoptarg(node); end - # source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#57 + # source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#44 def on_optarg(node); end private - # source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#63 + # source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#50 def check_for_circular_argument_references(arg_name, arg_value); end end -# source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#51 +# source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#38 RuboCop::Cop::Lint::CircularArgumentReference::MSG = T.let(T.unsafe(nil), String) # Do not define constants within a block, since the block's scope does not @@ -17492,7 +17476,6 @@ RuboCop::Cop::Lint::ConstantResolution::MSG = T.let(T.unsafe(nil), String) # binding.pry # do_something # end -# @example # # # bad (ok during development) # @@ -17501,7 +17484,6 @@ RuboCop::Cop::Lint::ConstantResolution::MSG = T.let(T.unsafe(nil), String) # byebug # do_something # end -# @example # # # good # @@ -17521,50 +17503,50 @@ RuboCop::Cop::Lint::ConstantResolution::MSG = T.let(T.unsafe(nil), String) # # require 'my_debugger/start' # -# source://rubocop//lib/rubocop/cop/lint/debugger.rb#78 +# source://rubocop//lib/rubocop/cop/lint/debugger.rb#74 class RuboCop::Cop::Lint::Debugger < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#82 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#78 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#142 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#138 def assumed_argument?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#121 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#117 def assumed_usage_context?(node); end - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#131 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#127 def chained_method_name(send_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#108 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#104 def debugger_method?(send_node); end - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#94 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#90 def debugger_methods; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#114 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#110 def debugger_require?(send_node); end - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#101 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#97 def debugger_requires; end - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#90 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#86 def message(node); end end -# source://rubocop//lib/rubocop/cop/lint/debugger.rb#80 +# source://rubocop//lib/rubocop/cop/lint/debugger.rb#76 RuboCop::Cop::Lint::Debugger::BLOCK_TYPES = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/debugger.rb#79 +# source://rubocop//lib/rubocop/cop/lint/debugger.rb#75 RuboCop::Cop::Lint::Debugger::MSG = T.let(T.unsafe(nil), String) # Checks for uses of the deprecated class method usages. @@ -17701,25 +17683,17 @@ RuboCop::Cop::Lint::DeprecatedConstants::SUGGEST_GOOD_MSG = T.let(T.unsafe(nil), # # @example # -# # Example for OpenSSL::Cipher instantiation. -# # # bad # OpenSSL::Cipher::AES.new(128, :GCM) # # # good # OpenSSL::Cipher.new('aes-128-gcm') -# @example -# -# # Example for OpenSSL::Digest instantiation. # # # bad # OpenSSL::Digest::SHA256.new # # # good # OpenSSL::Digest.new('SHA256') -# @example -# -# # Example for ::Digest inherited class methods. # # # bad # OpenSSL::Digest::SHA256.digest('foo') @@ -17727,51 +17701,51 @@ RuboCop::Cop::Lint::DeprecatedConstants::SUGGEST_GOOD_MSG = T.let(T.unsafe(nil), # # good # OpenSSL::Digest.digest('SHA256', 'foo') # -# source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#40 +# source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#30 class RuboCop::Cop::Lint::DeprecatedOpenSSLConstant < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#49 + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#39 def algorithm_const(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#59 + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#49 def digest_const?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#63 + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#53 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#110 + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#100 def algorithm_name(node); end - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#75 + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#65 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#139 + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#129 def build_cipher_arguments(node, algorithm_name, no_arguments); end - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#102 + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#92 def correction_range(node); end - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#87 + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#77 def message(node); end - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#106 + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#96 def openssl_class(node); end - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#128 + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#118 def replacement_args(node); end - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#120 + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#110 def sanitize_arguments(arguments); end end -# source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#44 +# source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#34 RuboCop::Cop::Lint::DeprecatedOpenSSLConstant::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#46 +# source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#36 RuboCop::Cop::Lint::DeprecatedOpenSSLConstant::NO_ARG_ALGORITHM = T.let(T.unsafe(nil), Array) # Checks constructors for disjunctive assignments (`||=`) that should @@ -17968,17 +17942,14 @@ RuboCop::Cop::Lint::DuplicateBranch::MSG = T.let(T.unsafe(nil), String) # @example # # # bad -# # case x # when 'first' # do_something # when 'first' # do_something_else # end -# @example # # # good -# # case x # when 'first' # do_something @@ -17986,13 +17957,13 @@ RuboCop::Cop::Lint::DuplicateBranch::MSG = T.let(T.unsafe(nil), String) # do_something_else # end # -# source://rubocop//lib/rubocop/cop/lint/duplicate_case_condition.rb#30 +# source://rubocop//lib/rubocop/cop/lint/duplicate_case_condition.rb#26 class RuboCop::Cop::Lint::DuplicateCaseCondition < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/duplicate_case_condition.rb#33 + # source://rubocop//lib/rubocop/cop/lint/duplicate_case_condition.rb#29 def on_case(case_node); end end -# source://rubocop//lib/rubocop/cop/lint/duplicate_case_condition.rb#31 +# source://rubocop//lib/rubocop/cop/lint/duplicate_case_condition.rb#27 RuboCop::Cop::Lint::DuplicateCaseCondition::MSG = T.let(T.unsafe(nil), String) # Checks that there are no repeated conditions used in if 'elsif'. @@ -18029,23 +18000,20 @@ RuboCop::Cop::Lint::DuplicateElsifCondition::MSG = T.let(T.unsafe(nil), String) # @example # # # bad -# # hash = { food: 'apple', food: 'orange' } -# @example # # # good -# # hash = { food: 'apple', other_food: 'orange' } # -# source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#22 +# source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#18 class RuboCop::Cop::Lint::DuplicateHashKey < ::RuboCop::Cop::Base include ::RuboCop::Cop::Duplication - # source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#27 + # source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#23 def on_hash(node); end end -# source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#25 +# source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#21 RuboCop::Cop::Lint::DuplicateHashKey::MSG = T.let(T.unsafe(nil), String) # Checks for duplicated magic comments. @@ -18197,7 +18165,6 @@ RuboCop::Cop::Lint::DuplicateMatchPattern::MSG = T.let(T.unsafe(nil), String) # @example # # # bad -# # def foo # 1 # end @@ -18205,19 +18172,15 @@ RuboCop::Cop::Lint::DuplicateMatchPattern::MSG = T.let(T.unsafe(nil), String) # def foo # 2 # end -# @example # # # bad -# # def foo # 1 # end # # alias foo bar -# @example # # # good -# # def foo # 1 # end @@ -18225,98 +18188,96 @@ RuboCop::Cop::Lint::DuplicateMatchPattern::MSG = T.let(T.unsafe(nil), String) # def bar # 2 # end -# @example # # # good -# # def foo # 1 # end # # alias bar foo # -# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#52 +# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#42 class RuboCop::Cop::Lint::DuplicateMethods < ::RuboCop::Cop::Base # @return [DuplicateMethods] a new instance of DuplicateMethods # - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#57 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#47 def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#98 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#88 def alias_method?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#85 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#75 def method_alias?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#89 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#79 def on_alias(node); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#63 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#53 def on_def(node); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#72 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#62 def on_defs(node); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#104 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#94 def on_send(node); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#103 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#93 def sym_name(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#117 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#107 def check_const_receiver(node, name, const_name); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#124 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#114 def check_self_receiver(node, name); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#208 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#198 def found_attr(node, args, readable: T.unsafe(nil), writable: T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#136 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#126 def found_instance_method(node, name); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#159 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#149 def found_method(node, method_name); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#149 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#139 def found_sclass_method(node, name); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#186 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#176 def location(node); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#218 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#208 def lookup_constant(node, const_name); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#131 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#121 def message_for_dup(node, method_name, key); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#178 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#168 def method_key(node, method_name); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#194 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#184 def on_attr(node, attr_name, args); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#250 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#240 def possible_dsl?(node); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#236 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#226 def qualified_name(enclosing, namespace, mod_name); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#260 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#250 def source_location(node); end end -# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#55 +# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#45 RuboCop::Cop::Lint::DuplicateMethods::DEF_TYPES = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#53 +# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#43 RuboCop::Cop::Lint::DuplicateMethods::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#54 +# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#44 RuboCop::Cop::Lint::DuplicateMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for duplicate elements in Regexp character classes. @@ -18473,31 +18434,28 @@ RuboCop::Cop::Lint::DuplicateRescueException::MSG = T.let(T.unsafe(nil), String) # @example # # # bad -# # sum = numbers.each_with_object(0) { |e, a| a += e } -# @example # # # good -# # num = 0 # sum = numbers.each_with_object(num) { |e, a| a += e } # -# source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#24 +# source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#20 class RuboCop::Cop::Lint::EachWithObjectArgument < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#29 + # source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#25 def each_with_object?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#33 + # source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#29 def on_csend(node); end - # source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#33 + # source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#29 def on_send(node); end end -# source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#25 +# source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#21 RuboCop::Cop::Lint::EachWithObjectArgument::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#26 +# source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#22 RuboCop::Cop::Lint::EachWithObjectArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for odd `else` block layout - like @@ -18517,7 +18475,6 @@ RuboCop::Cop::Lint::EachWithObjectArgument::RESTRICT_ON_SEND = T.let(T.unsafe(ni # else do_this # do_that # end -# @example # # # good # @@ -18537,28 +18494,28 @@ RuboCop::Cop::Lint::EachWithObjectArgument::RESTRICT_ON_SEND = T.let(T.unsafe(ni # do_that # end # -# source://rubocop//lib/rubocop/cop/lint/else_layout.rb#43 +# source://rubocop//lib/rubocop/cop/lint/else_layout.rb#41 class RuboCop::Cop::Lint::ElseLayout < ::RuboCop::Cop::Base include ::RuboCop::Cop::Alignment include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#50 + # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#48 def on_if(node); end private - # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#81 + # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#79 def autocorrect(corrector, node, first_else); end - # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#61 + # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#59 def check(node); end - # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#71 + # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#69 def check_else(node); end end -# source://rubocop//lib/rubocop/cop/lint/else_layout.rb#48 +# source://rubocop//lib/rubocop/cop/lint/else_layout.rb#46 RuboCop::Cop::Lint::ElseLayout::MSG = T.let(T.unsafe(nil), String) # Checks for blocks without a body. @@ -18834,52 +18791,45 @@ end # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#68 RuboCop::Cop::Lint::EmptyConditionalBody::MSG = T.let(T.unsafe(nil), String) -# Checks for empty `ensure` blocks +# Checks for empty `ensure` blocks. # # @example # # # bad -# # def some_method # do_something # ensure # end -# @example # # # bad -# # begin # do_something # ensure # end -# @example # # # good -# # def some_method # do_something # ensure # do_something_else # end -# @example # # # good -# # begin # do_something # ensure # do_something_else # end # -# source://rubocop//lib/rubocop/cop/lint/empty_ensure.rb#45 +# source://rubocop//lib/rubocop/cop/lint/empty_ensure.rb#35 class RuboCop::Cop::Lint::EmptyEnsure < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/empty_ensure.rb#50 + # source://rubocop//lib/rubocop/cop/lint/empty_ensure.rb#40 def on_ensure(node); end end -# source://rubocop//lib/rubocop/cop/lint/empty_ensure.rb#48 +# source://rubocop//lib/rubocop/cop/lint/empty_ensure.rb#38 RuboCop::Cop::Lint::EmptyEnsure::MSG = T.let(T.unsafe(nil), String) # Checks for the presence of empty expressions. @@ -19014,24 +18964,21 @@ RuboCop::Cop::Lint::EmptyInPattern::MSG = T.let(T.unsafe(nil), String) # @example # # # bad -# # "result is #{}" -# @example # # # good -# # "result is #{some_result}" # -# source://rubocop//lib/rubocop/cop/lint/empty_interpolation.rb#19 +# source://rubocop//lib/rubocop/cop/lint/empty_interpolation.rb#15 class RuboCop::Cop::Lint::EmptyInterpolation < ::RuboCop::Cop::Base include ::RuboCop::Cop::Interpolation extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/empty_interpolation.rb#25 + # source://rubocop//lib/rubocop/cop/lint/empty_interpolation.rb#21 def on_interpolation(begin_node); end end -# source://rubocop//lib/rubocop/cop/lint/empty_interpolation.rb#23 +# source://rubocop//lib/rubocop/cop/lint/empty_interpolation.rb#19 RuboCop::Cop::Lint::EmptyInterpolation::MSG = T.let(T.unsafe(nil), String) # Checks for the presence of `when` branches without a body. @@ -19044,7 +18991,6 @@ RuboCop::Cop::Lint::EmptyInterpolation::MSG = T.let(T.unsafe(nil), String) # do_something # when baz # end -# @example # # # good # case condition @@ -19072,15 +19018,15 @@ RuboCop::Cop::Lint::EmptyInterpolation::MSG = T.let(T.unsafe(nil), String) # # do nothing # end # -# source://rubocop//lib/rubocop/cop/lint/empty_when.rb#47 +# source://rubocop//lib/rubocop/cop/lint/empty_when.rb#45 class RuboCop::Cop::Lint::EmptyWhen < ::RuboCop::Cop::Base include ::RuboCop::Cop::CommentsHelp - # source://rubocop//lib/rubocop/cop/lint/empty_when.rb#52 + # source://rubocop//lib/rubocop/cop/lint/empty_when.rb#50 def on_case(node); end end -# source://rubocop//lib/rubocop/cop/lint/empty_when.rb#50 +# source://rubocop//lib/rubocop/cop/lint/empty_when.rb#48 RuboCop::Cop::Lint::EmptyWhen::MSG = T.let(T.unsafe(nil), String) # Checks for `return` from an `ensure` block. @@ -19093,17 +19039,14 @@ RuboCop::Cop::Lint::EmptyWhen::MSG = T.let(T.unsafe(nil), String) # @example # # # bad -# # def foo # do_something # ensure # cleanup # return self # end -# @example # # # good -# # def foo # do_something # self @@ -19111,8 +19054,7 @@ RuboCop::Cop::Lint::EmptyWhen::MSG = T.let(T.unsafe(nil), String) # cleanup # end # -# # also good -# +# # good # def foo # begin # do_something @@ -19124,16 +19066,16 @@ RuboCop::Cop::Lint::EmptyWhen::MSG = T.let(T.unsafe(nil), String) # cleanup # end # -# source://rubocop//lib/rubocop/cop/lint/ensure_return.rb#47 +# source://rubocop//lib/rubocop/cop/lint/ensure_return.rb#42 class RuboCop::Cop::Lint::EnsureReturn < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/ensure_return.rb#53 + # source://rubocop//lib/rubocop/cop/lint/ensure_return.rb#48 def on_ensure(node); end end -# source://rubocop//lib/rubocop/cop/lint/ensure_return.rb#51 +# source://rubocop//lib/rubocop/cop/lint/ensure_return.rb#46 RuboCop::Cop::Lint::EnsureReturn::MSG = T.let(T.unsafe(nil), String) # Emulates the following Ruby warnings in Ruby 2.6. @@ -19306,10 +19248,10 @@ class RuboCop::Cop::Lint::FloatComparison < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#89 + # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#91 def check_numeric_returning_method(node); end - # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#73 + # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#75 def check_send(node); end # @return [Boolean] @@ -19345,21 +19287,18 @@ RuboCop::Cop::Lint::FloatComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arr # @example # # # bad -# # float = 3.0e400 -# @example # # # good -# # float = 42.9 # -# source://rubocop//lib/rubocop/cop/lint/float_out_of_range.rb#21 +# source://rubocop//lib/rubocop/cop/lint/float_out_of_range.rb#17 class RuboCop::Cop::Lint::FloatOutOfRange < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/float_out_of_range.rb#24 + # source://rubocop//lib/rubocop/cop/lint/float_out_of_range.rb#20 def on_float(node); end end -# source://rubocop//lib/rubocop/cop/lint/float_out_of_range.rb#22 +# source://rubocop//lib/rubocop/cop/lint/float_out_of_range.rb#18 RuboCop::Cop::Lint::FloatOutOfRange::MSG = T.let(T.unsafe(nil), String) # This lint sees if there is a mismatch between the number of @@ -19373,138 +19312,131 @@ RuboCop::Cop::Lint::FloatOutOfRange::MSG = T.let(T.unsafe(nil), String) # @example # # # bad -# # format('A value: %s and another: %i', a_value) -# @example # # # good -# # format('A value: %s and another: %i', a_value, another) -# @example # # # bad -# # format('Unnumbered format: %s and numbered: %2$s', a_value, another) -# @example # # # good -# # format('Numbered format: %1$s and numbered %2$s', a_value, another) # -# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#37 +# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#27 class RuboCop::Cop::Lint::FormatParameterMismatch < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#100 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#90 def called_on_string?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#49 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#39 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#137 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#127 def count_format_matches(node); end - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#119 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#109 def count_matches(node); end - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#141 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#131 def count_percent_matches(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#129 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#119 def countable_format?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#133 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#123 def countable_percent?(node); end - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#153 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#143 def expected_fields_count(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#168 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#158 def format?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#146 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#136 def format_method?(name, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#64 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#54 def format_string?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#115 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#105 def heredoc?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#68 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#58 def invalid_format_string?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#91 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#81 def matched_arguments_count?(expected, passed); end - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#186 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#176 def message(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#105 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#95 def method_with_format_args?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#77 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#67 def offending_node?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#176 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#166 def percent?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#109 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#99 def splat_args?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#172 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#162 def sprintf?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#195 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#185 def string_type?(node); end end -# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#44 +# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#34 RuboCop::Cop::Lint::FormatParameterMismatch::KERNEL = T.let(T.unsafe(nil), String) # http://rubular.com/r/CvpbxkcTzy # -# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#39 +# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#29 RuboCop::Cop::Lint::FormatParameterMismatch::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#41 +# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#31 RuboCop::Cop::Lint::FormatParameterMismatch::MSG_INVALID = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#47 +# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#37 RuboCop::Cop::Lint::FormatParameterMismatch::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#45 +# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#35 RuboCop::Cop::Lint::FormatParameterMismatch::SHOVEL = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#46 +# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#36 RuboCop::Cop::Lint::FormatParameterMismatch::STRING_TYPES = T.let(T.unsafe(nil), Array) # Prefer using `Hash#compare_by_identity` rather than using `object_id` @@ -19684,12 +19616,9 @@ RuboCop::Cop::Lint::IdentityComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), # @example # # # bad -# # array = ['Item 1' 'Item 2'] -# @example # # # good -# # array = ['Item 1Item 2'] # array = ['Item 1' + 'Item 2'] # array = [ @@ -19697,45 +19626,45 @@ RuboCop::Cop::Lint::IdentityComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), # 'Item 2' # ] # -# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#25 +# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#21 class RuboCop::Cop::Lint::ImplicitStringConcatenation < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#36 + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#32 def on_dstr(node); end private - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#90 + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#86 def display_str(node); end - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#57 + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#53 def each_bad_cons(node); end - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#72 + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#68 def ending_delimiter(str); end - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#98 + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#94 def str_content(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#82 + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#78 def string_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#86 + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#82 def string_literals?(node1, node2); end end -# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#30 +# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#26 RuboCop::Cop::Lint::ImplicitStringConcatenation::FOR_ARRAY = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#32 +# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#28 RuboCop::Cop::Lint::ImplicitStringConcatenation::FOR_METHOD = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#28 +# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#24 RuboCop::Cop::Lint::ImplicitStringConcatenation::MSG = T.let(T.unsafe(nil), String) # Checks for `IO.select` that is incompatible with Fiber Scheduler since Ruby 3.0. @@ -19797,7 +19726,6 @@ RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler::RESTRICT_ON_SEND = T # @example # # # bad -# # class C # private # @@ -19805,10 +19733,8 @@ RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler::RESTRICT_ON_SEND = T # puts 'hi' # end # end -# @example # # # good -# # class C # def self.method # puts 'hi' @@ -19816,10 +19742,8 @@ RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler::RESTRICT_ON_SEND = T # # private_class_method :method # end -# @example # # # good -# # class C # class << self # private @@ -19830,49 +19754,49 @@ RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler::RESTRICT_ON_SEND = T # end # end # -# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#48 +# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#41 class RuboCop::Cop::Lint::IneffectiveAccessModifier < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#59 + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#52 def on_class(node); end - # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#59 + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#52 def on_module(node); end - # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#55 + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#48 def private_class_methods(param0); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#109 + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#102 def access_modifier?(node); end - # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#66 + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#59 def check_node(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#113 + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#106 def correct_visibility?(node, modifier, ignored_methods); end - # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#78 + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#71 def format_message(modifier); end - # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#91 + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#84 def ineffective_modifier(node, ignored_methods = T.unsafe(nil), modifier = T.unsafe(nil), &block); end - # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#74 + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#67 def private_class_method_names(node); end end -# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#51 +# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#44 RuboCop::Cop::Lint::IneffectiveAccessModifier::ALTERNATIVE_PRIVATE = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#52 +# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#45 RuboCop::Cop::Lint::IneffectiveAccessModifier::ALTERNATIVE_PROTECTED = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#49 +# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#42 RuboCop::Cop::Lint::IneffectiveAccessModifier::MSG = T.let(T.unsafe(nil), String) # Looks for error classes inheriting from `Exception`. @@ -19951,33 +19875,30 @@ RuboCop::Cop::Lint::InheritException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Ar # @example # # # bad -# # foo = 'something with #{interpolation} inside' -# @example # # # good -# # foo = "something with #{interpolation} inside" # -# source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#25 +# source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#21 class RuboCop::Cop::Lint::InterpolationCheck < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#31 + # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#27 def on_str(node); end private - # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#42 + # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#38 def autocorrect(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#53 + # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#49 def heredoc?(node); end end -# source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#28 +# source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#24 RuboCop::Cop::Lint::InterpolationCheck::MSG = T.let(T.unsafe(nil), String) # Emulates the following Ruby warning in Ruby 3.3. @@ -20220,84 +20141,81 @@ RuboCop::Cop::Lint::LiteralAssignmentInCondition::MSG = T.let(T.unsafe(nil), Str # @example # # # bad -# # "result is #{10}" -# @example # # # good -# # "result is 10" # -# source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#19 +# source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#15 class RuboCop::Cop::Lint::LiteralInInterpolation < ::RuboCop::Cop::Base include ::RuboCop::Cop::Interpolation include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::PercentLiteral extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#28 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#24 def on_interpolation(begin_node); end private - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#62 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#58 def autocorrected_value(node); end - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#108 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#104 def autocorrected_value_for_array(node); end - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#114 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#110 def autocorrected_value_for_hash(node); end - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#84 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#80 def autocorrected_value_for_string(node); end - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#92 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#88 def autocorrected_value_for_symbol(node); end - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#125 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#121 def autocorrected_value_in_hash(node); end - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#99 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#95 def autocorrected_value_in_hash_for_symbol(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#155 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#151 def ends_heredoc_line?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#163 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#159 def in_array_percent_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#48 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#44 def offending?(node); end # Does node print its own source when converted to a string? # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#146 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#142 def prints_as_self?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#151 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#147 def space_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#56 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#52 def special_keyword?(node); end end -# source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#26 +# source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#22 RuboCop::Cop::Lint::LiteralInInterpolation::COMPOSITE = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#25 +# source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#21 RuboCop::Cop::Lint::LiteralInInterpolation::MSG = T.let(T.unsafe(nil), String) # Checks for uses of `begin...end while/until something`. @@ -20310,15 +20228,6 @@ RuboCop::Cop::Lint::LiteralInInterpolation::MSG = T.let(T.unsafe(nil), String) # begin # do_something # end while some_condition -# @example -# -# # bad -# -# # using until -# begin -# do_something -# end until some_condition -# @example # # # good # @@ -20327,7 +20236,13 @@ RuboCop::Cop::Lint::LiteralInInterpolation::MSG = T.let(T.unsafe(nil), String) # do_something # break unless some_condition # end -# @example +# +# # bad +# +# # using until +# begin +# do_something +# end until some_condition # # # good # @@ -20337,29 +20252,29 @@ RuboCop::Cop::Lint::LiteralInInterpolation::MSG = T.let(T.unsafe(nil), String) # break if some_condition # end # -# source://rubocop//lib/rubocop/cop/lint/loop.rb#50 +# source://rubocop//lib/rubocop/cop/lint/loop.rb#44 class RuboCop::Cop::Lint::Loop < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/loop.rb#59 + # source://rubocop//lib/rubocop/cop/lint/loop.rb#53 def on_until_post(node); end - # source://rubocop//lib/rubocop/cop/lint/loop.rb#55 + # source://rubocop//lib/rubocop/cop/lint/loop.rb#49 def on_while_post(node); end private - # source://rubocop//lib/rubocop/cop/lint/loop.rb#79 + # source://rubocop//lib/rubocop/cop/lint/loop.rb#73 def build_break_line(node); end - # source://rubocop//lib/rubocop/cop/lint/loop.rb#75 + # source://rubocop//lib/rubocop/cop/lint/loop.rb#69 def keyword_and_condition_range(node); end - # source://rubocop//lib/rubocop/cop/lint/loop.rb#65 + # source://rubocop//lib/rubocop/cop/lint/loop.rb#59 def register_offense(node); end end -# source://rubocop//lib/rubocop/cop/lint/loop.rb#53 +# source://rubocop//lib/rubocop/cop/lint/loop.rb#47 RuboCop::Cop::Lint::Loop::MSG = T.let(T.unsafe(nil), String) # cop disables on wide ranges of code, that latter contributors to @@ -20705,15 +20620,17 @@ RuboCop::Cop::Lint::MultipleComparison::SET_OPERATION_OPERATORS = T.let(T.unsafe # Checks for nested method definitions. # -# @example AllowedPatterns: ['baz'] -# # good -# def foo(obj) -# obj.do_baz do +# @example +# +# # bad +# +# # `bar` definition actually produces methods in the same scope +# # as the outer `foo` method. Furthermore, the `bar` method +# # will be redefined every time `foo` is invoked. +# def foo # def bar # end # end -# end -# @example # # # good # @@ -20721,7 +20638,6 @@ RuboCop::Cop::Lint::MultipleComparison::SET_OPERATION_OPERATORS = T.let(T.unsafe # bar = -> { puts 'hello' } # bar.call # end -# @example # # # good # @@ -20741,7 +20657,6 @@ RuboCop::Cop::Lint::MultipleComparison::SET_OPERATION_OPERATORS = T.let(T.unsafe # end # end # end -# @example # # # good # @@ -20775,49 +20690,46 @@ RuboCop::Cop::Lint::MultipleComparison::SET_OPERATION_OPERATORS = T.let(T.unsafe # end # end # end -# @example -# -# # bad -# -# # `bar` definition actually produces methods in the same scope -# # as the outer `foo` method. Furthermore, the `bar` method -# # will be redefined every time `foo` is invoked. -# def foo +# @example AllowedPatterns: ['baz'] +# # good +# def foo(obj) +# obj.do_baz do # def bar # end # end +# end # -# source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#97 +# source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#91 class RuboCop::Cop::Lint::NestedMethodDefinition < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedMethods include ::RuboCop::Cop::AllowedPattern - # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#133 + # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#127 def eval_call?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#138 + # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#132 def exec_call?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#103 + # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#97 def on_def(node); end - # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#103 + # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#97 def on_defs(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#126 + # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#120 def allowed_method_name?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#121 + # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#115 def scoping_method_call?(child); end end -# source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#101 +# source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#95 RuboCop::Cop::Lint::NestedMethodDefinition::MSG = T.let(T.unsafe(nil), String) # Checks for nested percent literals. @@ -20883,38 +20795,35 @@ RuboCop::Cop::Lint::NestedPercentLiteral::REGEXES = T.let(T.unsafe(nil), Array) # @example # # # bad -# # result = (1..4).reduce(0) do |acc, i| # next if i.odd? # acc + i # end -# @example # # # good -# # result = (1..4).reduce(0) do |acc, i| # next acc if i.odd? # acc + i # end # -# source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#25 +# source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#21 class RuboCop::Cop::Lint::NextWithoutAccumulator < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#28 + # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#24 def on_block(node); end - # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#42 + # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#38 def on_block_body_of_reduce(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#28 + # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#24 def on_numblock(node); end private - # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#49 + # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#45 def parent_block_node(node); end end -# source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#26 +# source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#22 RuboCop::Cop::Lint::NextWithoutAccumulator::MSG = T.let(T.unsafe(nil), String) # Checks for the presence of a `return` inside a `begin..end` block @@ -20925,16 +20834,13 @@ RuboCop::Cop::Lint::NextWithoutAccumulator::MSG = T.let(T.unsafe(nil), String) # @example # # # bad -# # @some_variable ||= begin # return some_value if some_condition_is_met # # do_something # end -# @example # # # good -# # @some_variable ||= begin # if some_condition_is_met # some_value @@ -20944,7 +20850,6 @@ RuboCop::Cop::Lint::NextWithoutAccumulator::MSG = T.let(T.unsafe(nil), String) # end # # # good -# # some_variable = if some_condition_is_met # return if another_condition_is_met # @@ -20953,19 +20858,19 @@ RuboCop::Cop::Lint::NextWithoutAccumulator::MSG = T.let(T.unsafe(nil), String) # do_something # end # -# source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#43 +# source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#38 class RuboCop::Cop::Lint::NoReturnInBeginEndBlocks < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#46 + # source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#41 def on_lvasgn(node); end - # source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#46 + # source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#41 def on_op_asgn(node); end - # source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#46 + # source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#41 def on_or_asgn(node); end end -# source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#44 +# source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#39 RuboCop::Cop::Lint::NoReturnInBeginEndBlocks::MSG = T.let(T.unsafe(nil), String) # Checks for non-atomic file operation. @@ -21653,44 +21558,41 @@ RuboCop::Cop::Lint::ParenthesesAsGroupedExpression::MSG = T.let(T.unsafe(nil), S # @example # # # bad -# # %w('foo', "bar") -# @example # # # good -# # %w(foo bar) # -# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#33 +# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#29 class RuboCop::Cop::Lint::PercentStringArray < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::PercentLiteral extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#44 + # source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#40 def on_array(node); end - # source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#48 + # source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#44 def on_percent_literal(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#65 + # source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#61 def contains_quotes_or_commas?(node); end end -# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#38 +# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#34 RuboCop::Cop::Lint::PercentStringArray::LEADING_QUOTE = T.let(T.unsafe(nil), Regexp) -# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#41 +# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#37 RuboCop::Cop::Lint::PercentStringArray::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#37 +# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#33 RuboCop::Cop::Lint::PercentStringArray::QUOTES_AND_COMMAS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#39 +# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#35 RuboCop::Cop::Lint::PercentStringArray::TRAILING_QUOTE = T.let(T.unsafe(nil), Regexp) # Checks for colons and commas in %i, e.g. `%i(:foo, :bar)` @@ -21702,43 +21604,40 @@ RuboCop::Cop::Lint::PercentStringArray::TRAILING_QUOTE = T.let(T.unsafe(nil), Re # @example # # # bad -# # %i(:foo, :bar) -# @example # # # good -# # %i(foo bar) # -# source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#23 +# source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#19 class RuboCop::Cop::Lint::PercentSymbolArray < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::PercentLiteral extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#30 + # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#26 def on_array(node); end - # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#34 + # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#30 def on_percent_literal(node); end private - # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#42 + # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#38 def autocorrect(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#52 + # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#48 def contains_colons_or_commas?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#62 + # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#58 def non_alphanumeric_literal?(literal); end end -# source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#27 +# source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#23 RuboCop::Cop::Lint::PercentSymbolArray::MSG = T.let(T.unsafe(nil), String) # Checks for `raise` or `fail` statements which are @@ -21804,35 +21703,32 @@ RuboCop::Cop::Lint::RaiseException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arra # @example # # # bad -# # rand 1 # Kernel.rand(-1) # rand 1.0 # rand(-1.0) -# @example # # # good -# # 0 # just use 0 instead # -# source://rubocop//lib/rubocop/cop/lint/rand_one.rb#23 +# source://rubocop//lib/rubocop/cop/lint/rand_one.rb#19 class RuboCop::Cop::Lint::RandOne < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/rand_one.rb#32 + # source://rubocop//lib/rubocop/cop/lint/rand_one.rb#28 def on_send(node); end - # source://rubocop//lib/rubocop/cop/lint/rand_one.rb#28 + # source://rubocop//lib/rubocop/cop/lint/rand_one.rb#24 def rand_one?(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/lint/rand_one.rb#40 + # source://rubocop//lib/rubocop/cop/lint/rand_one.rb#36 def message(node); end end -# source://rubocop//lib/rubocop/cop/lint/rand_one.rb#24 +# source://rubocop//lib/rubocop/cop/lint/rand_one.rb#20 RuboCop::Cop::Lint::RandOne::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/rand_one.rb#25 +# source://rubocop//lib/rubocop/cop/lint/rand_one.rb#21 RuboCop::Cop::Lint::RandOne::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # removed without causing any offenses to be reported. It's implemented @@ -22013,13 +21909,14 @@ RuboCop::Cop::Lint::RedundantCopDisableDirective::SIMILAR_COP_NAMES_CACHE = T.le # that cop checks whether any cop was actually enabled. # # @example +# # # bad # foo = 1 # # rubocop:enable Layout/LineLength # # # good # foo = 1 -# @example +# # # bad # # rubocop:disable Style/StringLiterals # foo = "1" @@ -22033,54 +21930,54 @@ RuboCop::Cop::Lint::RedundantCopDisableDirective::SIMILAR_COP_NAMES_CACHE = T.le # # rubocop:enable all # baz # -# source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#37 +# source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#39 class RuboCop::Cop::Lint::RedundantCopEnableDirective < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::SurroundingSpace extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#44 + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#46 def on_new_investigation; end private - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#120 + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#122 def all_or_name(name); end - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#76 + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#78 def comment_start(comment); end - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#80 + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#82 def cop_name_indention(comment, name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#124 + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#126 def department?(directive, name); end - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#71 + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#73 def range_of_offense(comment, name); end - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#95 + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#97 def range_to_remove(begin_pos, end_pos, comment); end - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#84 + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#86 def range_with_comma(comment, name); end # If the list of cops is comma-separated, but without a empty space after the comma, # we should **not** remove the prepending empty space, thus begin_pos += 1 # - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#114 + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#116 def range_with_comma_after(comment, start, begin_pos, end_pos); end - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#108 + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#110 def range_with_comma_before(start, begin_pos, end_pos); end - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#53 + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#55 def register_offense(comment, cop_names); end end -# source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#42 +# source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#44 RuboCop::Cop::Lint::RedundantCopEnableDirective::MSG = T.let(T.unsafe(nil), String) # Sort globbed results by default in Ruby 3.0. @@ -22381,7 +22278,7 @@ RuboCop::Cop::Lint::RedundantSafeNavigation::NIL_SPECIFIC_METHODS = T.let(T.unsa # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#87 RuboCop::Cop::Lint::RedundantSafeNavigation::SNAKE_CASE = T.let(T.unsafe(nil), Regexp) -# Checks for unneeded usages of splat expansion +# Checks for unneeded usages of splat expansion. # # @example # @@ -22534,47 +22431,44 @@ RuboCop::Cop::Lint::RedundantSplatExpansion::PERCENT_W = T.let(T.unsafe(nil), St # @example # # # bad -# # "result is #{something.to_s}" # print something.to_s # puts something.to_s # warn something.to_s -# @example # # # good -# # "result is #{something}" # print something # puts something # warn something # -# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#27 +# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#23 class RuboCop::Cop::Lint::RedundantStringCoercion < ::RuboCop::Cop::Base include ::RuboCop::Cop::Interpolation extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#38 + # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#34 def on_interpolation(begin_node); end - # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#46 + # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#42 def on_send(node); end - # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#36 + # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#32 def to_s_without_args?(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#58 + # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#54 def register_offense(node, context); end end -# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#31 +# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#27 RuboCop::Cop::Lint::RedundantStringCoercion::MSG_DEFAULT = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#32 +# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#28 RuboCop::Cop::Lint::RedundantStringCoercion::MSG_SELF = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#33 +# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#29 RuboCop::Cop::Lint::RedundantStringCoercion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for redundant `with_index`. @@ -22754,38 +22648,35 @@ RuboCop::Cop::Lint::RegexpAsCondition::MSG = T.let(T.unsafe(nil), String) # @example # # # bad -# # if day.is? :tuesday && month == :jan # # ... # end -# @example # # # good -# # if day.is?(:tuesday) && month == :jan # # ... # end # -# source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#30 +# source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#26 class RuboCop::Cop::Lint::RequireParentheses < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp - # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#35 + # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#31 def on_csend(node); end - # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#35 + # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#31 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#58 + # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#54 def check_predicate(predicate, node); end - # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#48 + # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#44 def check_ternary(ternary, node); end end -# source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#33 +# source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#29 RuboCop::Cop::Lint::RequireParentheses::MSG = T.let(T.unsafe(nil), String) # Checks that a range literal is enclosed in parentheses when the end of the range is @@ -22879,34 +22770,31 @@ RuboCop::Cop::Lint::RequireRelativeSelfPath::RESTRICT_ON_SEND = T.let(T.unsafe(n # @example # # # bad -# # begin # do_something # rescue Exception # handle_exception # end -# @example # # # good -# # begin # do_something # rescue ArgumentError # handle_exception # end # -# source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#27 +# source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#23 class RuboCop::Cop::Lint::RescueException < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#30 + # source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#26 def on_resbody(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#39 + # source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#35 def targets_exception?(rescue_arg_node); end end -# source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#28 +# source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#24 RuboCop::Cop::Lint::RescueException::MSG = T.let(T.unsafe(nil), String) # Check for arguments to `rescue` that will result in a `TypeError` @@ -22984,7 +22872,6 @@ RuboCop::Cop::Lint::RescueType::MSG = T.let(T.unsafe(nil), String) # def foo=(bar) # return 42 # end -# @example # # # good # def initialize @@ -22997,18 +22884,18 @@ RuboCop::Cop::Lint::RescueType::MSG = T.let(T.unsafe(nil), String) # return # end # -# source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#34 +# source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#32 class RuboCop::Cop::Lint::ReturnInVoidContext < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#37 + # source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#35 def on_return(return_node); end private - # source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#53 + # source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#51 def non_void_context(return_node); end end -# source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#35 +# source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#33 RuboCop::Cop::Lint::ReturnInVoidContext::MSG = T.let(T.unsafe(nil), String) # The safe navigation operator returns nil if the receiver is @@ -23020,28 +22907,25 @@ RuboCop::Cop::Lint::ReturnInVoidContext::MSG = T.let(T.unsafe(nil), String) # @example # # # bad -# # x&.foo.bar # x&.foo + bar # x&.foo[bar] -# @example # # # good -# # x&.foo&.bar # x&.foo || bar # -# source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#26 +# source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#22 class RuboCop::Cop::Lint::SafeNavigationChain < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedMethods include ::RuboCop::Cop::NilMethods extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#37 + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#33 def bad_method?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#44 + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#40 def on_send(node); end private @@ -23050,31 +22934,31 @@ class RuboCop::Cop::Lint::SafeNavigationChain < ::RuboCop::Cop::Base # @param send_node [RuboCop::AST::SendNode] # @return [String] # - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#62 + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#58 def add_safe_navigation_operator(offense_range:, send_node:); end # @param corrector [RuboCop::Cop::Corrector] # @param offense_range [Parser::Source::Range] # @param send_node [RuboCop::AST::SendNode] # - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#81 + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#77 def autocorrect(corrector, offense_range:, send_node:); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#90 + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#86 def brackets?(send_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#94 + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#90 def require_parentheses?(send_node); end end -# source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#33 +# source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#29 RuboCop::Cop::Lint::SafeNavigationChain::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#34 +# source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#30 RuboCop::Cop::Lint::SafeNavigationChain::PLUS_MINUS_METHODS = T.let(T.unsafe(nil), Array) # Check to make sure that if safe navigation is used for a method @@ -23577,17 +23461,16 @@ RuboCop::Cop::Lint::ShadowedException::MSG = T.let(T.unsafe(nil), String) # because `Ractor` should not access outer variables. # eg. following style is encouraged: # -# [source,ruby] -# ---- -# worker_id, pipe = env -# Ractor.new(worker_id, pipe) do |worker_id, pipe| -# end -# ---- +# [source,ruby] +# ---- +# worker_id, pipe = env +# Ractor.new(worker_id, pipe) do |worker_id, pipe| +# end +# ---- # # @example # # # bad -# # def some_method # foo = 1 # @@ -23595,10 +23478,8 @@ RuboCop::Cop::Lint::ShadowedException::MSG = T.let(T.unsafe(nil), String) # do_something(foo) # end # end -# @example # # # good -# # def some_method # foo = 1 # @@ -23607,37 +23488,37 @@ RuboCop::Cop::Lint::ShadowedException::MSG = T.let(T.unsafe(nil), String) # end # end # -# source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#45 +# source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#41 class RuboCop::Cop::Lint::ShadowingOuterLocalVariable < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#57 + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#53 def before_declaring_variable(variable, variable_table); end - # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#93 + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#89 def find_conditional_node_from_ascendant(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#100 + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#96 def node_or_its_ascendant_conditional?(node); end - # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#49 + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#45 def ractor_block?(param0 = T.unsafe(nil)); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#69 + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#65 def same_conditions_node_different_branch?(variable, outer_local_variable); end - # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#83 + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#79 def variable_node(variable); end class << self - # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#53 + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#49 def joining_forces; end end end -# source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#46 +# source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#42 RuboCop::Cop::Lint::ShadowingOuterLocalVariable::MSG = T.let(T.unsafe(nil), String) # Checks unexpected overrides of the `Struct` built-in methods @@ -24288,27 +24169,24 @@ RuboCop::Cop::Lint::UnexpectedBlockArity::MSG = T.let(T.unsafe(nil), String) # @example # # # bad -# # 1.is_a?(Fixnum) # 1.is_a?(Bignum) -# @example # # # good -# # 1.is_a?(Integer) # -# source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#20 +# source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#16 class RuboCop::Cop::Lint::UnifiedInteger < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#26 + # source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#22 def fixnum_or_bignum_const(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#30 + # source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#26 def on_const(node); end end -# source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#23 +# source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#19 RuboCop::Cop::Lint::UnifiedInteger::MSG = T.let(T.unsafe(nil), String) # Looks for `reduce` or `inject` blocks where the value returned (implicitly or @@ -24460,14 +24338,12 @@ RuboCop::Cop::Lint::UnmodifiedReduceAccumulator::MSG_INDEX = T.let(T.unsafe(nil) # @example # # # bad -# # def some_method # return # do_something # end # # # bad -# # def some_method # if cond # return @@ -24476,40 +24352,38 @@ RuboCop::Cop::Lint::UnmodifiedReduceAccumulator::MSG_INDEX = T.let(T.unsafe(nil) # end # do_something # end -# @example # # # good -# # def some_method # do_something # end # -# source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#37 +# source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#32 class RuboCop::Cop::Lint::UnreachableCode < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#55 + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#50 def flow_command?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#40 + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#35 def on_begin(node); end - # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#40 + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#35 def on_kwbegin(node); end private - # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#87 + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#82 def check_case(node); end - # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#81 + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#76 def check_if(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#65 + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#60 def flow_expression?(node); end end -# source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#38 +# source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#33 RuboCop::Cop::Lint::UnreachableCode::MSG = T.let(T.unsafe(nil), String) # Checks for loops that will have at most one iteration. @@ -25180,97 +25054,94 @@ RuboCop::Cop::Lint::UselessAccessModifier::MSG = T.let(T.unsafe(nil), String) # @example # # # bad -# # def some_method # some_var = 1 # do_something # end -# @example # # # good -# # def some_method # some_var = 1 # do_something(some_var) # end # -# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#45 +# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#41 class RuboCop::Cop::Lint::UselessAssignment < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#56 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#52 def after_leaving_scope(scope, _variable_table); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#162 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#158 def autocorrect(corrector, assignment); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#103 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#99 def chained_assignment?(node); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#61 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#57 def check_for_unused_assignments(variable); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#146 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#142 def collect_variable_like_names(scope); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#79 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#75 def message_for_useless_assignment(assignment); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#107 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#103 def message_specification(assignment, variable); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#117 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#113 def multiple_assignment_message(variable_name); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#85 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#81 def offense_range(assignment); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#122 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#118 def operator_assignment_message(scope, assignment); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#179 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#175 def remove_exception_assignment_part(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#203 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#199 def remove_local_variable_assignment_part(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#192 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#188 def remove_trailing_character_from_operator(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#188 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#184 def rename_variable_with_underscore(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#196 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#192 def replace_named_capture_group_with_non_capturing_group(corrector, node, variable_name); end # TODO: More precise handling (rescue, ensure, nested begin, etc.) # - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#136 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#132 def return_value_node_of_scope(scope); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#93 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#89 def sequential_assignment?(node); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#129 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#125 def similar_name_message(variable); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#155 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#151 def variable_like_method_invocation?(node); end class << self - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#52 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#48 def joining_forces; end end end -# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#50 +# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#46 RuboCop::Cop::Lint::UselessAssignment::MSG = T.let(T.unsafe(nil), String) # Checks for useless `else` in `begin..end` without `rescue`. @@ -25280,16 +25151,13 @@ RuboCop::Cop::Lint::UselessAssignment::MSG = T.let(T.unsafe(nil), String) # @example # # # bad -# # begin # do_something # else # do_something_else # This will never be run. # end -# @example # # # good -# # begin # do_something # rescue @@ -25298,13 +25166,13 @@ RuboCop::Cop::Lint::UselessAssignment::MSG = T.let(T.unsafe(nil), String) # do_something_else # end # -# source://rubocop//lib/rubocop/cop/lint/useless_else_without_rescue.rb#31 +# source://rubocop//lib/rubocop/cop/lint/useless_else_without_rescue.rb#27 class RuboCop::Cop::Lint::UselessElseWithoutRescue < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/useless_else_without_rescue.rb#34 + # source://rubocop//lib/rubocop/cop/lint/useless_else_without_rescue.rb#30 def on_new_investigation; end end -# source://rubocop//lib/rubocop/cop/lint/useless_else_without_rescue.rb#32 +# source://rubocop//lib/rubocop/cop/lint/useless_else_without_rescue.rb#28 RuboCop::Cop::Lint::UselessElseWithoutRescue::MSG = T.let(T.unsafe(nil), String) # Checks for useless method definitions, specifically: empty constructors @@ -25532,83 +25400,80 @@ RuboCop::Cop::Lint::UselessRuby2Keywords::RESTRICT_ON_SEND = T.let(T.unsafe(nil) # @example # # # bad -# # def something # x = Something.new # x.attr = 5 # end -# @example # # # good -# # def something # x = Something.new # x.attr = 5 # x # end # -# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#35 +# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#31 class RuboCop::Cop::Lint::UselessSetterCall < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#41 + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#37 def on_def(node); end - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#41 + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#37 def on_defs(node); end - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#63 + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#59 def setter_call_to_local_variable?(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#67 + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#63 def last_expression(body); end end -# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#39 +# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#35 RuboCop::Cop::Lint::UselessSetterCall::ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#38 +# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#34 RuboCop::Cop::Lint::UselessSetterCall::MSG = T.let(T.unsafe(nil), String) # This class tracks variable assignments in a method body # and if a variable contains object passed as argument at the end of # the method. # -# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#76 +# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#72 class RuboCop::Cop::Lint::UselessSetterCall::MethodVariableTracker # @return [MethodVariableTracker] a new instance of MethodVariableTracker # - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#77 + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#73 def initialize(body_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#163 + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#159 def constructor?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#82 + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#78 def contain_local_object?(variable_name); end - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#152 + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#148 def process_assignment(asgn_node, rhs_node); end - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#100 + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#96 def process_assignment_node(node); end - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#142 + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#138 def process_binary_operator_assignment(op_asgn_node); end - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#133 + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#129 def process_logical_operator_assignment(asgn_node); end - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#114 + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#110 def process_multiple_assignment(masgn_node); end - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#92 + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#88 def scan(node, &block); end end @@ -28605,94 +28470,109 @@ class RuboCop::Cop::Naming::MethodParameterName < ::RuboCop::Cop::Base def on_defs(node); end end -# Checks that predicate methods names end with a question mark and +# Checks that predicate method names end with a question mark and # do not start with a forbidden prefix. # -# A method is determined to be a predicate method if its name starts -# with one of the prefixes defined in the `NamePrefix` configuration. -# You can change what prefixes are considered by changing this option. -# Any method name that starts with one of these prefixes is required by -# the cop to end with a `?`. Other methods can be allowed by adding to -# the `AllowedMethods` configuration. -# -# NOTE: The `is_a?` method is allowed by default. +# A method is determined to be a predicate method if its name starts with +# one of the prefixes listed in the `NamePrefix` configuration. The list +# defaults to `is_`, `has_`, and `have_` but may be overridden. # -# If `ForbiddenPrefixes` is set, methods that start with the configured -# prefixes will not be allowed and will be removed by autocorrection. +# Predicate methods must end with a question mark. # -# In other words, if `ForbiddenPrefixes` is empty, a method named `is_foo` -# will register an offense only due to the lack of question mark (and will be -# autocorrected to `is_foo?`). If `ForbiddenPrefixes` contains `is_`, -# `is_foo` will register an offense both because the ? is missing and because of -# the `is_` prefix, and will be corrected to `foo?`. +# When `ForbiddenPrefixes` is also set (as it is by default), predicate +# methods which begin with a forbidden prefix are not allowed, even if +# they end with a `?`. These methods should be changed to remove the +# prefix. # -# NOTE: `ForbiddenPrefixes` is only applied to prefixes in `NamePrefix`; -# a prefix in the former but not the latter will not be considered by -# this cop. -# -# @example +# @example NamePrefix: ['is_', 'has_', 'have_'] (default) # # bad # def is_even(value) # end # -# def is_even?(value) -# end -# +# # When ForbiddenPrefixes: ['is_', 'has_', 'have_'] (default) # # good # def even?(value) # end # +# # When ForbiddenPrefixes: [] +# # good +# def is_even?(value) +# end +# @example NamePrefix: ['seems_to_be_'] # # bad -# def has_value +# def seems_to_be_even(value) # end # -# def has_value? +# # When ForbiddenPrefixes: ['seems_to_be_'] +# # good +# def even?(value) # end # +# # When ForbiddenPrefixes: [] # # good -# def value? +# def seems_to_be_even?(value) # end # @example AllowedMethods: ['is_a?'] (default) +# # Despite starting with the `is_` prefix, this method is allowed # # good # def is_a?(value) # end +# @example AllowedMethods: ['is_even?'] +# # good +# def is_even?(value) +# end +# @example MethodDefinitionMacros: ['define_method', 'define_singleton_method'] (default) +# # bad +# define_method(:is_even) { |value| } # -# source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#59 +# # good +# define_method(:even?) { |value| } +# @example MethodDefinitionMacros: ['def_node_matcher'] +# # bad +# def_node_matcher(:is_even) { |value| } +# +# # good +# # def_node_matcher(:even?) { |value| } +# +# source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#75 class RuboCop::Cop::Naming::PredicateName < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedMethods - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#63 + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#79 def dynamic_method_define(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#82 + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#98 def on_def(node); end - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#82 + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#98 def on_defs(node); end - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#69 + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#85 def on_send(node); end + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#112 + def validate_config; end + private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#98 + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#124 def allowed_method_name?(method_name, prefix); end - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#106 + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#132 def expected_name(method_name, prefix); end - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#120 + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#146 def forbidden_prefixes; end - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#116 + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#142 def message(method_name, new_name); end - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#128 + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#154 def method_definition_macros(macro_name); end - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#124 + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#150 def predicate_prefixes; end end @@ -28762,31 +28642,31 @@ class RuboCop::Cop::Naming::RescuedExceptionsVariableName < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#96 def autocorrect(corrector, node, range, offending_name, preferred_name); end - # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#116 + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#117 def correct_node(corrector, node, offending_name, preferred_name); end # If the exception variable is reassigned, that assignment needs to be corrected. # Further `lvar` nodes will not be corrected though since they now refer to a # different variable. # - # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#134 + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#143 def correct_reassignment(corrector, node, offending_name, preferred_name); end - # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#159 + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#168 def message(node); end # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#91 def offense_range(resbody); end - # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#143 + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#152 def preferred_name(variable_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#165 + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#174 def shadowed_variable_name?(node); end - # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#152 + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#161 def variable_name(node); end # @return [Boolean] @@ -34489,7 +34369,6 @@ RuboCop::Cop::Style::DateTime::COERCION_MSG = T.let(T.unsafe(nil), String) # # # good (without parentheses it's a syntax error) # def foo() do_something end -# @example # # # bad # def Baz.foo() @@ -34501,18 +34380,18 @@ RuboCop::Cop::Style::DateTime::COERCION_MSG = T.let(T.unsafe(nil), String) # do_something # end # -# source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#42 +# source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#40 class RuboCop::Cop::Style::DefWithParentheses < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#47 + # source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#45 def on_def(node); end - # source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#47 + # source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#45 def on_defs(node); end end -# source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#45 +# source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#43 RuboCop::Cop::Style::DefWithParentheses::MSG = T.let(T.unsafe(nil), String) # Checks for places where the `#\_\_dir\_\_` method can replace more @@ -35189,38 +35068,38 @@ RuboCop::Cop::Style::DoubleNegation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arr # # # good # 5.times { } -# @example +# # # bad # (0...10).each {} # # # good # 10.times {} # -# source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#25 +# source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#24 class RuboCop::Cop::Style::EachForSimpleLoop < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#53 + # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#52 def each_range(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#65 + # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#64 def each_range_with_zero_origin?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#77 + # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#76 def each_range_without_block_argument?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#30 + # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#29 def on_block(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#46 + # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#45 def offending?(node); end end -# source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#28 +# source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#27 RuboCop::Cop::Style::EachForSimpleLoop::MSG = T.let(T.unsafe(nil), String) # Looks for inject / reduce calls where the passed in object is @@ -36032,9 +35911,18 @@ RuboCop::Cop::Style::EnvHome::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # will not attempt to automatically add a binding, or add filename and # line values. # -# This cop works only when a string literal is given as a code string. +# NOTE: This cop works only when a string literal is given as a code string. # No offense is reported if a string variable is given as below: # +# [source,ruby] +# ---- +# code = <<-RUBY +# def do_something +# end +# RUBY +# eval code # not checked. +# ---- +# # @example # # bad # eval <<-RUBY @@ -36059,100 +35947,93 @@ RuboCop::Cop::Style::EnvHome::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # def do_something # end # RUBY -# @example -# # not checked -# code = <<-RUBY -# def do_something -# end -# RUBY -# eval code # -# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#56 +# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#57 class RuboCop::Cop::Style::EvalWithLocation < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#74 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#75 def line_with_offset?(param0 = T.unsafe(nil), param1, param2); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#81 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#82 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#69 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#70 def valid_eval_receiver?(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#186 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#187 def add_offense_for_different_line(node, line_node, line_diff); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#131 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#132 def add_offense_for_incorrect_line(method_name, line_node, sign, line_diff); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#201 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#202 def add_offense_for_missing_line(node, code); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#208 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#209 def add_offense_for_missing_location(node, code); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#180 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#181 def add_offense_for_same_line(node, line_node); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#143 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#144 def check_file(node, file_node); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#156 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#157 def check_line(node, code); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#95 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#96 def check_location(node, code); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#193 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#194 def expected_line(sign, line_diff); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#122 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#123 def file_and_line(node); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#168 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#169 def line_difference(line_node, code); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#220 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#221 def missing_line(node, code); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#109 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#110 def register_offense(node, &block); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#114 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#115 def special_file_keyword?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#118 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#119 def special_line_keyword?(node); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#172 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#173 def string_first_line(str_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#127 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#128 def with_binding?(node); end end -# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#59 +# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#60 RuboCop::Cop::Style::EvalWithLocation::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#60 +# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#61 RuboCop::Cop::Style::EvalWithLocation::MSG_EVAL = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#61 +# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#62 RuboCop::Cop::Style::EvalWithLocation::MSG_INCORRECT_FILE = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#63 +# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#64 RuboCop::Cop::Style::EvalWithLocation::MSG_INCORRECT_LINE = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#66 +# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#67 RuboCop::Cop::Style::EvalWithLocation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for places where `Integer#even?` or `Integer#odd?` @@ -36661,8 +36542,7 @@ RuboCop::Cop::Style::FileEmpty::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Favor `File.(bin)read` convenience methods. # # @example -# ## text mode -# # bad +# # bad - text mode # File.open(filename).read # File.open(filename, &:read) # File.open(filename) { |f| f.read } @@ -36677,9 +36557,8 @@ RuboCop::Cop::Style::FileEmpty::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # # # good # File.read(filename) -# @example -# ## binary mode -# # bad +# +# # bad - binary mode # File.open(filename, 'rb').read # File.open(filename, 'rb', &:read) # File.open(filename, 'rb') do |f| @@ -36689,49 +36568,49 @@ RuboCop::Cop::Style::FileEmpty::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # # good # File.binread(filename) # -# source://rubocop//lib/rubocop/cop/style/file_read.rb#38 +# source://rubocop//lib/rubocop/cop/style/file_read.rb#35 class RuboCop::Cop::Style::FileRead < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/file_read.rb#65 + # source://rubocop//lib/rubocop/cop/style/file_read.rb#62 def block_read?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/file_read.rb#49 + # source://rubocop//lib/rubocop/cop/style/file_read.rb#46 def file_open?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/file_read.rb#69 + # source://rubocop//lib/rubocop/cop/style/file_read.rb#66 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/file_read.rb#60 + # source://rubocop//lib/rubocop/cop/style/file_read.rb#57 def send_read?(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/style/file_read.rb#84 + # source://rubocop//lib/rubocop/cop/style/file_read.rb#81 def evidence(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/file_read.rb#100 + # source://rubocop//lib/rubocop/cop/style/file_read.rb#97 def file_open_read?(node); end - # source://rubocop//lib/rubocop/cop/style/file_read.rb#106 + # source://rubocop//lib/rubocop/cop/style/file_read.rb#103 def read_method(mode); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/file_read.rb#92 + # source://rubocop//lib/rubocop/cop/style/file_read.rb#89 def read_node?(node, block_pass); end end -# source://rubocop//lib/rubocop/cop/style/file_read.rb#42 +# source://rubocop//lib/rubocop/cop/style/file_read.rb#39 RuboCop::Cop::Style::FileRead::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/file_read.rb#46 +# source://rubocop//lib/rubocop/cop/style/file_read.rb#43 RuboCop::Cop::Style::FileRead::READ_FILE_START_TO_FINISH_MODES = T.let(T.unsafe(nil), Set) -# source://rubocop//lib/rubocop/cop/style/file_read.rb#44 +# source://rubocop//lib/rubocop/cop/style/file_read.rb#41 RuboCop::Cop::Style::FileRead::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Favor `File.(bin)write` convenience methods. @@ -36748,8 +36627,7 @@ RuboCop::Cop::Style::FileRead::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # ---- # # @example -# ## text mode -# # bad +# # bad - text mode # File.open(filename, 'w').write(content) # File.open(filename, 'w') do |f| # f.write(content) @@ -36757,9 +36635,8 @@ RuboCop::Cop::Style::FileRead::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # # # good # File.write(filename, content) -# @example -# ## binary mode -# # bad +# +# # bad - binary mode # File.open(filename, 'wb').write(content) # File.open(filename, 'wb') do |f| # f.write(content) @@ -36768,24 +36645,24 @@ RuboCop::Cop::Style::FileRead::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # # good # File.binwrite(filename, content) # -# source://rubocop//lib/rubocop/cop/style/file_write.rb#41 +# source://rubocop//lib/rubocop/cop/style/file_write.rb#38 class RuboCop::Cop::Style::FileWrite < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/file_write.rb#68 + # source://rubocop//lib/rubocop/cop/style/file_write.rb#65 def block_write?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/file_write.rb#85 + # source://rubocop//lib/rubocop/cop/style/file_write.rb#82 def evidence(node); end - # source://rubocop//lib/rubocop/cop/style/file_write.rb#52 + # source://rubocop//lib/rubocop/cop/style/file_write.rb#49 def file_open?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/file_write.rb#72 + # source://rubocop//lib/rubocop/cop/style/file_write.rb#69 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/file_write.rb#63 + # source://rubocop//lib/rubocop/cop/style/file_write.rb#60 def send_write?(param0 = T.unsafe(nil)); end private @@ -36793,31 +36670,31 @@ class RuboCop::Cop::Style::FileWrite < ::RuboCop::Cop::Base # @return [Boolean] # @yield [content] # - # source://rubocop//lib/rubocop/cop/style/file_write.rb#95 + # source://rubocop//lib/rubocop/cop/style/file_write.rb#92 def file_open_write?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/file_write.rb#123 + # source://rubocop//lib/rubocop/cop/style/file_write.rb#120 def heredoc?(write_node); end - # source://rubocop//lib/rubocop/cop/style/file_write.rb#128 + # source://rubocop//lib/rubocop/cop/style/file_write.rb#125 def heredoc_range(first_argument); end - # source://rubocop//lib/rubocop/cop/style/file_write.rb#108 + # source://rubocop//lib/rubocop/cop/style/file_write.rb#105 def replacement(mode, filename, content, write_node); end - # source://rubocop//lib/rubocop/cop/style/file_write.rb#104 + # source://rubocop//lib/rubocop/cop/style/file_write.rb#101 def write_method(mode); end end -# source://rubocop//lib/rubocop/cop/style/file_write.rb#45 +# source://rubocop//lib/rubocop/cop/style/file_write.rb#42 RuboCop::Cop::Style::FileWrite::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/file_write.rb#47 +# source://rubocop//lib/rubocop/cop/style/file_write.rb#44 RuboCop::Cop::Style::FileWrite::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) -# source://rubocop//lib/rubocop/cop/style/file_write.rb#49 +# source://rubocop//lib/rubocop/cop/style/file_write.rb#46 RuboCop::Cop::Style::FileWrite::TRUNCATING_WRITE_MODES = T.let(T.unsafe(nil), Set) # Checks for division with integers coerced to floats. @@ -37382,11 +37259,16 @@ class RuboCop::Cop::Style::GlobalStdStream < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#64 + # source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#70 def gvar_name(const_name); end - # source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#60 + # source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#62 def message(const_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#66 + def namespaced?(node); end end # source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#37 @@ -38857,7 +38739,7 @@ RuboCop::Cop::Style::IfUnlessModifierOfIfUnless::MSG = T.let(T.unsafe(nil), Stri # # # good # foo == bar -# @example +# # # bad # if foo.do_something? # true @@ -38871,61 +38753,61 @@ RuboCop::Cop::Style::IfUnlessModifierOfIfUnless::MSG = T.let(T.unsafe(nil), Stri # # good # num.nonzero? ? true : false # -# source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#62 +# source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#61 class RuboCop::Cop::Style::IfWithBooleanLiteralBranches < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedMethods extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#74 + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#73 def double_negative?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#70 + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#69 def if_with_boolean_literal_branches?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#76 + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#75 def on_if(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#136 + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#135 def assume_boolean_value?(condition); end - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#114 + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#113 def message(node, keyword); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#96 + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#95 def multiple_elsif?(node); end - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#102 + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#101 def offense_range_with_keyword(node, condition); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#153 + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#152 def opposite_condition?(node); end - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#143 + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#142 def replacement_condition(node, condition); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#158 + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#157 def require_parentheses?(condition); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#122 + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#121 def return_boolean_value?(condition); end end -# source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#66 +# source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#65 RuboCop::Cop::Style::IfWithBooleanLiteralBranches::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#67 +# source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#66 RuboCop::Cop::Style::IfWithBooleanLiteralBranches::MSG_FOR_ELSIF = T.let(T.unsafe(nil), String) # Checks for uses of semicolon in if statements. @@ -40184,7 +40066,7 @@ RuboCop::Cop::Style::MapToSet::MSG = T.let(T.unsafe(nil), String) RuboCop::Cop::Style::MapToSet::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Enforces the presence (default) or absence of parentheses in -# method calls containing parameters. +# method calls containing arguments. # # In the default style (require_parentheses), macro methods are allowed. # Additional methods can be added to the `AllowedMethods` or @@ -41105,15 +40987,10 @@ class RuboCop::Cop::Style::MissingElse < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/missing_else.rb#127 def check(node); end - # source://rubocop//lib/rubocop/cop/style/missing_else.rb#181 + # source://rubocop//lib/rubocop/cop/style/missing_else.rb#177 def empty_else_config; end - # @return [Boolean] - # # source://rubocop//lib/rubocop/cop/style/missing_else.rb#171 - def empty_else_cop_enabled?; end - - # source://rubocop//lib/rubocop/cop/style/missing_else.rb#175 def empty_else_style; end # @return [Boolean] @@ -41825,11 +41702,6 @@ class RuboCop::Cop::Style::MultilineWhenThen < ::RuboCop::Cop::Base private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/multiline_when_then.rb#58 - def accept_node_type?(node); end - # Requires `then` for write `when` and its body on the same line. # # @return [Boolean] @@ -42027,7 +41899,7 @@ class RuboCop::Cop::Style::MutableConstant < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-sorbet/0.8.3/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#18 + # source://rubocop-sorbet/0.8.5/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#18 def on_assignment(value); end # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#127 @@ -42045,7 +41917,7 @@ class RuboCop::Cop::Style::MutableConstant < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#217 def splat_value(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet/0.8.3/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#12 + # source://rubocop-sorbet/0.8.5/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#12 def t_let(param0 = T.unsafe(nil)); end private @@ -45046,7 +44918,7 @@ RuboCop::Cop::Style::RedundantCapitalW::MSG = T.let(T.unsafe(nil), String) # # # good # a = b || c -# @example +# # # bad # if b # b @@ -45064,12 +44936,12 @@ RuboCop::Cop::Style::RedundantCapitalW::MSG = T.let(T.unsafe(nil), String) # c # end # -# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#33 +# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#32 class RuboCop::Cop::Style::RedundantCondition < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#43 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#42 def on_if(node); end private @@ -45079,116 +44951,116 @@ class RuboCop::Cop::Style::RedundantCondition < ::RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#167 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#166 def argument_with_operator?(argument); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#142 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#141 def asgn_type?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#132 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#131 def branches_have_assignment?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#146 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#145 def branches_have_method?(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#240 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#239 def correct_ternary(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#187 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#186 def else_source(else_branch, arithmetic_operation); end - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#213 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#212 def else_source_if_has_assignment(else_branch); end - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#203 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#202 def else_source_if_has_method(else_branch); end - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#175 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#174 def if_source(if_branch, arithmetic_operation); end - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#223 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#222 def make_ternary_form(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#64 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#63 def message(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#79 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#78 def offense?(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#72 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#71 def range_of_offense(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#88 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#87 def redundant_condition?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#255 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#254 def require_braces?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#248 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#247 def require_parentheses?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#161 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#160 def same_method?(if_branch, else_branch); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#155 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#154 def single_argument_method?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#104 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#103 def synonymous_condition_and_branch?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#259 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#258 def use_arithmetic_operation?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#100 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#99 def use_hash_key_access?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#96 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#95 def use_hash_key_assignment?(else_branch); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#92 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#91 def use_if_branch?(else_branch); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#263 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#262 def without_argument_parentheses_method?(node); end end -# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#39 +# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#38 RuboCop::Cop::Style::RedundantCondition::ARGUMENT_WITH_OPERATOR_TYPES = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#37 +# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#36 RuboCop::Cop::Style::RedundantCondition::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#38 +# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#37 RuboCop::Cop::Style::RedundantCondition::REDUNDANT_CONDITION = T.let(T.unsafe(nil), String) # Checks for redundant returning of true/false in conditionals. @@ -46697,13 +46569,10 @@ class RuboCop::Cop::Style::RedundantRegexpEscape < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#92 def delimiter?(node, char); end - # Please remove this `else` branch when support for regexp_parser 1.8 will be dropped. - # It's for compatibility with regexp_parser 1.8 and will never be maintained. - # - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#99 + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#98 def each_escape(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#126 + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#110 def escape_range_at_index(node, index); end end @@ -49130,10 +48999,10 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#242 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#261 def allow_modifier?; end - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#227 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#233 def arguments_range(node); end # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#81 @@ -49151,25 +49020,25 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#145 def correct_for_basic_condition_style(corrector, node, if_branch, and_operator); end - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#175 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#181 def correct_for_comment(corrector, node, if_branch); end # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#136 def correct_for_guard_condition_style(corrector, outer_condition, if_branch, and_operator); end - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#165 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#171 def correct_for_outer_condition_modify_form_style(corrector, node, if_branch); end # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#130 def correct_from_unless_to_if(corrector, node, is_modify_form: T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#184 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#190 def correct_outer_condition(corrector, condition); end - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#197 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#203 def insert_bang(corrector, node, is_modify_form); end - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#210 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#216 def insert_bang_for_and(corrector, node); end # @return [Boolean] @@ -49179,15 +49048,18 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#246 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#265 def outer_condition_modify_form?(node, if_branch); end - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#238 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#254 + def parenthesized_method_arguments(node); end + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#244 def replace_condition(condition); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#222 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#228 def require_parentheses?(condition); end # @return [Boolean] @@ -49200,7 +49072,7 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#233 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#239 def wrap_condition?(node); end class << self @@ -51727,7 +51599,6 @@ RuboCop::Cop::Style::WhenThen::MSG = T.let(T.unsafe(nil), String) # while x.any? # do_something(x.pop) # end -# @example # # # bad # until x.empty? do @@ -51739,18 +51610,18 @@ RuboCop::Cop::Style::WhenThen::MSG = T.let(T.unsafe(nil), String) # do_something(x.pop) # end # -# source://rubocop//lib/rubocop/cop/style/while_until_do.rb#31 +# source://rubocop//lib/rubocop/cop/style/while_until_do.rb#29 class RuboCop::Cop::Style::WhileUntilDo < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/while_until_do.rb#36 + # source://rubocop//lib/rubocop/cop/style/while_until_do.rb#34 def on_until(node); end - # source://rubocop//lib/rubocop/cop/style/while_until_do.rb#36 + # source://rubocop//lib/rubocop/cop/style/while_until_do.rb#34 def on_while(node); end end -# source://rubocop//lib/rubocop/cop/style/while_until_do.rb#34 +# source://rubocop//lib/rubocop/cop/style/while_until_do.rb#32 RuboCop::Cop::Style::WhileUntilDo::MSG = T.let(T.unsafe(nil), String) # Checks for while and until statements that would fit on one line @@ -51765,7 +51636,7 @@ RuboCop::Cop::Style::WhileUntilDo::MSG = T.let(T.unsafe(nil), String) # # # good # x += 1 while x < 10 -# @example +# # # bad # until x > 10 # x += 1 @@ -51782,7 +51653,7 @@ RuboCop::Cop::Style::WhileUntilDo::MSG = T.let(T.unsafe(nil), String) # x += 100 # end # -# source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#36 +# source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#35 class RuboCop::Cop::Style::WhileUntilModifier < ::RuboCop::Cop::Base include ::RuboCop::Cop::Alignment include ::RuboCop::Cop::LineLengthHelp @@ -51790,14 +51661,14 @@ class RuboCop::Cop::Style::WhileUntilModifier < ::RuboCop::Cop::Base include ::RuboCop::Cop::StatementModifier extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#42 + # source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#41 def on_until(node); end - # source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#42 + # source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#41 def on_while(node); end end -# source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#40 +# source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#39 RuboCop::Cop::Style::WhileUntilModifier::MSG = T.let(T.unsafe(nil), String) # Checks for array literals made up of word-like @@ -52217,42 +52088,42 @@ class RuboCop::Cop::Style::ZeroLengthPredicate < ::RuboCop::Cop::Base # implement `#size`, but not `#empty`. We ignore those to # reduce false positives. # - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#143 + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#147 def non_polymorphic_collection?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#110 + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#114 def nonzero_length_comparison(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#45 + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#51 def on_csend(node); end # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#45 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#134 + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#138 def other_length_node(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#102 + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#106 def zero_length_comparison(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#126 + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#130 def zero_length_node(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#97 + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#101 def zero_length_predicate?(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#81 + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#85 def check_nonzero_length_comparison(node); end - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#66 + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#70 def check_zero_length_comparison(node); end - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#54 + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#58 def check_zero_length_predicate(node); end - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#115 + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#119 def replacement(node); end end @@ -53150,59 +53021,59 @@ class RuboCop::Cop::VariableForce < ::RuboCop::Cop::Force # # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#76 + # source://rubocop//lib/rubocop/cop/variable_force.rb#79 def investigate(processed_source); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#85 + # source://rubocop//lib/rubocop/cop/variable_force.rb#88 def process_node(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#71 + # source://rubocop//lib/rubocop/cop/variable_force.rb#74 def variable_table; end private - # source://rubocop//lib/rubocop/cop/variable_force.rb#368 + # source://rubocop//lib/rubocop/cop/variable_force.rb#380 def after_declaring_variable(arg); end - # source://rubocop//lib/rubocop/cop/variable_force.rb#368 + # source://rubocop//lib/rubocop/cop/variable_force.rb#380 def after_entering_scope(arg); end - # source://rubocop//lib/rubocop/cop/variable_force.rb#368 + # source://rubocop//lib/rubocop/cop/variable_force.rb#380 def after_leaving_scope(arg); end - # source://rubocop//lib/rubocop/cop/variable_force.rb#368 + # source://rubocop//lib/rubocop/cop/variable_force.rb#380 def before_declaring_variable(arg); end - # source://rubocop//lib/rubocop/cop/variable_force.rb#368 + # source://rubocop//lib/rubocop/cop/variable_force.rb#380 def before_entering_scope(arg); end - # source://rubocop//lib/rubocop/cop/variable_force.rb#368 + # source://rubocop//lib/rubocop/cop/variable_force.rb#380 def before_leaving_scope(arg); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#339 + # source://rubocop//lib/rubocop/cop/variable_force.rb#351 def descendant_reference(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#329 + # source://rubocop//lib/rubocop/cop/variable_force.rb#341 def each_descendant_reference(loop_node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#314 + # source://rubocop//lib/rubocop/cop/variable_force.rb#326 def find_variables_in_loop(loop_node); end # This is called for each scope recursively. # # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#94 + # source://rubocop//lib/rubocop/cop/variable_force.rb#97 def inspect_variables_in_scope(scope_node); end # Mark all assignments which are referenced in the same loop @@ -53211,104 +53082,109 @@ class RuboCop::Cop::VariableForce < ::RuboCop::Cop::Force # # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#295 + # source://rubocop//lib/rubocop/cop/variable_force.rb#307 def mark_assignments_as_referenced_in_loop(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#126 + # source://rubocop//lib/rubocop/cop/variable_force.rb#130 def node_handler_method_name(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#100 + # source://rubocop//lib/rubocop/cop/variable_force.rb#103 def process_children(origin_node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#231 + # source://rubocop//lib/rubocop/cop/variable_force.rb#243 def process_loop(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#160 + # source://rubocop//lib/rubocop/cop/variable_force.rb#182 + def process_pattern_match_variable(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#164 def process_regexp_named_captures(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#246 + # source://rubocop//lib/rubocop/cop/variable_force.rb#258 def process_rescue(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#265 + # source://rubocop//lib/rubocop/cop/variable_force.rb#277 def process_scope(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#284 + # source://rubocop//lib/rubocop/cop/variable_force.rb#296 def process_send(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#142 + # source://rubocop//lib/rubocop/cop/variable_force.rb#146 def process_variable_assignment(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#130 + # source://rubocop//lib/rubocop/cop/variable_force.rb#134 def process_variable_declaration(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#219 + # source://rubocop//lib/rubocop/cop/variable_force.rb#231 def process_variable_multiple_assignment(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#184 + # source://rubocop//lib/rubocop/cop/variable_force.rb#196 def process_variable_operator_assignment(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#226 + # source://rubocop//lib/rubocop/cop/variable_force.rb#238 def process_variable_referencing(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#257 + # source://rubocop//lib/rubocop/cop/variable_force.rb#269 def process_zero_arity_super(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#178 + # source://rubocop//lib/rubocop/cop/variable_force.rb#190 def regexp_captured_names(node); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/variable_force.rb#351 + # source://rubocop//lib/rubocop/cop/variable_force.rb#363 def scanned_node?(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#355 + # source://rubocop//lib/rubocop/cop/variable_force.rb#367 def scanned_nodes; end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#108 + # source://rubocop//lib/rubocop/cop/variable_force.rb#111 def skip_children!; end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#278 + # source://rubocop//lib/rubocop/cop/variable_force.rb#290 def twisted_nodes(node); end end # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#32 +# source://rubocop//lib/rubocop/cop/variable_force.rb#35 RuboCop::Cop::VariableForce::ARGUMENT_DECLARATION_TYPES = T.let(T.unsafe(nil), Array) # This class represents each assignment of a variable. @@ -53420,12 +53296,12 @@ RuboCop::Cop::VariableForce::Assignment::MULTIPLE_LEFT_HAND_SIDE_TYPE = T.let(T. # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#65 +# source://rubocop//lib/rubocop/cop/variable_force.rb#68 class RuboCop::Cop::VariableForce::AssignmentReference < ::Struct # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/variable_force.rb#66 + # source://rubocop//lib/rubocop/cop/variable_force.rb#69 def assignment?; end # Returns the value of attribute node @@ -53865,32 +53741,37 @@ end # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#39 +# source://rubocop//lib/rubocop/cop/variable_force.rb#42 RuboCop::Cop::VariableForce::LOGICAL_OPERATOR_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#48 +# source://rubocop//lib/rubocop/cop/variable_force.rb#51 RuboCop::Cop::VariableForce::LOOP_TYPES = T.let(T.unsafe(nil), Array) # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#42 +# source://rubocop//lib/rubocop/cop/variable_force.rb#45 RuboCop::Cop::VariableForce::MULTIPLE_ASSIGNMENT_TYPE = T.let(T.unsafe(nil), Symbol) # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#112 +# source://rubocop//lib/rubocop/cop/variable_force.rb#115 RuboCop::Cop::VariableForce::NODE_HANDLER_METHOD_NAMES = T.let(T.unsafe(nil), Hash) # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#40 +# source://rubocop//lib/rubocop/cop/variable_force.rb#43 RuboCop::Cop::VariableForce::OPERATOR_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#47 +# source://rubocop//lib/rubocop/cop/variable_force.rb#30 +RuboCop::Cop::VariableForce::PATTERN_MATCH_VARIABLE_TYPE = T.let(T.unsafe(nil), Symbol) + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#50 RuboCop::Cop::VariableForce::POST_CONDITION_LOOP_TYPES = T.let(T.unsafe(nil), Array) # @api private @@ -53900,12 +53781,12 @@ RuboCop::Cop::VariableForce::REGEXP_NAMED_CAPTURE_TYPE = T.let(T.unsafe(nil), Sy # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#50 +# source://rubocop//lib/rubocop/cop/variable_force.rb#53 RuboCop::Cop::VariableForce::RESCUE_TYPE = T.let(T.unsafe(nil), Symbol) # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#43 +# source://rubocop//lib/rubocop/cop/variable_force.rb#46 RuboCop::Cop::VariableForce::REST_ASSIGNMENT_TYPE = T.let(T.unsafe(nil), Symbol) # This class represents each reference of a variable. @@ -53955,12 +53836,12 @@ RuboCop::Cop::VariableForce::Reference::VARIABLE_REFERENCE_TYPES = T.let(T.unsaf # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#55 +# source://rubocop//lib/rubocop/cop/variable_force.rb#58 RuboCop::Cop::VariableForce::SCOPE_TYPES = T.let(T.unsafe(nil), Array) # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#57 +# source://rubocop//lib/rubocop/cop/variable_force.rb#60 RuboCop::Cop::VariableForce::SEND_TYPE = T.let(T.unsafe(nil), Symbol) # A Scope represents a context of local variable visibility. @@ -54039,7 +53920,7 @@ RuboCop::Cop::VariableForce::Scope::OUTER_SCOPE_CHILD_INDICES = T.let(T.unsafe(n # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#54 +# source://rubocop//lib/rubocop/cop/variable_force.rb#57 RuboCop::Cop::VariableForce::TWISTED_SCOPE_TYPES = T.let(T.unsafe(nil), Array) # @api private @@ -54049,12 +53930,12 @@ RuboCop::Cop::VariableForce::VARIABLE_ASSIGNMENT_TYPE = T.let(T.unsafe(nil), Sym # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#30 +# source://rubocop//lib/rubocop/cop/variable_force.rb#31 RuboCop::Cop::VariableForce::VARIABLE_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#45 +# source://rubocop//lib/rubocop/cop/variable_force.rb#48 RuboCop::Cop::VariableForce::VARIABLE_REFERENCE_TYPE = T.let(T.unsafe(nil), Symbol) # A Variable represents existence of a local variable. @@ -54171,12 +54052,12 @@ RuboCop::Cop::VariableForce::Variable::VARIABLE_DECLARATION_TYPES = T.let(T.unsa # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#59 +# source://rubocop//lib/rubocop/cop/variable_force.rb#62 class RuboCop::Cop::VariableForce::VariableReference < ::Struct # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/variable_force.rb#60 + # source://rubocop//lib/rubocop/cop/variable_force.rb#63 def assignment?; end # Returns the value of attribute name @@ -54258,7 +54139,7 @@ end # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#52 +# source://rubocop//lib/rubocop/cop/variable_force.rb#55 RuboCop::Cop::VariableForce::ZERO_ARITY_SUPER_TYPE = T.let(T.unsafe(nil), Symbol) # Help methods for determining node visibility. @@ -54608,13 +54489,10 @@ end # # source://rubocop//lib/rubocop/ext/regexp_node.rb#6 module RuboCop::Ext::RegexpNode - # Please remove this `else` branch when support for regexp_parser 1.8 will be dropped. - # It's for compatibility with regexp_parser 1.8 and will never be maintained. - # - # source://rubocop//lib/rubocop/ext/regexp_node.rb#19 + # source://rubocop//lib/rubocop/ext/regexp_node.rb#18 def assign_properties(*_arg0); end - # source://rubocop//lib/rubocop/ext/regexp_node.rb#53 + # source://rubocop//lib/rubocop/ext/regexp_node.rb#31 def each_capture(named: T.unsafe(nil)); end # Note: we extend Regexp nodes to provide `loc` and `expression` @@ -54629,10 +54507,10 @@ module RuboCop::Ext::RegexpNode # @return [Boolean] # - # source://rubocop//lib/rubocop/ext/regexp_node.rb#65 + # source://rubocop//lib/rubocop/ext/regexp_node.rb#43 def named_capturing?(exp, event, named); end - # source://rubocop//lib/rubocop/ext/regexp_node.rb#73 + # source://rubocop//lib/rubocop/ext/regexp_node.rb#51 def with_interpolations_blanked; end end diff --git a/sorbet/rbi/gems/spoom@1.3.3.rbi b/sorbet/rbi/gems/spoom@1.4.2.rbi similarity index 98% rename from sorbet/rbi/gems/spoom@1.3.3.rbi rename to sorbet/rbi/gems/spoom@1.4.2.rbi index dd7de1b..0ac317b 100644 --- a/sorbet/rbi/gems/spoom@1.3.3.rbi +++ b/sorbet/rbi/gems/spoom@1.4.2.rbi @@ -1004,7 +1004,7 @@ class Spoom::Coverage::D3::ColorPalette < ::T::Struct prop :strong, ::String class << self - # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11506/lib/types/struct.rb#13 def inherited(s); end end end @@ -1344,7 +1344,7 @@ class Spoom::Coverage::Snapshot < ::T::Struct sig { params(obj: T::Hash[::String, T.untyped]).returns(::Spoom::Coverage::Snapshot) } def from_obj(obj); end - # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11506/lib/types/struct.rb#13 def inherited(s); end end end @@ -1480,7 +1480,7 @@ class Spoom::Deadcode::Definition < ::T::Struct def to_json(*args); end class << self - # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11506/lib/types/struct.rb#13 def inherited(s); end end end @@ -2034,6 +2034,10 @@ class Spoom::Deadcode::Plugins::Minitest < ::Spoom::Deadcode::Plugins::Base # source://spoom//lib/spoom/deadcode/plugins/minitest.rb#22 sig { override.params(definition: ::Spoom::Model::Method).void } def on_define_method(definition); end + + # source://spoom//lib/spoom/deadcode/plugins/minitest.rb#28 + sig { override.params(send: ::Spoom::Deadcode::Send).void } + def on_send(send); end end # source://spoom//lib/spoom/deadcode/plugins/namespaces.rb#7 @@ -2364,7 +2368,7 @@ class Spoom::Deadcode::Send < ::T::Struct def each_arg_assoc(&block); end class << self - # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11506/lib/types/struct.rb#13 def inherited(s); end end end @@ -2384,7 +2388,7 @@ class Spoom::ExecResult < ::T::Struct def to_s; end class << self - # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11506/lib/types/struct.rb#13 def inherited(s); end end end @@ -2582,7 +2586,7 @@ class Spoom::FileTree::Node < ::T::Struct def path; end class << self - # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11506/lib/types/struct.rb#13 def inherited(s); end end end @@ -2648,7 +2652,7 @@ class Spoom::Git::Commit < ::T::Struct def timestamp; end class << self - # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11506/lib/types/struct.rb#13 def inherited(s); end # Parse a line formatted as `%h %at` into a `Commit` @@ -2760,7 +2764,7 @@ class Spoom::LSP::Diagnostic < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Diagnostic) } def from_json(json); end - # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11506/lib/types/struct.rb#13 def inherited(s); end end end @@ -2793,7 +2797,7 @@ class Spoom::LSP::DocumentSymbol < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::DocumentSymbol) } def from_json(json); end - # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11506/lib/types/struct.rb#13 def inherited(s); end end end @@ -2851,7 +2855,7 @@ class Spoom::LSP::Hover < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Hover) } def from_json(json); end - # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11506/lib/types/struct.rb#13 def inherited(s); end end end @@ -2876,7 +2880,7 @@ class Spoom::LSP::Location < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Location) } def from_json(json); end - # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11506/lib/types/struct.rb#13 def inherited(s); end end end @@ -2939,7 +2943,7 @@ class Spoom::LSP::Position < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Position) } def from_json(json); end - # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11506/lib/types/struct.rb#13 def inherited(s); end end end @@ -2977,7 +2981,7 @@ class Spoom::LSP::Range < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Range) } def from_json(json); end - # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11506/lib/types/struct.rb#13 def inherited(s); end end end @@ -3043,7 +3047,7 @@ class Spoom::LSP::SignatureHelp < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::SignatureHelp) } def from_json(json); end - # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11506/lib/types/struct.rb#13 def inherited(s); end end end @@ -3095,55 +3099,57 @@ end class Spoom::Location include ::Comparable - # source://spoom//lib/spoom/location.rb#53 + # @raise [LocationError] + # + # source://spoom//lib/spoom/location.rb#73 sig do params( file: ::String, - start_line: ::Integer, - start_column: ::Integer, - end_line: ::Integer, - end_column: ::Integer + start_line: T.nilable(::Integer), + start_column: T.nilable(::Integer), + end_line: T.nilable(::Integer), + end_column: T.nilable(::Integer) ).void end - def initialize(file, start_line, start_column, end_line, end_column); end + def initialize(file, start_line: T.unsafe(nil), start_column: T.unsafe(nil), end_line: T.unsafe(nil), end_column: T.unsafe(nil)); end - # source://spoom//lib/spoom/location.rb#73 + # source://spoom//lib/spoom/location.rb#106 sig { override.params(other: ::BasicObject).returns(T.nilable(::Integer)) } def <=>(other); end - # @return [Integer] + # @return [Integer, nil] # - # source://spoom//lib/spoom/location.rb#42 + # source://spoom//lib/spoom/location.rb#62 def end_column; end - # @return [Integer] + # @return [Integer, nil] # - # source://spoom//lib/spoom/location.rb#42 + # source://spoom//lib/spoom/location.rb#62 def end_line; end - # source://spoom//lib/spoom/location.rb#39 + # source://spoom//lib/spoom/location.rb#59 sig { returns(::String) } def file; end - # source://spoom//lib/spoom/location.rb#62 + # source://spoom//lib/spoom/location.rb#93 sig { params(other: ::Spoom::Location).returns(T::Boolean) } def include?(other); end - # @return [Integer] + # @return [Integer, nil] # - # source://spoom//lib/spoom/location.rb#42 + # source://spoom//lib/spoom/location.rb#62 def start_column; end - # source://spoom//lib/spoom/location.rb#42 - sig { returns(::Integer) } + # source://spoom//lib/spoom/location.rb#62 + sig { returns(T.nilable(::Integer)) } def start_line; end - # source://spoom//lib/spoom/location.rb#80 + # source://spoom//lib/spoom/location.rb#129 sig { returns(::String) } def to_s; end class << self - # source://spoom//lib/spoom/location.rb#33 + # source://spoom//lib/spoom/location.rb#47 sig { params(file: ::String, location: ::Prism::Location).returns(::Spoom::Location) } def from_prism(file, location); end @@ -3467,7 +3473,7 @@ class Spoom::Model::Reference < ::T::Struct sig { params(name: ::String, location: ::Spoom::Location).returns(::Spoom::Model::Reference) } def constant(name, location); end - # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11506/lib/types/struct.rb#13 def inherited(s); end # source://spoom//lib/spoom/model/reference.rb#29 diff --git a/sorbet/rbi/gems/tapioca@0.15.1.rbi b/sorbet/rbi/gems/tapioca@0.15.1.rbi index 03fdd66..25572e4 100644 --- a/sorbet/rbi/gems/tapioca@0.15.1.rbi +++ b/sorbet/rbi/gems/tapioca@0.15.1.rbi @@ -55,7 +55,7 @@ module RBI; end # source://tapioca//lib/tapioca/rbi_ext/model.rb#5 class RBI::Tree < ::RBI::NodeWithComments - # source://rbi/0.1.13/lib/rbi/model.rb#119 + # source://rbi/0.1.14/lib/rbi/model.rb#121 sig do params( loc: T.nilable(::RBI::Loc), @@ -65,19 +65,15 @@ class RBI::Tree < ::RBI::NodeWithComments end def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi/0.1.13/lib/rbi/model.rb#126 + # source://rbi/0.1.14/lib/rbi/model.rb#128 sig { params(node: ::RBI::Node).void } def <<(node); end - # source://rbi/0.1.13/lib/rbi/printer.rb#226 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi/0.1.13/lib/rbi/rewriters/add_sig_templates.rb#66 + # source://rbi/0.1.14/lib/rbi/rewriters/add_sig_templates.rb#66 sig { params(with_todo_comment: T::Boolean).void } def add_sig_templates!(with_todo_comment: T.unsafe(nil)); end - # source://rbi/0.1.13/lib/rbi/rewriters/annotate.rb#49 + # source://rbi/0.1.14/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 @@ -164,27 +160,27 @@ 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/0.1.13/lib/rbi/rewriters/deannotate.rb#41 + # source://rbi/0.1.14/lib/rbi/rewriters/deannotate.rb#41 sig { params(annotation: ::String).void } def deannotate!(annotation); end - # source://rbi/0.1.13/lib/rbi/model.rb#132 + # source://rbi/0.1.14/lib/rbi/model.rb#134 sig { returns(T::Boolean) } def empty?; end - # source://rbi/0.1.13/lib/rbi/rewriters/filter_versions.rb#118 + # source://rbi/0.1.14/lib/rbi/rewriters/filter_versions.rb#118 sig { params(version: ::Gem::Version).void } def filter_versions!(version); end - # source://rbi/0.1.13/lib/rbi/rewriters/group_nodes.rb#38 + # source://rbi/0.1.14/lib/rbi/rewriters/group_nodes.rb#81 sig { void } def group_nodes!; end - # source://rbi/0.1.13/lib/rbi/index.rb#68 + # source://rbi/0.1.14/lib/rbi/index.rb#68 sig { returns(::RBI::Index) } def index; end - # source://rbi/0.1.13/lib/rbi/rewriters/merge_trees.rb#324 + # source://rbi/0.1.14/lib/rbi/rewriters/merge_trees.rb#324 sig do params( other: ::RBI::Tree, @@ -195,23 +191,23 @@ 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/0.1.13/lib/rbi/rewriters/nest_non_public_methods.rb#46 + # source://rbi/0.1.14/lib/rbi/rewriters/nest_non_public_methods.rb#46 sig { void } def nest_non_public_methods!; end - # source://rbi/0.1.13/lib/rbi/rewriters/nest_singleton_methods.rb#36 + # source://rbi/0.1.14/lib/rbi/rewriters/nest_singleton_methods.rb#36 sig { void } def nest_singleton_methods!; end - # source://rbi/0.1.13/lib/rbi/model.rb#110 + # source://rbi/0.1.14/lib/rbi/model.rb#112 sig { returns(T::Array[::RBI::Node]) } def nodes; end - # source://rbi/0.1.13/lib/rbi/printer.rb#233 - sig { override.returns(T::Boolean) } - def oneline?; end + # source://rbi/0.1.14/lib/rbi/rewriters/attr_to_methods.rb#53 + sig { void } + def replace_attributes_with_methods!; end - # source://rbi/0.1.13/lib/rbi/rewriters/sort_nodes.rb#119 + # source://rbi/0.1.14/lib/rbi/rewriters/sort_nodes.rb#119 sig { void } def sort_nodes!; end @@ -232,7 +228,7 @@ class RBI::TypedParam < ::T::Struct const :type, ::String class << self - # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11506/lib/types/struct.rb#13 def inherited(s); end end end @@ -1155,7 +1151,7 @@ class Tapioca::ConfigHelper::ConfigError < ::T::Struct const :message_parts, T::Array[::Tapioca::ConfigHelper::ConfigErrorMessagePart] class << self - # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11506/lib/types/struct.rb#13 def inherited(s); end end end @@ -1166,7 +1162,7 @@ class Tapioca::ConfigHelper::ConfigErrorMessagePart < ::T::Struct const :colors, T::Array[::Symbol] class << self - # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11506/lib/types/struct.rb#13 def inherited(s); end end end @@ -2207,7 +2203,7 @@ class Tapioca::GemInfo < ::T::Struct sig { params(spec: ::Bundler::LazySpecification).returns(::Tapioca::GemInfo) } def from_spec(spec); end - # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11506/lib/types/struct.rb#13 def inherited(s); end end end @@ -2684,7 +2680,7 @@ class Tapioca::Loaders::Loader # @param engine [T.class_of(Rails::Engine)] # @return [Array] # - # source://sorbet-runtime/0.5.11481/lib/types/private/methods/_methods.rb#257 + # source://sorbet-runtime/0.5.11506/lib/types/private/methods/_methods.rb#257 def eager_load_paths(*args, **_arg1, &blk); end # source://tapioca//lib/tapioca/loaders/loader.rb#188 @@ -3592,7 +3588,7 @@ module Tapioca::Static::SymbolLoader # @return [Array] # - # source://sorbet-runtime/0.5.11481/lib/types/private/methods/_methods.rb#257 + # source://sorbet-runtime/0.5.11506/lib/types/private/methods/_methods.rb#257 def engines(*args, **_arg1, &blk); end # source://tapioca//lib/tapioca/static/symbol_loader.rb#82 diff --git a/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi b/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi index e805297..fca5219 100644 --- a/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +++ b/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi @@ -388,7 +388,7 @@ class YARDSorbet::TStructProp < ::T::Struct const :types, T::Array[::String] class << self - # source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11506/lib/types/struct.rb#13 def inherited(s); end end end diff --git a/sorbet/rbi/gems/zeitwerk@2.6.16.rbi b/sorbet/rbi/gems/zeitwerk@2.6.17.rbi similarity index 100% rename from sorbet/rbi/gems/zeitwerk@2.6.16.rbi rename to sorbet/rbi/gems/zeitwerk@2.6.17.rbi