diff --git a/Gemfile b/Gemfile index 188ad31..642ac94 100644 --- a/Gemfile +++ b/Gemfile @@ -2,12 +2,11 @@ source "https://rubygems.org" -gem "activesupport" gem "rspec" gem "rspec-json_expectations" gem "rspec-sorbet", "~> 1.9.2" -gem "sorbet-coerce", ">= 0.2.6" -gem "sorbet-static-and-runtime", ">= 0.5.11609" +gem "sorbet-coerce", "~> 0.7" +gem "sorbet-static-and-runtime", "0.5.11670" gem "tapioca", "~> 0.15.1", require: false gem "syntax_tree", "~> 6.2", require: false diff --git a/Gemfile.lock b/Gemfile.lock index f17f896..93dac9b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,26 +1,8 @@ GEM remote: https://rubygems.org/ specs: - activesupport (7.2.2) - base64 - benchmark (>= 0.3) - bigdecimal - concurrent-ruby (~> 1.0, >= 1.3.1) - connection_pool (>= 2.2.5) - drb - i18n (>= 1.6, < 2) - logger (>= 1.4.2) - minitest (>= 5.1) - securerandom (>= 0.3) - tzinfo (~> 2.0, >= 2.0.5) - base64 (0.2.0) - benchmark (0.3.0) - bigdecimal (3.1.8) coderay (1.1.3) - concurrent-ruby (1.3.4) - connection_pool (2.4.1) diff-lcs (1.5.1) - drb (2.2.1) erubi (1.12.0) ffi (1.17.0-arm64-darwin) ffi (1.17.0-x86_64-linux-gnu) @@ -39,15 +21,11 @@ GEM guard (~> 2.1) guard-compat (~> 1.1) rspec (>= 2.99.0, < 4.0) - i18n (1.14.6) - concurrent-ruby (~> 1.0) listen (3.9.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - logger (1.6.1) lumberjack (1.2.10) method_source (1.1.0) - minitest (5.25.1) nenv (0.3.0) netrc (0.11.0) notiffany (0.1.3) @@ -83,20 +61,19 @@ GEM sorbet-runtime rspec-support (3.13.1) safe_type (1.1.1) - securerandom (0.3.1) shellany (0.0.1) - sorbet (0.5.11609) - sorbet-static (= 0.5.11609) + sorbet (0.5.11670) + sorbet-static (= 0.5.11670) sorbet-coerce (0.7.0) polyfill (~> 1.8) safe_type (~> 1.1, >= 1.1.1) sorbet-runtime (>= 0.4.4704) - sorbet-runtime (0.5.11609) - sorbet-static (0.5.11609-universal-darwin) - sorbet-static (0.5.11609-x86_64-linux) - sorbet-static-and-runtime (0.5.11609) - sorbet (= 0.5.11609) - sorbet-runtime (= 0.5.11609) + sorbet-runtime (0.5.11670) + sorbet-static (0.5.11670-universal-darwin) + sorbet-static (0.5.11670-x86_64-linux) + sorbet-static-and-runtime (0.5.11670) + sorbet (= 0.5.11670) + sorbet-runtime (= 0.5.11670) spoom (1.4.2) erubi (>= 1.10.0) prism (>= 0.28.0) @@ -114,8 +91,6 @@ GEM thor (>= 1.2.0) yard-sorbet thor (1.3.0) - tzinfo (2.0.6) - concurrent-ruby (~> 1.0) yard (0.9.36) yard-sorbet (0.9.0) sorbet-runtime @@ -126,14 +101,13 @@ PLATFORMS x86_64-linux DEPENDENCIES - activesupport guard guard-rspec rspec rspec-json_expectations rspec-sorbet (~> 1.9.2) - sorbet-coerce (>= 0.2.6) - sorbet-static-and-runtime (>= 0.5.11609) + sorbet-coerce (~> 0.7) + sorbet-static-and-runtime (= 0.5.11670) syntax_tree (~> 6.2) tapioca (~> 0.15.1) diff --git a/examples/sinatra-pet-shelter/Gemfile b/examples/sinatra-pet-shelter/Gemfile index 06d2a2b..1787fbc 100644 --- a/examples/sinatra-pet-shelter/Gemfile +++ b/examples/sinatra-pet-shelter/Gemfile @@ -5,7 +5,7 @@ source "https://rubygems.org" gem "json" gem "resource_registry", github: "factorialco/resource-registry", - branch: "adding-example-app" + branch: "chore/update-sorbet-version-and-fixes" gem "sinatra" gem "sinatra-contrib" gem "tapioca", "~> 0.15.1", require: false diff --git a/examples/sinatra-pet-shelter/Gemfile.lock b/examples/sinatra-pet-shelter/Gemfile.lock index 0091787..e880ba1 100644 --- a/examples/sinatra-pet-shelter/Gemfile.lock +++ b/examples/sinatra-pet-shelter/Gemfile.lock @@ -1,12 +1,11 @@ GIT remote: https://github.com/factorialco/resource-registry.git - revision: 2b73ddd272417ca8026e5f13e1103b4c72897824 - branch: adding-example-app + revision: ed87fb3c171f006fe05ad42219c7f40682a31ce9 + branch: chore/update-sorbet-version-and-fixes specs: resource_registry (0.0.0) - dry-inflector (= 1.1.0) - sorbet-coerce (>= 0.2.6) - sorbet-runtime (= 0.5.11609) + sorbet-coerce (~> 0.7) + sorbet-runtime (= 0.5.11670) GEM remote: https://rubygems.org/ @@ -14,9 +13,9 @@ GEM base64 (0.2.0) coderay (1.1.3) diff-lcs (1.5.1) - dry-inflector (1.1.0) erubi (1.13.0) - json (2.7.2) + json (2.8.2) + logger (1.6.1) method_source (1.1.0) multi_json (1.15.0) mustermann (3.0.3) @@ -25,13 +24,16 @@ GEM parallel (1.26.3) polyfill (1.9.0) prism (0.30.0) - pry (0.14.2) + pry (0.15.0) coderay (~> 1.1) method_source (~> 1.0) - rack (2.2.9) - rack-protection (3.2.0) + rack (3.1.8) + rack-protection (4.1.1) base64 (>= 0.1.0) - rack (~> 2.2, >= 2.2.4) + logger (>= 1.6.0) + rack (>= 3.0.0, < 4) + rack-session (2.0.0) + rack (>= 3.0.0) rack-test (2.1.0) rack (>= 1.3) rbi (0.1.14) @@ -41,40 +43,42 @@ GEM rspec-core (~> 3.13.0) rspec-expectations (~> 3.13.0) rspec-mocks (~> 3.13.0) - rspec-core (3.13.1) + rspec-core (3.13.2) rspec-support (~> 3.13.0) rspec-expectations (3.13.3) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-mocks (3.13.1) + rspec-mocks (3.13.2) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) rspec-support (3.13.1) ruby2_keywords (0.0.5) safe_type (1.1.1) - sinatra (3.2.0) + sinatra (4.1.1) + logger (>= 1.6.0) mustermann (~> 3.0) - rack (~> 2.2, >= 2.2.4) - rack-protection (= 3.2.0) + rack (>= 3.0.0, < 4) + rack-protection (= 4.1.1) + rack-session (>= 2.0.0, < 3) tilt (~> 2.0) - sinatra-contrib (3.2.0) + sinatra-contrib (4.1.1) multi_json (>= 0.0.2) mustermann (~> 3.0) - rack-protection (= 3.2.0) - sinatra (= 3.2.0) + rack-protection (= 4.1.1) + sinatra (= 4.1.1) tilt (~> 2.0) - sorbet (0.5.11609) - sorbet-static (= 0.5.11609) + sorbet (0.5.11670) + sorbet-static (= 0.5.11670) sorbet-coerce (0.7.0) polyfill (~> 1.8) safe_type (~> 1.1, >= 1.1.1) sorbet-runtime (>= 0.4.4704) - sorbet-runtime (0.5.11609) - sorbet-static (0.5.11609-universal-darwin) - sorbet-static (0.5.11609-x86_64-linux) - sorbet-static-and-runtime (0.5.11609) - sorbet (= 0.5.11609) - sorbet-runtime (= 0.5.11609) + sorbet-runtime (0.5.11670) + sorbet-static (0.5.11670-universal-darwin) + sorbet-static (0.5.11670-x86_64-linux) + sorbet-static-and-runtime (0.5.11670) + sorbet (= 0.5.11670) + sorbet-runtime (= 0.5.11670) spoom (1.5.0) erubi (>= 1.10.0) prism (>= 0.28.0) diff --git a/examples/sinatra-pet-shelter/sorbet/rbi/gems/dry-inflector@1.1.0.rbi b/examples/sinatra-pet-shelter/sorbet/rbi/gems/dry-inflector@1.1.0.rbi deleted file mode 100644 index 5efec73..0000000 --- a/examples/sinatra-pet-shelter/sorbet/rbi/gems/dry-inflector@1.1.0.rbi +++ /dev/null @@ -1,648 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `dry-inflector` gem. -# Please instead update this file by running `bin/tapioca gem dry-inflector`. - - -# source://dry-inflector//lib/dry/inflector.rb#3 -module Dry; end - -# dry-inflector -# -# @since 0.1.0 -# -# source://dry-inflector//lib/dry/inflector.rb#7 -class Dry::Inflector - # Instantiate the inflector - # - # @example Basic usage - # require "dry/inflector" - # - # inflector = Dry::Inflector.new - # @example Custom inflection rules - # require "dry/inflector" - # - # inflector = Dry::Inflector.new do |inflections| - # inflections.plural "virus", "viruses" # specify a rule for #pluralize - # inflections.singular "thieves", "thief" # specify a rule for #singularize - # inflections.uncountable "dry-inflector" # add an exception for an uncountable word - # end - # @param blk [Proc] an optional block to specify custom inflection rules - # @return [Dry::Inflector] the inflector - # @since 0.1.0 - # @yieldparam the [Dry::Inflector::Inflections] inflection rules - # - # source://dry-inflector//lib/dry/inflector.rb#33 - def initialize(&blk); end - - # Upper camelize a string - # - # @example - # require "dry/inflector" - # - # inflector = Dry::Inflector.new - # inflector.camelize_upper("data_mapper") # => "DataMapper" - # inflector.camelize_upper("dry/inflector") # => "Dry::Inflector" - # @param input [String, Symbol] the input - # @return [String] the upper camelized string - # @since 0.1.3 - # - # source://dry-inflector//lib/dry/inflector.rb#66 - def camelize(input); end - - # Lower camelize a string - # - # @example - # require "dry/inflector" - # - # inflector = Dry::Inflector.new - # inflector.camelize_lower("data_mapper") # => "dataMapper" - # @param input [String, Symbol] the input - # @return [String] the lower camelized string - # @since 0.1.3 - # - # source://dry-inflector//lib/dry/inflector.rb#49 - def camelize_lower(input); end - - # Upper camelize a string - # - # @example - # require "dry/inflector" - # - # inflector = Dry::Inflector.new - # inflector.camelize_upper("data_mapper") # => "DataMapper" - # inflector.camelize_upper("dry/inflector") # => "Dry::Inflector" - # @param input [String, Symbol] the input - # @return [String] the upper camelized string - # @since 0.1.3 - # - # source://dry-inflector//lib/dry/inflector.rb#66 - def camelize_upper(input); end - - # Classify a string - # - # @example - # require "dry/inflector" - # - # inflector = Dry::Inflector.new - # inflector.classify("books") # => "Book" - # @param input [String, Symbol] the input - # @return [String] the classified string - # @since 0.1.0 - # - # source://dry-inflector//lib/dry/inflector.rb#104 - def classify(input); end - - # Find a constant with the name specified in the argument string - # - # The name is assumed to be the one of a top-level constant, - # constant scope of caller is ignored - # - # @example - # require "dry/inflector" - # - # inflector = Dry::Inflector.new - # inflector.constantize("Module") # => Module - # inflector.constantize("Dry::Inflector") # => Dry::Inflector - # @param input [String, Symbol] the input - # @return [Class, Module] the class or module - # @since 0.1.0 - # - # source://dry-inflector//lib/dry/inflector.rb#88 - def constantize(input); end - - # Dasherize a string - # - # @example - # require "dry/inflector" - # - # inflector = Dry::Inflector.new - # inflector.dasherize("dry_inflector") # => "dry-inflector" - # @param input [String, Symbol] the input - # @return [String] the dasherized string - # @since 0.1.0 - # - # source://dry-inflector//lib/dry/inflector.rb#120 - def dasherize(input); end - - # Demodulize a string - # - # @example - # require "dry/inflector" - # - # inflector = Dry::Inflector.new - # inflector.demodulize("Dry::Inflector") # => "Inflector" - # @param input [String, Symbol] the input - # @return [String] the demodulized string - # @since 0.1.0 - # - # source://dry-inflector//lib/dry/inflector.rb#136 - def demodulize(input); end - - # Creates a foreign key name - # - # @example - # require "dry/inflector" - # - # inflector = Dry::Inflector.new - # inflector.foreign_key("Message") => "message_id" - # @param input [String, Symbol] the input - # @return [String] foreign key - # @since 0.1.0 - # - # source://dry-inflector//lib/dry/inflector.rb#175 - def foreign_key(input); end - - # Humanize a string - # - # @example - # require "dry/inflector" - # - # inflector = Dry::Inflector.new - # inflector.humanize("dry_inflector") # => "Dry inflector" - # inflector.humanize("author_id") # => "Author" - # @param input [String, Symbol] the input - # @return [String] the humanized string - # @since 0.1.0 - # - # source://dry-inflector//lib/dry/inflector.rb#153 - def humanize(input); end - - # @api public - # @return [String] - # @since 0.2.0 - # - # source://dry-inflector//lib/dry/inflector.rb#310 - def inspect; end - - # Ordinalize a number - # - # @example - # require "dry/inflector" - # - # inflector = Dry::Inflector.new - # inflector.ordinalize(1) # => "1st" - # inflector.ordinalize(2) # => "2nd" - # inflector.ordinalize(3) # => "3rd" - # inflector.ordinalize(10) # => "10th" - # inflector.ordinalize(23) # => "23rd" - # @param number [Integer] the input - # @return [String] the ordinalized number - # @since 0.1.0 - # - # source://dry-inflector//lib/dry/inflector.rb#195 - def ordinalize(number); end - - # Pluralize a string - # - # @example - # require "dry/inflector" - # - # inflector = Dry::Inflector.new - # inflector.pluralize("book") # => "books" - # inflector.pluralize("money") # => "money" - # @param input [String, Symbol] the input - # @return [String] the pluralized string - # @since 0.1.0 - # - # source://dry-inflector//lib/dry/inflector.rb#223 - def pluralize(input); end - - # Singularize a string - # - # @example - # require "dry/inflector" - # - # inflector = Dry::Inflector.new - # inflector.singularize("books") # => "book" - # inflector.singularize("money") # => "money" - # @param input [String] the input - # @return [String] the singularized string - # @since 0.1.0 - # - # source://dry-inflector//lib/dry/inflector.rb#243 - def singularize(input); end - - # Tableize a string - # - # @example - # require "dry/inflector" - # - # inflector = Dry::Inflector.new - # inflector.tableize("Book") # => "books" - # @param input [String, Symbol] the input - # @return [String] the tableized string - # @since 0.1.0 - # - # source://dry-inflector//lib/dry/inflector.rb#262 - def tableize(input); end - - # @api public - # @return [String] - # @since 0.2.0 - # - # source://dry-inflector//lib/dry/inflector.rb#310 - def to_s; end - - # Check if the input is an uncountable word - # - # @api private - # @param input [String] the input - # @return [TrueClass, FalseClass] the result of the check - # @since 0.1.0 - # - # source://dry-inflector//lib/dry/inflector.rb#300 - def uncountable?(input); end - - # Underscore a string - # - # @example - # require "dry/inflector" - # - # inflector = Dry::Inflector.new - # inflector.underscore("dry-inflector") # => "dry_inflector" - # @param input [String, Symbol] the input - # @return [String] the underscored string - # @since 0.1.0 - # - # source://dry-inflector//lib/dry/inflector.rb#279 - def underscore(input); end - - private - - # @since 0.1.0 - # - # source://dry-inflector//lib/dry/inflector.rb#325 - def inflections; end - - # @api private - # @since 0.1.3 - # - # source://dry-inflector//lib/dry/inflector.rb#329 - def internal_camelize(input, upper); end -end - -# A set of acronyms -# -# @api private -# @since 0.1.2 -# -# source://dry-inflector//lib/dry/inflector/acronyms.rb#9 -class Dry::Inflector::Acronyms - # @api private - # @return [Acronyms] a new instance of Acronyms - # @since 0.1.2 - # - # source://dry-inflector//lib/dry/inflector/acronyms.rb#14 - def initialize; end - - # @api private - # @since 0.1.2 - # - # source://dry-inflector//lib/dry/inflector/acronyms.rb#27 - def add(rule, replacement); end - - # @api private - # @since 0.1.2 - # - # source://dry-inflector//lib/dry/inflector/acronyms.rb#21 - def apply_to(word, capitalize: T.unsafe(nil)); end - - # @api private - # @since 0.1.2 - # - # source://dry-inflector//lib/dry/inflector/acronyms.rb#10 - def regex; end - - private - - # @api private - # @since 0.1.2 - # - # source://dry-inflector//lib/dry/inflector/acronyms.rb#36 - def define_regex_patterns; end -end - -# @api private -# @since 0.1.2 -# -# source://dry-inflector//lib/dry/inflector.rb#323 -Dry::Inflector::DEFAULT_SEPARATOR = T.let(T.unsafe(nil), String) - -# Inflections -# -# @since 0.1.0 -# -# source://dry-inflector//lib/dry/inflector/inflections.rb#12 -class Dry::Inflector::Inflections - # Instantiate the rules - # - # @api private - # @return [Dry::Inflector::Inflections] - # @since 0.1.0 - # @yieldparam [self] - # - # source://dry-inflector//lib/dry/inflector/inflections.rb#76 - def initialize; end - - # Add one or more acronyms - # - # Acronyms affect how basic operations are performed, such - # as camelize/underscore. - # - # @example - # require "dry/inflector" - # - # inflector = Dry::Inflector.new do |inflections| - # inflections.acronym "HTML" - # end - # - # inflector.camelize("html") # => "HTML" - # inflector.underscore("HTMLIsFun") # => "html_is_fun" - # @param words [Array] a list of acronyms - # @since 0.1.2 - # - # source://dry-inflector//lib/dry/inflector/inflections.rb#197 - def acronym(*words); end - - # Acronyms - # - # @api private - # @return [Dry::Inflector::Acronyms] - # @since 0.1.2 - # - # source://dry-inflector//lib/dry/inflector/inflections.rb#67 - def acronyms; end - - # Add a custom humanize rule - # - # Specifies a humanized form of a string by a regular expression rule or - # by a string mapping. - # - # When using a regular expression based replacement, the normal humanize - # formatting is called after the replacement. - # - # When a string is used, the human form should be specified as desired - # (example: `"The name"`, not `"the_name"`) - # - # @example - # require "dry/inflector" - # - # inflector = Dry::Inflector.new do |inflections| - # inflections.human(/_cnt$/i, '\1_count') - # inflections.human("legacy_col_person_name", "Name") - # end - # @param rule [String, Regexp] the rule - # @param replacement [String] the replacement - # @since 0.1.0 - # - # source://dry-inflector//lib/dry/inflector/inflections.rb#224 - def human(rule, replacement); end - - # Human rules - # - # @api private - # @return [Dry::Inflector::Rules] - # @since 0.1.0 - # - # source://dry-inflector//lib/dry/inflector/inflections.rb#59 - def humans; end - - # Add a custom pluralization rule - # - # Specifies a new irregular that applies to both pluralization - # and singularization at the same time. - # - # This can only be used for strings, not regular expressions. - # You simply pass the irregular in singular and plural form. - # - # @example - # require "dry/inflector" - # - # inflector = Dry::Inflector.new do |inflections| - # inflections.singular "octopus", "octopi" - # end - # @param singular [String] the singular - # @param plural [String] the plural - # @since 0.1.0 - # - # source://dry-inflector//lib/dry/inflector/inflections.rb#151 - def irregular(singular, plural); end - - # Add a custom pluralization rule - # - # Specifies a new pluralization rule and its replacement. - # The rule can either be a string or a regular expression. - # - # The replacement should always be a string that may include - # references to the matched data from the rule. - # - # @example - # require "dry/inflector" - # - # inflector = Dry::Inflector.new do |inflections| - # inflections.plural "virus", "viruses" - # end - # @param rule [String, Regexp] the rule - # @param replacement [String] the replacement - # @since 0.1.0 - # - # source://dry-inflector//lib/dry/inflector/inflections.rb#105 - def plural(rule, replacement); end - - # Pluralization rules - # - # @api private - # @return [Dry::Inflector::Rules] - # @since 0.1.0 - # - # source://dry-inflector//lib/dry/inflector/inflections.rb#35 - def plurals; end - - # Add a custom singularization rule - # - # Specifies a new singularization rule and its replacement. - # The rule can either be a string or a regular expression. - # - # The replacement should always be a string that may include - # references to the matched data from the rule. - # - # @example - # require "dry/inflector" - # - # inflector = Dry::Inflector.new do |inflections| - # inflections.singular "thieves", "thief" - # end - # @param rule [String, Regexp] the rule - # @param replacement [String] the replacement - # @since 0.1.0 - # - # source://dry-inflector//lib/dry/inflector/inflections.rb#128 - def singular(rule, replacement); end - - # Singularization rules - # - # @api private - # @return [Dry::Inflector::Rules] - # @since 0.1.0 - # - # source://dry-inflector//lib/dry/inflector/inflections.rb#43 - def singulars; end - - # Add a custom rule for uncountable words - # - # Uncountable will not be inflected - # - # @example - # require "dry/inflector" - # - # inflector = Dry::Inflector.new do |inflections| - # inflections.uncountable "money" - # inflections.uncountable "money", "information" - # inflections.uncountable %w(money information rice) - # end - # @param words [Enumerable] - # @since 0.1.0 - # - # source://dry-inflector//lib/dry/inflector/inflections.rb#175 - def uncountable(*words); end - - # Uncountable rules - # - # @api private - # @return [Set] - # @since 0.1.0 - # - # source://dry-inflector//lib/dry/inflector/inflections.rb#51 - def uncountables; end - - private - - # Add irregular inflection - # - # @api private - # @param rule [String] the rule - # @param replacement [String] the replacement - # @return [undefined] - # @since 0.1.0 - # - # source://dry-inflector//lib/dry/inflector/inflections.rb#239 - def add_irregular(rule, replacement, target); end - - # Add a new rule - # - # @api private - # @param rule [String, Regexp] the rule - # @param replacement [String, Regexp] the replacement - # @param target [Dry::Inflector::Rules] the target - # @since 0.1.0 - # - # source://dry-inflector//lib/dry/inflector/inflections.rb#252 - def rule(rule, replacement, target); end - - class << self - # Instantiate a set of inflection rules. - # It adds the default rules and the optional customizations, passed as a block. - # - # @api private - # @param blk [Proc] the optional, custom rules - # @since 0.1.0 - # - # source://dry-inflector//lib/dry/inflector/inflections.rb#22 - def build(&blk); end - end -end - -# Default inflections -# -# -# @api private -# @since 0.1.0 -# -# source://dry-inflector//lib/dry/inflector/inflections/defaults.rb#12 -module Dry::Inflector::Inflections::Defaults - class << self - # @api private - # @since 0.1.0 - # - # source://dry-inflector//lib/dry/inflector/inflections/defaults.rb#15 - def call(inflect); end - - private - - # @api private - # @since 0.1.2 - # - # source://dry-inflector//lib/dry/inflector/inflections/defaults.rb#112 - def acronyms(inflect); end - - # @api private - # @since 0.1.0 - # - # source://dry-inflector//lib/dry/inflector/inflections/defaults.rb#87 - def irregular(inflect); end - - # @api private - # @since 0.1.0 - # - # source://dry-inflector//lib/dry/inflector/inflections/defaults.rb#25 - def plural(inflect); end - - # @api private - # @since 0.1.0 - # - # source://dry-inflector//lib/dry/inflector/inflections/defaults.rb#55 - def singular(inflect); end - - # @api private - # @since 0.1.0 - # - # source://dry-inflector//lib/dry/inflector/inflections/defaults.rb#105 - def uncountable(inflect); end - end -end - -# @api private -# @since 0.1.0 -# -# source://dry-inflector//lib/dry/inflector.rb#319 -Dry::Inflector::ORDINALIZE_TH = T.let(T.unsafe(nil), Hash) - -# A set of inflection rules -# -# @api private -# @since 0.1.0 -# -# source://dry-inflector//lib/dry/inflector/rules.rb#9 -class Dry::Inflector::Rules - # @api private - # @return [Rules] a new instance of Rules - # @since 0.1.0 - # - # source://dry-inflector//lib/dry/inflector/rules.rb#12 - def initialize; end - - # @api private - # @since 0.1.0 - # - # source://dry-inflector//lib/dry/inflector/rules.rb#18 - def apply_to(word); end - - # @api private - # @since 0.1.0 - # - # source://dry-inflector//lib/dry/inflector/rules.rb#32 - def each(&blk); end - - # @api private - # @since 0.1.0 - # - # source://dry-inflector//lib/dry/inflector/rules.rb#26 - def insert(index, array); end -end - -# @since 0.1.0 -# -# source://dry-inflector//lib/dry/inflector/version.rb#6 -Dry::Inflector::VERSION = T.let(T.unsafe(nil), String) diff --git a/examples/sinatra-pet-shelter/sorbet/rbi/gems/rbi@0.1.14.rbi b/examples/sinatra-pet-shelter/sorbet/rbi/gems/rbi@0.1.14.rbi index f7e518b..e3b0534 100644 --- a/examples/sinatra-pet-shelter/sorbet/rbi/gems/rbi@0.1.14.rbi +++ b/examples/sinatra-pet-shelter/sorbet/rbi/gems/rbi@0.1.14.rbi @@ -2099,7 +2099,7 @@ class RBI::Rewriters::Merge::Conflict < ::T::Struct def to_s; end class << self - # source://sorbet-runtime/0.5.11609/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/lib/types/struct.rb#13 def inherited(s); end end end @@ -2316,7 +2316,7 @@ class RBI::Rewriters::RemoveKnownDefinitions::Operation < ::T::Struct def to_s; end class << self - # source://sorbet-runtime/0.5.11609/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/lib/types/struct.rb#13 def inherited(s); end end end diff --git a/examples/sinatra-pet-shelter/sorbet/rbi/gems/resource_registry@0.0.0-2b73ddd272417ca8026e5f13e1103b4c72897824.rbi b/examples/sinatra-pet-shelter/sorbet/rbi/gems/resource_registry@0.0.0-2b73ddd272417ca8026e5f13e1103b4c72897824.rbi index 64e218b..2fb54ac 100644 --- a/examples/sinatra-pet-shelter/sorbet/rbi/gems/resource_registry@0.0.0-2b73ddd272417ca8026e5f13e1103b4c72897824.rbi +++ b/examples/sinatra-pet-shelter/sorbet/rbi/gems/resource_registry@0.0.0-2b73ddd272417ca8026e5f13e1103b4c72897824.rbi @@ -642,7 +642,7 @@ class ResourceRegistry::Relationship < ::T::Struct def should_skip_argument?(argument); end class << self - # source://sorbet-runtime/0.5.11609/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/lib/types/struct.rb#13 def inherited(s); end # source://resource_registry//lib/public/relationship.rb#39 @@ -1047,7 +1047,7 @@ class ResourceRegistry::Repositories::OutputContexts::PageInfoDto < ::T::Struct const :end_cursor, T.nilable(::String), default: T.unsafe(nil) class << self - # source://sorbet-runtime/0.5.11609/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/lib/types/struct.rb#13 def inherited(s); end end end @@ -1219,7 +1219,7 @@ class ResourceRegistry::Resource < ::T::Struct def inflector; end class << self - # source://sorbet-runtime/0.5.11609/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/lib/types/struct.rb#13 def inherited(s); end # source://resource_registry//lib/public/resource.rb#220 @@ -1341,7 +1341,7 @@ class ResourceRegistry::Verb < ::T::Struct def inflector; end class << self - # source://sorbet-runtime/0.5.11609/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/lib/types/struct.rb#13 def inherited(s); end # @raise [ArgumentError] @@ -1486,7 +1486,7 @@ class SchemaRegistry::FilterField < ::T::Struct const :in_memory, T::Boolean, default: T.unsafe(nil) class << self - # source://sorbet-runtime/0.5.11609/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/lib/types/struct.rb#13 def inherited(s); end end end @@ -1724,7 +1724,7 @@ class SchemaRegistry::Property < ::T::Struct def value_object?; end class << self - # source://sorbet-runtime/0.5.11609/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/lib/types/struct.rb#13 def inherited(s); end end end @@ -1864,7 +1864,7 @@ class SchemaRegistry::Schema < ::T::Struct def inflector; end class << self - # source://sorbet-runtime/0.5.11609/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/lib/types/struct.rb#13 def inherited(s); end # source://resource_registry//lib/schema_registry/schema.rb#84 diff --git a/examples/sinatra-pet-shelter/sorbet/rbi/gems/spoom@1.5.0.rbi b/examples/sinatra-pet-shelter/sorbet/rbi/gems/spoom@1.5.0.rbi index b0b590b..dce5d9c 100644 --- a/examples/sinatra-pet-shelter/sorbet/rbi/gems/spoom@1.5.0.rbi +++ b/examples/sinatra-pet-shelter/sorbet/rbi/gems/spoom@1.5.0.rbi @@ -1004,7 +1004,7 @@ class Spoom::Coverage::D3::ColorPalette < ::T::Struct prop :strong, ::String class << self - # source://sorbet-runtime/0.5.11609/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/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.11609/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/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.11609/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/lib/types/struct.rb#13 def inherited(s); end end end @@ -2368,7 +2368,7 @@ class Spoom::Deadcode::Send < ::T::Struct def each_arg_assoc(&block); end class << self - # source://sorbet-runtime/0.5.11609/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/lib/types/struct.rb#13 def inherited(s); end end end @@ -2388,7 +2388,7 @@ class Spoom::ExecResult < ::T::Struct def to_s; end class << self - # source://sorbet-runtime/0.5.11609/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/lib/types/struct.rb#13 def inherited(s); end end end @@ -2586,7 +2586,7 @@ class Spoom::FileTree::Node < ::T::Struct def path; end class << self - # source://sorbet-runtime/0.5.11609/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/lib/types/struct.rb#13 def inherited(s); end end end @@ -2652,7 +2652,7 @@ class Spoom::Git::Commit < ::T::Struct def timestamp; end class << self - # source://sorbet-runtime/0.5.11609/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/lib/types/struct.rb#13 def inherited(s); end # Parse a line formatted as `%h %at` into a `Commit` @@ -2764,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.11609/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/lib/types/struct.rb#13 def inherited(s); end end end @@ -2797,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.11609/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/lib/types/struct.rb#13 def inherited(s); end end end @@ -2855,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.11609/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/lib/types/struct.rb#13 def inherited(s); end end end @@ -2880,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.11609/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/lib/types/struct.rb#13 def inherited(s); end end end @@ -2943,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.11609/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/lib/types/struct.rb#13 def inherited(s); end end end @@ -2981,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.11609/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/lib/types/struct.rb#13 def inherited(s); end end end @@ -3047,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.11609/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/lib/types/struct.rb#13 def inherited(s); end end end @@ -3473,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.11609/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/lib/types/struct.rb#13 def inherited(s); end # source://spoom//lib/spoom/model/reference.rb#29 diff --git a/examples/sinatra-pet-shelter/sorbet/rbi/gems/tapioca@0.15.1.rbi b/examples/sinatra-pet-shelter/sorbet/rbi/gems/tapioca@0.15.1.rbi index bafa82e..ab02c3b 100644 --- a/examples/sinatra-pet-shelter/sorbet/rbi/gems/tapioca@0.15.1.rbi +++ b/examples/sinatra-pet-shelter/sorbet/rbi/gems/tapioca@0.15.1.rbi @@ -228,7 +228,7 @@ class RBI::TypedParam < ::T::Struct const :type, ::String class << self - # source://sorbet-runtime/0.5.11609/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/lib/types/struct.rb#13 def inherited(s); end end end @@ -1151,7 +1151,7 @@ class Tapioca::ConfigHelper::ConfigError < ::T::Struct const :message_parts, T::Array[::Tapioca::ConfigHelper::ConfigErrorMessagePart] class << self - # source://sorbet-runtime/0.5.11609/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/lib/types/struct.rb#13 def inherited(s); end end end @@ -1162,7 +1162,7 @@ class Tapioca::ConfigHelper::ConfigErrorMessagePart < ::T::Struct const :colors, T::Array[::Symbol] class << self - # source://sorbet-runtime/0.5.11609/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/lib/types/struct.rb#13 def inherited(s); end end end @@ -2203,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.11609/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/lib/types/struct.rb#13 def inherited(s); end end end @@ -2495,7 +2495,7 @@ class Tapioca::Loaders::Loader # @param engine [T.class_of(Rails::Engine)] # @return [Array] # - # source://sorbet-runtime/0.5.11609/lib/types/private/methods/_methods.rb#257 + # source://sorbet-runtime/0.5.11670/lib/types/private/methods/_methods.rb#257 def eager_load_paths(*args, **_arg1, &blk); end # source://tapioca//lib/tapioca/loaders/loader.rb#188 @@ -3403,7 +3403,7 @@ module Tapioca::Static::SymbolLoader # @return [Array] # - # source://sorbet-runtime/0.5.11609/lib/types/private/methods/_methods.rb#257 + # source://sorbet-runtime/0.5.11670/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/examples/sinatra-pet-shelter/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi b/examples/sinatra-pet-shelter/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi index 7a68b98..3889d4b 100644 --- a/examples/sinatra-pet-shelter/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +++ b/examples/sinatra-pet-shelter/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.11609/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/lib/types/struct.rb#13 def inherited(s); end end end diff --git a/lib/resource_registry.rb b/lib/resource_registry.rb index 54132e7..f34487b 100644 --- a/lib/resource_registry.rb +++ b/lib/resource_registry.rb @@ -8,12 +8,15 @@ require "public/versions" require "public/versions/version" require "public/entity_finder" +require "public/resource_struct_builder" +require "public/registry" +require "public/serializer" +require "public/repositories/base" +require "schema_registry/registry" require "schema_registry/json_schema_mapper" require "schema_registry/maybe" require "schema_registry/generate_from_struct" require "runtime_generic" -require "public/resource_struct_builder" -require "public/registry" # Entry point for ResourceRegistry module ResourceRegistry diff --git a/lib/schema_generator.rb b/lib/schema_generator.rb deleted file mode 100644 index e12cbc2..0000000 --- a/lib/schema_generator.rb +++ /dev/null @@ -1,34 +0,0 @@ -# typed: strict - -require_relative "./schema_registry/generate_from_struct" - -module ResourceRegistry - class SchemaGenerator - extend T::Sig - - Repository = - T.type_alias { T.class_of(ResourceRegistry::Repositories::Base) } - - sig do - params(repository: Repository).returns(T.nilable(SchemaRegistry::Schema)) - end - def generate(repository:) - struct_klass = ResourceRegistry::EntityFinder.call(repository: repository) - return nil unless struct_klass - - definition = - SchemaRegistry::GenerateFromStruct.new(struct_klass: struct_klass).call - SchemaRegistry::JsonSchemaMapper.new( - namespace: repository.namespace, - definition: definition - ).call - end - - private - - sig { params(repo: Repository).returns(Symbol) } - def identifier_from_repo(repo) - "#{repo.namespace.underscore}.#{T.must(repo.name).underscore.singularize}".to_sym - end - end -end diff --git a/resource_registry-0.0.0.gem b/resource_registry-0.0.0.gem new file mode 100644 index 0000000..4af2741 Binary files /dev/null and b/resource_registry-0.0.0.gem differ diff --git a/resource_registry.gemspec b/resource_registry.gemspec index 5d24fa9..78b14d7 100644 --- a/resource_registry.gemspec +++ b/resource_registry.gemspec @@ -1,19 +1,21 @@ Gem::Specification.new do |s| - s.name = 'resource_registry' - s.version = '0.0.0' - s.summary = 'Resource Registry' - s.description = 'A declarative approach to define resources and their relationships' - s.authors = ['Genar Trias Ortiz'] - s.email = 'genar.factorial@factorial.co' - s.files = ['lib/resource_registry.rb', 'lib/public/repositories/base.rb', 'rbi/resource_registry.rbi'] - s.homepage = - 'https://rubygems.org/gems/resource_registry' - s.license = 'MIT' - s.add_dependency 'sorbet-coerce', '>= 0.2.6' - # s.add_runtime_dependency 'sorbet-runtime-stub', '0.2.0' - s.add_development_dependency 'sorbet', '0.5.11609' - s.add_runtime_dependency 'activesupport', '>= 7.1.3' - s.add_runtime_dependency 'dry-inflector', '>= 0.1.2' - s.add_runtime_dependency 'sorbet-runtime', '0.5.11609' + s.name = "resource_registry" + s.version = "0.0.0" + s.summary = "Resource Registry" + s.description = + "A declarative approach to define resources and their relationships" + s.authors = ["Genar Trias Ortiz"] + s.email = "genar.factorial@factorial.co" + s.files = %w[ + lib/resource_registry.rb + lib/public/repositories/base.rb + rbi/resource_registry.rbi + ] + s.homepage = "https://rubygems.org/gems/resource_registry" + s.license = "MIT" + s.required_ruby_version = ">= 3.0" + s.add_dependency "sorbet-coerce", "~> 0.7" + s.add_development_dependency "sorbet", "0.5.11670" + s.add_runtime_dependency "sorbet-runtime", "0.5.11670" # s.add_development_dependency 'tapioca' end diff --git a/sorbet/rbi/dsl/.gitattributes b/sorbet/rbi/dsl/.gitattributes new file mode 100644 index 0000000..d9bb82a --- /dev/null +++ b/sorbet/rbi/dsl/.gitattributes @@ -0,0 +1 @@ +**/*.rbi linguist-generated=true diff --git a/sorbet/rbi/dsl/active_support/callbacks.rbi b/sorbet/rbi/dsl/active_support/callbacks.rbi new file mode 100644 index 0000000..4c1ad13 --- /dev/null +++ b/sorbet/rbi/dsl/active_support/callbacks.rbi @@ -0,0 +1,23 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveSupport::Callbacks`. +# Please instead update this file by running `bin/tapioca dsl ActiveSupport::Callbacks`. + + +module ActiveSupport::Callbacks + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + module GeneratedClassMethods + def __callbacks; end + def __callbacks=(value); end + def __callbacks?; end + end + + module GeneratedInstanceMethods + def __callbacks; end + def __callbacks?; end + end +end diff --git a/sorbet/rbi/gems/activesupport.rbi b/sorbet/rbi/gems/activesupport.rbi deleted file mode 100644 index ea8b79f..0000000 --- a/sorbet/rbi/gems/activesupport.rbi +++ /dev/null @@ -1,1245 +0,0 @@ -# This file is autogenerated. Do not edit it by hand. Regenerate it with: -# srb rbi gems - -# typed: false -# -# If you would like to make changes to this file, great! Please create the gem's shim here: -# -# https://github.com/sorbet/sorbet-typed/new/master?filename=lib/activesupport/all/activesupport.rbi -# -# activesupport-7.2.0 - -module ActiveSupport - def self.cache_format_version; end - def self.cache_format_version=(value); end - def self.deprecator; end - def self.eager_load!; end - def self.error_reporter; end - def self.error_reporter=(arg0); end - def self.gem_version; end - def self.test_order; end - def self.test_order=(val); end - def self.test_parallelization_threshold; end - def self.test_parallelization_threshold=(val); end - def self.to_time_preserves_timezone; end - def self.to_time_preserves_timezone=(value); end - def self.utc_to_local_returns_utc_offset_times; end - def self.utc_to_local_returns_utc_offset_times=(value); end - def self.version; end - def test_order; end - def test_order=(val); end - def test_parallelization_threshold; end - def test_parallelization_threshold=(val); end - extend ActiveSupport::Autoload - extend ActiveSupport::LazyLoadHooks -end -module ActiveSupport::DeepMergeable - def deep_merge!(other, &block); end - def deep_merge(other, &block); end - def deep_merge?(other); end -end -class Hash - def _deep_transform_keys_in_object!(object, &block); end - def _deep_transform_keys_in_object(object, &block); end - def assert_valid_keys(*valid_keys); end - def blank?; end - def compact_blank!; end - def compact_blank; end - def deep_merge?(other); end - def deep_stringify_keys!; end - def deep_stringify_keys; end - def deep_symbolize_keys!; end - def deep_symbolize_keys; end - def deep_transform_keys!(&block); end - def deep_transform_keys(&block); end - def except!(*keys); end - def extract!(*keys); end - def extractable_options?; end - def present?; end - def reverse_merge!(other_hash); end - def reverse_merge(other_hash); end - def reverse_update(other_hash); end - def slice!(*keys); end - def stringify_keys!; end - def stringify_keys; end - def symbolize_keys!; end - def symbolize_keys; end - def to_options!; end - def to_options; end - def to_param(namespace = nil); end - def to_query(namespace = nil); end - def with_defaults!(other_hash); end - def with_defaults(other_hash); end - include ActiveSupport::DeepMergeable -end -module ActiveSupport::LazyLoadHooks - def execute_hook(name, base, options, block); end - def on_load(name, options = nil, &block); end - def run_load_hooks(name, base = nil); end - def self.extended(base); end - def with_execution_control(name, block, once); end -end -module ActiveSupport::Inflector - def apply_inflections(word, rules, locale = nil); end - def camelize(term, uppercase_first_letter = nil); end - def classify(table_name); end - def const_regexp(camel_cased_word); end - def constantize(camel_cased_word); end - def dasherize(underscored_word); end - def deconstantize(path); end - def demodulize(path); end - def downcase_first(string); end - def foreign_key(class_name, separate_class_name_and_id_with_underscore = nil); end - def humanize(lower_case_and_underscored_word, capitalize: nil, keep_id_suffix: nil); end - def inflections(locale = nil); end - def ordinal(number); end - def ordinalize(number); end - def parameterize(string, separator: nil, preserve_case: nil, locale: nil); end - def pluralize(word, locale = nil); end - def safe_constantize(camel_cased_word); end - def singularize(word, locale = nil); end - def tableize(class_name); end - def titleize(word, keep_id_suffix: nil); end - def transliterate(string, replacement = nil, locale: nil); end - def underscore(camel_cased_word); end - def upcase_first(string); end - extend ActiveSupport::Inflector - extend ActiveSupport::Inflector -end -class ActiveSupport::Inflector::Inflections - def acronym(word); end - def acronyms; end - def acronyms_camelize_regex; end - def acronyms_underscore_regex; end - def clear(scope = nil); end - def define_acronym_regex_patterns; end - def human(rule, replacement); end - def humans; end - def initialize; end - def initialize_dup(orig); end - def irregular(singular, plural); end - def plural(rule, replacement); end - def plurals; end - def self.instance(locale = nil); end - def self.instance_or_fallback(locale); end - def singular(rule, replacement); end - def singulars; end - def uncountable(*words); end - def uncountables; end -end -class ActiveSupport::Inflector::Inflections::Uncountables < Array - def <<(*word); end - def add(words); end - def delete(entry); end - def initialize; end - def to_regex(string); end - def uncountable?(str); end -end -module ActiveSupport::Autoload - def autoload(const_name, path = nil); end - def autoload_at(path); end - def autoload_under(path); end - def eager_autoload; end - def eager_load!; end -end -module ActiveSupport::VERSION -end -module ActiveSupport::Concern - def append_features(base); end - def class_methods(&class_methods_module_definition); end - def included(base = nil, &block); end - def prepend_features(base); end - def prepended(base = nil, &block); end - def self.extended(base); end -end -class ActiveSupport::Concern::MultipleIncludedBlocks < StandardError - def initialize; end -end -class ActiveSupport::Concern::MultiplePrependBlocks < StandardError - def initialize; end -end -class Module - def cattr_accessor(*syms, instance_reader: nil, instance_writer: nil, instance_accessor: nil, default: nil, &blk); end - def cattr_reader(*syms, instance_reader: nil, instance_accessor: nil, default: nil, location: nil); end - def cattr_writer(*syms, instance_writer: nil, instance_accessor: nil, default: nil, location: nil); end - def delegate(*methods, to: nil, prefix: nil, allow_nil: nil, private: nil); end - def delegate_missing_to(target, allow_nil: nil); end - def mattr_accessor(*syms, instance_reader: nil, instance_writer: nil, instance_accessor: nil, default: nil, &blk); end - def mattr_reader(*syms, instance_reader: nil, instance_accessor: nil, default: nil, location: nil); end - def mattr_writer(*syms, instance_writer: nil, instance_accessor: nil, default: nil, location: nil); end - def method_visibility(method); end - def redefine_method(method, &block); end - def redefine_singleton_method(method, &block); end - def remove_possible_method(method); end - def remove_possible_singleton_method(method); end - def silence_redefinition_of_method(method); end -end -module ActiveSupport::LoggerThreadSafeLevel - def level; end - def local_level; end - def local_level=(level); end - def local_level_key; end - def log_at(level); end - extend ActiveSupport::Concern -end -module ActiveSupport::LoggerSilence - def silence(severity = nil); end - extend ActiveSupport::Concern -end -class ActiveSupport::Logger < Logger - def initialize(*args, **kwargs); end - def self.logger_outputs_to?(logger, *sources); end - def self.normalize_sources(sources); end - def self.silencer; end - def self.silencer=(val); end - def silencer; end - def silencer=(val); end - include ActiveSupport::LoggerSilence - include ActiveSupport::LoggerThreadSafeLevel -end -class ActiveSupport::Logger::SimpleFormatter < Logger::Formatter - def call(severity, timestamp, progname, msg); end -end -class ActiveSupport::BroadcastLogger - def <<(message); end - def add(*args, &block); end - def broadcast_to(*loggers); end - def broadcasts; end - def close; end - def debug!; end - def debug(*args, &block); end - def debug?; end - def dispatch(&block); end - def error!; end - def error(*args, &block); end - def error?; end - def fatal!; end - def fatal(*args, &block); end - def fatal?; end - def formatter; end - def formatter=(formatter); end - def info!; end - def info(*args, &block); end - def info?; end - def initialize(*loggers); end - def initialize_copy(other); end - def level; end - def level=(level); end - def local_level=(level); end - def log(*args, &block); end - def method_missing(name, *, **, &); end - def progname; end - def progname=(arg0); end - def respond_to_missing?(method, include_all); end - def self.silencer; end - def self.silencer=(val); end - def sev_threshold=(level); end - def silencer; end - def silencer=(val); end - def stop_broadcasting_to(logger); end - def unknown(*args, &block); end - def warn!; end - def warn(*args, &block); end - def warn?; end - include ActiveSupport::LoggerSilence - include ActiveSupport::LoggerThreadSafeLevel -end -module DateAndTime -end -module DateAndTime::Compatibility - def preserve_timezone; end - def self.preserve_timezone; end - def self.preserve_timezone=(val); end - def self.utc_to_local_returns_utc_offset_times; end - def self.utc_to_local_returns_utc_offset_times=(val); end - def utc_to_local_returns_utc_offset_times; end -end -class ActiveSupport::ErrorReporter - def debug_mode; end - def debug_mode=(arg0); end - def disable(subscriber); end - def handle(*error_classes, severity: nil, context: nil, fallback: nil, source: nil); end - def initialize(*subscribers, logger: nil); end - def logger; end - def logger=(arg0); end - def record(*error_classes, severity: nil, context: nil, source: nil); end - def report(error, handled: nil, severity: nil, context: nil, source: nil); end - def set_context(*, **, &); end - def subscribe(subscriber); end - def unexpected(error, severity: nil, context: nil, source: nil); end - def unsubscribe(subscriber); end -end -class ActiveSupport::ErrorReporter::UnexpectedError < Exception -end -module ActiveSupport::ActionableError - def self.actions(error); end - def self.dispatch(error, name); end - extend ActiveSupport::Concern -end -class ActiveSupport::ActionableError::NonActionable < StandardError -end -module ActiveSupport::ActionableError::ClassMethods - def action(name, &block); end -end -module ActiveSupport::DescendantsTracker - def descendants; end - def self.clear(classes); end - def self.descendants(klass); end - def self.disable_clear!; end - def self.reject!(classes); end - def self.subclasses(klass); end -end -class ActiveSupport::DescendantsTracker::WeakSet < ObjectSpace::WeakMap - def <<(object); end - def to_a; end -end -module ActiveSupport::DescendantsTracker::ReloadedClassesFiltering - def descendants; end - def subclasses; end -end -class Array - def blank?; end - def compact_blank!; end - def extract_options!; end - def present?; end - def to_formatted_s(format = nil); end - def to_fs(format = nil); end - def to_param; end - def to_query(key); end - def to_sentence(options = nil); end - def to_xml(options = nil); end -end -class Class < Module - def class_attribute(*attrs, instance_accessor: nil, instance_reader: nil, instance_writer: nil, instance_predicate: nil, default: nil); end -end -class String - def blank?; end - def camelcase(first_letter = nil); end - def camelize(first_letter = nil); end - def classify; end - def constantize; end - def dasherize; end - def deconstantize; end - def demodulize; end - def downcase_first; end - def foreign_key(separate_class_name_and_id_with_underscore = nil); end - def humanize(capitalize: nil, keep_id_suffix: nil); end - def is_utf8?; end - def mb_chars; end - def parameterize(separator: nil, preserve_case: nil, locale: nil); end - def pluralize(count = nil, locale = nil); end - def present?; end - def remove!(*patterns); end - def remove(*patterns); end - def safe_constantize; end - def singularize(locale = nil); end - def squish!; end - def squish; end - def tableize; end - def titlecase(keep_id_suffix: nil); end - def titleize(keep_id_suffix: nil); end - def truncate(truncate_to, options = nil); end - def truncate_bytes(truncate_to, omission: nil); end - def truncate_words(words_count, options = nil); end - def underscore; end - def upcase_first; end -end -class Object < BasicObject - def acts_like?(duck); end - def blank?; end - def presence; end - def present?; end - def to_param; end - def to_query(key); end - def with(**attributes); end - include ActiveSupport::Tryable -end -class NilClass - def blank?; end - def present?; end - def to_param; end - def try!(*); end - def try(*); end -end -class FalseClass - def blank?; end - def present?; end - def to_param; end -end -class TrueClass - def blank?; end - def present?; end - def to_param; end -end -class Symbol - def blank?; end - def present?; end -end -class Numeric - def blank?; end - def present?; end -end -class Time - def acts_like_time?; end - def advance(options); end - def ago(seconds); end - def at_beginning_of_day; end - def at_beginning_of_hour; end - def at_beginning_of_minute; end - def at_end_of_day; end - def at_end_of_hour; end - def at_end_of_minute; end - def at_midday; end - def at_middle_of_day; end - def at_midnight; end - def at_noon; end - def beginning_of_day; end - def beginning_of_hour; end - def beginning_of_minute; end - def blank?; end - def change(options); end - def compare_with_coercion(other); end - def compare_without_coercion(arg0); end - def end_of_day; end - def end_of_hour; end - def end_of_minute; end - def eql_with_coercion(other); end - def eql_without_coercion(arg0); end - def formatted_offset(colon = nil, alternate_utc_string = nil); end - def in(seconds); end - def midday; end - def middle_of_day; end - def midnight; end - def minus_with_coercion(other); end - def minus_with_duration(other); end - def minus_without_coercion(other); end - def minus_without_duration(arg0); end - def next_day(days = nil); end - def next_month(months = nil); end - def next_year(years = nil); end - def noon; end - def plus_with_duration(other); end - def plus_without_duration(arg0); end - def present?; end - def prev_day(days = nil); end - def prev_month(months = nil); end - def prev_year(years = nil); end - def rfc3339(fraction_digits = nil); end - def sec_fraction; end - def seconds_since_midnight; end - def seconds_until_end_of_day; end - def self.===(other); end - def self.at_with_coercion(time_or_number, *args, **); end - def self.at_without_coercion(time, subsec = nil, unit = nil, in: nil); end - def self.current; end - def self.days_in_month(month, year = nil); end - def self.days_in_year(year = nil); end - def self.find_zone!(time_zone); end - def self.find_zone(time_zone); end - def self.rfc3339(str); end - def self.use_zone(time_zone); end - def self.zone; end - def self.zone=(time_zone); end - def self.zone_default; end - def self.zone_default=(arg0); end - def since(seconds); end - def to_formatted_s(format = nil); end - def to_fs(format = nil); end - include DateAndTime::Calculations - include DateAndTime::Zones -end -module ActiveSupport::Callbacks - def halted_callback_hook(filter, name); end - def run_callbacks(kind, type = nil); end - extend ActiveSupport::Concern -end -module ActiveSupport::Callbacks::Conditionals -end -class ActiveSupport::Callbacks::Conditionals::Value - def call(target, value); end - def initialize(&block); end -end -module ActiveSupport::Callbacks::Filters -end -class ActiveSupport::Callbacks::Filters::Environment < Struct - def halted; end - def halted=(_); end - def self.[](*arg0); end - def self.inspect; end - def self.keyword_init?; end - def self.members; end - def self.new(*arg0); end - def target; end - def target=(_); end - def value; end - def value=(_); end -end -class ActiveSupport::Callbacks::Filters::Before - def apply(callback_sequence); end - def call(env); end - def filter; end - def halted_lambda; end - def initialize(user_callback, user_conditions, chain_config, filter, name); end - def name; end - def user_callback; end - def user_conditions; end -end -class ActiveSupport::Callbacks::Filters::After - def apply(callback_sequence); end - def call(env); end - def halting; end - def initialize(user_callback, user_conditions, chain_config); end - def user_callback; end - def user_conditions; end -end -class ActiveSupport::Callbacks::Filters::Around - def apply(callback_sequence); end - def initialize(user_callback, user_conditions); end -end -class ActiveSupport::Callbacks::Callback - def apply(callback_sequence); end - def chain_config; end - def check_conditionals(conditionals); end - def compiled; end - def conditions_lambdas; end - def current_scopes; end - def duplicates?(other); end - def filter; end - def initialize(name, filter, kind, options, chain_config); end - def kind; end - def kind=(arg0); end - def matches?(_kind, _filter); end - def merge_conditional_options(chain, if_option:, unless_option:); end - def name; end - def name=(arg0); end - def self.build(chain, filter, kind, options); end -end -module ActiveSupport::Callbacks::CallTemplate - def self.build(filter, callback); end -end -class ActiveSupport::Callbacks::CallTemplate::MethodCall - def expand(target, value, block); end - def initialize(method); end - def inverted_lambda; end - def make_lambda; end -end -class ActiveSupport::Callbacks::CallTemplate::ObjectCall - def expand(target, value, block); end - def initialize(target, method); end - def inverted_lambda; end - def make_lambda; end -end -class ActiveSupport::Callbacks::CallTemplate::InstanceExec0 - def expand(target, value, block); end - def initialize(block); end - def inverted_lambda; end - def make_lambda; end -end -class ActiveSupport::Callbacks::CallTemplate::InstanceExec1 - def expand(target, value, block); end - def initialize(block); end - def inverted_lambda; end - def make_lambda; end -end -class ActiveSupport::Callbacks::CallTemplate::InstanceExec2 - def expand(target, value, block); end - def initialize(block); end - def inverted_lambda; end - def make_lambda; end -end -class ActiveSupport::Callbacks::CallTemplate::ProcCall - def expand(target, value, block); end - def initialize(target); end - def inverted_lambda; end - def make_lambda; end -end -class ActiveSupport::Callbacks::CallbackSequence - def after(after); end - def around(call_template, user_conditions); end - def before(before); end - def expand_call_template(arg, block); end - def final?; end - def initialize(nested = nil, call_template = nil, user_conditions = nil); end - def invoke_after(arg); end - def invoke_before(arg); end - def nested; end - def skip?(arg); end -end -class ActiveSupport::Callbacks::CallbackChain - def append(*callbacks); end - def append_one(callback); end - def chain; end - def clear; end - def compile(type); end - def config; end - def default_terminator; end - def delete(o); end - def each(&block); end - def empty?; end - def index(o); end - def initialize(name, config); end - def initialize_copy(other); end - def insert(index, o); end - def name; end - def prepend(*callbacks); end - def prepend_one(callback); end - def remove_duplicates(callback); end - include Enumerable -end -module ActiveSupport::Callbacks::ClassMethods - def __update_callbacks(name); end - def define_callbacks(*names); end - def get_callbacks(name); end - def normalize_callback_params(filters, block); end - def reset_callbacks(name); end - def set_callback(name, *filter_list, &block); end - def set_callbacks(name, callbacks); end - def skip_callback(name, *filter_list, &block); end -end -module ActiveSupport::EnumerableCoreExt -end -module ActiveSupport::EnumerableCoreExt::Constants - def const_missing(name); end -end -module Enumerable - def compact_blank; end - def exclude?(object); end - def excluding(*elements); end - def in_order_of(key, series); end - def including(*elements); end - def index_by; end - def index_with(default = nil); end - def many?; end - def maximum(key); end - def minimum(key); end - def pick(*keys); end - def pluck(*keys); end - def sole; end - def without(*elements); end -end -class Enumerable::SoleItemExpectedError < StandardError -end -class Range - def sum(initial_value = nil); end -end -class ActiveSupport::DelegationError < NoMethodError - def self.nil_target(method_name, target); end -end -module ActiveSupport::Delegation - def self.generate(owner, methods, location: nil, to: nil, prefix: nil, allow_nil: nil, nilable: nil, private: nil, as: nil, signature: nil); end - def self.generate_method_missing(owner, target, allow_nil: nil); end -end -module ActiveSupport::IsolatedExecutionState - def self.[](key); end - def self.[]=(key, value); end - def self.clear; end - def self.context; end - def self.delete(key); end - def self.isolation_level; end - def self.isolation_level=(level); end - def self.key?(key); end - def self.scope; end - def self.share_with(other); end - def self.state; end - def self.unique_id; end -end -class Thread - def active_support_execution_state; end - def active_support_execution_state=(arg0); end -end -class Fiber - def active_support_execution_state; end - def active_support_execution_state=(arg0); end -end -class ActiveSupport::CurrentAttributes - def __callbacks; end - def __callbacks?; end - def _reset_callbacks; end - def _run_reset_callbacks(&block); end - def self.__callbacks; end - def self.__callbacks=(value); end - def self.__callbacks?; end - def self._reset_callbacks; end - def self._reset_callbacks=(value); end - def self.after_reset(*methods, &block); end - def self.attribute(*names, default: nil); end - def self.before_reset(*methods, &block); end - def self.clear_all; end - def self.current_instances; end - def self.current_instances_key; end - def self.defaults; end - def self.defaults=(value); end - def self.defaults?; end - def self.generated_attribute_methods; end - def self.instance; end - def self.method_added(name); end - def self.method_missing(name, *, **, &); end - def self.reset(*, **, &); end - def self.reset_all; end - def self.resets(*methods, &block); end - def self.respond_to_missing?(name, _); end - def self.set(*, **, &); end - extend ActiveSupport::Callbacks::ClassMethods - extend ActiveSupport::DescendantsTracker - include ActiveSupport::Callbacks -end -module ActiveSupport::Concurrency -end -class ActiveSupport::Concurrency::ShareLock - def busy_for_exclusive?(purpose); end - def busy_for_sharing?(purpose); end - def eligible_waiters?(compatible); end - def exclusive(purpose: nil, compatible: nil, after_compatible: nil, no_wait: nil); end - def initialize; end - def raw_state; end - def sharing; end - def start_exclusive(purpose: nil, compatible: nil, no_wait: nil); end - def start_sharing; end - def stop_exclusive(compatible: nil); end - def stop_sharing; end - def wait_for(method, &block); end - def yield_shares(purpose: nil, compatible: nil, block_share: nil); end - include MonitorMixin -end -module ActiveSupport::Dependencies - def self._autoloaded_tracked_classes; end - def self._autoloaded_tracked_classes=(arg0); end - def self._eager_load_paths; end - def self._eager_load_paths=(arg0); end - def self.autoload_once_paths; end - def self.autoload_once_paths=(arg0); end - def self.autoload_paths; end - def self.autoload_paths=(arg0); end - def self.autoloader; end - def self.autoloader=(arg0); end - def self.clear; end - def self.eager_load?(path); end - def self.interlock; end - def self.interlock=(arg0); end - def self.load_interlock(&block); end - def self.run_interlock(&block); end - def self.search_for_file(relpath); end - def self.unload_interlock(&block); end -end -class ActiveSupport::Dependencies::Interlock - def done_running; end - def done_unloading; end - def initialize; end - def loading(&block); end - def permit_concurrent_loads(&block); end - def raw_state(&block); end - def running(&block); end - def start_running; end - def start_unloading; end - def unloading(&block); end -end -module ActiveSupport::Dependencies::RequireDependency - def require_dependency(filename); end -end -class ActiveSupport::ExecutionWrapper - def __callbacks; end - def __callbacks?; end - def _complete_callbacks; end - def _run_callbacks; end - def _run_complete_callbacks(&block); end - def _run_run_callbacks(&block); end - def complete!; end - def complete; end - def hook_state; end - def run!; end - def run; end - def self.__callbacks; end - def self.__callbacks=(value); end - def self.__callbacks?; end - def self._complete_callbacks; end - def self._complete_callbacks=(value); end - def self._run_callbacks; end - def self._run_callbacks=(value); end - def self.active?; end - def self.active_key; end - def self.error_reporter; end - def self.perform; end - def self.register_hook(hook, outer: nil); end - def self.run!(reset: nil); end - def self.to_complete(*args, &block); end - def self.to_run(*args, &block); end - def self.wrap(source: nil); end - extend ActiveSupport::Callbacks::ClassMethods - extend ActiveSupport::DescendantsTracker - include ActiveSupport::Callbacks -end -class ActiveSupport::ExecutionWrapper::RunHook < Struct - def before(target); end - def hook; end - def hook=(_); end - def self.[](*arg0); end - def self.inspect; end - def self.keyword_init?; end - def self.members; end - def self.new(*arg0); end -end -class ActiveSupport::ExecutionWrapper::CompleteHook < Struct - def after(target); end - def before(target); end - def hook; end - def hook=(_); end - def self.[](*arg0); end - def self.inspect; end - def self.keyword_init?; end - def self.members; end - def self.new(*arg0); end -end -class ActiveSupport::Executor < ActiveSupport::ExecutionWrapper -end -module ActiveSupport::Multibyte - def self.proxy_class; end - def self.proxy_class=(klass); end -end -class ActiveSupport::Duration - def %(other); end - def *(other); end - def +(other); end - def +@; end - def -(other); end - def -@; end - def /(other); end - def <=>(other); end - def ==(other); end - def _parts; end - def abs(&); end - def after(time = nil); end - def ago(time = nil); end - def as_json(options = nil); end - def before(time = nil); end - def coerce(other); end - def encode_with(coder); end - def eql?(other); end - def from_now(time = nil); end - def hash; end - def in_days; end - def in_hours; end - def in_minutes; end - def in_months; end - def in_seconds; end - def in_weeks; end - def in_years; end - def init_with(coder); end - def initialize(value, parts, variable = nil); end - def inspect; end - def instance_of?(klass); end - def is_a?(klass); end - def iso8601(precision: nil); end - def kind_of?(klass); end - def method_missing(*, **, &); end - def negative?(&); end - def parts; end - def positive?(&); end - def raise_type_error(other); end - def respond_to_missing?(method, _); end - def self.===(other); end - def self.build(value); end - def self.calculate_total_seconds(parts); end - def self.days(value); end - def self.hours(value); end - def self.minutes(value); end - def self.months(value); end - def self.parse(iso8601duration); end - def self.seconds(value); end - def self.weeks(value); end - def self.years(value); end - def since(time = nil); end - def sum(sign, time = nil); end - def to_f(&); end - def to_i; end - def to_s; end - def until(time = nil); end - def value; end - def variable?; end - def zero?(&); end -end -class ActiveSupport::Duration::Scalar < Numeric - def %(other); end - def *(other); end - def +(other); end - def -(other); end - def -@; end - def /(other); end - def <=>(other); end - def calculate(op, other); end - def coerce(other); end - def initialize(value); end - def raise_type_error(other); end - def to_f(*, **, &); end - def to_i(*, **, &); end - def to_s(*, **, &); end - def value; end - def variable?; end -end -class ActiveSupport::TimeZone - def <=>(zone); end - def =~(re); end - def at(*args); end - def encode_with(coder); end - def formatted_offset(colon = nil, alternate_utc_string = nil); end - def init_with(coder); end - def initialize(name, utc_offset = nil, tzinfo = nil); end - def iso8601(str); end - def local(*args); end - def local_to_utc(time, dst = nil); end - def match?(re); end - def name; end - def now; end - def parse(str, now = nil); end - def parts_to_time(parts, now); end - def period_for_local(time, dst = nil); end - def period_for_utc(time); end - def periods_for_local(time); end - def rfc3339(str); end - def self.[](arg); end - def self.all; end - def self.clear; end - def self.country_zones(country_code); end - def self.create(*, **); end - def self.find_tzinfo(name); end - def self.load_country_zones(code); end - def self.new(name); end - def self.seconds_to_utc_offset(seconds, colon = nil); end - def self.us_zones; end - def self.zones_map; end - def strptime(str, format, now = nil); end - def time_now; end - def to_s; end - def today; end - def tomorrow; end - def tzinfo; end - def utc_offset; end - def utc_to_local(time); end - def yesterday; end - include Comparable -end -class ActiveSupport::TimeWithZone - def +(other); end - def -(other); end - def <=>(other); end - def acts_like_time?; end - def advance(options); end - def after?(arg0); end - def ago(other); end - def as_json(options = nil); end - def before?(arg0); end - def between?(min, max); end - def blank?; end - def change(options); end - def comparable_time; end - def day; end - def dst?; end - def duration_of_variable_length?(obj); end - def encode_with(coder); end - def eql?(other); end - def formatted_offset(colon = nil, alternate_utc_string = nil); end - def freeze; end - def future?; end - def get_period_and_ensure_valid_local_time(period); end - def getgm; end - def getlocal(utc_offset = nil); end - def getutc; end - def gmt?; end - def gmt_offset; end - def gmtime; end - def gmtoff; end - def hash; end - def hour; end - def httpdate; end - def in(other); end - def in_time_zone(new_zone = nil); end - def incorporate_utc_offset(time, offset); end - def init_with(coder); end - def initialize(utc_time, time_zone, local_time = nil, period = nil); end - def inspect; end - def is_a?(klass); end - def isdst; end - def iso8601(fraction_digits = nil); end - def kind_of?(klass); end - def localtime(utc_offset = nil); end - def marshal_dump; end - def marshal_load(variables); end - def mday; end - def method_missing(*, **, &); end - def min; end - def mon; end - def month; end - def next_day?; end - def nsec; end - def past?; end - def period; end - def present?; end - def prev_day?; end - def respond_to?(sym, include_priv = nil); end - def respond_to_missing?(sym, include_priv); end - def rfc2822; end - def rfc3339(fraction_digits = nil); end - def rfc822; end - def sec; end - def since(other); end - def strftime(format); end - def time; end - def time_zone; end - def to_a; end - def to_date; end - def to_datetime; end - def to_f; end - def to_formatted_s(format = nil); end - def to_fs(format = nil); end - def to_i; end - def to_r; end - def to_s; end - def to_time; end - def today?; end - def tomorrow?; end - def transfer_time_values_to_utc_constructor(time); end - def tv_sec; end - def usec; end - def utc; end - def utc?; end - def utc_offset; end - def wday; end - def wrap_with_time_zone(time); end - def xmlschema(fraction_digits = nil); end - def yday; end - def year; end - def yesterday?; end - def zone; end - include Comparable -end -module DateAndTime::Zones - def in_time_zone(zone = nil); end - def time_with_zone(time, zone); end -end -module ActiveSupport::Tryable - def try!(*args, **, &block); end - def try(*args, **, &block); end -end -class Delegator < BasicObject - include ActiveSupport::Tryable -end -class DateTime < Date - def <=>(other); end - def advance(options); end - def ago(seconds); end - def at_beginning_of_day; end - def at_beginning_of_hour; end - def at_beginning_of_minute; end - def at_end_of_day; end - def at_end_of_hour; end - def at_end_of_minute; end - def at_midday; end - def at_middle_of_day; end - def at_midnight; end - def at_noon; end - def beginning_of_day; end - def beginning_of_hour; end - def beginning_of_minute; end - def change(options); end - def default_inspect; end - def end_of_day; end - def end_of_hour; end - def end_of_minute; end - def formatted_offset(colon = nil, alternate_utc_string = nil); end - def getgm; end - def getlocal(utc_offset = nil); end - def getutc; end - def gmtime; end - def in(seconds); end - def inspect; end - def localtime(utc_offset = nil); end - def midday; end - def middle_of_day; end - def midnight; end - def noon; end - def nsec; end - def offset_in_seconds; end - def readable_inspect; end - def seconds_since_midnight; end - def seconds_since_unix_epoch; end - def seconds_until_end_of_day; end - def self.civil_from_format(utc_or_local, year, month = nil, day = nil, hour = nil, min = nil, sec = nil); end - def self.current; end - def since(seconds); end - def subsec; end - def to_f; end - def to_formatted_s(format = nil); end - def to_fs(format = nil); end - def to_i; end - def usec; end - def utc; end - def utc?; end - def utc_offset; end -end -module DateAndTime::Calculations - def after?(date_or_time); end - def all_day; end - def all_month; end - def all_quarter; end - def all_week(start_day = nil); end - def all_year; end - def at_beginning_of_month; end - def at_beginning_of_quarter; end - def at_beginning_of_week(start_day = nil); end - def at_beginning_of_year; end - def at_end_of_month; end - def at_end_of_quarter; end - def at_end_of_week(start_day = nil); end - def at_end_of_year; end - def before?(date_or_time); end - def beginning_of_month; end - def beginning_of_quarter; end - def beginning_of_week(start_day = nil); end - def beginning_of_year; end - def copy_time_to(other); end - def days_ago(days); end - def days_since(days); end - def days_span(day); end - def days_to_week_start(start_day = nil); end - def end_of_month; end - def end_of_quarter; end - def end_of_week(start_day = nil); end - def end_of_year; end - def first_hour(date_or_time); end - def future?; end - def last_hour(date_or_time); end - def last_month; end - def last_quarter; end - def last_week(start_day = nil, same_time: nil); end - def last_weekday; end - def last_year; end - def monday; end - def months_ago(months); end - def months_since(months); end - def next_day?; end - def next_occurring(day_of_week); end - def next_quarter; end - def next_week(given_day_in_next_week = nil, same_time: nil); end - def next_weekday; end - def on_weekday?; end - def on_weekend?; end - def past?; end - def prev_day?; end - def prev_occurring(day_of_week); end - def prev_quarter; end - def prev_week(start_day = nil, same_time: nil); end - def prev_weekday; end - def quarter; end - def sunday; end - def today?; end - def tomorrow; end - def tomorrow?; end - def weeks_ago(weeks); end - def weeks_since(weeks); end - def years_ago(years); end - def years_since(years); end - def yesterday; end - def yesterday?; end -end -class Date - def advance(options); end - def ago(seconds); end - def at_beginning_of_day; end - def at_end_of_day; end - def at_midday; end - def at_middle_of_day; end - def at_midnight; end - def at_noon; end - def beginning_of_day; end - def change(options); end - def compare_with_coercion(other); end - def compare_without_coercion(arg0); end - def end_of_day; end - def in(seconds); end - def midday; end - def middle_of_day; end - def midnight; end - def minus_with_duration(other); end - def minus_without_duration(arg0); end - def noon; end - def plus_with_duration(other); end - def plus_without_duration(arg0); end - def self.beginning_of_week; end - def self.beginning_of_week=(week_start); end - def self.beginning_of_week_default; end - def self.beginning_of_week_default=(arg0); end - def self.current; end - def self.find_beginning_of_week!(week_start); end - def self.tomorrow; end - def self.yesterday; end - def since(seconds); end - include DateAndTime::Calculations - include DateAndTime::Zones -end -class ActiveSupport::FileUpdateChecker - def compile_ext(array); end - def compile_glob(hash); end - def escape(key); end - def execute; end - def execute_if_updated; end - def initialize(files, dirs = nil, &block); end - def max_mtime(paths); end - def updated?; end - def updated_at(paths); end - def watched; end -end -class ActiveSupport::HashWithIndifferentAccess < Hash - def [](key); end - def []=(key, value); end - def assoc(key); end - def compact; end - def convert_key(key); end - def convert_value(value, conversion: nil); end - def deep_stringify_keys!; end - def deep_stringify_keys; end - def deep_symbolize_keys; end - def default(key = nil); end - def delete(key); end - def dig(*args); end - def dup; end - def except(*keys); end - def extractable_options?; end - def fetch(key, *extras); end - def fetch_values(*indices, &block); end - def has_key?(key); end - def include?(key); end - def initialize(constructor = nil); end - def key?(key); end - def member?(key); end - def merge!(*other_hashes, &block); end - def merge(*hashes, &block); end - def nested_under_indifferent_access; end - def regular_update(*arg0); end - def regular_writer(arg0, arg1); end - def reject(*args, &block); end - def replace(other_hash); end - def reverse_merge!(other_hash); end - def reverse_merge(other_hash); end - def select(*args, &block); end - def self.[](*args); end - def set_defaults(target); end - def slice!(*keys); end - def slice(*keys); end - def store(key, value); end - def stringify_keys!; end - def stringify_keys; end - def symbolize_keys; end - def to_hash; end - def to_options!; end - def to_options; end - def to_proc; end - def transform_keys!(hash = nil, &block); end - def transform_keys(hash = nil, &block); end - def transform_values(&block); end - def update(*other_hashes, &block); end - def update_with_single_argument(other_hash, block); end - def values_at(*keys); end - def with_defaults!(other_hash); end - def with_defaults(other_hash); end - def with_indifferent_access; end - def without(*keys); end -end diff --git a/sorbet/rbi/gems/activesupport@7.2.2.rbi b/sorbet/rbi/gems/activesupport@7.2.2.rbi deleted file mode 100644 index 5ca5905..0000000 --- a/sorbet/rbi/gems/activesupport@7.2.2.rbi +++ /dev/null @@ -1,20679 +0,0 @@ -# typed: false - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `activesupport` gem. -# Please instead update this file by running `bin/tapioca gem activesupport`. - - -# :include: ../README.rdoc -# -# source://activesupport//lib/active_support/deep_mergeable.rb#3 -module ActiveSupport - extend ::ActiveSupport::LazyLoadHooks - extend ::ActiveSupport::Autoload - - # source://activesupport//lib/active_support/json/decoding.rb#9 - def parse_json_times; end - - # source://activesupport//lib/active_support/json/decoding.rb#9 - def parse_json_times=(val); end - - # source://activesupport//lib/active_support.rb#99 - def test_order; end - - # source://activesupport//lib/active_support.rb#99 - def test_order=(val); end - - # source://activesupport//lib/active_support.rb#100 - def test_parallelization_threshold; end - - # source://activesupport//lib/active_support.rb#100 - def test_parallelization_threshold=(val); end - - class << self - # source://activesupport//lib/active_support.rb#105 - def cache_format_version; end - - # source://activesupport//lib/active_support.rb#109 - def cache_format_version=(value); end - - # source://activesupport//lib/active_support/deprecator.rb#4 - def deprecator; end - - # source://activesupport//lib/active_support.rb#93 - def eager_load!; end - - # source://activesupport//lib/active_support.rb#103 - def error_reporter; end - - # source://activesupport//lib/active_support.rb#103 - def error_reporter=(_arg0); end - - # source://activesupport//lib/active_support/json/encoding.rb#8 - def escape_html_entities_in_json(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/json/encoding.rb#8 - def escape_html_entities_in_json=(arg); end - - # Returns the currently loaded version of Active Support as a +Gem::Version+. - # - # source://activesupport//lib/active_support/gem_version.rb#5 - def gem_version; end - - # source://activesupport//lib/active_support/json/encoding.rb#8 - def json_encoder(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/json/encoding.rb#8 - def json_encoder=(arg); end - - # source://activesupport//lib/active_support/json/decoding.rb#9 - def parse_json_times; end - - # source://activesupport//lib/active_support/json/decoding.rb#9 - def parse_json_times=(val); end - - # source://activesupport//lib/active_support.rb#99 - def test_order; end - - # source://activesupport//lib/active_support.rb#99 - def test_order=(val); end - - # source://activesupport//lib/active_support.rb#100 - def test_parallelization_threshold; end - - # source://activesupport//lib/active_support.rb#100 - def test_parallelization_threshold=(val); end - - # source://activesupport//lib/active_support/json/encoding.rb#8 - def time_precision(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/json/encoding.rb#8 - def time_precision=(arg); end - - # source://activesupport//lib/active_support.rb#113 - def to_time_preserves_timezone; end - - # source://activesupport//lib/active_support.rb#117 - def to_time_preserves_timezone=(value); end - - # source://activesupport//lib/active_support/json/encoding.rb#8 - def use_standard_json_time_format(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/json/encoding.rb#8 - def use_standard_json_time_format=(arg); end - - # source://activesupport//lib/active_support.rb#127 - def utc_to_local_returns_utc_offset_times; end - - # source://activesupport//lib/active_support.rb#131 - def utc_to_local_returns_utc_offset_times=(value); end - - # Returns the currently loaded version of Active Support as a +Gem::Version+. - # - # source://activesupport//lib/active_support/version.rb#7 - def version; end - end -end - -# = Actionable Errors -# -# Actionable errors lets you define actions to resolve an error. -# -# To make an error actionable, include the +ActiveSupport::ActionableError+ -# module and invoke the +action+ class macro to define the action. An action -# needs a name and a block to execute. -# -# source://activesupport//lib/active_support/actionable_error.rb#11 -module ActiveSupport::ActionableError - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActiveSupport::ActionableError::ClassMethods - - class << self - # source://activesupport//lib/active_support/actionable_error.rb#20 - def actions(error); end - - # source://activesupport//lib/active_support/actionable_error.rb#29 - def dispatch(error, name); end - end - - module GeneratedClassMethods - def _actions; end - def _actions=(value); end - def _actions?; end - end - - module GeneratedInstanceMethods - def _actions; end - def _actions=(value); end - def _actions?; end - end -end - -# source://activesupport//lib/active_support/actionable_error.rb#35 -module ActiveSupport::ActionableError::ClassMethods - # Defines an action that can resolve the error. - # - # class PendingMigrationError < MigrationError - # include ActiveSupport::ActionableError - # - # action "Run pending migrations" do - # ActiveRecord::Tasks::DatabaseTasks.migrate - # end - # end - # - # source://activesupport//lib/active_support/actionable_error.rb#45 - def action(name, &block); end -end - -# source://activesupport//lib/active_support/actionable_error.rb#14 -class ActiveSupport::ActionableError::NonActionable < ::StandardError; end - -# = \Array Inquirer -# -# Wrapping an array in an +ArrayInquirer+ gives a friendlier way to check -# its string-like contents: -# -# variants = ActiveSupport::ArrayInquirer.new([:phone, :tablet]) -# -# variants.phone? # => true -# variants.tablet? # => true -# variants.desktop? # => false -# -# source://activesupport//lib/active_support/array_inquirer.rb#14 -class ActiveSupport::ArrayInquirer < ::Array - # Passes each element of +candidates+ collection to ArrayInquirer collection. - # The method returns true if any element from the ArrayInquirer collection - # is equal to the stringified or symbolized form of any element in the +candidates+ collection. - # - # If +candidates+ collection is not given, method returns true. - # - # variants = ActiveSupport::ArrayInquirer.new([:phone, :tablet]) - # - # variants.any? # => true - # variants.any?(:phone, :tablet) # => true - # variants.any?('phone', 'desktop') # => true - # variants.any?(:desktop, :watch) # => false - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/array_inquirer.rb#27 - def any?(*candidates); end - - private - - # source://activesupport//lib/active_support/array_inquirer.rb#42 - def method_missing(name, *_arg1, **_arg2, &_arg3); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/array_inquirer.rb#38 - def respond_to_missing?(name, include_private = T.unsafe(nil)); end -end - -# = Active Support \Autoload -# -# Autoload and eager load conveniences for your library. -# -# This module allows you to define autoloads based on -# \Rails conventions (i.e. no need to define the path -# it is automatically guessed based on the filename) -# and also define a set of constants that needs to be -# eager loaded: -# -# module MyLib -# extend ActiveSupport::Autoload -# -# autoload :Model -# -# eager_autoload do -# autoload :Cache -# end -# end -# -# Then your library can be eager loaded by simply calling: -# -# MyLib.eager_load! -# -# source://activesupport//lib/active_support/dependencies/autoload.rb#29 -module ActiveSupport::Autoload - # source://activesupport//lib/active_support/dependencies/autoload.rb#30 - def autoload(const_name, path = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/dependencies/autoload.rb#51 - def autoload_at(path); end - - # source://activesupport//lib/active_support/dependencies/autoload.rb#44 - def autoload_under(path); end - - # source://activesupport//lib/active_support/dependencies/autoload.rb#58 - def eager_autoload; end - - # source://activesupport//lib/active_support/dependencies/autoload.rb#65 - def eager_load!; end -end - -# = Backtrace Cleaner -# -# Backtraces often include many lines that are not relevant for the context -# under review. This makes it hard to find the signal amongst the backtrace -# noise, and adds debugging time. With a BacktraceCleaner, filters and -# silencers are used to remove the noisy lines, so that only the most relevant -# lines remain. -# -# Filters are used to modify lines of data, while silencers are used to remove -# lines entirely. The typical filter use case is to remove lengthy path -# information from the start of each line, and view file paths relevant to the -# app directory instead of the file system root. The typical silencer use case -# is to exclude the output of a noisy library from the backtrace, so that you -# can focus on the rest. -# -# bc = ActiveSupport::BacktraceCleaner.new -# root = "#{Rails.root}/" -# bc.add_filter { |line| line.start_with?(root) ? line.from(root.size) : line } # strip the Rails.root prefix -# bc.add_silencer { |line| /puma|rubygems/.match?(line) } # skip any lines from puma or rubygems -# bc.clean(exception.backtrace) # perform the cleanup -# -# To reconfigure an existing BacktraceCleaner (like the default one in \Rails) -# and show as much data as possible, you can always call -# BacktraceCleaner#remove_silencers!, which will restore the -# backtrace to a pristine state. If you need to reconfigure an existing -# BacktraceCleaner so that it does not filter or modify the paths of any lines -# of the backtrace, you can call BacktraceCleaner#remove_filters! -# These two methods will give you a completely untouched backtrace. -# -# Inspired by the Quiet Backtrace gem by thoughtbot. -# -# source://activesupport//lib/active_support/backtrace_cleaner.rb#34 -class ActiveSupport::BacktraceCleaner - # @return [BacktraceCleaner] a new instance of BacktraceCleaner - # - # source://activesupport//lib/active_support/backtrace_cleaner.rb#35 - def initialize; end - - # Adds a filter from the block provided. Each line in the backtrace will be - # mapped against this filter. - # - # # Will turn "/my/rails/root/app/models/person.rb" into "app/models/person.rb" - # root = "#{Rails.root}/" - # backtrace_cleaner.add_filter { |line| line.start_with?(root) ? line.from(root.size) : line } - # - # source://activesupport//lib/active_support/backtrace_cleaner.rb#83 - def add_filter(&block); end - - # Adds a silencer from the block provided. If the silencer returns +true+ - # for a given line, it will be excluded from the clean backtrace. - # - # # Will reject all lines that include the word "puma", like "/gems/puma/server.rb" or "/app/my_puma_server/rb" - # backtrace_cleaner.add_silencer { |line| /puma/.match?(line) } - # - # source://activesupport//lib/active_support/backtrace_cleaner.rb#92 - def add_silencer(&block); end - - # Returns the backtrace after all filters and silencers have been run - # against it. Filters run first, then silencers. - # - # source://activesupport//lib/active_support/backtrace_cleaner.rb#45 - def clean(backtrace, kind = T.unsafe(nil)); end - - # Returns the frame with all filters applied. - # returns +nil+ if the frame was silenced. - # - # source://activesupport//lib/active_support/backtrace_cleaner.rb#61 - def clean_frame(frame, kind = T.unsafe(nil)); end - - # Returns the backtrace after all filters and silencers have been run - # against it. Filters run first, then silencers. - # - # source://activesupport//lib/active_support/backtrace_cleaner.rb#45 - def filter(backtrace, kind = T.unsafe(nil)); end - - # Removes all filters, but leaves in the silencers. Useful if you suddenly - # need to see entire filepaths in the backtrace that you had already - # filtered out. - # - # source://activesupport//lib/active_support/backtrace_cleaner.rb#106 - def remove_filters!; end - - # Removes all silencers, but leaves in the filters. Useful if your - # context of debugging suddenly expands as you suspect a bug in one of - # the libraries you use. - # - # source://activesupport//lib/active_support/backtrace_cleaner.rb#99 - def remove_silencers!; end - - private - - # source://activesupport//lib/active_support/backtrace_cleaner.rb#127 - def add_core_silencer; end - - # source://activesupport//lib/active_support/backtrace_cleaner.rb#118 - def add_gem_filter; end - - # source://activesupport//lib/active_support/backtrace_cleaner.rb#131 - def add_gem_silencer; end - - # source://activesupport//lib/active_support/backtrace_cleaner.rb#135 - def add_stdlib_silencer; end - - # source://activesupport//lib/active_support/backtrace_cleaner.rb#139 - def filter_backtrace(backtrace); end - - # source://activesupport//lib/active_support/backtrace_cleaner.rb#113 - def initialize_copy(_other); end - - # source://activesupport//lib/active_support/backtrace_cleaner.rb#155 - def noise(backtrace); end - - # source://activesupport//lib/active_support/backtrace_cleaner.rb#147 - def silence(backtrace); end -end - -# source://activesupport//lib/active_support/backtrace_cleaner.rb#111 -ActiveSupport::BacktraceCleaner::FORMATTED_GEMS_PATTERN = T.let(T.unsafe(nil), Regexp) - -# = \Benchmarkable -# -# source://activesupport//lib/active_support/benchmarkable.rb#8 -module ActiveSupport::Benchmarkable - # Allows you to measure the execution time of a block in a template and - # records the result to the log. Wrap this block around expensive operations - # or possible bottlenecks to get a time reading for the operation. For - # example, let's say you thought your file processing method was taking too - # long; you could wrap it in a benchmark block. - # - # <% benchmark 'Process data files' do %> - # <%= expensive_files_operation %> - # <% end %> - # - # That would add something like "Process data files (345.2ms)" to the log, - # which you can then use to compare timings when optimizing your code. - # - # You may give an optional logger level (:debug, :info, - # :warn, :error) as the :level option. The - # default logger level value is :info. - # - # <% benchmark 'Low-level files', level: :debug do %> - # <%= lowlevel_files_operation %> - # <% end %> - # - # Finally, you can pass true as the third argument to silence all log - # activity (other than the timing information) from inside the block. This - # is great for boiling down a noisy block to just a single statement that - # produces one log line: - # - # <% benchmark 'Process data files', level: :info, silence: true do %> - # <%= expensive_and_chatty_files_operation %> - # <% end %> - # - # source://activesupport//lib/active_support/benchmarkable.rb#38 - def benchmark(message = T.unsafe(nil), options = T.unsafe(nil), &block); end -end - -# source://activesupport//lib/active_support/core_ext/big_decimal/conversions.rb#7 -module ActiveSupport::BigDecimalWithDefaultFormat - # source://activesupport//lib/active_support/core_ext/big_decimal/conversions.rb#8 - def to_s(format = T.unsafe(nil)); end -end - -# = Active Support Broadcast Logger -# -# The Broadcast logger is a logger used to write messages to multiple IO. It is commonly used -# in development to display messages on STDOUT and also write them to a file (development.log). -# With the Broadcast logger, you can broadcast your logs to a unlimited number of sinks. -# -# The BroadcastLogger acts as a standard logger and all methods you are used to are available. -# However, all the methods on this logger will propagate and be delegated to the other loggers -# that are part of the broadcast. -# -# Broadcasting your logs. -# -# stdout_logger = Logger.new(STDOUT) -# file_logger = Logger.new("development.log") -# broadcast = BroadcastLogger.new(stdout_logger, file_logger) -# -# broadcast.info("Hello world!") # Writes the log to STDOUT and the development.log file. -# -# Add a logger to the broadcast. -# -# stdout_logger = Logger.new(STDOUT) -# broadcast = BroadcastLogger.new(stdout_logger) -# file_logger = Logger.new("development.log") -# broadcast.broadcast_to(file_logger) -# -# broadcast.info("Hello world!") # Writes the log to STDOUT and the development.log file. -# -# Modifying the log level for all broadcasted loggers. -# -# stdout_logger = Logger.new(STDOUT) -# file_logger = Logger.new("development.log") -# broadcast = BroadcastLogger.new(stdout_logger, file_logger) -# -# broadcast.level = Logger::FATAL # Modify the log level for the whole broadcast. -# -# Stop broadcasting log to a sink. -# -# stdout_logger = Logger.new(STDOUT) -# file_logger = Logger.new("development.log") -# broadcast = BroadcastLogger.new(stdout_logger, file_logger) -# broadcast.info("Hello world!") # Writes the log to STDOUT and the development.log file. -# -# broadcast.stop_broadcasting_to(file_logger) -# broadcast.info("Hello world!") # Writes the log *only* to STDOUT. -# -# At least one sink has to be part of the broadcast. Otherwise, your logs will not -# be written anywhere. For instance: -# -# broadcast = BroadcastLogger.new -# broadcast.info("Hello world") # The log message will appear nowhere. -# -# If you are adding a custom logger with custom methods to the broadcast, -# the `BroadcastLogger` will proxy them and return the raw value, or an array -# of raw values, depending on how many loggers in the broadcasts responded to -# the method: -# -# class MyLogger < ::Logger -# def loggable? -# true -# end -# end -# -# logger = BroadcastLogger.new -# logger.loggable? # => A NoMethodError exception is raised because no loggers in the broadcasts could respond. -# -# logger.broadcast_to(MyLogger.new(STDOUT)) -# logger.loggable? # => true -# logger.broadcast_to(MyLogger.new(STDOUT)) -# puts logger.broadcasts # => [MyLogger, MyLogger] -# logger.loggable? # [true, true] -# -# source://activesupport//lib/active_support/broadcast_logger.rb#74 -class ActiveSupport::BroadcastLogger - include ::ActiveSupport::LoggerSilence - include ::ActiveSupport::LoggerThreadSafeLevel - - # @return [BroadcastLogger] a new instance of BroadcastLogger - # - # source://activesupport//lib/active_support/broadcast_logger.rb#82 - def initialize(*loggers); end - - # source://activesupport//lib/active_support/broadcast_logger.rb#112 - def <<(message); end - - # source://activesupport//lib/active_support/broadcast_logger.rb#116 - def add(*_arg0, **_arg1, &_arg2); end - - # Add logger(s) to the broadcast. - # - # broadcast_logger = ActiveSupport::BroadcastLogger.new - # broadcast_logger.broadcast_to(Logger.new(STDOUT), Logger.new(STDERR)) - # - # source://activesupport//lib/active_support/broadcast_logger.rb#93 - def broadcast_to(*loggers); end - - # Returns all the logger that are part of this broadcast. - # - # source://activesupport//lib/active_support/broadcast_logger.rb#78 - def broadcasts; end - - # source://activesupport//lib/active_support/broadcast_logger.rb#162 - def close; end - - # source://activesupport//lib/active_support/broadcast_logger.rb#121 - def debug(*_arg0, **_arg1, &_arg2); end - - # Sets the log level to Logger::DEBUG for the whole broadcast. - # - # source://activesupport//lib/active_support/broadcast_logger.rb#173 - def debug!; end - - # +True+ if the log level allows entries with severity Logger::DEBUG to be written - # to at least one broadcast. +False+ otherwise. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/broadcast_logger.rb#168 - def debug?; end - - # source://activesupport//lib/active_support/broadcast_logger.rb#133 - def error(*_arg0, **_arg1, &_arg2); end - - # Sets the log level to Logger::ERROR for the whole broadcast. - # - # source://activesupport//lib/active_support/broadcast_logger.rb#206 - def error!; end - - # +True+ if the log level allows entries with severity Logger::ERROR to be written - # to at least one broadcast. +False+ otherwise. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/broadcast_logger.rb#201 - def error?; end - - # source://activesupport//lib/active_support/broadcast_logger.rb#137 - def fatal(*_arg0, **_arg1, &_arg2); end - - # Sets the log level to Logger::FATAL for the whole broadcast. - # - # source://activesupport//lib/active_support/broadcast_logger.rb#217 - def fatal!; end - - # +True+ if the log level allows entries with severity Logger::FATAL to be written - # to at least one broadcast. +False+ otherwise. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/broadcast_logger.rb#212 - def fatal?; end - - # Returns the value of attribute formatter. - # - # source://activesupport//lib/active_support/broadcast_logger.rb#79 - def formatter; end - - # source://activesupport//lib/active_support/broadcast_logger.rb#145 - def formatter=(formatter); end - - # source://activesupport//lib/active_support/broadcast_logger.rb#125 - def info(*_arg0, **_arg1, &_arg2); end - - # Sets the log level to Logger::INFO for the whole broadcast. - # - # source://activesupport//lib/active_support/broadcast_logger.rb#184 - def info!; end - - # +True+ if the log level allows entries with severity Logger::INFO to be written - # to at least one broadcast. +False+ otherwise. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/broadcast_logger.rb#179 - def info?; end - - # source://activesupport//lib/active_support/broadcast_logger.rb#108 - def level; end - - # source://activesupport//lib/active_support/broadcast_logger.rb#151 - def level=(level); end - - # source://activesupport//lib/active_support/broadcast_logger.rb#156 - def local_level=(level); end - - # source://activesupport//lib/active_support/broadcast_logger.rb#116 - def log(*_arg0, **_arg1, &_arg2); end - - # Returns the value of attribute progname. - # - # source://activesupport//lib/active_support/broadcast_logger.rb#80 - def progname; end - - # Sets the attribute progname - # - # @param value the value to set the attribute progname to. - # - # source://activesupport//lib/active_support/broadcast_logger.rb#80 - def progname=(_arg0); end - - # source://activesupport//lib/active_support/broadcast_logger.rb#151 - def sev_threshold=(level); end - - # source://activesupport//lib/active_support/logger_silence.rb#12 - def silencer; end - - # source://activesupport//lib/active_support/logger_silence.rb#12 - def silencer=(val); end - - # Remove a logger from the broadcast. When a logger is removed, messages sent to - # the broadcast will no longer be written to its sink. - # - # sink = Logger.new(STDOUT) - # broadcast_logger = ActiveSupport::BroadcastLogger.new - # - # broadcast_logger.stop_broadcasting_to(sink) - # - # source://activesupport//lib/active_support/broadcast_logger.rb#104 - def stop_broadcasting_to(logger); end - - # source://activesupport//lib/active_support/broadcast_logger.rb#141 - def unknown(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/broadcast_logger.rb#129 - def warn(*_arg0, **_arg1, &_arg2); end - - # Sets the log level to Logger::WARN for the whole broadcast. - # - # source://activesupport//lib/active_support/broadcast_logger.rb#195 - def warn!; end - - # +True+ if the log level allows entries with severity Logger::WARN to be written - # to at least one broadcast. +False+ otherwise. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/broadcast_logger.rb#190 - def warn?; end - - private - - # source://activesupport//lib/active_support/broadcast_logger.rb#230 - def dispatch(&block); end - - # source://activesupport//lib/active_support/broadcast_logger.rb#221 - def initialize_copy(other); end - - # source://activesupport//lib/active_support/broadcast_logger.rb#235 - def method_missing(name, *_arg1, **_arg2, &_arg3); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/broadcast_logger.rb#247 - def respond_to_missing?(method, include_all); end - - class << self - # source://activesupport//lib/active_support/logger_silence.rb#12 - def silencer; end - - # source://activesupport//lib/active_support/logger_silence.rb#12 - def silencer=(val); end - end -end - -# See ActiveSupport::Cache::Store for documentation. -# -# source://activesupport//lib/active_support/cache/entry.rb#6 -module ActiveSupport::Cache - class << self - # Expands out the +key+ argument into a key that can be used for the - # cache store. Optionally accepts a namespace, and all keys will be - # scoped within that namespace. - # - # If the +key+ argument provided is an array, or responds to +to_a+, then - # each of elements in the array will be turned into parameters/keys and - # concatenated into a single key. For example: - # - # ActiveSupport::Cache.expand_cache_key([:foo, :bar]) # => "foo/bar" - # ActiveSupport::Cache.expand_cache_key([:foo, :bar], "namespace") # => "namespace/foo/bar" - # - # The +key+ argument can also respond to +cache_key+ or +to_param+. - # - # source://activesupport//lib/active_support/cache.rb#111 - def expand_cache_key(key, namespace = T.unsafe(nil)); end - - # Returns the value of attribute format_version. - # - # source://activesupport//lib/active_support/cache.rb#58 - def format_version; end - - # Sets the attribute format_version - # - # @param value the value to set the attribute format_version to. - # - # source://activesupport//lib/active_support/cache.rb#58 - def format_version=(_arg0); end - - # Creates a new Store object according to the given options. - # - # If no arguments are passed to this method, then a new - # ActiveSupport::Cache::MemoryStore object will be returned. - # - # If you pass a Symbol as the first argument, then a corresponding cache - # store class under the ActiveSupport::Cache namespace will be created. - # For example: - # - # ActiveSupport::Cache.lookup_store(:memory_store) - # # => returns a new ActiveSupport::Cache::MemoryStore object - # - # ActiveSupport::Cache.lookup_store(:mem_cache_store) - # # => returns a new ActiveSupport::Cache::MemCacheStore object - # - # Any additional arguments will be passed to the corresponding cache store - # class's constructor: - # - # ActiveSupport::Cache.lookup_store(:file_store, '/tmp/cache') - # # => same as: ActiveSupport::Cache::FileStore.new('/tmp/cache') - # - # If the first argument is not a Symbol, then it will simply be returned: - # - # ActiveSupport::Cache.lookup_store(MyOwnCacheStore.new) - # # => returns MyOwnCacheStore.new - # - # source://activesupport//lib/active_support/cache.rb#85 - def lookup_store(store = T.unsafe(nil), *parameters); end - - private - - # source://activesupport//lib/active_support/cache.rb#123 - def retrieve_cache_key(key); end - - # Obtains the specified cache store class, given the name of the +store+. - # Raises an error when the store class cannot be found. - # - # source://activesupport//lib/active_support/cache.rb#135 - def retrieve_store_class(store); end - end -end - -# source://activesupport//lib/active_support/cache/coder.rb#7 -class ActiveSupport::Cache::Coder - # @return [Coder] a new instance of Coder - # - # source://activesupport//lib/active_support/cache/coder.rb#8 - def initialize(serializer, compressor, legacy_serializer: T.unsafe(nil)); end - - # source://activesupport//lib/active_support/cache/coder.rb#14 - def dump(entry); end - - # source://activesupport//lib/active_support/cache/coder.rb#20 - def dump_compressed(entry, threshold); end - - # source://activesupport//lib/active_support/cache/coder.rb#48 - def load(dumped); end - - private - - # source://activesupport//lib/active_support/cache/coder.rb#136 - def dump_version(version); end - - # source://activesupport//lib/active_support/cache/coder.rb#144 - def load_version(dumped_version); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/cache/coder.rb#121 - def signature?(dumped); end - - # source://activesupport//lib/active_support/cache/coder.rb#129 - def try_compress(string, threshold); end - - # source://activesupport//lib/active_support/cache/coder.rb#125 - def type_for_string(value); end -end - -# source://activesupport//lib/active_support/cache/coder.rb#76 -ActiveSupport::Cache::Coder::COMPRESSED_FLAG = T.let(T.unsafe(nil), Integer) - -# source://activesupport//lib/active_support/cache/coder.rb#98 -class ActiveSupport::Cache::Coder::LazyEntry < ::ActiveSupport::Cache::Entry - # @return [LazyEntry] a new instance of LazyEntry - # - # source://activesupport//lib/active_support/cache/coder.rb#99 - def initialize(serializer, compressor, payload, **options); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/cache/coder.rb#114 - def mismatched?(version); end - - # source://activesupport//lib/active_support/cache/coder.rb#106 - def value; end -end - -# source://activesupport//lib/active_support/cache/coder.rb#84 -ActiveSupport::Cache::Coder::MARSHAL_SIGNATURE = T.let(T.unsafe(nil), String) - -# source://activesupport//lib/active_support/cache/coder.rb#68 -ActiveSupport::Cache::Coder::OBJECT_DUMP_TYPE = T.let(T.unsafe(nil), Integer) - -# source://activesupport//lib/active_support/cache/coder.rb#80 -ActiveSupport::Cache::Coder::PACKED_EXPIRES_AT_TEMPLATE = T.let(T.unsafe(nil), String) - -# source://activesupport//lib/active_support/cache/coder.rb#78 -ActiveSupport::Cache::Coder::PACKED_TEMPLATE = T.let(T.unsafe(nil), String) - -# source://activesupport//lib/active_support/cache/coder.rb#79 -ActiveSupport::Cache::Coder::PACKED_TYPE_TEMPLATE = T.let(T.unsafe(nil), String) - -# source://activesupport//lib/active_support/cache/coder.rb#82 -ActiveSupport::Cache::Coder::PACKED_VERSION_INDEX = T.let(T.unsafe(nil), Integer) - -# source://activesupport//lib/active_support/cache/coder.rb#81 -ActiveSupport::Cache::Coder::PACKED_VERSION_LENGTH_TEMPLATE = T.let(T.unsafe(nil), String) - -# source://activesupport//lib/active_support/cache/coder.rb#66 -ActiveSupport::Cache::Coder::SIGNATURE = T.let(T.unsafe(nil), String) - -# source://activesupport//lib/active_support/cache/coder.rb#96 -ActiveSupport::Cache::Coder::STRING_DESERIALIZERS = T.let(T.unsafe(nil), Hash) - -# source://activesupport//lib/active_support/cache/coder.rb#70 -ActiveSupport::Cache::Coder::STRING_ENCODINGS = T.let(T.unsafe(nil), Hash) - -# source://activesupport//lib/active_support/cache/coder.rb#86 -class ActiveSupport::Cache::Coder::StringDeserializer - # @return [StringDeserializer] a new instance of StringDeserializer - # - # source://activesupport//lib/active_support/cache/coder.rb#87 - def initialize(encoding); end - - # source://activesupport//lib/active_support/cache/coder.rb#91 - def load(payload); end -end - -# source://activesupport//lib/active_support/cache.rb#45 -ActiveSupport::Cache::DEFAULT_COMPRESS_LIMIT = T.let(T.unsafe(nil), Integer) - -# Raised by coders when the cache entry can't be deserialized. -# This error is treated as a cache miss. -# -# source://activesupport//lib/active_support/cache.rb#49 -class ActiveSupport::Cache::DeserializationError < ::StandardError; end - -# This class is used to represent cache entries. Cache entries have a value, an optional -# expiration time, and an optional version. The expiration time is used to support the :race_condition_ttl option -# on the cache. The version is used to support the :version option on the cache for rejecting -# mismatches. -# -# Since cache entries in most instances will be serialized, the internals of this class are highly optimized -# using short instance variable names that are lazily defined. -# -# source://activesupport//lib/active_support/cache/entry.rb#14 -class ActiveSupport::Cache::Entry - # Creates a new cache entry for the specified value. Options supported are - # +:compressed+, +:version+, +:expires_at+ and +:expires_in+. - # - # @return [Entry] a new instance of Entry - # - # source://activesupport//lib/active_support/cache/entry.rb#25 - def initialize(value, compressed: T.unsafe(nil), version: T.unsafe(nil), expires_in: T.unsafe(nil), expires_at: T.unsafe(nil), **_arg5); end - - # Returns the size of the cached value. This could be less than - # value.bytesize if the data is compressed. - # - # source://activesupport//lib/active_support/cache/entry.rb#61 - def bytesize; end - - # source://activesupport//lib/active_support/cache/entry.rb#76 - def compressed(compress_threshold); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/cache/entry.rb#72 - def compressed?; end - - # Duplicates the value in a class. This is used by cache implementations that don't natively - # serialize entries to protect against accidental cache modifications. - # - # source://activesupport//lib/active_support/cache/entry.rb#106 - def dup_value!; end - - # Checks if the entry is expired. The +expires_in+ parameter can override - # the value set when the entry was created. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/cache/entry.rb#43 - def expired?; end - - # source://activesupport//lib/active_support/cache/entry.rb#47 - def expires_at; end - - # source://activesupport//lib/active_support/cache/entry.rb#51 - def expires_at=(value); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/cache/entry.rb#100 - def local?; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/cache/entry.rb#37 - def mismatched?(version); end - - # source://activesupport//lib/active_support/cache/entry.rb#116 - def pack; end - - # source://activesupport//lib/active_support/cache/entry.rb#33 - def value; end - - # Returns the value of attribute version. - # - # source://activesupport//lib/active_support/cache/entry.rb#21 - def version; end - - private - - # source://activesupport//lib/active_support/cache/entry.rb#127 - def marshal_load(payload); end - - # source://activesupport//lib/active_support/cache/entry.rb#123 - def uncompress(value); end - - class << self - # source://activesupport//lib/active_support/cache/entry.rb#16 - def unpack(members); end - end -end - -# = \File \Cache \Store -# -# A cache store implementation which stores everything on the filesystem. -# -# source://activesupport//lib/active_support/cache/file_store.rb#12 -class ActiveSupport::Cache::FileStore < ::ActiveSupport::Cache::Store - # @return [FileStore] a new instance of FileStore - # - # source://activesupport//lib/active_support/cache/file_store.rb#20 - def initialize(cache_path, **options); end - - # Returns the value of attribute cache_path. - # - # source://activesupport//lib/active_support/cache/file_store.rb#13 - def cache_path; end - - # Preemptively iterates through all stored keys and removes the ones which have expired. - # - # source://activesupport//lib/active_support/cache/file_store.rb#40 - def cleanup(options = T.unsafe(nil)); end - - # Deletes all items from the cache. In this case it deletes all the entries in the specified - # file store directory except for .keep or .gitkeep. Be careful which directory is specified in your - # config file when using +FileStore+ because everything in that directory will be deleted. - # - # source://activesupport//lib/active_support/cache/file_store.rb#33 - def clear(options = T.unsafe(nil)); end - - # Decrement a cached integer value. Returns the updated value. - # - # If the key is unset, it will be set to +-amount+. - # - # cache.decrement("foo") # => -1 - # - # To set a specific value, call #write: - # - # cache.write("baz", 5) - # cache.decrement("baz") # => 4 - # - # source://activesupport//lib/active_support/cache/file_store.rb#75 - def decrement(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/cache/file_store.rb#79 - def delete_matched(matcher, options = T.unsafe(nil)); end - - # Increment a cached integer value. Returns the updated value. - # - # If the key is unset, it starts from +0+: - # - # cache.increment("foo") # => 1 - # cache.increment("bar", 100) # => 100 - # - # To set a specific value, call #write: - # - # cache.write("baz", 5) - # cache.increment("baz") # => 6 - # - # source://activesupport//lib/active_support/cache/file_store.rb#60 - def increment(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/cache/file_store.rb#91 - def inspect; end - - private - - # Delete empty directories in the cache. - # - # source://activesupport//lib/active_support/cache/file_store.rb#185 - def delete_empty_directories(dir); end - - # source://activesupport//lib/active_support/cache/file_store.rb#121 - def delete_entry(key, **options); end - - # Make sure a file path's directories exist. - # - # source://activesupport//lib/active_support/cache/file_store.rb#194 - def ensure_cache_path(path); end - - # Translate a file path into a key. - # - # source://activesupport//lib/active_support/cache/file_store.rb#179 - def file_path_key(path); end - - # Lock a file for a block so only one process can modify it at a time. - # - # source://activesupport//lib/active_support/cache/file_store.rb#138 - def lock_file(file_name, &block); end - - # Modifies the amount of an integer value that is stored in the cache. - # If the key is not found it is created and set to +amount+. - # - # source://activesupport//lib/active_support/cache/file_store.rb#212 - def modify_value(name, amount, options); end - - # Translate a key into a file path. - # - # source://activesupport//lib/active_support/cache/file_store.rb#152 - def normalize_key(key, options); end - - # source://activesupport//lib/active_support/cache/file_store.rb#96 - def read_entry(key, **options); end - - # source://activesupport//lib/active_support/cache/file_store.rb#103 - def read_serialized_entry(key, **_arg1); end - - # source://activesupport//lib/active_support/cache/file_store.rb#198 - def search_dir(dir, &callback); end - - # source://activesupport//lib/active_support/cache/file_store.rb#110 - def write_entry(key, entry, **options); end - - # source://activesupport//lib/active_support/cache/file_store.rb#114 - def write_serialized_entry(key, payload, **options); end - - class << self - # Advertise cache versioning support. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/cache/file_store.rb#26 - def supports_cache_versioning?; end - end -end - -# source://activesupport//lib/active_support/cache/file_store.rb#15 -ActiveSupport::Cache::FileStore::DIR_FORMATTER = T.let(T.unsafe(nil), String) - -# max filename size on file system is 255, minus room for timestamp, pid, and random characters appended by Tempfile (used by atomic write) -# -# source://activesupport//lib/active_support/cache/file_store.rb#16 -ActiveSupport::Cache::FileStore::FILENAME_MAX_SIZE = T.let(T.unsafe(nil), Integer) - -# max is 1024, plus some room -# -# source://activesupport//lib/active_support/cache/file_store.rb#17 -ActiveSupport::Cache::FileStore::FILEPATH_MAX_SIZE = T.let(T.unsafe(nil), Integer) - -# source://activesupport//lib/active_support/cache/file_store.rb#18 -ActiveSupport::Cache::FileStore::GITKEEP_FILES = T.let(T.unsafe(nil), Array) - -# = Memory \Cache \Store -# -# A cache store implementation which stores everything into memory in the -# same process. If you're running multiple Ruby on \Rails server processes -# (which is the case if you're using Phusion Passenger or puma clustered mode), -# then this means that \Rails server process instances won't be able -# to share cache data with each other and this may not be the most -# appropriate cache in that scenario. -# -# This cache has a bounded size specified by the +:size+ options to the -# initializer (default is 32Mb). When the cache exceeds the allotted size, -# a cleanup will occur which tries to prune the cache down to three quarters -# of the maximum size by removing the least recently used entries. -# -# Unlike other Cache store implementations, +MemoryStore+ does not compress -# values by default. +MemoryStore+ does not benefit from compression as much -# as other Store implementations, as it does not send data over a network. -# However, when compression is enabled, it still pays the full cost of -# compression in terms of cpu use. -# -# +MemoryStore+ is thread-safe. -# -# source://activesupport//lib/active_support/cache/memory_store.rb#28 -class ActiveSupport::Cache::MemoryStore < ::ActiveSupport::Cache::Store - # @return [MemoryStore] a new instance of MemoryStore - # - # source://activesupport//lib/active_support/cache/memory_store.rb#73 - def initialize(options = T.unsafe(nil)); end - - # Preemptively iterates through all stored keys and removes the ones which have expired. - # - # source://activesupport//lib/active_support/cache/memory_store.rb#101 - def cleanup(options = T.unsafe(nil)); end - - # Delete all data stored in a given cache store. - # - # source://activesupport//lib/active_support/cache/memory_store.rb#93 - def clear(options = T.unsafe(nil)); end - - # Decrement a cached integer value. Returns the updated value. - # - # If the key is unset or has expired, it will be set to +-amount+. - # - # cache.decrement("foo") # => -1 - # - # To set a specific value, call #write: - # - # cache.write("baz", 5) - # cache.decrement("baz") # => 4 - # - # source://activesupport//lib/active_support/cache/memory_store.rb#164 - def decrement(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end - - # Deletes cache entries if the cache key matches a given pattern. - # - # source://activesupport//lib/active_support/cache/memory_store.rb#169 - def delete_matched(matcher, options = T.unsafe(nil)); end - - # Increment a cached integer value. Returns the updated value. - # - # If the key is unset, it will be set to +amount+: - # - # cache.increment("foo") # => 1 - # cache.increment("bar", 100) # => 100 - # - # To set a specific value, call #write: - # - # cache.write("baz", 5) - # cache.increment("baz") # => 6 - # - # source://activesupport//lib/active_support/cache/memory_store.rb#149 - def increment(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/cache/memory_store.rb#181 - def inspect; end - - # To ensure entries fit within the specified memory prune the cache by removing the least - # recently accessed entries. - # - # source://activesupport//lib/active_support/cache/memory_store.rb#114 - def prune(target_size, max_time = T.unsafe(nil)); end - - # Returns true if the cache is currently being pruned. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/cache/memory_store.rb#133 - def pruning?; end - - # Synchronize calls to the cache. This should be called wherever the underlying cache implementation - # is not thread safe. - # - # source://activesupport//lib/active_support/cache/memory_store.rb#187 - def synchronize(&block); end - - private - - # source://activesupport//lib/active_support/cache/memory_store.rb#194 - def cached_size(key, payload); end - - # source://activesupport//lib/active_support/cache/memory_store.rb#227 - def delete_entry(key, **options); end - - # Modifies the amount of an integer value that is stored in the cache. - # If the key is not found it is created and set to +amount+. - # - # source://activesupport//lib/active_support/cache/memory_store.rb#237 - def modify_value(name, amount, options); end - - # source://activesupport//lib/active_support/cache/memory_store.rb#198 - def read_entry(key, **options); end - - # source://activesupport//lib/active_support/cache/memory_store.rb#210 - def write_entry(key, entry, **options); end - - class << self - # Advertise cache versioning support. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/cache/memory_store.rb#88 - def supports_cache_versioning?; end - end -end - -# source://activesupport//lib/active_support/cache/memory_store.rb#29 -module ActiveSupport::Cache::MemoryStore::DupCoder - extend ::ActiveSupport::Cache::MemoryStore::DupCoder - - # source://activesupport//lib/active_support/cache/memory_store.rb#32 - def dump(entry); end - - # source://activesupport//lib/active_support/cache/memory_store.rb#40 - def dump_compressed(entry, threshold); end - - # source://activesupport//lib/active_support/cache/memory_store.rb#45 - def load(entry); end - - private - - # source://activesupport//lib/active_support/cache/memory_store.rb#56 - def dump_value(value); end - - # source://activesupport//lib/active_support/cache/memory_store.rb#64 - def load_value(string); end -end - -# source://activesupport//lib/active_support/cache/memory_store.rb#54 -ActiveSupport::Cache::MemoryStore::DupCoder::MARSHAL_SIGNATURE = T.let(T.unsafe(nil), String) - -# source://activesupport//lib/active_support/cache/memory_store.rb#192 -ActiveSupport::Cache::MemoryStore::PER_ENTRY_OVERHEAD = T.let(T.unsafe(nil), Integer) - -# = Null \Cache \Store -# -# A cache store implementation which doesn't actually store anything. Useful in -# development and test environments where you don't want caching turned on but -# need to go through the caching interface. -# -# This cache does implement the local cache strategy, so values will actually -# be cached inside blocks that utilize this strategy. See -# ActiveSupport::Cache::Strategy::LocalCache for more details. -# -# source://activesupport//lib/active_support/cache/null_store.rb#14 -class ActiveSupport::Cache::NullStore < ::ActiveSupport::Cache::Store - include ::ActiveSupport::Cache::Strategy::LocalCache - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#85 - def cleanup(options = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#79 - def clear(options = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#108 - def decrement(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#91 - def delete_matched(matcher, options = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#97 - def increment(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/cache/null_store.rb#37 - def inspect; end - - private - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#162 - def delete_entry(key, **_arg1); end - - # source://activesupport//lib/active_support/cache/null_store.rb#42 - def read_entry(key, **s); end - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#120 - def read_serialized_entry(key, raw: T.unsafe(nil), **options); end - - # source://activesupport//lib/active_support/cache/null_store.rb#49 - def write_entry(key, entry, **_arg2); end - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#153 - def write_serialized_entry(key, payload, **_arg2); end - - class << self - # Advertise cache versioning support. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/cache/null_store.rb#18 - def supports_cache_versioning?; end - end -end - -# Mapping of canonical option names to aliases that a store will recognize. -# -# source://activesupport//lib/active_support/cache.rb#41 -ActiveSupport::Cache::OPTION_ALIASES = T.let(T.unsafe(nil), Hash) - -# source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#8 -module ActiveSupport::Cache::SerializerWithFallback - # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#17 - def load(dumped); end - - private - - # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#39 - def marshal_load(payload); end - - class << self - # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#9 - def [](format); end - end -end - -# source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#66 -module ActiveSupport::Cache::SerializerWithFallback::Marshal70WithFallback - include ::ActiveSupport::Cache::SerializerWithFallback - extend ::ActiveSupport::Cache::SerializerWithFallback - extend ::ActiveSupport::Cache::SerializerWithFallback::Marshal70WithFallback - - # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#88 - def _load(marked); end - - # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#73 - def dump(entry); end - - # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#77 - def dump_compressed(entry, threshold); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#94 - def dumped?(dumped); end -end - -# source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#71 -ActiveSupport::Cache::SerializerWithFallback::Marshal70WithFallback::MARK_COMPRESSED = T.let(T.unsafe(nil), String) - -# source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#70 -ActiveSupport::Cache::SerializerWithFallback::Marshal70WithFallback::MARK_UNCOMPRESSED = T.let(T.unsafe(nil), String) - -# source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#99 -module ActiveSupport::Cache::SerializerWithFallback::Marshal71WithFallback - include ::ActiveSupport::Cache::SerializerWithFallback - extend ::ActiveSupport::Cache::SerializerWithFallback - extend ::ActiveSupport::Cache::SerializerWithFallback::Marshal71WithFallback - - # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#109 - def _load(dumped); end - - # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#105 - def dump(value); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#113 - def dumped?(dumped); end -end - -# source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#103 -ActiveSupport::Cache::SerializerWithFallback::Marshal71WithFallback::MARSHAL_SIGNATURE = T.let(T.unsafe(nil), String) - -# source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#118 -module ActiveSupport::Cache::SerializerWithFallback::MessagePackWithFallback - include ::ActiveSupport::Cache::SerializerWithFallback - extend ::ActiveSupport::Cache::SerializerWithFallback - extend ::ActiveSupport::Cache::SerializerWithFallback::MessagePackWithFallback - - # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#126 - def _load(dumped); end - - # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#122 - def dump(value); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#130 - def dumped?(dumped); end - - private - - # @return [Boolean] - # - # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#135 - def available?; end -end - -# source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#45 -module ActiveSupport::Cache::SerializerWithFallback::PassthroughWithFallback - include ::ActiveSupport::Cache::SerializerWithFallback - extend ::ActiveSupport::Cache::SerializerWithFallback - extend ::ActiveSupport::Cache::SerializerWithFallback::PassthroughWithFallback - - # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#57 - def _load(entry); end - - # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#49 - def dump(entry); end - - # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#53 - def dump_compressed(entry, threshold); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#61 - def dumped?(dumped); end -end - -# source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#144 -ActiveSupport::Cache::SerializerWithFallback::SERIALIZERS = T.let(T.unsafe(nil), Hash) - -# = Active Support \Cache \Store -# -# An abstract cache store class. There are multiple cache store -# implementations, each having its own additional features. See the classes -# under the ActiveSupport::Cache module, e.g. -# ActiveSupport::Cache::MemCacheStore. MemCacheStore is currently the most -# popular cache store for large production websites. -# -# Some implementations may not support all methods beyond the basic cache -# methods of #fetch, #write, #read, #exist?, and #delete. -# -# +ActiveSupport::Cache::Store+ can store any Ruby object that is supported -# by its +coder+'s +dump+ and +load+ methods. -# -# cache = ActiveSupport::Cache::MemoryStore.new -# -# cache.read('city') # => nil -# cache.write('city', "Duckburgh") # => true -# cache.read('city') # => "Duckburgh" -# -# cache.write('not serializable', Proc.new {}) # => TypeError -# -# Keys are always translated into Strings and are case sensitive. When an -# object is specified as a key and has a +cache_key+ method defined, this -# method will be called to define the key. Otherwise, the +to_param+ -# method will be called. Hashes and Arrays can also be used as keys. The -# elements will be delimited by slashes, and the elements within a Hash -# will be sorted by key so they are consistent. -# -# cache.read('city') == cache.read(:city) # => true -# -# Nil values can be cached. -# -# If your cache is on a shared infrastructure, you can define a namespace -# for your cache entries. If a namespace is defined, it will be prefixed on -# to every key. The namespace can be either a static value or a Proc. If it -# is a Proc, it will be invoked when each key is evaluated so that you can -# use application logic to invalidate keys. -# -# cache.namespace = -> { @last_mod_time } # Set the namespace to a variable -# @last_mod_time = Time.now # Invalidate the entire cache by changing namespace -# -# source://activesupport//lib/active_support/cache.rb#188 -class ActiveSupport::Cache::Store - # Creates a new cache. - # - # ==== Options - # - # [+:namespace+] - # Sets the namespace for the cache. This option is especially useful if - # your application shares a cache with other applications. - # - # [+:serializer+] - # The serializer for cached values. Must respond to +dump+ and +load+. - # - # The default serializer depends on the cache format version (set via - # +config.active_support.cache_format_version+ when using Rails). The - # default serializer for each format version includes a fallback - # mechanism to deserialize values from any format version. This behavior - # makes it easy to migrate between format versions without invalidating - # the entire cache. - # - # You can also specify serializer: :message_pack to use a - # preconfigured serializer based on ActiveSupport::MessagePack. The - # +:message_pack+ serializer includes the same deserialization fallback - # mechanism, allowing easy migration from (or to) the default - # serializer. The +:message_pack+ serializer may improve performance, - # but it requires the +msgpack+ gem. - # - # [+:compressor+] - # The compressor for serialized cache values. Must respond to +deflate+ - # and +inflate+. - # - # The default compressor is +Zlib+. To define a new custom compressor - # that also decompresses old cache entries, you can check compressed - # values for Zlib's "\x78" signature: - # - # module MyCompressor - # def self.deflate(dumped) - # # compression logic... (make sure result does not start with "\x78"!) - # end - # - # def self.inflate(compressed) - # if compressed.start_with?("\x78") - # Zlib.inflate(compressed) - # else - # # decompression logic... - # end - # end - # end - # - # ActiveSupport::Cache.lookup_store(:redis_cache_store, compressor: MyCompressor) - # - # [+:coder+] - # The coder for serializing and (optionally) compressing cache entries. - # Must respond to +dump+ and +load+. - # - # The default coder composes the serializer and compressor, and includes - # some performance optimizations. If you only need to override the - # serializer or compressor, you should specify the +:serializer+ or - # +:compressor+ options instead. - # - # If the store can handle cache entries directly, you may also specify - # coder: nil to omit the serializer, compressor, and coder. For - # example, if you are using ActiveSupport::Cache::MemoryStore and can - # guarantee that cache values will not be mutated, you can specify - # coder: nil to avoid the overhead of safeguarding against - # mutation. - # - # The +:coder+ option is mutally exclusive with the +:serializer+ and - # +:compressor+ options. Specifying them together will raise an - # +ArgumentError+. - # - # Any other specified options are treated as default options for the - # relevant cache operations, such as #read, #write, and #fetch. - # - # @return [Store] a new instance of Store - # - # source://activesupport//lib/active_support/cache.rb#295 - def initialize(options = T.unsafe(nil)); end - - # Cleans up the cache by removing expired entries. - # - # Options are passed to the underlying cache implementation. - # - # Some implementations may not support this method. - # - # @raise [NotImplementedError] - # - # source://activesupport//lib/active_support/cache.rb#747 - def cleanup(options = T.unsafe(nil)); end - - # Clears the entire cache. Be careful with this method since it could - # affect other processes if shared cache is being used. - # - # The options hash is passed to the underlying cache implementation. - # - # Some implementations may not support this method. - # - # @raise [NotImplementedError] - # - # source://activesupport//lib/active_support/cache.rb#757 - def clear(options = T.unsafe(nil)); end - - # Decrements an integer value in the cache. - # - # Options are passed to the underlying cache implementation. - # - # Some implementations may not support this method. - # - # @raise [NotImplementedError] - # - # source://activesupport//lib/active_support/cache.rb#738 - def decrement(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end - - # Deletes an entry in the cache. Returns +true+ if an entry is deleted - # and +false+ otherwise. - # - # Options are passed to the underlying cache implementation. - # - # source://activesupport//lib/active_support/cache.rb#674 - def delete(name, options = T.unsafe(nil)); end - - # Deletes all entries with keys matching the pattern. - # - # Options are passed to the underlying cache implementation. - # - # Some implementations may not support this method. - # - # @raise [NotImplementedError] - # - # source://activesupport//lib/active_support/cache.rb#720 - def delete_matched(matcher, options = T.unsafe(nil)); end - - # Deletes multiple entries in the cache. Returns the number of deleted - # entries. - # - # Options are passed to the underlying cache implementation. - # - # source://activesupport//lib/active_support/cache.rb#687 - def delete_multi(names, options = T.unsafe(nil)); end - - # Returns +true+ if the cache contains an entry for the given key. - # - # Options are passed to the underlying cache implementation. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/cache.rb#701 - def exist?(name, options = T.unsafe(nil)); end - - # Fetches data from the cache, using the given key. If there is data in - # the cache with the given key, then that data is returned. - # - # If there is no such data in the cache (a cache miss), then +nil+ will be - # returned. However, if a block has been passed, that block will be passed - # the key and executed in the event of a cache miss. The return value of the - # block will be written to the cache under the given cache key, and that - # return value will be returned. - # - # cache.write('today', 'Monday') - # cache.fetch('today') # => "Monday" - # - # cache.fetch('city') # => nil - # cache.fetch('city') do - # 'Duckburgh' - # end - # cache.fetch('city') # => "Duckburgh" - # - # ==== Options - # - # Internally, +fetch+ calls +read_entry+, and calls +write_entry+ on a - # cache miss. Thus, +fetch+ supports the same options as #read and #write. - # Additionally, +fetch+ supports the following options: - # - # * force: true - Forces a cache "miss," meaning we treat the - # cache value as missing even if it's present. Passing a block is - # required when +force+ is true so this always results in a cache write. - # - # cache.write('today', 'Monday') - # cache.fetch('today', force: true) { 'Tuesday' } # => 'Tuesday' - # cache.fetch('today', force: true) # => ArgumentError - # - # The +:force+ option is useful when you're calling some other method to - # ask whether you should force a cache write. Otherwise, it's clearer to - # just call +write+. - # - # * skip_nil: true - Prevents caching a nil result: - # - # cache.fetch('foo') { nil } - # cache.fetch('bar', skip_nil: true) { nil } - # cache.exist?('foo') # => true - # cache.exist?('bar') # => false - # - # * +:race_condition_ttl+ - Specifies the number of seconds during which - # an expired value can be reused while a new value is being generated. - # This can be used to prevent race conditions when cache entries expire, - # by preventing multiple processes from simultaneously regenerating the - # same entry (also known as the dog pile effect). - # - # When a process encounters a cache entry that has expired less than - # +:race_condition_ttl+ seconds ago, it will bump the expiration time by - # +:race_condition_ttl+ seconds before generating a new value. During - # this extended time window, while the process generates a new value, - # other processes will continue to use the old value. After the first - # process writes the new value, other processes will then use it. - # - # If the first process errors out while generating a new value, another - # process can try to generate a new value after the extended time window - # has elapsed. - # - # # Set all values to expire after one minute. - # cache = ActiveSupport::Cache::MemoryStore.new(expires_in: 1) - # - # cache.write("foo", "original value") - # val_1 = nil - # val_2 = nil - # p cache.read("foo") # => "original value" - # - # sleep 1 # wait until the cache expires - # - # t1 = Thread.new do - # # fetch does the following: - # # 1. gets an recent expired entry - # # 2. extends the expiry by 2 seconds (race_condition_ttl) - # # 3. regenerates the new value - # val_1 = cache.fetch("foo", race_condition_ttl: 2) do - # sleep 1 - # "new value 1" - # end - # end - # - # # Wait until t1 extends the expiry of the entry - # # but before generating the new value - # sleep 0.1 - # - # val_2 = cache.fetch("foo", race_condition_ttl: 2) do - # # This block won't be executed because t1 extended the expiry - # "new value 2" - # end - # - # t1.join - # - # p val_1 # => "new value 1" - # p val_2 # => "oritinal value" - # p cache.fetch("foo") # => "new value 1" - # - # # The entry requires 3 seconds to expire (expires_in + race_condition_ttl) - # # We have waited 2 seconds already (sleep(1) + t1.join) thus we need to wait 1 - # # more second to see the entry expire. - # sleep 1 - # - # p cache.fetch("foo") # => nil - # - # ==== Dynamic Options - # - # In some cases it may be necessary to dynamically compute options based - # on the cached value. To support this, an ActiveSupport::Cache::WriteOptions - # instance is passed as the second argument to the block. For example: - # - # cache.fetch("authentication-token:#{user.id}") do |key, options| - # token = authenticate_to_service - # options.expires_at = token.expires_at - # token - # end - # - # source://activesupport//lib/active_support/cache.rb#444 - def fetch(name, options = T.unsafe(nil), &block); end - - # Fetches data from the cache, using the given keys. If there is data in - # the cache with the given keys, then that data is returned. Otherwise, - # the supplied block is called for each key for which there was no data, - # and the result will be written to the cache and returned. - # Therefore, you need to pass a block that returns the data to be written - # to the cache. If you do not want to write the cache when the cache is - # not found, use #read_multi. - # - # Returns a hash with the data for each of the names. For example: - # - # cache.write("bim", "bam") - # cache.fetch_multi("bim", "unknown_key") do |key| - # "Fallback value for key: #{key}" - # end - # # => { "bim" => "bam", - # # "unknown_key" => "Fallback value for key: unknown_key" } - # - # You may also specify additional options via the +options+ argument. See #fetch for details. - # Other options are passed to the underlying cache implementation. For example: - # - # cache.fetch_multi("fizz", expires_in: 5.seconds) do |key| - # "buzz" - # end - # # => {"fizz"=>"buzz"} - # cache.read("fizz") - # # => "buzz" - # sleep(6) - # cache.read("fizz") - # # => nil - # - # @raise [ArgumentError] - # - # source://activesupport//lib/active_support/cache.rb#593 - def fetch_multi(*names); end - - # Increments an integer value in the cache. - # - # Options are passed to the underlying cache implementation. - # - # Some implementations may not support this method. - # - # @raise [NotImplementedError] - # - # source://activesupport//lib/active_support/cache.rb#729 - def increment(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/cache.rb#189 - def logger; end - - # source://activesupport//lib/active_support/cache.rb#189 - def logger=(val); end - - # Silences the logger within a block. - # - # source://activesupport//lib/active_support/cache.rb#322 - def mute; end - - # source://activesupport//lib/active_support/cache.rb#711 - def new_entry(value, options = T.unsafe(nil)); end - - # Returns the value of attribute options. - # - # source://activesupport//lib/active_support/cache.rb#192 - def options; end - - # source://activesupport//lib/active_support/cache.rb#190 - def raise_on_invalid_cache_expiration_time; end - - # source://activesupport//lib/active_support/cache.rb#190 - def raise_on_invalid_cache_expiration_time=(val); end - - # Reads data from the cache, using the given key. If there is data in - # the cache with the given key, then that data is returned. Otherwise, - # +nil+ is returned. - # - # Note, if data was written with the :expires_in or - # :version options, both of these conditions are applied before - # the data is returned. - # - # ==== Options - # - # * +:namespace+ - Replace the store namespace for this call. - # * +:version+ - Specifies a version for the cache entry. If the cached - # version does not match the requested version, the read will be treated - # as a cache miss. This feature is used to support recyclable cache keys. - # - # Other options will be handled by the specific cache store implementation. - # - # source://activesupport//lib/active_support/cache.rb#498 - def read(name, options = T.unsafe(nil)); end - - # Reads multiple values at once from the cache. Options can be passed - # in the last argument. - # - # Some cache implementation may optimize this method. - # - # Returns a hash mapping the names provided to the values found. - # - # source://activesupport//lib/active_support/cache.rb#536 - def read_multi(*names); end - - # Returns the value of attribute silence. - # - # source://activesupport//lib/active_support/cache.rb#192 - def silence; end - - # Silences the logger. - # - # source://activesupport//lib/active_support/cache.rb#316 - def silence!; end - - # Returns the value of attribute silence. - # - # source://activesupport//lib/active_support/cache.rb#192 - def silence?; end - - # Writes the value to the cache with the key. The value must be supported - # by the +coder+'s +dump+ and +load+ methods. - # - # Returns +true+ if the write succeeded, +nil+ if there was an error talking - # to the cache backend, or +false+ if the write failed for another reason. - # - # By default, cache entries larger than 1kB are compressed. Compression - # allows more data to be stored in the same memory footprint, leading to - # fewer cache evictions and higher hit rates. - # - # ==== Options - # - # * compress: false - Disables compression of the cache entry. - # - # * +:compress_threshold+ - The compression threshold, specified in bytes. - # \Cache entries larger than this threshold will be compressed. Defaults - # to +1.kilobyte+. - # - # * +:expires_in+ - Sets a relative expiration time for the cache entry, - # specified in seconds. +:expire_in+ and +:expired_in+ are aliases for - # +:expires_in+. - # - # cache = ActiveSupport::Cache::MemoryStore.new(expires_in: 5.minutes) - # cache.write(key, value, expires_in: 1.minute) # Set a lower value for one entry - # - # * +:expires_at+ - Sets an absolute expiration time for the cache entry. - # - # cache = ActiveSupport::Cache::MemoryStore.new - # cache.write(key, value, expires_at: Time.now.at_end_of_hour) - # - # * +:version+ - Specifies a version for the cache entry. When reading - # from the cache, if the cached version does not match the requested - # version, the read will be treated as a cache miss. This feature is - # used to support recyclable cache keys. - # - # Other options will be handled by the specific cache store implementation. - # - # source://activesupport//lib/active_support/cache.rb#660 - def write(name, value, options = T.unsafe(nil)); end - - # Cache Storage API to write multiple values at once. - # - # source://activesupport//lib/active_support/cache.rb#550 - def write_multi(hash, options = T.unsafe(nil)); end - - private - - # source://activesupport//lib/active_support/cache.rb#1005 - def _instrument(operation, multi: T.unsafe(nil), options: T.unsafe(nil), **payload, &block); end - - # source://activesupport//lib/active_support/cache.rb#762 - def default_serializer; end - - # Deletes an entry from the cache implementation. Subclasses must - # implement this method. - # - # @raise [NotImplementedError] - # - # source://activesupport//lib/active_support/cache.rb#848 - def delete_entry(key, **options); end - - # Deletes multiples entries in the cache implementation. Subclasses MAY - # implement this method. - # - # source://activesupport//lib/active_support/cache.rb#854 - def delete_multi_entries(entries, **options); end - - # source://activesupport//lib/active_support/cache.rb#813 - def deserialize_entry(payload, **_arg1); end - - # Expands key to be a consistent string value. Invokes +cache_key+ if - # object responds to +cache_key+. Otherwise, +to_param+ method will be - # called. If the key is a Hash, then keys will be sorted alphabetically. - # - # source://activesupport//lib/active_support/cache.rb#968 - def expanded_key(key); end - - # source://activesupport//lib/active_support/cache.rb#989 - def expanded_version(key); end - - # source://activesupport//lib/active_support/cache.rb#1043 - def get_entry_value(entry, name, options); end - - # source://activesupport//lib/active_support/cache.rb#1026 - def handle_expired_entry(entry, key, options); end - - # source://activesupport//lib/active_support/cache.rb#888 - def handle_invalid_expires_in(message); end - - # source://activesupport//lib/active_support/cache.rb#997 - def instrument(operation, key, options = T.unsafe(nil), &block); end - - # source://activesupport//lib/active_support/cache.rb#1001 - def instrument_multi(operation, keys, options = T.unsafe(nil), &block); end - - # Adds the namespace defined in the options to a pattern designed to - # match keys. Implementations that support delete_matched should call - # this method to translate a pattern that matches names into one that - # matches namespaced keys. - # - # source://activesupport//lib/active_support/cache.rb#777 - def key_matcher(pattern, options); end - - # Merges the default options with ones specific to a method call. - # - # source://activesupport//lib/active_support/cache.rb#859 - def merged_options(call_options); end - - # Prefix the key with a namespace string: - # - # namespace_key 'foo', namespace: 'cache' - # # => 'cache:foo' - # - # With a namespace block: - # - # namespace_key 'foo', namespace: -> { 'cache' } - # # => 'cache:foo' - # - # source://activesupport//lib/active_support/cache.rb#946 - def namespace_key(key, options = T.unsafe(nil)); end - - # Expands and namespaces the cache key. - # Raises an exception when the key is +nil+ or an empty string. - # May be overridden by cache stores to do additional normalization. - # - # @raise [ArgumentError] - # - # source://activesupport//lib/active_support/cache.rb#930 - def normalize_key(key, options = T.unsafe(nil)); end - - # Normalize aliased options to their canonical form - # - # source://activesupport//lib/active_support/cache.rb#899 - def normalize_options(options); end - - # source://activesupport//lib/active_support/cache.rb#985 - def normalize_version(key, options = T.unsafe(nil)); end - - # Reads an entry from the cache implementation. Subclasses must implement - # this method. - # - # @raise [NotImplementedError] - # - # source://activesupport//lib/active_support/cache.rb#794 - def read_entry(key, **options); end - - # Reads multiple entries from the cache implementation. Subclasses MAY - # implement this method. - # - # source://activesupport//lib/active_support/cache.rb#821 - def read_multi_entries(names, **options); end - - # source://activesupport//lib/active_support/cache.rb#1048 - def save_block_result_to_cache(name, key, options); end - - # source://activesupport//lib/active_support/cache.rb#804 - def serialize_entry(entry, **options); end - - # source://activesupport//lib/active_support/cache.rb#910 - def validate_options(options); end - - # Writes an entry to the cache implementation. Subclasses must implement - # this method. - # - # @raise [NotImplementedError] - # - # source://activesupport//lib/active_support/cache.rb#800 - def write_entry(key, entry, **options); end - - # Writes multiple entries to the cache implementation. Subclasses MAY - # implement this method. - # - # source://activesupport//lib/active_support/cache.rb#840 - def write_multi_entries(hash, **options); end - - class << self - # source://activesupport//lib/active_support/cache.rb#189 - def logger; end - - # source://activesupport//lib/active_support/cache.rb#189 - def logger=(val); end - - # source://activesupport//lib/active_support/cache.rb#190 - def raise_on_invalid_cache_expiration_time; end - - # source://activesupport//lib/active_support/cache.rb#190 - def raise_on_invalid_cache_expiration_time=(val); end - - private - - # source://activesupport//lib/active_support/cache.rb#200 - def retrieve_pool_options(options); end - end -end - -# source://activesupport//lib/active_support/cache.rb#51 -module ActiveSupport::Cache::Strategy; end - -# = Local \Cache \Strategy -# -# Caches that implement LocalCache will be backed by an in-memory cache for the -# duration of a block. Repeated calls to the cache for the same key will hit the -# in-memory cache for faster access. -# -# source://activesupport//lib/active_support/cache/strategy/local_cache.rb#13 -module ActiveSupport::Cache::Strategy::LocalCache - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#85 - def cleanup(options = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#79 - def clear(options = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#108 - def decrement(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#91 - def delete_matched(matcher, options = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#97 - def increment(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end - - # Middleware class can be inserted as a Rack handler to be local cache for the - # duration of request. - # - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#73 - def middleware; end - - # Use a local cache for the duration of block. - # - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#67 - def with_local_cache(&block); end - - private - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#185 - def bypass_local_cache(&block); end - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#162 - def delete_entry(key, **_arg1); end - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#181 - def local_cache; end - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#177 - def local_cache_key; end - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#134 - def read_multi_entries(names, **options); end - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#120 - def read_serialized_entry(key, raw: T.unsafe(nil), **options); end - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#189 - def use_temporary_local_cache(temporary_cache); end - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#167 - def write_cache_value(name, value, **options); end - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#153 - def write_serialized_entry(key, payload, **_arg2); end -end - -# Class for storing and registering the local caches. -# -# source://activesupport//lib/active_support/cache/strategy/local_cache.rb#17 -module ActiveSupport::Cache::Strategy::LocalCache::LocalCacheRegistry - extend ::ActiveSupport::Cache::Strategy::LocalCache::LocalCacheRegistry - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#20 - def cache_for(local_cache_key); end - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#25 - def set_cache_for(local_cache_key, value); end -end - -# = Local \Cache \Store -# -# Simple memory backed cache. This cache is not thread safe and is intended only -# for serving as a temporary memory cache for a single thread. -# -# source://activesupport//lib/active_support/cache/strategy/local_cache.rb#35 -class ActiveSupport::Cache::Strategy::LocalCache::LocalStore - # @return [LocalStore] a new instance of LocalStore - # - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#36 - def initialize; end - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#40 - def clear(options = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#57 - def delete_entry(key); end - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#61 - def fetch_entry(key); end - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#44 - def read_entry(key); end - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#48 - def read_multi_entries(keys); end - - # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#52 - def write_entry(key, entry); end -end - -# These options mean something to all cache implementations. Individual cache -# implementations may support additional options. -# -# source://activesupport//lib/active_support/cache.rb#26 -ActiveSupport::Cache::UNIVERSAL_OPTIONS = T.let(T.unsafe(nil), Array) - -# Enables the dynamic configuration of Cache entry options while ensuring -# that conflicting options are not both set. When a block is given to -# ActiveSupport::Cache::Store#fetch, the second argument will be an -# instance of +WriteOptions+. -# -# source://activesupport//lib/active_support/cache.rb#1064 -class ActiveSupport::Cache::WriteOptions - # @return [WriteOptions] a new instance of WriteOptions - # - # source://activesupport//lib/active_support/cache.rb#1065 - def initialize(options); end - - # source://activesupport//lib/active_support/cache.rb#1089 - def expires_at; end - - # Sets the Cache entry's +expires_at+ value. If an +expires_in+ option was - # previously set, this will unset it since +expires_at+ and +expires_in+ - # cannot both be set. - # - # source://activesupport//lib/active_support/cache.rb#1096 - def expires_at=(expires_at); end - - # source://activesupport//lib/active_support/cache.rb#1077 - def expires_in; end - - # Sets the Cache entry's +expires_in+ value. If an +expires_at+ option was - # previously set, this will unset it since +expires_in+ and +expires_at+ - # cannot both be set. - # - # source://activesupport//lib/active_support/cache.rb#1084 - def expires_in=(expires_in); end - - # source://activesupport//lib/active_support/cache.rb#1069 - def version; end - - # source://activesupport//lib/active_support/cache.rb#1073 - def version=(version); end -end - -# = Caching Key Generator -# -# CachingKeyGenerator is a wrapper around KeyGenerator which allows users to avoid -# re-executing the key generation process when it's called using the same +salt+ and -# +key_size+. -# -# source://activesupport//lib/active_support/key_generator.rb#55 -class ActiveSupport::CachingKeyGenerator - # @return [CachingKeyGenerator] a new instance of CachingKeyGenerator - # - # source://activesupport//lib/active_support/key_generator.rb#56 - def initialize(key_generator); end - - # Returns a derived key suitable for use. - # - # source://activesupport//lib/active_support/key_generator.rb#62 - def generate_key(*args); end -end - -# = Active Support \Callbacks -# -# \Callbacks are code hooks that are run at key points in an object's life cycle. -# The typical use case is to have a base class define a set of callbacks -# relevant to the other functionality it supplies, so that subclasses can -# install callbacks that enhance or modify the base functionality without -# needing to override or redefine methods of the base class. -# -# Mixing in this module allows you to define the events in the object's -# life cycle that will support callbacks (via ClassMethods#define_callbacks), -# set the instance methods, procs, or callback objects to be called (via -# ClassMethods#set_callback), and run the installed callbacks at the -# appropriate times (via +run_callbacks+). -# -# By default callbacks are halted by throwing +:abort+. -# See ClassMethods#define_callbacks for details. -# -# Three kinds of callbacks are supported: before callbacks, run before a -# certain event; after callbacks, run after the event; and around callbacks, -# blocks that surround the event, triggering it when they yield. Callback code -# can be contained in instance methods, procs or lambdas, or callback objects -# that respond to certain predetermined methods. See ClassMethods#set_callback -# for details. -# -# class Record -# include ActiveSupport::Callbacks -# define_callbacks :save -# -# def save -# run_callbacks :save do -# puts "- save" -# end -# end -# end -# -# class PersonRecord < Record -# set_callback :save, :before, :saving_message -# def saving_message -# puts "saving..." -# end -# -# set_callback :save, :after do |object| -# puts "saved" -# end -# end -# -# person = PersonRecord.new -# person.save -# -# Output: -# saving... -# - save -# saved -# -# source://activesupport//lib/active_support/callbacks.rb#65 -module ActiveSupport::Callbacks - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActiveSupport::Callbacks::ClassMethods - mixes_in_class_methods ::ActiveSupport::DescendantsTracker - - # Runs the callbacks for the given event. - # - # Calls the before and around callbacks in the order they were set, yields - # the block (if given one), and then runs the after callbacks in reverse - # order. - # - # If the callback chain was halted, returns +false+. Otherwise returns the - # result of the block, +nil+ if no callbacks have been set, or +true+ - # if callbacks have been set but no block is given. - # - # run_callbacks :save do - # save - # end - # - # -- - # - # As this method is used in many places, and often wraps large portions of - # user code, it has an additional design goal of minimizing its impact on - # the visible call stack. An exception from inside a :before or :after - # callback can be as noisy as it likes -- but when control has passed - # smoothly through and into the supplied block, we want as little evidence - # as possible that we were here. - # - # source://activesupport//lib/active_support/callbacks.rb#97 - def run_callbacks(kind, type = T.unsafe(nil)); end - - private - - # A hook invoked every time a before callback is halted. - # This can be overridden in ActiveSupport::Callbacks implementors in order - # to provide better debugging/logging. - # - # source://activesupport//lib/active_support/callbacks.rb#150 - def halted_callback_hook(filter, name); end - - module GeneratedClassMethods - def __callbacks; end - def __callbacks=(value); end - def __callbacks?; end - end - - module GeneratedInstanceMethods - def __callbacks; end - def __callbacks?; end - end -end - -# source://activesupport//lib/active_support/callbacks.rb#73 -ActiveSupport::Callbacks::CALLBACK_FILTER_TYPES = T.let(T.unsafe(nil), Array) - -# A future invocation of user-supplied code (either as a callback, -# or a condition filter). -# -# source://activesupport//lib/active_support/callbacks.rb#337 -module ActiveSupport::Callbacks::CallTemplate - class << self - # Filters support: - # - # Symbols:: A method to call. - # Procs:: A proc to call with the object. - # Objects:: An object with a before_foo method on it to call. - # - # All of these objects are converted into a CallTemplate and handled - # the same after this point. - # - # source://activesupport//lib/active_support/callbacks.rb#495 - def build(filter, callback); end - end -end - -# source://activesupport//lib/active_support/callbacks.rb#396 -class ActiveSupport::Callbacks::CallTemplate::InstanceExec0 - # @return [InstanceExec0] a new instance of InstanceExec0 - # - # source://activesupport//lib/active_support/callbacks.rb#397 - def initialize(block); end - - # source://activesupport//lib/active_support/callbacks.rb#401 - def expand(target, value, block); end - - # source://activesupport//lib/active_support/callbacks.rb#411 - def inverted_lambda; end - - # source://activesupport//lib/active_support/callbacks.rb#405 - def make_lambda; end -end - -# source://activesupport//lib/active_support/callbacks.rb#418 -class ActiveSupport::Callbacks::CallTemplate::InstanceExec1 - # @return [InstanceExec1] a new instance of InstanceExec1 - # - # source://activesupport//lib/active_support/callbacks.rb#419 - def initialize(block); end - - # source://activesupport//lib/active_support/callbacks.rb#423 - def expand(target, value, block); end - - # source://activesupport//lib/active_support/callbacks.rb#433 - def inverted_lambda; end - - # source://activesupport//lib/active_support/callbacks.rb#427 - def make_lambda; end -end - -# source://activesupport//lib/active_support/callbacks.rb#440 -class ActiveSupport::Callbacks::CallTemplate::InstanceExec2 - # @return [InstanceExec2] a new instance of InstanceExec2 - # - # source://activesupport//lib/active_support/callbacks.rb#441 - def initialize(block); end - - # @raise [ArgumentError] - # - # source://activesupport//lib/active_support/callbacks.rb#445 - def expand(target, value, block); end - - # source://activesupport//lib/active_support/callbacks.rb#457 - def inverted_lambda; end - - # source://activesupport//lib/active_support/callbacks.rb#450 - def make_lambda; end -end - -# source://activesupport//lib/active_support/callbacks.rb#338 -class ActiveSupport::Callbacks::CallTemplate::MethodCall - # @return [MethodCall] a new instance of MethodCall - # - # source://activesupport//lib/active_support/callbacks.rb#339 - def initialize(method); end - - # Return the parts needed to make this call, with the given - # input values. - # - # Returns an array of the form: - # - # [target, block, method, *arguments] - # - # This array can be used as such: - # - # target.send(method, *arguments, &block) - # - # The actual invocation is left up to the caller to minimize - # call stack pollution. - # - # source://activesupport//lib/active_support/callbacks.rb#356 - def expand(target, value, block); end - - # source://activesupport//lib/active_support/callbacks.rb#366 - def inverted_lambda; end - - # source://activesupport//lib/active_support/callbacks.rb#360 - def make_lambda; end -end - -# source://activesupport//lib/active_support/callbacks.rb#373 -class ActiveSupport::Callbacks::CallTemplate::ObjectCall - # @return [ObjectCall] a new instance of ObjectCall - # - # source://activesupport//lib/active_support/callbacks.rb#374 - def initialize(target, method); end - - # source://activesupport//lib/active_support/callbacks.rb#379 - def expand(target, value, block); end - - # source://activesupport//lib/active_support/callbacks.rb#389 - def inverted_lambda; end - - # source://activesupport//lib/active_support/callbacks.rb#383 - def make_lambda; end -end - -# source://activesupport//lib/active_support/callbacks.rb#465 -class ActiveSupport::Callbacks::CallTemplate::ProcCall - # @return [ProcCall] a new instance of ProcCall - # - # source://activesupport//lib/active_support/callbacks.rb#466 - def initialize(target); end - - # source://activesupport//lib/active_support/callbacks.rb#470 - def expand(target, value, block); end - - # source://activesupport//lib/active_support/callbacks.rb#480 - def inverted_lambda; end - - # source://activesupport//lib/active_support/callbacks.rb#474 - def make_lambda; end -end - -# source://activesupport//lib/active_support/callbacks.rb#231 -class ActiveSupport::Callbacks::Callback - # @return [Callback] a new instance of Callback - # - # source://activesupport//lib/active_support/callbacks.rb#246 - def initialize(name, filter, kind, options, chain_config); end - - # Wraps code with filter - # - # source://activesupport//lib/active_support/callbacks.rb#300 - def apply(callback_sequence); end - - # Returns the value of attribute chain_config. - # - # source://activesupport//lib/active_support/callbacks.rb#244 - def chain_config; end - - # source://activesupport//lib/active_support/callbacks.rb#282 - def compiled; end - - # source://activesupport//lib/active_support/callbacks.rb#304 - def current_scopes; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/callbacks.rb#273 - def duplicates?(other); end - - # Returns the value of attribute filter. - # - # source://activesupport//lib/active_support/callbacks.rb#244 - def filter; end - - # Returns the value of attribute kind. - # - # source://activesupport//lib/active_support/callbacks.rb#243 - def kind; end - - # Sets the attribute kind - # - # @param value the value to set the attribute kind to. - # - # source://activesupport//lib/active_support/callbacks.rb#243 - def kind=(_arg0); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/callbacks.rb#269 - def matches?(_kind, _filter); end - - # source://activesupport//lib/active_support/callbacks.rb#257 - def merge_conditional_options(chain, if_option:, unless_option:); end - - # Returns the value of attribute name. - # - # source://activesupport//lib/active_support/callbacks.rb#243 - def name; end - - # Sets the attribute name - # - # @param value the value to set the attribute name to. - # - # source://activesupport//lib/active_support/callbacks.rb#243 - def name=(_arg0); end - - private - - # source://activesupport//lib/active_support/callbacks.rb#312 - def check_conditionals(conditionals); end - - # source://activesupport//lib/active_support/callbacks.rb#327 - def conditions_lambdas; end - - class << self - # source://activesupport//lib/active_support/callbacks.rb#232 - def build(chain, filter, kind, options); end - end -end - -# source://activesupport//lib/active_support/callbacks.rb#309 -ActiveSupport::Callbacks::Callback::EMPTY_ARRAY = T.let(T.unsafe(nil), Array) - -# source://activesupport//lib/active_support/callbacks.rb#567 -class ActiveSupport::Callbacks::CallbackChain - include ::Enumerable - - # @return [CallbackChain] a new instance of CallbackChain - # - # source://activesupport//lib/active_support/callbacks.rb#572 - def initialize(name, config); end - - # source://activesupport//lib/active_support/callbacks.rb#632 - def append(*callbacks); end - - # source://activesupport//lib/active_support/callbacks.rb#600 - def clear; end - - # source://activesupport//lib/active_support/callbacks.rb#614 - def compile(type); end - - # Returns the value of attribute config. - # - # source://activesupport//lib/active_support/callbacks.rb#570 - def config; end - - # source://activesupport//lib/active_support/callbacks.rb#594 - def delete(o); end - - # source://activesupport//lib/active_support/callbacks.rb#584 - def each(&block); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/callbacks.rb#586 - def empty?; end - - # source://activesupport//lib/active_support/callbacks.rb#585 - def index(o); end - - # source://activesupport//lib/active_support/callbacks.rb#588 - def insert(index, o); end - - # Returns the value of attribute name. - # - # source://activesupport//lib/active_support/callbacks.rb#570 - def name; end - - # source://activesupport//lib/active_support/callbacks.rb#636 - def prepend(*callbacks); end - - protected - - # Returns the value of attribute chain. - # - # source://activesupport//lib/active_support/callbacks.rb#641 - def chain; end - - private - - # source://activesupport//lib/active_support/callbacks.rb#644 - def append_one(callback); end - - # source://activesupport//lib/active_support/callbacks.rb#664 - def default_terminator; end - - # source://activesupport//lib/active_support/callbacks.rb#607 - def initialize_copy(other); end - - # source://activesupport//lib/active_support/callbacks.rb#651 - def prepend_one(callback); end - - # source://activesupport//lib/active_support/callbacks.rb#658 - def remove_duplicates(callback); end -end - -# Execute before and after filters in a sequence instead of -# chaining them with nested lambda calls, see: -# https://github.com/rails/rails/issues/18011 -# -# source://activesupport//lib/active_support/callbacks.rb#518 -class ActiveSupport::Callbacks::CallbackSequence - # @return [CallbackSequence] a new instance of CallbackSequence - # - # source://activesupport//lib/active_support/callbacks.rb#519 - def initialize(nested = T.unsafe(nil), call_template = T.unsafe(nil), user_conditions = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/callbacks.rb#534 - def after(after); end - - # source://activesupport//lib/active_support/callbacks.rb#540 - def around(call_template, user_conditions); end - - # source://activesupport//lib/active_support/callbacks.rb#528 - def before(before); end - - # source://activesupport//lib/active_support/callbacks.rb#554 - def expand_call_template(arg, block); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/callbacks.rb#550 - def final?; end - - # source://activesupport//lib/active_support/callbacks.rb#562 - def invoke_after(arg); end - - # source://activesupport//lib/active_support/callbacks.rb#558 - def invoke_before(arg); end - - # Returns the value of attribute nested. - # - # source://activesupport//lib/active_support/callbacks.rb#548 - def nested; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/callbacks.rb#544 - def skip?(arg); end -end - -# source://activesupport//lib/active_support/callbacks.rb#676 -module ActiveSupport::Callbacks::ClassMethods - # This is used internally to append, prepend and skip callbacks to the - # CallbackChain. - # - # source://activesupport//lib/active_support/callbacks.rb#686 - def __update_callbacks(name); end - - # Define sets of events in the object life cycle that support callbacks. - # - # define_callbacks :validate - # define_callbacks :initialize, :save, :destroy - # - # ===== Options - # - # * :terminator - Determines when a before filter will halt the - # callback chain, preventing following before and around callbacks from - # being called and the event from being triggered. - # This should be a lambda to be executed. - # The current object and the result lambda of the callback will be provided - # to the terminator lambda. - # - # define_callbacks :validate, terminator: ->(target, result_lambda) { result_lambda.call == false } - # - # In this example, if any before validate callbacks returns +false+, - # any successive before and around callback is not executed. - # - # The default terminator halts the chain when a callback throws +:abort+. - # - # * :skip_after_callbacks_if_terminated - Determines if after - # callbacks should be terminated by the :terminator option. By - # default after callbacks are executed no matter if callback chain was - # terminated or not. This option has no effect if :terminator - # option is set to +nil+. - # - # * :scope - Indicates which methods should be executed when an - # object is used as a callback. - # - # class Audit - # def before(caller) - # puts 'Audit: before is called' - # end - # - # def before_save(caller) - # puts 'Audit: before_save is called' - # end - # end - # - # class Account - # include ActiveSupport::Callbacks - # - # define_callbacks :save - # set_callback :save, :before, Audit.new - # - # def save - # run_callbacks :save do - # puts 'save in main' - # end - # end - # end - # - # In the above case whenever you save an account the method - # Audit#before will be called. On the other hand - # - # define_callbacks :save, scope: [:kind, :name] - # - # would trigger Audit#before_save instead. That's constructed - # by calling #{kind}_#{name} on the given instance. In this - # case "kind" is "before" and "name" is "save". In this context +:kind+ - # and +:name+ have special meanings: +:kind+ refers to the kind of - # callback (before/after/around) and +:name+ refers to the method on - # which callbacks are being defined. - # - # A declaration like - # - # define_callbacks :save, scope: [:name] - # - # would call Audit#save. - # - # ===== Notes - # - # +names+ passed to +define_callbacks+ must not end with - # !, ? or =. - # - # Calling +define_callbacks+ multiple times with the same +names+ will - # overwrite previous callbacks registered with #set_callback. - # - # source://activesupport//lib/active_support/callbacks.rb#901 - def define_callbacks(*names); end - - # source://activesupport//lib/active_support/callbacks.rb#677 - def normalize_callback_params(filters, block); end - - # Remove all set callbacks for the given event. - # - # source://activesupport//lib/active_support/callbacks.rb#811 - def reset_callbacks(name); end - - # Install a callback for the given event. - # - # set_callback :save, :before, :before_method - # set_callback :save, :after, :after_method, if: :condition - # set_callback :save, :around, ->(r, block) { stuff; result = block.call; stuff } - # - # The second argument indicates whether the callback is to be run +:before+, - # +:after+, or +:around+ the event. If omitted, +:before+ is assumed. This - # means the first example above can also be written as: - # - # set_callback :save, :before_method - # - # The callback can be specified as a symbol naming an instance method; as a - # proc, lambda, or block; or as an object that responds to a certain method - # determined by the :scope argument to #define_callbacks. - # - # If a proc, lambda, or block is given, its body is evaluated in the context - # of the current object. It can also optionally accept the current object as - # an argument. - # - # Before and around callbacks are called in the order that they are set; - # after callbacks are called in the reverse order. - # - # Around callbacks can access the return value from the event, if it - # wasn't halted, from the +yield+ call. - # - # ===== Options - # - # * :if - A symbol or an array of symbols, each naming an instance - # method or a proc; the callback will be called only when they all return - # a true value. - # - # If a proc is given, its body is evaluated in the context of the - # current object. It can also optionally accept the current object as - # an argument. - # * :unless - A symbol or an array of symbols, each naming an - # instance method or a proc; the callback will be called only when they - # all return a false value. - # - # If a proc is given, its body is evaluated in the context of the - # current object. It can also optionally accept the current object as - # an argument. - # * :prepend - If +true+, the callback will be prepended to the - # existing chain rather than appended. - # - # source://activesupport//lib/active_support/callbacks.rb#737 - def set_callback(name, *filter_list, &block); end - - # Skip a previously set callback. Like #set_callback, :if or - # :unless options may be passed in order to control when the - # callback is skipped. - # - # Note: this example uses +PersonRecord+ and +#saving_message+, which you - # can see defined here[rdoc-ref:ActiveSupport::Callbacks] - # - # class Writer < PersonRecord - # attr_accessor :age - # skip_callback :save, :before, :saving_message, if: -> { age > 18 } - # end - # - # When if option returns true, callback is skipped. - # - # writer = Writer.new - # writer.age = 20 - # writer.save - # - # Output: - # - save - # saved - # - # When if option returns false, callback is NOT skipped. - # - # young_writer = Writer.new - # young_writer.age = 17 - # young_writer.save - # - # Output: - # saving... - # - save - # saved - # - # An ArgumentError will be raised if the callback has not - # already been set (unless the :raise option is set to false). - # - # source://activesupport//lib/active_support/callbacks.rb#786 - def skip_callback(name, *filter_list, &block); end - - protected - - # source://activesupport//lib/active_support/callbacks.rb#932 - def get_callbacks(name); end - - # source://activesupport//lib/active_support/callbacks.rb#936 - def set_callbacks(name, callbacks); end -end - -# source://activesupport//lib/active_support/callbacks.rb#153 -module ActiveSupport::Callbacks::Conditionals; end - -# source://activesupport//lib/active_support/callbacks.rb#154 -class ActiveSupport::Callbacks::Conditionals::Value - # @return [Value] a new instance of Value - # - # source://activesupport//lib/active_support/callbacks.rb#155 - def initialize(&block); end - - # source://activesupport//lib/active_support/callbacks.rb#158 - def call(target, value); end -end - -# source://activesupport//lib/active_support/callbacks.rb#162 -module ActiveSupport::Callbacks::Filters; end - -# source://activesupport//lib/active_support/callbacks.rb#194 -class ActiveSupport::Callbacks::Filters::After - # @return [After] a new instance of After - # - # source://activesupport//lib/active_support/callbacks.rb#196 - def initialize(user_callback, user_conditions, chain_config); end - - # source://activesupport//lib/active_support/callbacks.rb#214 - def apply(callback_sequence); end - - # source://activesupport//lib/active_support/callbacks.rb#202 - def call(env); end - - # Returns the value of attribute halting. - # - # source://activesupport//lib/active_support/callbacks.rb#195 - def halting; end - - # Returns the value of attribute user_callback. - # - # source://activesupport//lib/active_support/callbacks.rb#195 - def user_callback; end - - # Returns the value of attribute user_conditions. - # - # source://activesupport//lib/active_support/callbacks.rb#195 - def user_conditions; end -end - -# source://activesupport//lib/active_support/callbacks.rb#219 -class ActiveSupport::Callbacks::Filters::Around - # @return [Around] a new instance of Around - # - # source://activesupport//lib/active_support/callbacks.rb#220 - def initialize(user_callback, user_conditions); end - - # source://activesupport//lib/active_support/callbacks.rb#225 - def apply(callback_sequence); end -end - -# source://activesupport//lib/active_support/callbacks.rb#165 -class ActiveSupport::Callbacks::Filters::Before - # @return [Before] a new instance of Before - # - # source://activesupport//lib/active_support/callbacks.rb#166 - def initialize(user_callback, user_conditions, chain_config, filter, name); end - - # source://activesupport//lib/active_support/callbacks.rb#189 - def apply(callback_sequence); end - - # source://activesupport//lib/active_support/callbacks.rb#173 - def call(env); end - - # Returns the value of attribute filter. - # - # source://activesupport//lib/active_support/callbacks.rb#171 - def filter; end - - # Returns the value of attribute halted_lambda. - # - # source://activesupport//lib/active_support/callbacks.rb#171 - def halted_lambda; end - - # Returns the value of attribute name. - # - # source://activesupport//lib/active_support/callbacks.rb#171 - def name; end - - # Returns the value of attribute user_callback. - # - # source://activesupport//lib/active_support/callbacks.rb#171 - def user_callback; end - - # Returns the value of attribute user_conditions. - # - # source://activesupport//lib/active_support/callbacks.rb#171 - def user_conditions; end -end - -# source://activesupport//lib/active_support/callbacks.rb#163 -class ActiveSupport::Callbacks::Filters::Environment < ::Struct - # Returns the value of attribute halted - # - # @return [Object] the current value of halted - def halted; end - - # Sets the attribute halted - # - # @param value [Object] the value to set the attribute halted to. - # @return [Object] the newly set value - def halted=(_); end - - # Returns the value of attribute target - # - # @return [Object] the current value of target - def target; end - - # Sets the attribute target - # - # @param value [Object] the value to set the attribute target to. - # @return [Object] the newly set value - def target=(_); end - - # Returns the value of attribute value - # - # @return [Object] the current value of value - def value; end - - # Sets the attribute value - # - # @param value [Object] the value to set the attribute value to. - # @return [Object] the newly set value - def value=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://activesupport//lib/active_support/code_generator.rb#4 -class ActiveSupport::CodeGenerator - # @return [CodeGenerator] a new instance of CodeGenerator - # - # source://activesupport//lib/active_support/code_generator.rb#53 - def initialize(owner, path, line); end - - # source://activesupport//lib/active_support/code_generator.rb#60 - def define_cached_method(canonical_name, namespace:, as: T.unsafe(nil), &block); end - - # source://activesupport//lib/active_support/code_generator.rb#64 - def execute; end - - class << self - # source://activesupport//lib/active_support/code_generator.rb#41 - def batch(owner, path, line); end - end -end - -# source://activesupport//lib/active_support/code_generator.rb#5 -class ActiveSupport::CodeGenerator::MethodSet - # @return [MethodSet] a new instance of MethodSet - # - # source://activesupport//lib/active_support/code_generator.rb#8 - def initialize(namespace); end - - # source://activesupport//lib/active_support/code_generator.rb#28 - def apply(owner, path, line); end - - # source://activesupport//lib/active_support/code_generator.rb#15 - def define_cached_method(canonical_name, as: T.unsafe(nil)); end -end - -# source://activesupport//lib/active_support/code_generator.rb#6 -ActiveSupport::CodeGenerator::MethodSet::METHOD_CACHES = T.let(T.unsafe(nil), Hash) - -# 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: -# -# module M -# def self.included(base) -# base.extend ClassMethods -# base.class_eval do -# scope :disabled, -> { where(disabled: true) } -# end -# end -# -# module ClassMethods -# ... -# end -# end -# -# By using +ActiveSupport::Concern+ the above module could instead be -# written as: -# -# require "active_support/concern" -# -# module M -# extend ActiveSupport::Concern -# -# included do -# scope :disabled, -> { where(disabled: true) } -# end -# -# class_methods do -# ... -# end -# end -# -# Moreover, it gracefully handles module dependencies. Given a +Foo+ module -# and a +Bar+ module which depends on the former, we would typically write the -# following: -# -# module Foo -# def self.included(base) -# base.class_eval do -# def self.method_injected_by_foo -# ... -# end -# end -# end -# end -# -# module Bar -# def self.included(base) -# base.method_injected_by_foo -# end -# end -# -# class Host -# include Foo # We need to include this dependency for Bar -# include Bar # Bar is the module that Host really needs -# end -# -# But why should +Host+ care about +Bar+'s dependencies, namely +Foo+? We -# could try to hide these from +Host+ directly including +Foo+ in +Bar+: -# -# module Bar -# include Foo -# def self.included(base) -# base.method_injected_by_foo -# end -# end -# -# class Host -# include Bar -# end -# -# Unfortunately this won't work, since when +Foo+ is included, its base -# is the +Bar+ module, not the +Host+ class. With +ActiveSupport::Concern+, -# module dependencies are properly resolved: -# -# require "active_support/concern" -# -# module Foo -# extend ActiveSupport::Concern -# included do -# def self.method_injected_by_foo -# ... -# end -# end -# end -# -# module Bar -# extend ActiveSupport::Concern -# include Foo -# -# included do -# self.method_injected_by_foo -# end -# end -# -# class Host -# include Bar # It works, now Bar takes care of its dependencies -# end -# -# === Prepending concerns -# -# Just like include, concerns also support prepend with a corresponding -# prepended do callback. module ClassMethods or class_methods do are -# prepended as well. -# -# prepend is also used for any dependencies. -# -# source://activesupport//lib/active_support/concern.rb#112 -module ActiveSupport::Concern - # source://activesupport//lib/active_support/concern.rb#129 - def append_features(base); end - - # Define class methods from given block. - # You can define private class methods as well. - # - # module Example - # extend ActiveSupport::Concern - # - # class_methods do - # def foo; puts 'foo'; end - # - # private - # def bar; puts 'bar'; end - # end - # end - # - # class Buzz - # include Example - # end - # - # Buzz.foo # => "foo" - # Buzz.bar # => private method 'bar' called for Buzz:Class(NoMethodError) - # - # source://activesupport//lib/active_support/concern.rb#209 - def class_methods(&class_methods_module_definition); end - - # Evaluate given block in context of base class, - # so that you can write class macros here. - # When you define more than one +included+ block, it raises an exception. - # - # source://activesupport//lib/active_support/concern.rb#158 - def included(base = T.unsafe(nil), &block); end - - # source://activesupport//lib/active_support/concern.rb#142 - def prepend_features(base); end - - # Evaluate given block in context of base class, - # so that you can write class macros here. - # When you define more than one +prepended+ block, it raises an exception. - # - # source://activesupport//lib/active_support/concern.rb#175 - def prepended(base = T.unsafe(nil), &block); end - - class << self - # source://activesupport//lib/active_support/concern.rb#125 - def extended(base); end - end -end - -# source://activesupport//lib/active_support/concern.rb#113 -class ActiveSupport::Concern::MultipleIncludedBlocks < ::StandardError - # @return [MultipleIncludedBlocks] a new instance of MultipleIncludedBlocks - # - # source://activesupport//lib/active_support/concern.rb#114 - def initialize; end -end - -# source://activesupport//lib/active_support/concern.rb#119 -class ActiveSupport::Concern::MultiplePrependBlocks < ::StandardError - # @return [MultiplePrependBlocks] a new instance of MultiplePrependBlocks - # - # source://activesupport//lib/active_support/concern.rb#120 - def initialize; end -end - -# source://activesupport//lib/active_support/concurrency/share_lock.rb#7 -module ActiveSupport::Concurrency; end - -# A share/exclusive lock, otherwise known as a read/write lock. -# -# https://en.wikipedia.org/wiki/Readers%E2%80%93writer_lock -# -# source://activesupport//lib/active_support/concurrency/share_lock.rb#11 -class ActiveSupport::Concurrency::ShareLock - include ::MonitorMixin - - # @return [ShareLock] a new instance of ShareLock - # - # source://activesupport//lib/active_support/concurrency/share_lock.rb#50 - def initialize; end - - # Execute the supplied block while holding the Exclusive lock. If - # +no_wait+ is set and the lock is not immediately available, - # returns +nil+ without yielding. Otherwise, returns the result of - # the block. - # - # See +start_exclusive+ for other options. - # - # source://activesupport//lib/active_support/concurrency/share_lock.rb#148 - def exclusive(purpose: T.unsafe(nil), compatible: T.unsafe(nil), after_compatible: T.unsafe(nil), no_wait: T.unsafe(nil)); end - - # We track Thread objects, instead of just using counters, because - # we need exclusive locks to be reentrant, and we need to be able - # to upgrade share locks to exclusive. - # - # source://activesupport//lib/active_support/concurrency/share_lock.rb#18 - def raw_state; end - - # Execute the supplied block while holding the Share lock. - # - # source://activesupport//lib/active_support/concurrency/share_lock.rb#159 - def sharing; end - - # Returns false if +no_wait+ is set and the lock is not - # immediately available. Otherwise, returns true after the lock - # has been acquired. - # - # +purpose+ and +compatible+ work together; while this thread is - # waiting for the exclusive lock, it will yield its share (if any) - # to any other attempt whose +purpose+ appears in this attempt's - # +compatible+ list. This allows a "loose" upgrade, which, being - # less strict, prevents some classes of deadlocks. - # - # For many resources, loose upgrades are sufficient: if a thread - # is awaiting a lock, it is not running any other code. With - # +purpose+ matching, it is possible to yield only to other - # threads whose activity will not interfere. - # - # source://activesupport//lib/active_support/concurrency/share_lock.rb#76 - def start_exclusive(purpose: T.unsafe(nil), compatible: T.unsafe(nil), no_wait: T.unsafe(nil)); end - - # source://activesupport//lib/active_support/concurrency/share_lock.rb#114 - def start_sharing; end - - # Relinquish the exclusive lock. Must only be called by the thread - # that called start_exclusive (and currently holds the lock). - # - # source://activesupport//lib/active_support/concurrency/share_lock.rb#96 - def stop_exclusive(compatible: T.unsafe(nil)); end - - # source://activesupport//lib/active_support/concurrency/share_lock.rb#131 - def stop_sharing; end - - # Temporarily give up all held Share locks while executing the - # supplied block, allowing any +compatible+ exclusive lock request - # to proceed. - # - # source://activesupport//lib/active_support/concurrency/share_lock.rb#171 - def yield_shares(purpose: T.unsafe(nil), compatible: T.unsafe(nil), block_share: T.unsafe(nil)); end - - private - - # Must be called within synchronize - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/concurrency/share_lock.rb#204 - def busy_for_exclusive?(purpose); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/concurrency/share_lock.rb#209 - def busy_for_sharing?(purpose); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/concurrency/share_lock.rb#214 - def eligible_waiters?(compatible); end - - # source://activesupport//lib/active_support/concurrency/share_lock.rb#218 - def wait_for(method, &block); end -end - -# = Active Support \Configurable -# -# Configurable provides a config method to store and retrieve -# configuration options as an OrderedOptions. -# -# source://activesupport//lib/active_support/configurable.rb#11 -module ActiveSupport::Configurable - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActiveSupport::Configurable::ClassMethods - - # Reads and writes attributes from a configuration OrderedOptions. - # - # require "active_support/configurable" - # - # class User - # include ActiveSupport::Configurable - # end - # - # user = User.new - # - # user.config.allowed_access = true - # user.config.level = 1 - # - # user.config.allowed_access # => true - # user.config.level # => 1 - # - # source://activesupport//lib/active_support/configurable.rb#155 - def config; end -end - -# source://activesupport//lib/active_support/configurable.rb#29 -module ActiveSupport::Configurable::ClassMethods - # source://activesupport//lib/active_support/configurable.rb#30 - def config; end - - # @yield [config] - # - # source://activesupport//lib/active_support/configurable.rb#39 - def configure; end - - private - - # Allows you to add shortcut so that you don't have to refer to attribute - # through config. Also look at the example for config to contrast. - # - # Defines both class and instance config accessors. - # - # class User - # include ActiveSupport::Configurable - # config_accessor :allowed_access - # end - # - # User.allowed_access # => nil - # User.allowed_access = false - # User.allowed_access # => false - # - # user = User.new - # user.allowed_access # => false - # user.allowed_access = true - # user.allowed_access # => true - # - # User.allowed_access # => false - # - # The attribute name must be a valid method name in Ruby. - # - # class User - # include ActiveSupport::Configurable - # config_accessor :"1_Badname" - # end - # # => NameError: invalid config attribute name - # - # To omit the instance writer method, pass instance_writer: false. - # To omit the instance reader method, pass instance_reader: false. - # - # class User - # include ActiveSupport::Configurable - # config_accessor :allowed_access, instance_reader: false, instance_writer: false - # end - # - # User.allowed_access = false - # User.allowed_access # => false - # - # User.new.allowed_access = true # => NoMethodError - # User.new.allowed_access # => NoMethodError - # - # Or pass instance_accessor: false, to omit both instance methods. - # - # class User - # include ActiveSupport::Configurable - # config_accessor :allowed_access, instance_accessor: false - # end - # - # User.allowed_access = false - # User.allowed_access # => false - # - # User.new.allowed_access = true # => NoMethodError - # User.new.allowed_access # => NoMethodError - # - # Also you can pass default or a block to set up the attribute with a default value. - # - # class User - # include ActiveSupport::Configurable - # config_accessor :allowed_access, default: false - # config_accessor :hair_colors do - # [:brown, :black, :blonde, :red] - # end - # end - # - # User.allowed_access # => false - # User.hair_colors # => [:brown, :black, :blonde, :red] - # - # source://activesupport//lib/active_support/configurable.rb#111 - def config_accessor(*names, instance_reader: T.unsafe(nil), instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil)); end - - # source://activesupport//lib/active_support/configurable.rb#132 - def inherited(subclass); end -end - -# source://activesupport//lib/active_support/configurable.rb#14 -class ActiveSupport::Configurable::Configuration < ::ActiveSupport::InheritableOptions - # source://activesupport//lib/active_support/configurable.rb#15 - def compile_methods!; end - - class << self - # Compiles reader methods so we don't have to go through method_missing. - # - # source://activesupport//lib/active_support/configurable.rb#20 - def compile_methods!(keys); end - end -end - -# Reads a YAML configuration file, evaluating any ERB, then -# parsing the resulting YAML. -# -# Warns in case of YAML confusing characters, like invisible -# non-breaking spaces. -# -# source://activesupport//lib/active_support/configuration_file.rb#9 -class ActiveSupport::ConfigurationFile - # @return [ConfigurationFile] a new instance of ConfigurationFile - # - # source://activesupport//lib/active_support/configuration_file.rb#12 - def initialize(content_path); end - - # source://activesupport//lib/active_support/configuration_file.rb#21 - def parse(context: T.unsafe(nil), **options); end - - private - - # source://activesupport//lib/active_support/configuration_file.rb#35 - def read(content_path); end - - # source://activesupport//lib/active_support/configuration_file.rb#46 - def render(context); end - - class << self - # source://activesupport//lib/active_support/configuration_file.rb#17 - def parse(content_path, **options); end - end -end - -# source://activesupport//lib/active_support/configuration_file.rb#10 -class ActiveSupport::ConfigurationFile::FormatError < ::StandardError; end - -# source://activesupport//lib/active_support/core_ext/erb/util.rb#6 -module ActiveSupport::CoreExt; end - -# source://activesupport//lib/active_support/core_ext/erb/util.rb#7 -module ActiveSupport::CoreExt::ERBUtil - # A utility method for escaping HTML tag characters. - # This method is also aliased as h. - # - # puts html_escape('is a > 0 & a < 10?') - # # => is a > 0 & a < 10? - # - # source://activesupport//lib/active_support/core_ext/erb/util.rb#25 - def h(s); end - - # A utility method for escaping HTML tag characters. - # This method is also aliased as h. - # - # puts html_escape('is a > 0 & a < 10?') - # # => is a > 0 & a < 10? - # - # source://activesupport//lib/active_support/core_ext/erb/util.rb#25 - def html_escape(s); end - - # HTML escapes strings but doesn't wrap them with an ActiveSupport::SafeBuffer. - # This method is not for public consumption! Seriously! - # - # source://activesupport//lib/active_support/core_ext/erb/util.rb#10 - def unwrapped_html_escape(s); end -end - -# source://activesupport//lib/active_support/core_ext/erb/util.rb#31 -module ActiveSupport::CoreExt::ERBUtilPrivate - include ::ActiveSupport::CoreExt::ERBUtil - - private - - # source://activesupport//lib/active_support/core_ext/erb/util.rb#25 - def h(s); end - - # source://activesupport//lib/active_support/core_ext/erb/util.rb#25 - def html_escape(s); end - - # source://activesupport//lib/active_support/core_ext/erb/util.rb#10 - def unwrapped_html_escape(s); end -end - -# = Current Attributes -# -# Abstract super class that provides a thread-isolated attributes singleton, which resets automatically -# before and after each request. This allows you to keep all the per-request attributes easily -# available to the whole system. -# -# The following full app-like example demonstrates how to use a Current class to -# facilitate easy access to the global, per-request attributes without passing them deeply -# around everywhere: -# -# # app/models/current.rb -# class Current < ActiveSupport::CurrentAttributes -# attribute :account, :user -# attribute :request_id, :user_agent, :ip_address -# -# resets { Time.zone = nil } -# -# def user=(user) -# super -# self.account = user.account -# Time.zone = user.time_zone -# end -# end -# -# # app/controllers/concerns/authentication.rb -# module Authentication -# extend ActiveSupport::Concern -# -# included do -# before_action :authenticate -# end -# -# private -# def authenticate -# if authenticated_user = User.find_by(id: cookies.encrypted[:user_id]) -# Current.user = authenticated_user -# else -# redirect_to new_session_url -# end -# end -# end -# -# # app/controllers/concerns/set_current_request_details.rb -# module SetCurrentRequestDetails -# extend ActiveSupport::Concern -# -# included do -# before_action do -# Current.request_id = request.uuid -# Current.user_agent = request.user_agent -# Current.ip_address = request.ip -# end -# end -# end -# -# class ApplicationController < ActionController::Base -# include Authentication -# include SetCurrentRequestDetails -# end -# -# class MessagesController < ApplicationController -# def create -# Current.account.messages.create(message_params) -# end -# end -# -# class Message < ApplicationRecord -# belongs_to :creator, default: -> { Current.user } -# after_create { |message| Event.create(record: message) } -# end -# -# class Event < ApplicationRecord -# before_create do -# self.request_id = Current.request_id -# self.user_agent = Current.user_agent -# self.ip_address = Current.ip_address -# end -# end -# -# A word of caution: It's easy to overdo a global singleton like Current and tangle your model as a result. -# Current should only be used for a few, top-level globals, like account, user, and request details. -# The attributes stuck in Current should be used by more or less all actions on all requests. If you start -# sticking controller-specific attributes in there, you're going to create a mess. -# -# source://activesupport//lib/active_support/current_attributes.rb#92 -class ActiveSupport::CurrentAttributes - include ::ActiveSupport::Callbacks - extend ::ActiveSupport::Callbacks::ClassMethods - extend ::ActiveSupport::DescendantsTracker - - # @return [CurrentAttributes] a new instance of CurrentAttributes - # - # source://activesupport//lib/active_support/current_attributes.rb#199 - def initialize; end - - # source://activesupport//lib/active_support/callbacks.rb#70 - def __callbacks; end - - # source://activesupport//lib/active_support/callbacks.rb#70 - def __callbacks?; end - - # source://activesupport//lib/active_support/callbacks.rb#924 - def _reset_callbacks; end - - # source://activesupport//lib/active_support/callbacks.rb#912 - def _run_reset_callbacks(&block); end - - # Returns the value of attribute attributes. - # - # source://activesupport//lib/active_support/current_attributes.rb#197 - def attributes; end - - # Sets the attribute attributes - # - # @param value the value to set the attribute attributes to. - # - # source://activesupport//lib/active_support/current_attributes.rb#197 - def attributes=(_arg0); end - - # source://activesupport//lib/active_support/current_attributes.rb#195 - def defaults; end - - # source://activesupport//lib/active_support/current_attributes.rb#195 - def defaults?; end - - # Reset all attributes. Should be called before and after actions, when used as a per-request singleton. - # - # source://activesupport//lib/active_support/current_attributes.rb#218 - def reset; end - - # Expose one or more attributes within a block. Old values are returned after the block concludes. - # Example demonstrating the common use of needing to set Current attributes outside the request-cycle: - # - # class Chat::PublicationJob < ApplicationJob - # def perform(attributes, room_number, creator) - # Current.set(person: creator) do - # Chat::Publisher.publish(attributes: attributes, room_number: room_number) - # end - # end - # end - # - # source://activesupport//lib/active_support/current_attributes.rb#213 - def set(attributes, &block); end - - private - - # source://activesupport//lib/active_support/current_attributes.rb#225 - def resolve_defaults; end - - class << self - # source://activesupport//lib/active_support/callbacks.rb#70 - def __callbacks; end - - # source://activesupport//lib/active_support/callbacks.rb#70 - def __callbacks=(value); end - - # source://activesupport//lib/active_support/callbacks.rb#70 - def __callbacks?; end - - # source://activesupport//lib/active_support/callbacks.rb#916 - def _reset_callbacks; end - - # source://activesupport//lib/active_support/callbacks.rb#920 - def _reset_callbacks=(value); end - - # Calls this callback after #reset is called on the instance. Used for resetting external collaborators, like Time.zone. - # - # source://activesupport//lib/active_support/current_attributes.rb#149 - def after_reset(*methods, &block); end - - # Declares one or more attributes that will be given both class and instance accessor methods. - # - # ==== Options - # - # * :default - The default value for the attributes. If the value - # is a proc or lambda, it will be called whenever an instance is - # constructed. Otherwise, the value will be duplicated with +#dup+. - # Default values are re-assigned when the attributes are reset. - # - # source://activesupport//lib/active_support/current_attributes.rb#114 - def attribute(*names, default: T.unsafe(nil)); end - - # Calls this callback before #reset is called on the instance. Used for resetting external collaborators that depend on current values. - # - # source://activesupport//lib/active_support/current_attributes.rb#144 - def before_reset(*methods, &block); end - - # source://activesupport//lib/active_support/current_attributes.rb#160 - def clear_all; end - - # source://activesupport//lib/active_support/current_attributes.rb#195 - def defaults; end - - # source://activesupport//lib/active_support/current_attributes.rb#195 - def defaults=(value); end - - # source://activesupport//lib/active_support/current_attributes.rb#195 - def defaults?; end - - # Returns singleton instance for this class in this thread. If none exists, one is created. - # - # source://activesupport//lib/active_support/current_attributes.rb#102 - def instance; end - - # source://activesupport//lib/active_support/current_attributes.rb#154 - def reset(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/current_attributes.rb#156 - def reset_all; end - - # Calls this callback after #reset is called on the instance. Used for resetting external collaborators, like Time.zone. - # - # source://activesupport//lib/active_support/current_attributes.rb#149 - def resets(*methods, &block); end - - # source://activesupport//lib/active_support/current_attributes.rb#154 - def set(*_arg0, **_arg1, &_arg2); end - - private - - # source://activesupport//lib/active_support/current_attributes.rb#170 - def current_instances; end - - # source://activesupport//lib/active_support/current_attributes.rb#174 - def current_instances_key; end - - # source://activesupport//lib/active_support/current_attributes.rb#166 - def generated_attribute_methods; end - - # @private - # - # source://activesupport//lib/active_support/current_attributes.rb#186 - def method_added(name); end - - # source://activesupport//lib/active_support/current_attributes.rb#178 - def method_missing(name, *_arg1, **_arg2, &_arg3); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/current_attributes.rb#182 - def respond_to_missing?(name, _); end - end -end - -# source://activesupport//lib/active_support/current_attributes.rb#96 -ActiveSupport::CurrentAttributes::INVALID_ATTRIBUTE_NAMES = T.let(T.unsafe(nil), Array) - -# source://activesupport//lib/active_support/current_attributes.rb#98 -ActiveSupport::CurrentAttributes::NOT_SET = T.let(T.unsafe(nil), Object) - -# Provides +deep_merge+ and +deep_merge!+ methods. Expects the including class -# to provide a merge!(other, &block) method. -# -# source://activesupport//lib/active_support/deep_mergeable.rb#6 -module ActiveSupport::DeepMergeable - # Returns a new instance with the values from +other+ merged recursively. - # - # class Hash - # include ActiveSupport::DeepMergeable - # end - # - # hash_1 = { a: true, b: { c: [1, 2, 3] } } - # hash_2 = { a: false, b: { x: [3, 4, 5] } } - # - # hash_1.deep_merge(hash_2) - # # => { a: false, b: { c: [1, 2, 3], x: [3, 4, 5] } } - # - # A block can be provided to merge non-DeepMergeable values: - # - # hash_1 = { a: 100, b: 200, c: { c1: 100 } } - # hash_2 = { b: 250, c: { c1: 200 } } - # - # hash_1.deep_merge(hash_2) do |key, this_val, other_val| - # this_val + other_val - # end - # # => { a: 100, b: 450, c: { c1: 300 } } - # - # source://activesupport//lib/active_support/deep_mergeable.rb#29 - def deep_merge(other, &block); end - - # Same as #deep_merge, but modifies +self+. - # - # source://activesupport//lib/active_support/deep_mergeable.rb#34 - def deep_merge!(other, &block); end - - # Returns true if +other+ can be deep merged into +self+. Classes may - # override this method to restrict or expand the domain of deep mergeable - # values. Defaults to checking that +other+ is of type +self.class+. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/deep_mergeable.rb#49 - def deep_merge?(other); end -end - -# source://activesupport//lib/active_support/delegation.rb#16 -module ActiveSupport::Delegation - class << self - # source://activesupport//lib/active_support/delegation.rb#23 - def generate(owner, methods, location: T.unsafe(nil), to: T.unsafe(nil), prefix: T.unsafe(nil), allow_nil: T.unsafe(nil), nilable: T.unsafe(nil), private: T.unsafe(nil), as: T.unsafe(nil), signature: T.unsafe(nil)); end - - # source://activesupport//lib/active_support/delegation.rb#152 - def generate_method_missing(owner, target, allow_nil: T.unsafe(nil)); end - end -end - -# source://activesupport//lib/active_support/delegation.rb#20 -ActiveSupport::Delegation::RESERVED_METHOD_NAMES = T.let(T.unsafe(nil), Set) - -# source://activesupport//lib/active_support/delegation.rb#17 -ActiveSupport::Delegation::RUBY_RESERVED_KEYWORDS = T.let(T.unsafe(nil), Array) - -# Error generated by +delegate+ when a method is called on +nil+ and +allow_nil+ -# option is not used. -# -# source://activesupport//lib/active_support/delegation.rb#8 -class ActiveSupport::DelegationError < ::NoMethodError - class << self - # source://activesupport//lib/active_support/delegation.rb#10 - def nil_target(method_name, target); end - end -end - -# source://activesupport//lib/active_support/dependencies/interlock.rb#6 -module ActiveSupport::Dependencies - class << self - # source://activesupport//lib/active_support/dependencies.rb#62 - def _autoloaded_tracked_classes; end - - # source://activesupport//lib/active_support/dependencies.rb#62 - def _autoloaded_tracked_classes=(_arg0); end - - # source://activesupport//lib/active_support/dependencies.rb#56 - def _eager_load_paths; end - - # source://activesupport//lib/active_support/dependencies.rb#56 - def _eager_load_paths=(_arg0); end - - # source://activesupport//lib/active_support/dependencies.rb#49 - def autoload_once_paths; end - - # source://activesupport//lib/active_support/dependencies.rb#49 - def autoload_once_paths=(_arg0); end - - # source://activesupport//lib/active_support/dependencies.rb#43 - def autoload_paths; end - - # source://activesupport//lib/active_support/dependencies.rb#43 - def autoload_paths=(_arg0); end - - # source://activesupport//lib/active_support/dependencies.rb#69 - def autoloader; end - - # source://activesupport//lib/active_support/dependencies.rb#69 - def autoloader=(_arg0); end - - # Private method that reloads constants autoloaded by the main autoloader. - # - # Rails.application.reloader.reload! is the public interface for application - # reload. That involves more things, like deleting unloaded classes from the - # internal state of the descendants tracker, or reloading routes. - # - # source://activesupport//lib/active_support/dependencies.rb#76 - def clear; end - - # Private method that helps configuring the autoloaders. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/dependencies.rb#94 - def eager_load?(path); end - - # source://activesupport//lib/active_support/dependencies.rb#10 - def interlock; end - - # source://activesupport//lib/active_support/dependencies.rb#10 - def interlock=(_arg0); end - - # Execute the supplied block while holding an exclusive lock, - # preventing any other thread from being inside a #run_interlock - # block at the same time. - # - # source://activesupport//lib/active_support/dependencies.rb#24 - def load_interlock(&block); end - - # Execute the supplied block without interference from any - # concurrent loads. - # - # source://activesupport//lib/active_support/dependencies.rb#17 - def run_interlock(&block); end - - # Private method used by require_dependency. - # - # source://activesupport//lib/active_support/dependencies.rb#84 - def search_for_file(relpath); end - - # Execute the supplied block while holding an exclusive lock, - # preventing any other thread from being inside a #run_interlock - # block at the same time. - # - # source://activesupport//lib/active_support/dependencies.rb#31 - def unload_interlock(&block); end - end -end - -# source://activesupport//lib/active_support/dependencies/interlock.rb#7 -class ActiveSupport::Dependencies::Interlock - # @return [Interlock] a new instance of Interlock - # - # source://activesupport//lib/active_support/dependencies/interlock.rb#8 - def initialize; end - - # source://activesupport//lib/active_support/dependencies/interlock.rb#32 - def done_running; end - - # source://activesupport//lib/active_support/dependencies/interlock.rb#24 - def done_unloading; end - - # source://activesupport//lib/active_support/dependencies/interlock.rb#12 - def loading(&block); end - - # source://activesupport//lib/active_support/dependencies/interlock.rb#40 - def permit_concurrent_loads(&block); end - - # source://activesupport//lib/active_support/dependencies/interlock.rb#44 - def raw_state(&block); end - - # source://activesupport//lib/active_support/dependencies/interlock.rb#36 - def running(&block); end - - # source://activesupport//lib/active_support/dependencies/interlock.rb#28 - def start_running; end - - # source://activesupport//lib/active_support/dependencies/interlock.rb#20 - def start_unloading; end - - # source://activesupport//lib/active_support/dependencies/interlock.rb#16 - def unloading(&block); end -end - -# source://activesupport//lib/active_support/dependencies/require_dependency.rb#3 -module ActiveSupport::Dependencies::RequireDependency - # Warning: This method is obsolete. The semantics of the autoloader - # match Ruby's and you do not need to be defensive with load order anymore. - # Just refer to classes and modules normally. - # - # Engines that do not control the mode in which their parent application runs - # should call +require_dependency+ where needed in case the runtime mode is - # +:classic+. - # - # source://activesupport//lib/active_support/dependencies/require_dependency.rb#11 - def require_dependency(filename); end -end - -# = Active Support \Deprecation -# -# \Deprecation specifies the API used by \Rails to deprecate methods, instance variables, objects, and constants. It's -# also available for gems or applications. -# -# For a gem, use Deprecation.new to create a Deprecation object and store it in your module or class (in order for -# users to be able to configure it). -# -# module MyLibrary -# def self.deprecator -# @deprecator ||= ActiveSupport::Deprecation.new("2.0", "MyLibrary") -# end -# end -# -# For a Railtie or Engine, you may also want to add it to the application's deprecators, so that the application's -# configuration can be applied to it. -# -# module MyLibrary -# class Railtie < Rails::Railtie -# initializer "my_library.deprecator" do |app| -# app.deprecators[:my_library] = MyLibrary.deprecator -# end -# end -# end -# -# With the above initializer, configuration settings like the following will affect +MyLibrary.deprecator+: -# -# # in config/environments/test.rb -# config.active_support.deprecation = :raise -# -# source://activesupport//lib/active_support/deprecation.rb#33 -class ActiveSupport::Deprecation - include ::ActiveSupport::Deprecation::Behavior - include ::ActiveSupport::Deprecation::Reporting - include ::ActiveSupport::Deprecation::Disallowed - include ::ActiveSupport::Deprecation::MethodWrapper - - # It accepts two parameters on initialization. The first is a version of library - # and the second is a library name. - # - # ActiveSupport::Deprecation.new('2.0', 'MyLibrary') - # - # @return [Deprecation] a new instance of Deprecation - # - # source://activesupport//lib/active_support/deprecation.rb#71 - def initialize(deprecation_horizon = T.unsafe(nil), gem_name = T.unsafe(nil)); end - - # The version number in which the deprecated behavior will be removed, by default. - # - # source://activesupport//lib/active_support/deprecation.rb#65 - def deprecation_horizon; end - - # The version number in which the deprecated behavior will be removed, by default. - # - # source://activesupport//lib/active_support/deprecation.rb#65 - def deprecation_horizon=(_arg0); end - - class << self - # source://activesupport//lib/active_support/deprecation.rb#60 - def _instance; end - end -end - -# Behavior module allows to determine how to display deprecation messages. -# You can create a custom behavior or set any from the +DEFAULT_BEHAVIORS+ -# constant. Available behaviors are: -# -# [+:raise+] Raise ActiveSupport::DeprecationException. -# [+:stderr+] Log all deprecation warnings to $stderr. -# [+:log+] Log all deprecation warnings to +Rails.logger+. -# [+:notify+] Use ActiveSupport::Notifications to notify +deprecation.rails+. -# [+:report+] Use ActiveSupport::ErrorReporter to report deprecations. -# [+:silence+] Do nothing. On \Rails, set config.active_support.report_deprecations = false to disable all behaviors. -# -# Setting behaviors only affects deprecations that happen after boot time. -# For more information you can read the documentation of the #behavior= method. -# -# source://activesupport//lib/active_support/deprecation/behaviors.rb#69 -module ActiveSupport::Deprecation::Behavior - # Returns the current behavior or if one isn't set, defaults to +:stderr+. - # - # source://activesupport//lib/active_support/deprecation/behaviors.rb#74 - def behavior; end - - # Sets the behavior to the specified value. Can be a single value, array, - # or an object that responds to +call+. - # - # Available behaviors: - # - # [+:raise+] Raise ActiveSupport::DeprecationException. - # [+:stderr+] Log all deprecation warnings to $stderr. - # [+:log+] Log all deprecation warnings to +Rails.logger+. - # [+:notify+] Use ActiveSupport::Notifications to notify +deprecation.rails+. - # [+:report+] Use ActiveSupport::ErrorReporter to report deprecations. - # [+:silence+] Do nothing. - # - # Setting behaviors only affects deprecations that happen after boot time. - # Deprecation warnings raised by gems are not affected by this setting - # because they happen before \Rails boots up. - # - # deprecator = ActiveSupport::Deprecation.new - # deprecator.behavior = :stderr - # deprecator.behavior = [:stderr, :log] - # deprecator.behavior = MyCustomHandler - # deprecator.behavior = ->(message, callstack, deprecation_horizon, gem_name) { - # # custom stuff - # } - # - # If you are using \Rails, you can set - # config.active_support.report_deprecations = false to disable - # all deprecation behaviors. This is similar to the +:silence+ option but - # more performant. - # - # source://activesupport//lib/active_support/deprecation/behaviors.rb#111 - def behavior=(behavior); end - - # Whether to print a backtrace along with the warning. - # - # source://activesupport//lib/active_support/deprecation/behaviors.rb#71 - def debug; end - - # Whether to print a backtrace along with the warning. - # - # source://activesupport//lib/active_support/deprecation/behaviors.rb#71 - def debug=(_arg0); end - - # Returns the current behavior for disallowed deprecations or if one isn't set, defaults to +:raise+. - # - # source://activesupport//lib/active_support/deprecation/behaviors.rb#79 - def disallowed_behavior; end - - # Sets the behavior for disallowed deprecations (those configured by - # ActiveSupport::Deprecation#disallowed_warnings=) to the specified - # value. As with #behavior=, this can be a single value, array, or an - # object that responds to +call+. - # - # source://activesupport//lib/active_support/deprecation/behaviors.rb#119 - def disallowed_behavior=(behavior); end - - private - - # source://activesupport//lib/active_support/deprecation/behaviors.rb#124 - def arity_coerce(behavior); end - - # source://activesupport//lib/active_support/deprecation/behaviors.rb#143 - def arity_of_callable(callable); end -end - -# Default warning behaviors per Rails.env. -# -# source://activesupport//lib/active_support/deprecation/behaviors.rb#13 -ActiveSupport::Deprecation::DEFAULT_BEHAVIORS = T.let(T.unsafe(nil), Hash) - -# source://activesupport//lib/active_support/deprecation/constant_accessor.rb#5 -module ActiveSupport::Deprecation::DeprecatedConstantAccessor - class << self - # @private - # - # source://activesupport//lib/active_support/deprecation/constant_accessor.rb#6 - def included(base); end - end -end - -# DeprecatedConstantProxy transforms a constant into a deprecated one. It takes the full names of an old -# (deprecated) constant and of a new constant (both in string form) and a deprecator. The deprecated constant now -# returns the value of the new one. -# -# PLANETS = %w(mercury venus earth mars jupiter saturn uranus neptune pluto) -# -# # (In a later update, the original implementation of `PLANETS` has been removed.) -# -# PLANETS_POST_2006 = %w(mercury venus earth mars jupiter saturn uranus neptune) -# PLANETS = ActiveSupport::Deprecation::DeprecatedConstantProxy.new("PLANETS", "PLANETS_POST_2006", ActiveSupport::Deprecation.new) -# -# PLANETS.map { |planet| planet.capitalize } -# # => DEPRECATION WARNING: PLANETS is deprecated! Use PLANETS_POST_2006 instead. -# (Backtrace information…) -# ["Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune"] -# -# source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#120 -class ActiveSupport::Deprecation::DeprecatedConstantProxy < ::Module - # @return [DeprecatedConstantProxy] a new instance of DeprecatedConstantProxy - # - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#128 - def initialize(old_const, new_const, deprecator, message: T.unsafe(nil)); end - - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#158 - def append_features(base); end - - # Returns the class of the new constant. - # - # PLANETS_POST_2006 = %w(mercury venus earth mars jupiter saturn uranus neptune) - # PLANETS = ActiveSupport::Deprecation::DeprecatedConstantProxy.new('PLANETS', 'PLANETS_POST_2006') - # PLANETS.class # => Array - # - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#154 - def class; end - - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#168 - def extended(base); end - - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#147 - def hash(*_arg0, **_arg1, &_arg2); end - - # Don't give a deprecation warning on inspect since test/unit and error - # logs rely on it for diagnostics. - # - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#141 - def inspect; end - - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#147 - def instance_methods(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#147 - def name(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#163 - def prepend_features(base); end - - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#147 - def respond_to?(*_arg0, **_arg1, &_arg2); end - - private - - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#178 - def const_missing(name); end - - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#183 - def method_missing(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#174 - def target; end - - class << self - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#121 - def new(*args, **options, &block); end - end -end - -# DeprecatedInstanceVariableProxy transforms an instance variable into a deprecated one. It takes an instance of a -# class, a method on that class, an instance variable, and a deprecator as the last argument. -# -# Trying to use the deprecated instance variable will result in a deprecation warning, pointing to the method as a -# replacement. -# -# class Example -# def initialize -# @request = ActiveSupport::Deprecation::DeprecatedInstanceVariableProxy.new(self, :request, :@request, ActiveSupport::Deprecation.new) -# @_request = :special_request -# end -# -# def request -# @_request -# end -# -# def old_request -# @request -# end -# end -# -# example = Example.new -# # => # -# -# example.old_request.to_s -# # => DEPRECATION WARNING: @request is deprecated! Call request.to_s instead of -# @request.to_s -# (Backtrace information…) -# "special_request" -# -# example.request.to_s -# # => "special_request" -# -# source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#87 -class ActiveSupport::Deprecation::DeprecatedInstanceVariableProxy < ::ActiveSupport::Deprecation::DeprecationProxy - # @return [DeprecatedInstanceVariableProxy] a new instance of DeprecatedInstanceVariableProxy - # - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#88 - def initialize(instance, method, var = T.unsafe(nil), deprecator:); end - - private - - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#96 - def target; end - - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#100 - def warn(callstack, called, args); end -end - -# DeprecatedObjectProxy transforms an object into a deprecated one. It takes an object, a deprecation message, and -# a deprecator. -# -# deprecated_object = ActiveSupport::Deprecation::DeprecatedObjectProxy.new(Object.new, "This object is now deprecated", ActiveSupport::Deprecation.new) -# # => # -# -# deprecated_object.to_s -# DEPRECATION WARNING: This object is now deprecated. -# (Backtrace) -# # => "#" -# -# source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#38 -class ActiveSupport::Deprecation::DeprecatedObjectProxy < ::ActiveSupport::Deprecation::DeprecationProxy - # @return [DeprecatedObjectProxy] a new instance of DeprecatedObjectProxy - # - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#39 - def initialize(object, message, deprecator); end - - private - - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#46 - def target; end - - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#50 - def warn(callstack, called, args); end -end - -# source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#5 -class ActiveSupport::Deprecation::DeprecationProxy - # Don't give a deprecation warning on inspect since test/unit and error - # logs rely on it for diagnostics. - # - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#17 - def inspect; end - - private - - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#22 - def method_missing(called, *args, &block); end - - class << self - # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#6 - def new(*args, **kwargs, &block); end - end -end - -# A managed collection of deprecators. Configuration methods, such as -# #behavior=, affect all deprecators in the collection. Additionally, the -# #silence method silences all deprecators in the collection for the -# duration of a given block. -# -# source://activesupport//lib/active_support/deprecation/deprecators.rb#9 -class ActiveSupport::Deprecation::Deprecators - # @return [Deprecators] a new instance of Deprecators - # - # source://activesupport//lib/active_support/deprecation/deprecators.rb#10 - def initialize; end - - # Returns a deprecator added to this collection via #[]=. - # - # source://activesupport//lib/active_support/deprecation/deprecators.rb#16 - def [](name); end - - # Adds a given +deprecator+ to this collection. The deprecator will be - # immediately configured with any options previously set on this - # collection. - # - # deprecators = ActiveSupport::Deprecation::Deprecators.new - # deprecators.debug = true - # - # foo_deprecator = ActiveSupport::Deprecation.new("2.0", "Foo") - # foo_deprecator.debug # => false - # - # deprecators[:foo] = foo_deprecator - # deprecators[:foo].debug # => true - # foo_deprecator.debug # => true - # - # source://activesupport//lib/active_support/deprecation/deprecators.rb#34 - def []=(name, deprecator); end - - # Sets the deprecation warning behavior for all deprecators in this - # collection. - # - # See ActiveSupport::Deprecation#behavior=. - # - # source://activesupport//lib/active_support/deprecation/deprecators.rb#60 - def behavior=(behavior); end - - # Sets the debug flag for all deprecators in this collection. - # - # source://activesupport//lib/active_support/deprecation/deprecators.rb#52 - def debug=(debug); end - - # Sets the disallowed deprecation warning behavior for all deprecators in - # this collection. - # - # See ActiveSupport::Deprecation#disallowed_behavior=. - # - # source://activesupport//lib/active_support/deprecation/deprecators.rb#68 - def disallowed_behavior=(disallowed_behavior); end - - # Sets the disallowed deprecation warnings for all deprecators in this - # collection. - # - # See ActiveSupport::Deprecation#disallowed_warnings=. - # - # source://activesupport//lib/active_support/deprecation/deprecators.rb#76 - def disallowed_warnings=(disallowed_warnings); end - - # Iterates over all deprecators in this collection. If no block is given, - # returns an +Enumerator+. - # - # source://activesupport//lib/active_support/deprecation/deprecators.rb#41 - def each(&block); end - - # Silences all deprecators in this collection for the duration of the - # given block. - # - # See ActiveSupport::Deprecation#silence. - # - # source://activesupport//lib/active_support/deprecation/deprecators.rb#84 - def silence(&block); end - - # Sets the silenced flag for all deprecators in this collection. - # - # source://activesupport//lib/active_support/deprecation/deprecators.rb#47 - def silenced=(silenced); end - - private - - # source://activesupport//lib/active_support/deprecation/deprecators.rb#97 - def apply_options(deprecator); end - - # source://activesupport//lib/active_support/deprecation/deprecators.rb#92 - def set_option(name, value); end -end - -# source://activesupport//lib/active_support/deprecation/disallowed.rb#5 -module ActiveSupport::Deprecation::Disallowed - # Returns the configured criteria used to identify deprecation messages - # which should be treated as disallowed. - # - # source://activesupport//lib/active_support/deprecation/disallowed.rb#21 - def disallowed_warnings; end - - # Sets the criteria used to identify deprecation messages which should be - # disallowed. Can be an array containing strings, symbols, or regular - # expressions. (Symbols are treated as strings.) These are compared against - # the text of the generated deprecation warning. - # - # Additionally the scalar symbol +:all+ may be used to treat all - # deprecations as disallowed. - # - # Deprecations matching a substring or regular expression will be handled - # using the configured Behavior#disallowed_behavior rather than - # Behavior#behavior. - # - # source://activesupport//lib/active_support/deprecation/disallowed.rb#17 - def disallowed_warnings=(_arg0); end - - private - - # @return [Boolean] - # - # source://activesupport//lib/active_support/deprecation/disallowed.rb#26 - def deprecation_disallowed?(message); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/deprecation/disallowed.rb#39 - def explicitly_allowed?(message); end -end - -# source://activesupport//lib/active_support/deprecation.rb#57 -ActiveSupport::Deprecation::MUTEX = T.let(T.unsafe(nil), Thread::Mutex) - -# source://activesupport//lib/active_support/deprecation/method_wrappers.rb#8 -module ActiveSupport::Deprecation::MethodWrapper - # Declare that a method has been deprecated. - # - # class Fred - # def aaa; end - # def bbb; end - # def ccc; end - # def ddd; end - # def eee; end - # end - # - # deprecator = ActiveSupport::Deprecation.new('next-release', 'MyGem') - # - # deprecator.deprecate_methods(Fred, :aaa, bbb: :zzz, ccc: 'use Bar#ccc instead') - # # => Fred - # - # Fred.new.aaa - # # DEPRECATION WARNING: aaa is deprecated and will be removed from MyGem next-release. (called from irb_binding at (irb):10) - # # => nil - # - # Fred.new.bbb - # # DEPRECATION WARNING: bbb is deprecated and will be removed from MyGem next-release (use zzz instead). (called from irb_binding at (irb):11) - # # => nil - # - # Fred.new.ccc - # # DEPRECATION WARNING: ccc is deprecated and will be removed from MyGem next-release (use Bar#ccc instead). (called from irb_binding at (irb):12) - # # => nil - # - # source://activesupport//lib/active_support/deprecation/method_wrappers.rb#35 - def deprecate_methods(target_module, *method_names); end -end - -# source://activesupport//lib/active_support/deprecation/reporting.rb#7 -module ActiveSupport::Deprecation::Reporting - # Allow previously disallowed deprecation warnings within the block. - # allowed_warnings can be an array containing strings, symbols, or regular - # expressions. (Symbols are treated as strings). These are compared against - # the text of deprecation warning messages generated within the block. - # Matching warnings will be exempt from the rules set by - # ActiveSupport::Deprecation#disallowed_warnings. - # - # The optional if: argument accepts a truthy/falsy value or an object that - # responds to .call. If truthy, then matching warnings will be allowed. - # If falsey then the method yields to the block without allowing the warning. - # - # deprecator = ActiveSupport::Deprecation.new - # deprecator.disallowed_behavior = :raise - # deprecator.disallowed_warnings = [ - # "something broke" - # ] - # - # deprecator.warn('something broke!') - # # => ActiveSupport::DeprecationException - # - # deprecator.allow ['something broke'] do - # deprecator.warn('something broke!') - # end - # # => nil - # - # deprecator.allow ['something broke'], if: Rails.env.production? do - # deprecator.warn('something broke!') - # end - # # => ActiveSupport::DeprecationException for dev/test, nil for production - # - # source://activesupport//lib/active_support/deprecation/reporting.rb#89 - def allow(allowed_warnings = T.unsafe(nil), if: T.unsafe(nil), &block); end - - # source://activesupport//lib/active_support/deprecation/reporting.rb#48 - def begin_silence; end - - # source://activesupport//lib/active_support/deprecation/reporting.rb#99 - def deprecation_warning(deprecated_method_name, message = T.unsafe(nil), caller_backtrace = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/deprecation/reporting.rb#52 - def end_silence; end - - # Name of gem where method is deprecated - # - # source://activesupport//lib/active_support/deprecation/reporting.rb#11 - def gem_name; end - - # Name of gem where method is deprecated - # - # source://activesupport//lib/active_support/deprecation/reporting.rb#11 - def gem_name=(_arg0); end - - # Silence deprecation warnings within the block. - # - # deprecator = ActiveSupport::Deprecation.new - # deprecator.warn('something broke!') - # # => "DEPRECATION WARNING: something broke! (called from your_code.rb:1)" - # - # deprecator.silence do - # deprecator.warn('something broke!') - # end - # # => nil - # - # source://activesupport//lib/active_support/deprecation/reporting.rb#41 - def silence(&block); end - - # source://activesupport//lib/active_support/deprecation/reporting.rb#56 - def silenced; end - - # Whether to print a message (silent mode) - # - # source://activesupport//lib/active_support/deprecation/reporting.rb#9 - def silenced=(_arg0); end - - # Outputs a deprecation warning to the output configured by - # ActiveSupport::Deprecation#behavior. - # - # ActiveSupport::Deprecation.new.warn('something broke!') - # # => "DEPRECATION WARNING: something broke! (called from your_code.rb:1)" - # - # source://activesupport//lib/active_support/deprecation/reporting.rb#18 - def warn(message = T.unsafe(nil), callstack = T.unsafe(nil)); end - - private - - # source://activesupport//lib/active_support/deprecation/reporting.rb#153 - def _extract_callstack(callstack); end - - # Outputs a deprecation warning message - # - # deprecated_method_warning(:method_name) - # # => "method_name is deprecated and will be removed from Rails #{deprecation_horizon}" - # deprecated_method_warning(:method_name, :another_method) - # # => "method_name is deprecated and will be removed from Rails #{deprecation_horizon} (use another_method instead)" - # deprecated_method_warning(:method_name, "Optional message") - # # => "method_name is deprecated and will be removed from Rails #{deprecation_horizon} (Optional message)" - # - # source://activesupport//lib/active_support/deprecation/reporting.rb#115 - def deprecated_method_warning(method_name, message = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/deprecation/reporting.rb#129 - def deprecation_caller_message(callstack); end - - # source://activesupport//lib/active_support/deprecation/reporting.rb#124 - def deprecation_message(callstack, message = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/deprecation/reporting.rb#140 - def extract_callstack(callstack); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/deprecation/reporting.rb#174 - def ignored_callstack?(path); end -end - -# source://activesupport//lib/active_support/deprecation/reporting.rb#172 -ActiveSupport::Deprecation::Reporting::LIB_DIR = T.let(T.unsafe(nil), String) - -# source://activesupport//lib/active_support/deprecation/reporting.rb#171 -ActiveSupport::Deprecation::Reporting::RAILS_GEM_ROOT = T.let(T.unsafe(nil), String) - -# Raised when ActiveSupport::Deprecation::Behavior#behavior is set with :raise. -# You would set :raise, as a behavior to raise errors and proactively report exceptions from deprecations. -# -# source://activesupport//lib/active_support/deprecation/behaviors.rb#8 -class ActiveSupport::DeprecationException < ::StandardError; end - -# = Active Support Descendants Tracker -# -# This module provides an internal implementation to track descendants -# which is faster than iterating through +ObjectSpace+. -# -# However Ruby 3.1 provide a fast native +Class#subclasses+ method, -# so if you know your code won't be executed on older rubies, including -# +ActiveSupport::DescendantsTracker+ does not provide any benefit. -# -# source://activesupport//lib/active_support/descendants_tracker.rb#14 -module ActiveSupport::DescendantsTracker - # source://activesupport//lib/active_support/descendants_tracker.rb#107 - def descendants; end - - class << self - # source://activesupport//lib/active_support/descendants_tracker.rb#78 - def clear(classes); end - - # source://activesupport//lib/active_support/descendants_tracker.rb#102 - def descendants(klass); end - - # source://activesupport//lib/active_support/descendants_tracker.rb#69 - def disable_clear!; end - - # source://activesupport//lib/active_support/descendants_tracker.rb#89 - def reject!(classes); end - - # source://activesupport//lib/active_support/descendants_tracker.rb#98 - def subclasses(klass); end - end -end - -# source://activesupport//lib/active_support/descendants_tracker.rb#58 -module ActiveSupport::DescendantsTracker::ReloadedClassesFiltering - # source://activesupport//lib/active_support/descendants_tracker.rb#63 - def descendants; end - - # source://activesupport//lib/active_support/descendants_tracker.rb#59 - def subclasses; end -end - -# On TruffleRuby `ObjectSpace::WeakMap` keys are strong references. -# So we use `object_id` as a key and the actual object as a value. -# -# JRuby for now doesn't have Class#descendant, but when it will, it will likely -# have the same WeakMap semantic than Truffle so we future proof this as much as possible. -# -# source://activesupport//lib/active_support/descendants_tracker.rb#20 -class ActiveSupport::DescendantsTracker::WeakSet < ::ObjectSpace::WeakMap - # source://activesupport//lib/active_support/descendants_tracker.rb#23 - def <<(object); end - - def to_a; end -end - -# source://activesupport//lib/active_support/digest.rb#6 -class ActiveSupport::Digest - class << self - # source://activesupport//lib/active_support/digest.rb#8 - def hash_digest_class; end - - # @raise [ArgumentError] - # - # source://activesupport//lib/active_support/digest.rb#12 - def hash_digest_class=(klass); end - - # source://activesupport//lib/active_support/digest.rb#17 - def hexdigest(arg); end - end -end - -# = Active Support \Duration -# -# Provides accurate date and time measurements using Date#advance and -# Time#advance, respectively. It mainly supports the methods on Numeric. -# -# 1.month.ago # equivalent to Time.now.advance(months: -1) -# -# source://activesupport//lib/active_support/duration.rb#14 -class ActiveSupport::Duration - # @return [Duration] a new instance of Duration - # - # source://activesupport//lib/active_support/duration.rb#226 - def initialize(value, parts, variable = T.unsafe(nil)); end - - # Returns the modulo of this Duration by another Duration or Numeric. - # Numeric values are treated as seconds. - # - # source://activesupport//lib/active_support/duration.rb#312 - def %(other); end - - # Multiplies this Duration by a Numeric and returns a new Duration. - # - # source://activesupport//lib/active_support/duration.rb#287 - def *(other); end - - # Adds another Duration or a Numeric to this Duration. Numeric values - # are treated as seconds. - # - # source://activesupport//lib/active_support/duration.rb#268 - def +(other); end - - # source://activesupport//lib/active_support/duration.rb#326 - def +@; end - - # Subtracts another Duration or a Numeric from this Duration. Numeric - # values are treated as seconds. - # - # source://activesupport//lib/active_support/duration.rb#282 - def -(other); end - - # source://activesupport//lib/active_support/duration.rb#322 - def -@; end - - # Divides this Duration by a Numeric and returns a new Duration. - # - # source://activesupport//lib/active_support/duration.rb#298 - def /(other); end - - # Compares one Duration with another or a Numeric to this Duration. - # Numeric values are treated as seconds. - # - # source://activesupport//lib/active_support/duration.rb#258 - def <=>(other); end - - # Returns +true+ if +other+ is also a Duration instance with the - # same +value+, or if other == value. - # - # source://activesupport//lib/active_support/duration.rb#341 - def ==(other); end - - # source://activesupport//lib/active_support/duration.rb#481 - def _parts; end - - # source://activesupport//lib/active_support/duration.rb#224 - def abs(&_arg0); end - - # Calculates a new Time or Date that is as far in the future - # as this Duration represents. - # - # source://activesupport//lib/active_support/duration.rb#436 - def after(time = T.unsafe(nil)); end - - # Calculates a new Time or Date that is as far in the past - # as this Duration represents. - # - # source://activesupport//lib/active_support/duration.rb#444 - def ago(time = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/duration.rb#459 - def as_json(options = T.unsafe(nil)); end - - # Calculates a new Time or Date that is as far in the past - # as this Duration represents. - # - # source://activesupport//lib/active_support/duration.rb#444 - def before(time = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/duration.rb#245 - def coerce(other); end - - # source://activesupport//lib/active_support/duration.rb#467 - def encode_with(coder); end - - # Returns +true+ if +other+ is also a Duration instance, which has the - # same parts as this one. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/duration.rb#426 - def eql?(other); end - - # Calculates a new Time or Date that is as far in the future - # as this Duration represents. - # - # source://activesupport//lib/active_support/duration.rb#436 - def from_now(time = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/duration.rb#430 - def hash; end - - # Returns the amount of days a duration covers as a float - # - # 12.hours.in_days # => 0.5 - # - # source://activesupport//lib/active_support/duration.rb#399 - def in_days; end - - # Returns the amount of hours a duration covers as a float - # - # 1.day.in_hours # => 24.0 - # - # source://activesupport//lib/active_support/duration.rb#392 - def in_hours; end - - # Returns the amount of minutes a duration covers as a float - # - # 1.day.in_minutes # => 1440.0 - # - # source://activesupport//lib/active_support/duration.rb#385 - def in_minutes; end - - # Returns the amount of months a duration covers as a float - # - # 9.weeks.in_months # => 2.07 - # - # source://activesupport//lib/active_support/duration.rb#413 - def in_months; end - - # Returns the number of seconds that this Duration represents. - # - # 1.minute.to_i # => 60 - # 1.hour.to_i # => 3600 - # 1.day.to_i # => 86400 - # - # Note that this conversion makes some assumptions about the - # duration of some periods, e.g. months are always 1/12 of year - # and years are 365.2425 days: - # - # # equivalent to (1.year / 12).to_i - # 1.month.to_i # => 2629746 - # - # # equivalent to 365.2425.days.to_i - # 1.year.to_i # => 31556952 - # - # In such cases, Ruby's core - # Date[https://docs.ruby-lang.org/en/master/Date.html] and - # Time[https://docs.ruby-lang.org/en/master/Time.html] should be used for precision - # date and time arithmetic. - # - # source://activesupport//lib/active_support/duration.rb#377 - def in_seconds; end - - # Returns the amount of weeks a duration covers as a float - # - # 2.months.in_weeks # => 8.696 - # - # source://activesupport//lib/active_support/duration.rb#406 - def in_weeks; end - - # Returns the amount of years a duration covers as a float - # - # 30.days.in_years # => 0.082 - # - # source://activesupport//lib/active_support/duration.rb#420 - def in_years; end - - # source://activesupport//lib/active_support/duration.rb#463 - def init_with(coder); end - - # source://activesupport//lib/active_support/duration.rb#450 - def inspect; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/duration.rb#335 - def instance_of?(klass); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/duration.rb#330 - def is_a?(klass); end - - # Build ISO 8601 Duration string for this duration. - # The +precision+ parameter can be used to limit seconds' precision of duration. - # - # source://activesupport//lib/active_support/duration.rb#473 - def iso8601(precision: T.unsafe(nil)); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/duration.rb#330 - def kind_of?(klass); end - - # source://activesupport//lib/active_support/duration.rb#224 - def negative?(&_arg0); end - - # Returns a copy of the parts hash that defines the duration. - # - # 5.minutes.parts # => {:minutes=>5} - # 3.years.parts # => {:years=>3} - # - # source://activesupport//lib/active_support/duration.rb#241 - def parts; end - - # source://activesupport//lib/active_support/duration.rb#224 - def positive?(&_arg0); end - - # Calculates a new Time or Date that is as far in the future - # as this Duration represents. - # - # source://activesupport//lib/active_support/duration.rb#436 - def since(time = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/duration.rb#224 - def to_f(&_arg0); end - - # Returns the number of seconds that this Duration represents. - # - # 1.minute.to_i # => 60 - # 1.hour.to_i # => 3600 - # 1.day.to_i # => 86400 - # - # Note that this conversion makes some assumptions about the - # duration of some periods, e.g. months are always 1/12 of year - # and years are 365.2425 days: - # - # # equivalent to (1.year / 12).to_i - # 1.month.to_i # => 2629746 - # - # # equivalent to 365.2425.days.to_i - # 1.year.to_i # => 31556952 - # - # In such cases, Ruby's core - # Date[https://docs.ruby-lang.org/en/master/Date.html] and - # Time[https://docs.ruby-lang.org/en/master/Time.html] should be used for precision - # date and time arithmetic. - # - # source://activesupport//lib/active_support/duration.rb#377 - def to_i; end - - # Returns the amount of seconds a duration covers as a string. - # For more information check to_i method. - # - # 1.day.to_s # => "86400" - # - # source://activesupport//lib/active_support/duration.rb#353 - def to_s; end - - # Calculates a new Time or Date that is as far in the past - # as this Duration represents. - # - # source://activesupport//lib/active_support/duration.rb#444 - def until(time = T.unsafe(nil)); end - - # Returns the value of attribute value. - # - # source://activesupport//lib/active_support/duration.rb#133 - def value; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/duration.rb#477 - def variable?; end - - # source://activesupport//lib/active_support/duration.rb#224 - def zero?(&_arg0); end - - private - - # source://activesupport//lib/active_support/duration.rb#512 - def method_missing(*_arg0, **_arg1, &_arg2); end - - # @raise [TypeError] - # - # source://activesupport//lib/active_support/duration.rb#516 - def raise_type_error(other); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/duration.rb#508 - def respond_to_missing?(method, _); end - - # source://activesupport//lib/active_support/duration.rb#486 - def sum(sign, time = T.unsafe(nil)); end - - class << self - # source://activesupport//lib/active_support/duration.rb#149 - def ===(other); end - - # Creates a new Duration from a seconds value that is converted - # to the individual parts: - # - # ActiveSupport::Duration.build(31556952).parts # => {:years=>1} - # ActiveSupport::Duration.build(2716146).parts # => {:months=>1, :days=>1} - # - # source://activesupport//lib/active_support/duration.rb#189 - def build(value); end - - # source://activesupport//lib/active_support/duration.rb#167 - def days(value); end - - # source://activesupport//lib/active_support/duration.rb#163 - def hours(value); end - - # source://activesupport//lib/active_support/duration.rb#159 - def minutes(value); end - - # source://activesupport//lib/active_support/duration.rb#175 - def months(value); end - - # Creates a new Duration from string formatted according to ISO 8601 Duration. - # - # See {ISO 8601}[https://en.wikipedia.org/wiki/ISO_8601#Durations] for more information. - # This method allows negative parts to be present in pattern. - # If invalid string is provided, it will raise +ActiveSupport::Duration::ISO8601Parser::ParsingError+. - # - # source://activesupport//lib/active_support/duration.rb#144 - def parse(iso8601duration); end - - # source://activesupport//lib/active_support/duration.rb#155 - def seconds(value); end - - # source://activesupport//lib/active_support/duration.rb#171 - def weeks(value); end - - # source://activesupport//lib/active_support/duration.rb#179 - def years(value); end - - private - - # source://activesupport//lib/active_support/duration.rb#217 - def calculate_total_seconds(parts); end - end -end - -# Parses a string formatted according to ISO 8601 Duration into the hash. -# -# See {ISO 8601}[https://en.wikipedia.org/wiki/ISO_8601#Durations] for more information. -# -# This parser allows negative parts to be present in pattern. -# -# source://activesupport//lib/active_support/duration/iso8601_parser.rb#12 -class ActiveSupport::Duration::ISO8601Parser - # @return [ISO8601Parser] a new instance of ISO8601Parser - # - # source://activesupport//lib/active_support/duration/iso8601_parser.rb#34 - def initialize(string); end - - # Returns the value of attribute mode. - # - # source://activesupport//lib/active_support/duration/iso8601_parser.rb#32 - def mode; end - - # Sets the attribute mode - # - # @param value the value to set the attribute mode to. - # - # source://activesupport//lib/active_support/duration/iso8601_parser.rb#32 - def mode=(_arg0); end - - # source://activesupport//lib/active_support/duration/iso8601_parser.rb#41 - def parse!; end - - # Returns the value of attribute parts. - # - # source://activesupport//lib/active_support/duration/iso8601_parser.rb#31 - def parts; end - - # Returns the value of attribute scanner. - # - # source://activesupport//lib/active_support/duration/iso8601_parser.rb#31 - def scanner; end - - # Returns the value of attribute sign. - # - # source://activesupport//lib/active_support/duration/iso8601_parser.rb#32 - def sign; end - - # Sets the attribute sign - # - # @param value the value to set the attribute sign to. - # - # source://activesupport//lib/active_support/duration/iso8601_parser.rb#32 - def sign=(_arg0); end - - private - - # @return [Boolean] - # - # source://activesupport//lib/active_support/duration/iso8601_parser.rb#83 - def finished?; end - - # Parses number which can be a float with either comma or period. - # - # source://activesupport//lib/active_support/duration/iso8601_parser.rb#88 - def number; end - - # @raise [ParsingError] - # - # source://activesupport//lib/active_support/duration/iso8601_parser.rb#96 - def raise_parsing_error(reason = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/duration/iso8601_parser.rb#92 - def scan(pattern); end - - # Checks for various semantic errors as stated in ISO 8601 standard. - # - # source://activesupport//lib/active_support/duration/iso8601_parser.rb#101 - def validate!; end -end - -# source://activesupport//lib/active_support/duration/iso8601_parser.rb#17 -ActiveSupport::Duration::ISO8601Parser::COMMA = T.let(T.unsafe(nil), String) - -# source://activesupport//lib/active_support/duration/iso8601_parser.rb#22 -ActiveSupport::Duration::ISO8601Parser::DATE_COMPONENT = T.let(T.unsafe(nil), Regexp) - -# source://activesupport//lib/active_support/duration/iso8601_parser.rb#28 -ActiveSupport::Duration::ISO8601Parser::DATE_COMPONENTS = T.let(T.unsafe(nil), Array) - -# source://activesupport//lib/active_support/duration/iso8601_parser.rb#20 -ActiveSupport::Duration::ISO8601Parser::DATE_MARKER = T.let(T.unsafe(nil), Regexp) - -# source://activesupport//lib/active_support/duration/iso8601_parser.rb#25 -ActiveSupport::Duration::ISO8601Parser::DATE_TO_PART = T.let(T.unsafe(nil), Hash) - -# source://activesupport//lib/active_support/duration/iso8601_parser.rb#16 -ActiveSupport::Duration::ISO8601Parser::PERIOD = T.let(T.unsafe(nil), String) - -# source://activesupport//lib/active_support/duration/iso8601_parser.rb#15 -ActiveSupport::Duration::ISO8601Parser::PERIOD_OR_COMMA = T.let(T.unsafe(nil), Regexp) - -# source://activesupport//lib/active_support/duration/iso8601_parser.rb#13 -class ActiveSupport::Duration::ISO8601Parser::ParsingError < ::ArgumentError; end - -# source://activesupport//lib/active_support/duration/iso8601_parser.rb#19 -ActiveSupport::Duration::ISO8601Parser::SIGN_MARKER = T.let(T.unsafe(nil), Regexp) - -# source://activesupport//lib/active_support/duration/iso8601_parser.rb#23 -ActiveSupport::Duration::ISO8601Parser::TIME_COMPONENT = T.let(T.unsafe(nil), Regexp) - -# source://activesupport//lib/active_support/duration/iso8601_parser.rb#29 -ActiveSupport::Duration::ISO8601Parser::TIME_COMPONENTS = T.let(T.unsafe(nil), Array) - -# source://activesupport//lib/active_support/duration/iso8601_parser.rb#21 -ActiveSupport::Duration::ISO8601Parser::TIME_MARKER = T.let(T.unsafe(nil), Regexp) - -# source://activesupport//lib/active_support/duration/iso8601_parser.rb#26 -ActiveSupport::Duration::ISO8601Parser::TIME_TO_PART = T.let(T.unsafe(nil), Hash) - -# Serializes duration to string according to ISO 8601 Duration format. -# -# source://activesupport//lib/active_support/duration/iso8601_serializer.rb#6 -class ActiveSupport::Duration::ISO8601Serializer - # @return [ISO8601Serializer] a new instance of ISO8601Serializer - # - # source://activesupport//lib/active_support/duration/iso8601_serializer.rb#9 - def initialize(duration, precision: T.unsafe(nil)); end - - # Builds and returns output string. - # - # source://activesupport//lib/active_support/duration/iso8601_serializer.rb#15 - def serialize; end - - private - - # source://activesupport//lib/active_support/duration/iso8601_serializer.rb#55 - def format_seconds(seconds); end - - # Return pair of duration's parts and whole duration sign. - # Parts are summarized (as they can become repetitive due to addition, etc). - # Zero parts are removed as not significant. - # - # source://activesupport//lib/active_support/duration/iso8601_serializer.rb#38 - def normalize; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/duration/iso8601_serializer.rb#51 - def week_mixed_with_date?(parts); end -end - -# source://activesupport//lib/active_support/duration/iso8601_serializer.rb#7 -ActiveSupport::Duration::ISO8601Serializer::DATE_COMPONENTS = T.let(T.unsafe(nil), Array) - -# source://activesupport//lib/active_support/duration.rb#130 -ActiveSupport::Duration::PARTS = T.let(T.unsafe(nil), Array) - -# source://activesupport//lib/active_support/duration.rb#120 -ActiveSupport::Duration::PARTS_IN_SECONDS = T.let(T.unsafe(nil), Hash) - -# source://activesupport//lib/active_support/duration.rb#115 -ActiveSupport::Duration::SECONDS_PER_DAY = T.let(T.unsafe(nil), Integer) - -# source://activesupport//lib/active_support/duration.rb#114 -ActiveSupport::Duration::SECONDS_PER_HOUR = T.let(T.unsafe(nil), Integer) - -# source://activesupport//lib/active_support/duration.rb#113 -ActiveSupport::Duration::SECONDS_PER_MINUTE = T.let(T.unsafe(nil), Integer) - -# 1/12 of a gregorian year -# -# source://activesupport//lib/active_support/duration.rb#117 -ActiveSupport::Duration::SECONDS_PER_MONTH = T.let(T.unsafe(nil), Integer) - -# source://activesupport//lib/active_support/duration.rb#116 -ActiveSupport::Duration::SECONDS_PER_WEEK = T.let(T.unsafe(nil), Integer) - -# length of a gregorian year (365.2425 days) -# -# source://activesupport//lib/active_support/duration.rb#118 -ActiveSupport::Duration::SECONDS_PER_YEAR = T.let(T.unsafe(nil), Integer) - -# source://activesupport//lib/active_support/duration.rb#15 -class ActiveSupport::Duration::Scalar < ::Numeric - # @return [Scalar] a new instance of Scalar - # - # source://activesupport//lib/active_support/duration.rb#19 - def initialize(value); end - - # source://activesupport//lib/active_support/duration.rb#85 - def %(other); end - - # source://activesupport//lib/active_support/duration.rb#66 - def *(other); end - - # source://activesupport//lib/active_support/duration.rb#41 - def +(other); end - - # source://activesupport//lib/active_support/duration.rb#53 - def -(other); end - - # source://activesupport//lib/active_support/duration.rb#27 - def -@; end - - # source://activesupport//lib/active_support/duration.rb#77 - def /(other); end - - # source://activesupport//lib/active_support/duration.rb#31 - def <=>(other); end - - # source://activesupport//lib/active_support/duration.rb#23 - def coerce(other); end - - # source://activesupport//lib/active_support/duration.rb#17 - def to_f(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/duration.rb#17 - def to_i(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/duration.rb#17 - def to_s(*_arg0, **_arg1, &_arg2); end - - # Returns the value of attribute value. - # - # source://activesupport//lib/active_support/duration.rb#16 - def value; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/duration.rb#93 - def variable?; end - - private - - # source://activesupport//lib/active_support/duration.rb#98 - def calculate(op, other); end - - # @raise [TypeError] - # - # source://activesupport//lib/active_support/duration.rb#108 - def raise_type_error(other); end -end - -# source://activesupport//lib/active_support/duration.rb#131 -ActiveSupport::Duration::VARIABLE_PARTS = T.let(T.unsafe(nil), Array) - -# source://activesupport//lib/active_support/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 - -# source://activesupport//lib/active_support/core_ext/enumerable.rb#5 -module ActiveSupport::EnumerableCoreExt::Constants - private - - # source://activesupport//lib/active_support/core_ext/enumerable.rb#7 - def const_missing(name); end -end - -# HACK: For performance reasons, Enumerable shouldn't have any constants of its own. -# So we move SoleItemExpectedError into ActiveSupport::EnumerableCoreExt. -# -# source://activesupport//lib/active_support/core_ext/enumerable.rb#25 -ActiveSupport::EnumerableCoreExt::SoleItemExpectedError = Enumerable::SoleItemExpectedError - -# source://activesupport//lib/active_support/environment_inquirer.rb#9 -class ActiveSupport::EnvironmentInquirer < ::ActiveSupport::StringInquirer - # @raise [ArgumentError] - # @return [EnvironmentInquirer] a new instance of EnvironmentInquirer - # - # source://activesupport//lib/active_support/environment_inquirer.rb#15 - def initialize(env); end - - # source://activesupport//lib/active_support/environment_inquirer.rb#29 - def development?; end - - # Returns true if we're in the development or test environment. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/environment_inquirer.rb#36 - def local?; end - - # source://activesupport//lib/active_support/environment_inquirer.rb#29 - def production?; end - - # source://activesupport//lib/active_support/environment_inquirer.rb#29 - def test?; end -end - -# Optimization for the three default environments, so this inquirer doesn't need to rely on -# the slower delegation through method_missing that StringInquirer would normally entail. -# -# source://activesupport//lib/active_support/environment_inquirer.rb#10 -ActiveSupport::EnvironmentInquirer::DEFAULT_ENVIRONMENTS = T.let(T.unsafe(nil), Array) - -# Environments that'll respond true for #local? -# -# source://activesupport//lib/active_support/environment_inquirer.rb#13 -ActiveSupport::EnvironmentInquirer::LOCAL_ENVIRONMENTS = T.let(T.unsafe(nil), Array) - -# = Active Support \Error Reporter -# -# +ActiveSupport::ErrorReporter+ is a common interface for error reporting services. -# -# To rescue and report any unhandled error, you can use the #handle method: -# -# Rails.error.handle do -# do_something! -# end -# -# If an error is raised, it will be reported and swallowed. -# -# Alternatively, if you want to report the error but not swallow it, you can use #record: -# -# Rails.error.record do -# do_something! -# end -# -# Both methods can be restricted to handle only a specific error class: -# -# maybe_tags = Rails.error.handle(Redis::BaseError) { redis.get("tags") } -# -# source://activesupport//lib/active_support/error_reporter.rb#26 -class ActiveSupport::ErrorReporter - # @return [ErrorReporter] a new instance of ErrorReporter - # - # source://activesupport//lib/active_support/error_reporter.rb#35 - def initialize(*subscribers, logger: T.unsafe(nil)); end - - # Returns the value of attribute debug_mode. - # - # source://activesupport//lib/active_support/error_reporter.rb#31 - def debug_mode; end - - # Sets the attribute debug_mode - # - # @param value the value to set the attribute debug_mode to. - # - # source://activesupport//lib/active_support/error_reporter.rb#31 - def debug_mode=(_arg0); end - - # Prevent a subscriber from being notified of errors for the - # duration of the block. You may pass in the subscriber itself, or its class. - # - # This can be helpful for error reporting service integrations, when they wish - # to handle any errors higher in the stack. - # - # source://activesupport//lib/active_support/error_reporter.rb#185 - def disable(subscriber); end - - # Evaluates the given block, reporting and swallowing any unhandled error. - # If no error is raised, returns the return value of the block. Otherwise, - # returns the result of +fallback.call+, or +nil+ if +fallback+ is not - # specified. - # - # # Will report a TypeError to all subscribers and return nil. - # Rails.error.handle do - # 1 + '1' - # end - # - # Can be restricted to handle only specific error classes: - # - # maybe_tags = Rails.error.handle(Redis::BaseError) { redis.get("tags") } - # - # ==== Options - # - # * +:severity+ - This value is passed along to subscribers to indicate how - # important the error report is. Can be +:error+, +:warning+, or +:info+. - # Defaults to +:warning+. - # - # * +:context+ - Extra information that is passed along to subscribers. For - # example: - # - # Rails.error.handle(context: { section: "admin" }) do - # # ... - # end - # - # * +:fallback+ - A callable that provides +handle+'s return value when an - # unhandled error is raised. For example: - # - # user = Rails.error.handle(fallback: -> { User.anonymous }) do - # User.find_by(params) - # end - # - # * +:source+ - This value is passed along to subscribers to indicate the - # source of the error. Subscribers can use this value to ignore certain - # errors. Defaults to "application". - # - # source://activesupport//lib/active_support/error_reporter.rb#78 - def handle(*error_classes, severity: T.unsafe(nil), context: T.unsafe(nil), fallback: T.unsafe(nil), source: T.unsafe(nil)); end - - # Returns the value of attribute logger. - # - # source://activesupport//lib/active_support/error_reporter.rb#31 - def logger; end - - # Sets the attribute logger - # - # @param value the value to set the attribute logger to. - # - # source://activesupport//lib/active_support/error_reporter.rb#31 - def logger=(_arg0); end - - # Evaluates the given block, reporting and re-raising any unhandled error. - # If no error is raised, returns the return value of the block. - # - # # Will report a TypeError to all subscribers and re-raise it. - # Rails.error.record do - # 1 + '1' - # end - # - # Can be restricted to handle only specific error classes: - # - # tags = Rails.error.record(Redis::BaseError) { redis.get("tags") } - # - # ==== Options - # - # * +:severity+ - This value is passed along to subscribers to indicate how - # important the error report is. Can be +:error+, +:warning+, or +:info+. - # Defaults to +:error+. - # - # * +:context+ - Extra information that is passed along to subscribers. For - # example: - # - # Rails.error.record(context: { section: "admin" }) do - # # ... - # end - # - # * +:source+ - This value is passed along to subscribers to indicate the - # source of the error. Subscribers can use this value to ignore certain - # errors. Defaults to "application". - # - # source://activesupport//lib/active_support/error_reporter.rb#114 - def record(*error_classes, severity: T.unsafe(nil), context: T.unsafe(nil), source: T.unsafe(nil)); end - - # Report an error directly to subscribers. You can use this method when the - # block-based #handle and #record methods are not suitable. - # - # Rails.error.report(error) - # - # source://activesupport//lib/active_support/error_reporter.rb#210 - def report(error, handled: T.unsafe(nil), severity: T.unsafe(nil), context: T.unsafe(nil), source: T.unsafe(nil)); end - - # Update the execution context that is accessible to error subscribers. Any - # context passed to #handle, #record, or #report will be merged with the - # context set here. - # - # Rails.error.set_context(section: "checkout", user_id: @user.id) - # - # source://activesupport//lib/active_support/error_reporter.rb#201 - def set_context(*_arg0, **_arg1, &_arg2); end - - # Register a new error subscriber. The subscriber must respond to - # - # report(Exception, handled: Boolean, severity: (:error OR :warning OR :info), context: Hash, source: String) - # - # The +report+ method should never raise an error. - # - # source://activesupport//lib/active_support/error_reporter.rb#161 - def subscribe(subscriber); end - - # Either report the given error when in production, or raise it when in development or test. - # - # When called in production, after the error is reported, this method will return - # nil and execution will continue. - # - # When called in development, the original error is wrapped in a different error class to ensure - # it's not being rescued higher in the stack and will be surfaced to the developer. - # - # This method is intended for reporting violated assertions about preconditions, or similar - # cases that can and should be gracefully handled in production, but that aren't supposed to happen. - # - # The error can be either an exception instance or a String. - # - # example: - # - # def edit - # if published? - # Rails.error.unexpected("[BUG] Attempting to edit a published article, that shouldn't be possible") - # return false - # end - # # ... - # end - # - # source://activesupport//lib/active_support/error_reporter.rb#145 - def unexpected(error, severity: T.unsafe(nil), context: T.unsafe(nil), source: T.unsafe(nil)); end - - # Unregister an error subscriber. Accepts either a subscriber or a class. - # - # subscriber = MyErrorSubscriber.new - # Rails.error.subscribe(subscriber) - # - # Rails.error.unsubscribe(subscriber) - # # or - # Rails.error.unsubscribe(MyErrorSubscriber) - # - # source://activesupport//lib/active_support/error_reporter.rb#176 - def unsubscribe(subscriber); end -end - -# source://activesupport//lib/active_support/error_reporter.rb#29 -ActiveSupport::ErrorReporter::DEFAULT_RESCUE = T.let(T.unsafe(nil), Array) - -# source://activesupport//lib/active_support/error_reporter.rb#28 -ActiveSupport::ErrorReporter::DEFAULT_SOURCE = T.let(T.unsafe(nil), String) - -# source://activesupport//lib/active_support/error_reporter.rb#27 -ActiveSupport::ErrorReporter::SEVERITIES = T.let(T.unsafe(nil), Array) - -# source://activesupport//lib/active_support/error_reporter.rb#33 -class ActiveSupport::ErrorReporter::UnexpectedError < ::Exception; end - -# Allows you to "listen" to changes in a file system. -# The evented file updater does not hit disk when checking for updates. -# Instead, it uses platform-specific file system events to trigger a change -# in state. -# -# The file checker takes an array of files to watch or a hash specifying directories -# and file extensions to watch. It also takes a block that is called when -# EventedFileUpdateChecker#execute is run or when EventedFileUpdateChecker#execute_if_updated -# is run and there have been changes to the file system. -# -# Example: -# -# checker = ActiveSupport::EventedFileUpdateChecker.new(["/tmp/foo"]) { puts "changed" } -# checker.updated? -# # => false -# checker.execute_if_updated -# # => nil -# -# FileUtils.touch("/tmp/foo") -# -# checker.updated? -# # => true -# checker.execute_if_updated -# # => "changed" -# -# source://activesupport//lib/active_support/evented_file_update_checker.rb#36 -class ActiveSupport::EventedFileUpdateChecker - # @return [EventedFileUpdateChecker] a new instance of EventedFileUpdateChecker - # - # source://activesupport//lib/active_support/evented_file_update_checker.rb#37 - def initialize(files, dirs = T.unsafe(nil), &block); end - - # source://activesupport//lib/active_support/evented_file_update_checker.rb#60 - def execute; end - - # source://activesupport//lib/active_support/evented_file_update_checker.rb#65 - def execute_if_updated; end - - # source://activesupport//lib/active_support/evented_file_update_checker.rb#47 - def inspect; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/evented_file_update_checker.rb#51 - def updated?; end -end - -# source://activesupport//lib/active_support/evented_file_update_checker.rb#73 -class ActiveSupport::EventedFileUpdateChecker::Core - # @return [Core] a new instance of Core - # - # source://activesupport//lib/active_support/evented_file_update_checker.rb#76 - def initialize(files, dirs); end - - # source://activesupport//lib/active_support/evented_file_update_checker.rb#143 - def changed(modified, added, removed); end - - # source://activesupport//lib/active_support/evented_file_update_checker.rb#177 - def common_path(paths); end - - # source://activesupport//lib/active_support/evented_file_update_checker.rb#171 - def directories_to_watch; end - - # Returns the value of attribute files. - # - # source://activesupport//lib/active_support/evented_file_update_checker.rb#74 - def files; end - - # source://activesupport//lib/active_support/evented_file_update_checker.rb#99 - def finalizer; end - - # source://activesupport//lib/active_support/evented_file_update_checker.rb#137 - def normalize_dirs!; end - - # source://activesupport//lib/active_support/evented_file_update_checker.rb#128 - def restart; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/evented_file_update_checker.rb#133 - def restart?; end - - # source://activesupport//lib/active_support/evented_file_update_checker.rb#112 - def start; end - - # source://activesupport//lib/active_support/evented_file_update_checker.rb#124 - def stop; end - - # source://activesupport//lib/active_support/evented_file_update_checker.rb#106 - def thread_safely; end - - # Returns the value of attribute updated. - # - # source://activesupport//lib/active_support/evented_file_update_checker.rb#74 - def updated; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/evented_file_update_checker.rb#149 - def watching?(file); end -end - -# source://activesupport//lib/active_support/execution_context.rb#4 -module ActiveSupport::ExecutionContext - class << self - # source://activesupport//lib/active_support/execution_context.rb#34 - def []=(key, value); end - - # source://activesupport//lib/active_support/execution_context.rb#7 - def after_change(&block); end - - # source://activesupport//lib/active_support/execution_context.rb#43 - def clear; end - - # Updates the execution context. If a block is given, it resets the provided keys to their - # previous value once the block exits. - # - # source://activesupport//lib/active_support/execution_context.rb#13 - def set(**options); end - - # source://activesupport//lib/active_support/execution_context.rb#39 - def to_h; end - - private - - # source://activesupport//lib/active_support/execution_context.rb#48 - def store; end - end -end - -# source://activesupport//lib/active_support/execution_wrapper.rb#7 -class ActiveSupport::ExecutionWrapper - include ::ActiveSupport::Callbacks - extend ::ActiveSupport::Callbacks::ClassMethods - extend ::ActiveSupport::DescendantsTracker - - # source://activesupport//lib/active_support/callbacks.rb#70 - def __callbacks; end - - # source://activesupport//lib/active_support/callbacks.rb#70 - def __callbacks?; end - - # source://activesupport//lib/active_support/callbacks.rb#924 - def _complete_callbacks; end - - # source://activesupport//lib/active_support/callbacks.rb#924 - def _run_callbacks; end - - # source://activesupport//lib/active_support/callbacks.rb#912 - def _run_complete_callbacks(&block); end - - # source://activesupport//lib/active_support/callbacks.rb#912 - def _run_run_callbacks(&block); end - - # source://activesupport//lib/active_support/execution_wrapper.rb#141 - def complete; end - - # Complete this in-flight execution. This method *must* be called - # exactly once on the result of any call to +run!+. - # - # Where possible, prefer +wrap+. - # - # source://activesupport//lib/active_support/execution_wrapper.rb#135 - def complete!; end - - # source://activesupport//lib/active_support/execution_wrapper.rb#127 - def run; end - - # source://activesupport//lib/active_support/execution_wrapper.rb#122 - def run!; end - - private - - # source://activesupport//lib/active_support/execution_wrapper.rb#146 - def hook_state; end - - class << self - # source://activesupport//lib/active_support/callbacks.rb#70 - def __callbacks; end - - # source://activesupport//lib/active_support/callbacks.rb#70 - def __callbacks=(value); end - - # source://activesupport//lib/active_support/callbacks.rb#70 - def __callbacks?; end - - # source://activesupport//lib/active_support/callbacks.rb#916 - def _complete_callbacks; end - - # source://activesupport//lib/active_support/callbacks.rb#920 - def _complete_callbacks=(value); end - - # source://activesupport//lib/active_support/callbacks.rb#916 - def _run_callbacks; end - - # source://activesupport//lib/active_support/callbacks.rb#920 - def _run_callbacks=(value); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/execution_wrapper.rb#118 - def active?; end - - # source://activesupport//lib/active_support/execution_wrapper.rb#114 - def active_key; end - - # source://activesupport//lib/active_support/execution_wrapper.rb#110 - def error_reporter; end - - # source://activesupport//lib/active_support/execution_wrapper.rb#100 - def perform; end - - # Register an object to be invoked during both the +run+ and - # +complete+ steps. - # - # +hook.complete+ will be passed the value returned from +hook.run+, - # and will only be invoked if +run+ has previously been called. - # (Mostly, this means it won't be invoked if an exception occurs in - # a preceding +to_run+ block; all ordinary +to_complete+ blocks are - # invoked in that situation.) - # - # source://activesupport//lib/active_support/execution_wrapper.rb#50 - def register_hook(hook, outer: T.unsafe(nil)); end - - # Run this execution. - # - # Returns an instance, whose +complete!+ method *must* be invoked - # after the work has been performed. - # - # Where possible, prefer +wrap+. - # - # source://activesupport//lib/active_support/execution_wrapper.rb#66 - def run!(reset: T.unsafe(nil)); end - - # source://activesupport//lib/active_support/execution_wrapper.rb#21 - def to_complete(*args, &block); end - - # source://activesupport//lib/active_support/execution_wrapper.rb#17 - def to_run(*args, &block); end - - # Perform the work in the supplied block as an execution. - # - # source://activesupport//lib/active_support/execution_wrapper.rb#86 - def wrap(source: T.unsafe(nil)); end - end -end - -# source://activesupport//lib/active_support/execution_wrapper.rb#32 -class ActiveSupport::ExecutionWrapper::CompleteHook < ::Struct - # source://activesupport//lib/active_support/execution_wrapper.rb#33 - def after(target); end - - # source://activesupport//lib/active_support/execution_wrapper.rb#33 - def before(target); end - - # Returns the value of attribute hook - # - # @return [Object] the current value of hook - def hook; end - - # Sets the attribute hook - # - # @param value [Object] the value to set the attribute hook to. - # @return [Object] the newly set value - def hook=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://activesupport//lib/active_support/execution_wrapper.rb#10 -ActiveSupport::ExecutionWrapper::Null = T.let(T.unsafe(nil), Object) - -# source://activesupport//lib/active_support/execution_wrapper.rb#25 -class ActiveSupport::ExecutionWrapper::RunHook < ::Struct - # source://activesupport//lib/active_support/execution_wrapper.rb#26 - def before(target); end - - # Returns the value of attribute hook - # - # @return [Object] the current value of hook - def hook; end - - # Sets the attribute hook - # - # @param value [Object] the value to set the attribute hook to. - # @return [Object] the newly set value - def hook=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://activesupport//lib/active_support/executor.rb#6 -class ActiveSupport::Executor < ::ActiveSupport::ExecutionWrapper; end - -# = \File Update Checker -# -# FileUpdateChecker specifies the API used by \Rails to watch files -# and control reloading. The API depends on four methods: -# -# * +initialize+ which expects two parameters and one block as -# described below. -# -# * +updated?+ which returns a boolean if there were updates in -# the filesystem or not. -# -# * +execute+ which executes the given block on initialization -# and updates the latest watched files and timestamp. -# -# * +execute_if_updated+ which just executes the block if it was updated. -# -# After initialization, a call to +execute_if_updated+ must execute -# the block only if there was really a change in the filesystem. -# -# This class is used by \Rails to reload the I18n framework whenever -# they are changed upon a new request. -# -# i18n_reloader = ActiveSupport::FileUpdateChecker.new(paths) do -# I18n.reload! -# end -# -# ActiveSupport::Reloader.to_prepare do -# i18n_reloader.execute_if_updated -# end -# -# source://activesupport//lib/active_support/file_update_checker.rb#35 -class ActiveSupport::FileUpdateChecker - # It accepts two parameters on initialization. The first is an array - # of files and the second is an optional hash of directories. The hash must - # have directories as keys and the value is an array of extensions to be - # watched under that directory. - # - # This method must also receive a block that will be called once a path - # changes. The array of files and list of directories cannot be changed - # after FileUpdateChecker has been initialized. - # - # @return [FileUpdateChecker] a new instance of FileUpdateChecker - # - # source://activesupport//lib/active_support/file_update_checker.rb#44 - def initialize(files, dirs = T.unsafe(nil), &block); end - - # Executes the given block and updates the latest watched files and - # timestamp. - # - # source://activesupport//lib/active_support/file_update_checker.rb#82 - def execute; end - - # Execute the block given if updated. - # - # source://activesupport//lib/active_support/file_update_checker.rb#92 - def execute_if_updated; end - - # Check if any of the entries were updated. If so, the watched and/or - # updated_at values are cached until the block is executed via +execute+ - # or +execute_if_updated+. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/file_update_checker.rb#63 - def updated?; end - - private - - # source://activesupport//lib/active_support/file_update_checker.rb#158 - def compile_ext(array); end - - # source://activesupport//lib/active_support/file_update_checker.rb#144 - def compile_glob(hash); end - - # source://activesupport//lib/active_support/file_update_checker.rb#154 - def escape(key); end - - # This method returns the maximum mtime of the files in +paths+, or +nil+ - # if the array is empty. - # - # Files with a mtime in the future are ignored. Such abnormal situation - # can happen for example if the user changes the clock by hand. It is - # healthy to consider this edge case because with mtimes in the future - # reloading is not triggered. - # - # source://activesupport//lib/active_support/file_update_checker.rb#122 - def max_mtime(paths); end - - # source://activesupport//lib/active_support/file_update_checker.rb#111 - def updated_at(paths); end - - # source://activesupport//lib/active_support/file_update_checker.rb#103 - def watched; end -end - -# source://activesupport//lib/active_support/fork_tracker.rb#4 -module ActiveSupport::ForkTracker - class << self - # source://activesupport//lib/active_support/fork_tracker.rb#31 - def after_fork(&block); end - - # source://activesupport//lib/active_support/fork_tracker.rb#19 - def after_fork_callback; end - - # source://activesupport//lib/active_support/fork_tracker.rb#27 - def hook!; end - - # source://activesupport//lib/active_support/fork_tracker.rb#36 - def unregister(callback); end - end -end - -# source://activesupport//lib/active_support/fork_tracker.rb#5 -module ActiveSupport::ForkTracker::CoreExt - # source://activesupport//lib/active_support/fork_tracker.rb#6 - def _fork; end -end - -# = Active Support \Gzip -# -# A convenient wrapper for the zlib standard library that allows -# compression/decompression of strings with gzip. -# -# gzip = ActiveSupport::Gzip.compress('compress me!') -# # => "\x1F\x8B\b\x00o\x8D\xCDO\x00\x03K\xCE\xCF-(J-.V\xC8MU\x04\x00R>n\x83\f\x00\x00\x00" -# -# ActiveSupport::Gzip.decompress(gzip) -# # => "compress me!" -# -# source://activesupport//lib/active_support/gzip.rb#17 -module ActiveSupport::Gzip - class << self - # Compresses a string using gzip. - # - # source://activesupport//lib/active_support/gzip.rb#32 - def compress(source, level = T.unsafe(nil), strategy = T.unsafe(nil)); end - - # Decompresses a gzipped string. - # - # source://activesupport//lib/active_support/gzip.rb#27 - def decompress(source); end - end -end - -# source://activesupport//lib/active_support/gzip.rb#18 -class ActiveSupport::Gzip::Stream < ::StringIO - # @return [Stream] a new instance of Stream - # - # source://activesupport//lib/active_support/gzip.rb#19 - def initialize(*_arg0); end - - # source://activesupport//lib/active_support/gzip.rb#23 - def close; end -end - -# = \Hash With Indifferent Access -# -# Implements a hash where keys :foo and "foo" are considered -# to be the same. -# -# rgb = ActiveSupport::HashWithIndifferentAccess.new -# -# rgb[:black] = '#000000' -# rgb[:black] # => '#000000' -# rgb['black'] # => '#000000' -# -# rgb['white'] = '#FFFFFF' -# rgb[:white] # => '#FFFFFF' -# rgb['white'] # => '#FFFFFF' -# -# Internally symbols are mapped to strings when used as keys in the entire -# writing interface (calling []=, merge, etc). This -# mapping belongs to the public interface. For example, given: -# -# hash = ActiveSupport::HashWithIndifferentAccess.new(a: 1) -# -# You are guaranteed that the key is returned as a string: -# -# hash.keys # => ["a"] -# -# Technically other types of keys are accepted: -# -# hash = ActiveSupport::HashWithIndifferentAccess.new(a: 1) -# hash[0] = 0 -# hash # => {"a"=>1, 0=>0} -# -# but this class is intended for use cases where strings or symbols are the -# expected keys and it is convenient to understand both as the same. For -# example the +params+ hash in Ruby on \Rails. -# -# Note that core extensions define Hash#with_indifferent_access: -# -# rgb = { black: '#000000', white: '#FFFFFF' }.with_indifferent_access -# -# which may be handy. -# -# To access this class outside of \Rails, require the core extension with: -# -# require "active_support/core_ext/hash/indifferent_access" -# -# which will, in turn, require this file. -# -# source://activesupport//lib/active_support/hash_with_indifferent_access.rb#55 -class ActiveSupport::HashWithIndifferentAccess < ::Hash - # @return [HashWithIndifferentAccess] a new instance of HashWithIndifferentAccess - # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#70 - def initialize(constructor = T.unsafe(nil)); end - - # Same as Hash#[] where the key passed as argument can be - # either a string or a symbol: - # - # counters = ActiveSupport::HashWithIndifferentAccess.new - # counters[:foo] = 1 - # - # counters['foo'] # => 1 - # counters[:foo] # => 1 - # counters[:zoo] # => nil - # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#168 - def [](key); end - - # Assigns a new value to the hash: - # - # hash = ActiveSupport::HashWithIndifferentAccess.new - # hash[:key] = 'value' - # - # This value can be later fetched using either +:key+ or 'key'. - # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#98 - def []=(key, value); end - - # Same as Hash#assoc where the key passed as argument can be - # either a string or a symbol: - # - # counters = ActiveSupport::HashWithIndifferentAccess.new - # counters[:foo] = 1 - # - # counters.assoc('foo') # => ["foo", 1] - # counters.assoc(:foo) # => ["foo", 1] - # counters.assoc(:zoo) # => nil - # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#181 - def assoc(key); end - - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#375 - def compact; end - - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#319 - def deep_stringify_keys; end - - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#317 - def deep_stringify_keys!; end - - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#324 - def deep_symbolize_keys; end - - # Same as Hash#default where the key passed as argument can be - # either a string or a symbol: - # - # hash = ActiveSupport::HashWithIndifferentAccess.new(1) - # hash.default # => 1 - # - # hash = ActiveSupport::HashWithIndifferentAccess.new { |hash, key| key } - # hash.default # => nil - # hash.default('foo') # => 'foo' - # hash.default(:foo) # => 'foo' - # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#223 - def default(key = T.unsafe(nil)); end - - # Removes the specified key from the hash. - # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#303 - def delete(key); end - - # Same as Hash#dig where the key passed as argument can be - # either a string or a symbol: - # - # counters = ActiveSupport::HashWithIndifferentAccess.new - # counters[:foo] = { bar: 1 } - # - # counters.dig('foo', 'bar') # => 1 - # counters.dig(:foo, :bar) # => 1 - # counters.dig(:zoo) # => nil - # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#208 - def dig(*args); end - - # Returns a shallow copy of the hash. - # - # hash = ActiveSupport::HashWithIndifferentAccess.new({ a: { b: 'b' } }) - # dup = hash.dup - # dup[:a][:c] = 'c' - # - # hash[:a][:c] # => "c" - # dup[:a][:c] # => "c" - # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#264 - def dup; end - - # Returns a hash with indifferent access that includes everything except given keys. - # hash = { a: "x", b: "y", c: 10 }.with_indifferent_access - # hash.except(:a, "b") # => {c: 10}.with_indifferent_access - # hash # => { a: "x", b: "y", c: 10 }.with_indifferent_access - # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#311 - def except(*keys); end - - # Returns +true+ so that Array#extract_options! finds members of - # this class. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#58 - def extractable_options?; end - - # Same as Hash#fetch where the key passed as argument can be - # either a string or a symbol: - # - # counters = ActiveSupport::HashWithIndifferentAccess.new - # counters[:foo] = 1 - # - # counters.fetch('foo') # => 1 - # counters.fetch(:bar, 0) # => 0 - # counters.fetch(:bar) { |key| 0 } # => 0 - # counters.fetch(:zoo) # => KeyError: key not found: "zoo" - # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#195 - def fetch(key, *extras); end - - # Returns an array of the values at the specified indices, but also - # raises an exception when one of the keys can't be found. - # - # hash = ActiveSupport::HashWithIndifferentAccess.new - # hash[:a] = 'x' - # hash[:b] = 'y' - # hash.fetch_values('a', 'b') # => ["x", "y"] - # hash.fetch_values('a', 'c') { |key| 'z' } # => ["x", "z"] - # hash.fetch_values('a', 'c') # => KeyError: key not found: "c" - # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#251 - def fetch_values(*indices, &block); end - - # Checks the hash for a key matching the argument passed in: - # - # hash = ActiveSupport::HashWithIndifferentAccess.new - # hash['key'] = 'value' - # hash.key?(:key) # => true - # hash.key?('key') # => true - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#151 - def has_key?(key); end - - # Checks the hash for a key matching the argument passed in: - # - # hash = ActiveSupport::HashWithIndifferentAccess.new - # hash['key'] = 'value' - # hash.key?(:key) # => true - # hash.key?('key') # => true - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#151 - def include?(key); end - - # Checks the hash for a key matching the argument passed in: - # - # hash = ActiveSupport::HashWithIndifferentAccess.new - # hash['key'] = 'value' - # hash.key?(:key) # => true - # hash.key?('key') # => true - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#151 - def key?(key); end - - # Checks the hash for a key matching the argument passed in: - # - # hash = ActiveSupport::HashWithIndifferentAccess.new - # hash['key'] = 'value' - # hash.key?(:key) # => true - # hash.key?('key') # => true - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#151 - def member?(key); end - - # This method has the same semantics of +update+, except it does not - # modify the receiver but rather returns a new hash with indifferent - # access with the result of the merge. - # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#273 - def merge(*hashes, &block); end - - # Updates the receiver in-place, merging in the hashes passed as arguments: - # - # hash_1 = ActiveSupport::HashWithIndifferentAccess.new - # hash_1[:key] = 'value' - # - # hash_2 = ActiveSupport::HashWithIndifferentAccess.new - # hash_2[:key] = 'New Value!' - # - # hash_1.update(hash_2) # => {"key"=>"New Value!"} - # - # hash = ActiveSupport::HashWithIndifferentAccess.new - # hash.update({ "a" => 1 }, { "b" => 2 }) # => { "a" => 1, "b" => 2 } - # - # The arguments can be either an - # +ActiveSupport::HashWithIndifferentAccess+ or a regular +Hash+. - # In either case the merge respects the semantics of indifferent access. - # - # If the argument is a regular hash with keys +:key+ and "key" only one - # of the values end up in the receiver, but which one is unspecified. - # - # When given a block, the value for duplicated keys will be determined - # by the result of invoking the block with the duplicated key, the value - # in the receiver, and the value in +other_hash+. The rules for duplicated - # keys follow the semantics of indifferent access: - # - # hash_1[:key] = 10 - # hash_2['key'] = 12 - # hash_1.update(hash_2) { |key, old, new| old + new } # => {"key"=>22} - # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#132 - def merge!(*other_hashes, &block); end - - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#66 - def nested_under_indifferent_access; end - - def regular_update(*_arg0); end - def regular_writer(_arg0, _arg1); end - - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#332 - def reject(*args, &block); end - - # Replaces the contents of this hash with other_hash. - # - # h = { "a" => 100, "b" => 200 } - # h.replace({ "c" => 300, "d" => 400 }) # => {"c"=>300, "d"=>400} - # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#298 - def replace(other_hash); end - - # Like +merge+ but the other way around: Merges the receiver into the - # argument and returns a new hash with indifferent access as result: - # - # hash = ActiveSupport::HashWithIndifferentAccess.new - # hash['a'] = nil - # hash.reverse_merge(a: 0, b: 1) # => {"a"=>nil, "b"=>1} - # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#283 - def reverse_merge(other_hash); end - - # Same semantics as +reverse_merge+ but modifies the receiver in-place. - # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#289 - def reverse_merge!(other_hash); end - - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#327 - def select(*args, &block); end - - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#365 - def slice(*keys); end - - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#370 - def slice!(*keys); end - - # Assigns a new value to the hash: - # - # hash = ActiveSupport::HashWithIndifferentAccess.new - # hash[:key] = 'value' - # - # This value can be later fetched using either +:key+ or 'key'. - # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#98 - def store(key, value); end - - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#318 - def stringify_keys; end - - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#316 - def stringify_keys!; end - - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#322 - def symbolize_keys; end - - # Convert to a regular hash with string keys. - # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#380 - def to_hash; end - - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#322 - def to_options; end - - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#325 - def to_options!; end - - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#390 - def to_proc; end - - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#344 - def transform_keys(hash = T.unsafe(nil), &block); end - - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#349 - def transform_keys!(hash = T.unsafe(nil), &block); end - - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#337 - def transform_values(&block); end - - # Updates the receiver in-place, merging in the hashes passed as arguments: - # - # hash_1 = ActiveSupport::HashWithIndifferentAccess.new - # hash_1[:key] = 'value' - # - # hash_2 = ActiveSupport::HashWithIndifferentAccess.new - # hash_2[:key] = 'New Value!' - # - # hash_1.update(hash_2) # => {"key"=>"New Value!"} - # - # hash = ActiveSupport::HashWithIndifferentAccess.new - # hash.update({ "a" => 1 }, { "b" => 2 }) # => { "a" => 1, "b" => 2 } - # - # The arguments can be either an - # +ActiveSupport::HashWithIndifferentAccess+ or a regular +Hash+. - # In either case the merge respects the semantics of indifferent access. - # - # If the argument is a regular hash with keys +:key+ and "key" only one - # of the values end up in the receiver, but which one is unspecified. - # - # When given a block, the value for duplicated keys will be determined - # by the result of invoking the block with the duplicated key, the value - # in the receiver, and the value in +other_hash+. The rules for duplicated - # keys follow the semantics of indifferent access: - # - # hash_1[:key] = 10 - # hash_2['key'] = 12 - # hash_1.update(hash_2) { |key, old, new| old + new } # => {"key"=>22} - # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#132 - def update(*other_hashes, &block); end - - # Returns an array of the values at the specified indices: - # - # hash = ActiveSupport::HashWithIndifferentAccess.new - # hash[:a] = 'x' - # hash[:b] = 'y' - # hash.values_at('a', 'b') # => ["x", "y"] - # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#237 - def values_at(*keys); end - - # Like +merge+ but the other way around: Merges the receiver into the - # argument and returns a new hash with indifferent access as result: - # - # hash = ActiveSupport::HashWithIndifferentAccess.new - # hash['a'] = nil - # hash.reverse_merge(a: 0, b: 1) # => {"a"=>nil, "b"=>1} - # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#283 - def with_defaults(other_hash); end - - # Same semantics as +reverse_merge+ but modifies the receiver in-place. - # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#289 - def with_defaults!(other_hash); end - - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#62 - def with_indifferent_access; end - - # Returns a hash with indifferent access that includes everything except given keys. - # hash = { a: "x", b: "y", c: 10 }.with_indifferent_access - # hash.except(:a, "b") # => {c: 10}.with_indifferent_access - # hash # => { a: "x", b: "y", c: 10 }.with_indifferent_access - # - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#311 - def without(*keys); end - - private - - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#395 - def convert_key(key); end - - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#399 - def convert_value(value, conversion: T.unsafe(nil)); end - - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#416 - def set_defaults(target); end - - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#424 - def update_with_single_argument(other_hash, block); end - - class << self - # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#85 - def [](*args); end - end -end - -# source://activesupport//lib/active_support/hash_with_indifferent_access.rb#342 -ActiveSupport::HashWithIndifferentAccess::NOT_GIVEN = T.let(T.unsafe(nil), Object) - -# = Active Support \Inflector -# -# The Inflector transforms words from singular to plural, class names to table -# names, modularized class names to ones without, and class names to foreign -# keys. The default inflections for pluralization, singularization, and -# uncountable words are kept in inflections.rb. -# -# The \Rails core team has stated patches for the inflections library will not -# be accepted in order to avoid breaking legacy applications which may be -# relying on errant inflections. If you discover an incorrect inflection and -# require it for your application or wish to define rules for languages other -# than English, please correct or add them yourself (explained below). -# -# source://activesupport//lib/active_support/inflector/inflections.rb#7 -module ActiveSupport::Inflector - extend ::ActiveSupport::Inflector - - # Converts strings to UpperCamelCase. - # If the +uppercase_first_letter+ parameter is set to false, then produces - # lowerCamelCase. - # - # Also converts '/' to '::' which is useful for converting - # paths to namespaces. - # - # camelize('active_model') # => "ActiveModel" - # camelize('active_model', false) # => "activeModel" - # camelize('active_model/errors') # => "ActiveModel::Errors" - # camelize('active_model/errors', false) # => "activeModel::Errors" - # - # As a rule of thumb you can think of +camelize+ as the inverse of - # #underscore, though there are cases where that does not hold: - # - # camelize(underscore('SSLError')) # => "SslError" - # - # source://activesupport//lib/active_support/inflector/methods.rb#70 - def camelize(term, uppercase_first_letter = T.unsafe(nil)); end - - # Creates a class name from a plural table name like \Rails does for table - # names to models. Note that this returns a string and not a Class. (To - # convert to an actual class follow +classify+ with #constantize.) - # - # classify('ham_and_eggs') # => "HamAndEgg" - # classify('posts') # => "Post" - # - # Singular names are not handled correctly: - # - # classify('calculus') # => "Calculu" - # - # source://activesupport//lib/active_support/inflector/methods.rb#218 - def classify(table_name); end - - # Tries to find a constant with the name specified in the argument string. - # - # constantize('Module') # => Module - # constantize('Foo::Bar') # => Foo::Bar - # - # The name is assumed to be the one of a top-level constant, no matter - # whether it starts with "::" or not. No lexical context is taken into - # account: - # - # C = 'outside' - # module M - # C = 'inside' - # C # => 'inside' - # constantize('C') # => 'outside', same as ::C - # end - # - # NameError is raised when the name is not in CamelCase or the constant is - # unknown. - # - # source://activesupport//lib/active_support/inflector/methods.rb#289 - def constantize(camel_cased_word); end - - # Replaces underscores with dashes in the string. - # - # dasherize('puni_puni') # => "puni-puni" - # - # source://activesupport//lib/active_support/inflector/methods.rb#226 - def dasherize(underscored_word); end - - # Removes the rightmost segment from the constant expression in the string. - # - # deconstantize('Net::HTTP') # => "Net" - # deconstantize('::Net::HTTP') # => "::Net" - # deconstantize('String') # => "" - # deconstantize('::String') # => "" - # deconstantize('') # => "" - # - # See also #demodulize. - # - # source://activesupport//lib/active_support/inflector/methods.rb#256 - def deconstantize(path); end - - # Removes the module part from the expression in the string. - # - # demodulize('ActiveSupport::Inflector::Inflections') # => "Inflections" - # demodulize('Inflections') # => "Inflections" - # demodulize('::Inflections') # => "Inflections" - # demodulize('') # => "" - # - # See also #deconstantize. - # - # source://activesupport//lib/active_support/inflector/methods.rb#238 - def demodulize(path); end - - # Converts the first character in the string to lowercase. - # - # downcase_first('If they enjoyed The Matrix') # => "if they enjoyed The Matrix" - # downcase_first('I') # => "i" - # downcase_first('') # => "" - # - # source://activesupport//lib/active_support/inflector/methods.rb#175 - def downcase_first(string); end - - # Creates a foreign key name from a class name. - # +separate_class_name_and_id_with_underscore+ sets whether - # the method should put '_' between the name and 'id'. - # - # foreign_key('Message') # => "message_id" - # foreign_key('Message', false) # => "messageid" - # foreign_key('Admin::Post') # => "post_id" - # - # source://activesupport//lib/active_support/inflector/methods.rb#267 - def foreign_key(class_name, separate_class_name_and_id_with_underscore = T.unsafe(nil)); end - - # Tweaks an attribute name for display to end users. - # - # Specifically, performs these transformations: - # - # * Applies human inflection rules to the argument. - # * Deletes leading underscores, if any. - # * Removes an "_id" suffix if present. - # * Replaces underscores with spaces, if any. - # * Downcases all words except acronyms. - # * Capitalizes the first word. - # The capitalization of the first word can be turned off by setting the - # +:capitalize+ option to false (default is true). - # - # The trailing '_id' can be kept and capitalized by setting the - # optional parameter +keep_id_suffix+ to true (default is false). - # - # humanize('employee_salary') # => "Employee salary" - # humanize('author_id') # => "Author" - # humanize('author_id', capitalize: false) # => "author" - # humanize('_id') # => "Id" - # humanize('author_id', keep_id_suffix: true) # => "Author id" - # - # If "SSL" was defined to be an acronym: - # - # humanize('ssl_error') # => "SSL error" - # - # source://activesupport//lib/active_support/inflector/methods.rb#135 - def humanize(lower_case_and_underscored_word, capitalize: T.unsafe(nil), keep_id_suffix: T.unsafe(nil)); end - - # Yields a singleton instance of Inflector::Inflections so you can specify - # additional inflector rules. If passed an optional locale, rules for other - # languages can be specified. If not specified, defaults to :en. - # Only rules for English are provided. - # - # ActiveSupport::Inflector.inflections(:en) do |inflect| - # inflect.uncountable 'rails' - # end - # - # source://activesupport//lib/active_support/inflector/inflections.rb#265 - def inflections(locale = T.unsafe(nil)); end - - # Returns the suffix that should be added to a number to denote the position - # in an ordered sequence such as 1st, 2nd, 3rd, 4th. - # - # ordinal(1) # => "st" - # ordinal(2) # => "nd" - # ordinal(1002) # => "nd" - # ordinal(1003) # => "rd" - # ordinal(-11) # => "th" - # ordinal(-1021) # => "st" - # - # source://activesupport//lib/active_support/inflector/methods.rb#334 - def ordinal(number); end - - # Turns a number into an ordinal string used to denote the position in an - # ordered sequence such as 1st, 2nd, 3rd, 4th. - # - # ordinalize(1) # => "1st" - # ordinalize(2) # => "2nd" - # ordinalize(1002) # => "1002nd" - # ordinalize(1003) # => "1003rd" - # ordinalize(-11) # => "-11th" - # ordinalize(-1021) # => "-1021st" - # - # source://activesupport//lib/active_support/inflector/methods.rb#347 - def ordinalize(number); end - - # Replaces special characters in a string so that it may be used as part of - # a 'pretty' URL. - # - # parameterize("Donald E. Knuth") # => "donald-e-knuth" - # parameterize("^très|Jolie-- ") # => "tres-jolie" - # - # To use a custom separator, override the +separator+ argument. - # - # parameterize("Donald E. Knuth", separator: '_') # => "donald_e_knuth" - # parameterize("^très|Jolie__ ", separator: '_') # => "tres_jolie" - # - # To preserve the case of the characters in a string, use the +preserve_case+ argument. - # - # parameterize("Donald E. Knuth", preserve_case: true) # => "Donald-E-Knuth" - # parameterize("^très|Jolie-- ", preserve_case: true) # => "tres-Jolie" - # - # It preserves dashes and underscores unless they are used as separators: - # - # parameterize("^très|Jolie__ ") # => "tres-jolie__" - # parameterize("^très|Jolie-- ", separator: "_") # => "tres_jolie--" - # parameterize("^très_Jolie-- ", separator: ".") # => "tres_jolie--" - # - # If the optional parameter +locale+ is specified, - # the word will be parameterized as a word of that language. - # By default, this parameter is set to nil and it will use - # the configured I18n.locale. - # - # source://activesupport//lib/active_support/inflector/transliterate.rb#123 - def parameterize(string, separator: T.unsafe(nil), preserve_case: T.unsafe(nil), locale: T.unsafe(nil)); end - - # Returns the plural form of the word in the string. - # - # If passed an optional +locale+ parameter, the word will be - # pluralized using rules defined for that language. By default, - # this parameter is set to :en. - # - # pluralize('post') # => "posts" - # pluralize('octopus') # => "octopi" - # pluralize('sheep') # => "sheep" - # pluralize('words') # => "words" - # pluralize('CamelOctopus') # => "CamelOctopi" - # pluralize('ley', :es) # => "leyes" - # - # source://activesupport//lib/active_support/inflector/methods.rb#33 - def pluralize(word, locale = T.unsafe(nil)); end - - # Tries to find a constant with the name specified in the argument string. - # - # safe_constantize('Module') # => Module - # safe_constantize('Foo::Bar') # => Foo::Bar - # - # The name is assumed to be the one of a top-level constant, no matter - # whether it starts with "::" or not. No lexical context is taken into - # account: - # - # C = 'outside' - # module M - # C = 'inside' - # C # => 'inside' - # safe_constantize('C') # => 'outside', same as ::C - # end - # - # +nil+ is returned when the name is not in CamelCase or the constant (or - # part of it) is unknown. - # - # safe_constantize('blargle') # => nil - # safe_constantize('UnknownModule') # => nil - # safe_constantize('UnknownModule::Foo::Bar') # => nil - # - # source://activesupport//lib/active_support/inflector/methods.rb#315 - def safe_constantize(camel_cased_word); end - - # The reverse of #pluralize, returns the singular form of a word in a - # string. - # - # If passed an optional +locale+ parameter, the word will be - # singularized using rules defined for that language. By default, - # this parameter is set to :en. - # - # singularize('posts') # => "post" - # singularize('octopi') # => "octopus" - # singularize('sheep') # => "sheep" - # singularize('word') # => "word" - # singularize('CamelOctopi') # => "CamelOctopus" - # singularize('leyes', :es) # => "ley" - # - # source://activesupport//lib/active_support/inflector/methods.rb#50 - def singularize(word, locale = T.unsafe(nil)); end - - # Creates the name of a table like \Rails does for models to table names. - # This method uses the #pluralize method on the last word in the string. - # - # tableize('RawScaledScorer') # => "raw_scaled_scorers" - # tableize('ham_and_egg') # => "ham_and_eggs" - # tableize('fancyCategory') # => "fancy_categories" - # - # source://activesupport//lib/active_support/inflector/methods.rb#204 - def tableize(class_name); end - - # Capitalizes all the words and replaces some characters in the string to - # create a nicer looking title. +titleize+ is meant for creating pretty - # output. It is not used in the \Rails internals. - # - # The trailing '_id','Id'.. can be kept and capitalized by setting the - # optional parameter +keep_id_suffix+ to true. - # By default, this parameter is false. - # - # titleize('man from the boondocks') # => "Man From The Boondocks" - # titleize('x-men: the last stand') # => "X Men: The Last Stand" - # titleize('TheManWithoutAPast') # => "The Man Without A Past" - # titleize('raiders_of_the_lost_ark') # => "Raiders Of The Lost Ark" - # titleize('string_ending_with_id', keep_id_suffix: true) # => "String Ending With Id" - # - # source://activesupport//lib/active_support/inflector/methods.rb#192 - def titleize(word, keep_id_suffix: T.unsafe(nil)); end - - # Replaces non-ASCII characters with an ASCII approximation, or if none - # exists, a replacement character which defaults to "?". - # - # transliterate('Ærøskøbing') - # # => "AEroskobing" - # - # Default approximations are provided for Western/Latin characters, - # e.g, "ø", "ñ", "é", "ß", etc. - # - # This method is I18n aware, so you can set up custom approximations for a - # locale. This can be useful, for example, to transliterate German's "ü" - # and "ö" to "ue" and "oe", or to add support for transliterating Russian - # to ASCII. - # - # In order to make your custom transliterations available, you must set - # them as the i18n.transliterate.rule i18n key: - # - # # Store the transliterations in locales/de.yml - # i18n: - # transliterate: - # rule: - # ü: "ue" - # ö: "oe" - # - # # Or set them using Ruby - # I18n.backend.store_translations(:de, i18n: { - # transliterate: { - # rule: { - # 'ü' => 'ue', - # 'ö' => 'oe' - # } - # } - # }) - # - # The value for i18n.transliterate.rule can be a simple Hash that - # maps characters to ASCII approximations as shown above, or, for more - # complex requirements, a Proc: - # - # I18n.backend.store_translations(:de, i18n: { - # transliterate: { - # rule: ->(string) { MyTransliterator.transliterate(string) } - # } - # }) - # - # Now you can have different transliterations for each locale: - # - # transliterate('Jürgen', locale: :en) - # # => "Jurgen" - # - # transliterate('Jürgen', locale: :de) - # # => "Juergen" - # - # Transliteration is restricted to UTF-8, US-ASCII, and GB18030 strings. - # Other encodings will raise an ArgumentError. - # - # @raise [ArgumentError] - # - # source://activesupport//lib/active_support/inflector/transliterate.rb#64 - def transliterate(string, replacement = T.unsafe(nil), locale: T.unsafe(nil)); end - - # Makes an underscored, lowercase form from the expression in the string. - # - # Changes '::' to '/' to convert namespaces to paths. - # - # underscore('ActiveModel') # => "active_model" - # underscore('ActiveModel::Errors') # => "active_model/errors" - # - # As a rule of thumb you can think of +underscore+ as the inverse of - # #camelize, though there are cases where that does not hold: - # - # camelize(underscore('SSLError')) # => "SslError" - # - # source://activesupport//lib/active_support/inflector/methods.rb#99 - def underscore(camel_cased_word); end - - # Converts the first character in the string to uppercase. - # - # upcase_first('what a Lovely Day') # => "What a Lovely Day" - # upcase_first('w') # => "W" - # upcase_first('') # => "" - # - # source://activesupport//lib/active_support/inflector/methods.rb#166 - def upcase_first(string); end - - private - - # Applies inflection rules for +singularize+ and +pluralize+. - # - # If passed an optional +locale+ parameter, the uncountables will be - # found for that locale. - # - # apply_inflections('post', inflections.plurals, :en) # => "posts" - # apply_inflections('posts', inflections.singulars, :en) # => "post" - # - # source://activesupport//lib/active_support/inflector/methods.rb#376 - def apply_inflections(word, rules, locale = T.unsafe(nil)); end - - # Mounts a regular expression, returned as a string to ease interpolation, - # that will match part by part the given constant. - # - # const_regexp("Foo::Bar::Baz") # => "Foo(::Bar(::Baz)?)?" - # const_regexp("::") # => "::" - # - # source://activesupport//lib/active_support/inflector/methods.rb#357 - def const_regexp(camel_cased_word); end -end - -# source://activesupport//lib/active_support/inflector/transliterate.rb#8 -ActiveSupport::Inflector::ALLOWED_ENCODINGS_FOR_TRANSLITERATE = T.let(T.unsafe(nil), Array) - -# = Active Support \Inflections -# -# A singleton instance of this class is yielded by Inflector.inflections, -# which can then be used to specify additional inflection rules. If passed -# an optional locale, rules for other languages can be specified. The -# default locale is :en. Only rules for English are provided. -# -# ActiveSupport::Inflector.inflections(:en) do |inflect| -# inflect.plural /^(ox)$/i, '\1\2en' -# inflect.singular /^(ox)en/i, '\1' -# -# inflect.irregular 'cactus', 'cacti' -# -# inflect.uncountable 'equipment' -# end -# -# New rules are added at the top. So in the example above, the irregular -# rule for cactus will now be the first of the pluralization and -# singularization rules that is runs. This guarantees that your rules run -# before any of the rules that may already have been loaded. -# -# source://activesupport//lib/active_support/inflector/inflections.rb#30 -class ActiveSupport::Inflector::Inflections - # @return [Inflections] a new instance of Inflections - # - # source://activesupport//lib/active_support/inflector/inflections.rb#80 - def initialize; end - - # Specifies a new acronym. An acronym must be specified as it will appear - # in a camelized string. An underscore string that contains the acronym - # will retain the acronym when passed to +camelize+, +humanize+, or - # +titleize+. A camelized string that contains the acronym will maintain - # the acronym when titleized or humanized, and will convert the acronym - # into a non-delimited single lowercase word when passed to +underscore+. - # - # acronym 'HTML' - # titleize 'html' # => 'HTML' - # camelize 'html' # => 'HTML' - # underscore 'MyHTML' # => 'my_html' - # - # The acronym, however, must occur as a delimited unit and not be part of - # another word for conversions to recognize it: - # - # acronym 'HTTP' - # camelize 'my_http_delimited' # => 'MyHTTPDelimited' - # camelize 'https' # => 'Https', not 'HTTPs' - # underscore 'HTTPS' # => 'http_s', not 'https' - # - # acronym 'HTTPS' - # camelize 'https' # => 'HTTPS' - # underscore 'HTTPS' # => 'https' - # - # Note: Acronyms that are passed to +pluralize+ will no longer be - # recognized, since the acronym will not occur as a delimited unit in the - # pluralized result. To work around this, you must specify the pluralized - # form as an acronym as well: - # - # acronym 'API' - # camelize(pluralize('api')) # => 'Apis' - # - # acronym 'APIs' - # camelize(pluralize('api')) # => 'APIs' - # - # +acronym+ may be used to specify any word that contains an acronym or - # otherwise needs to maintain a non-standard capitalization. The only - # restriction is that the word must begin with a capital letter. - # - # acronym 'RESTful' - # underscore 'RESTful' # => 'restful' - # underscore 'RESTfulController' # => 'restful_controller' - # titleize 'RESTfulController' # => 'RESTful Controller' - # camelize 'restful' # => 'RESTful' - # camelize 'restful_controller' # => 'RESTfulController' - # - # acronym 'McDonald' - # underscore 'McDonald' # => 'mcdonald' - # camelize 'mcdonald' # => 'McDonald' - # - # source://activesupport//lib/active_support/inflector/inflections.rb#142 - def acronym(word); end - - # Returns the value of attribute acronyms. - # - # source://activesupport//lib/active_support/inflector/inflections.rb#76 - def acronyms; end - - # source://activesupport//lib/active_support/inflector/inflections.rb#78 - def acronyms_camelize_regex; end - - # source://activesupport//lib/active_support/inflector/inflections.rb#78 - def acronyms_underscore_regex; end - - # Clears the loaded inflections within a given scope (default is - # :all). Give the scope as a symbol of the inflection type, the - # options are: :plurals, :singulars, :uncountables, - # :humans, :acronyms. - # - # clear :all - # clear :plurals - # - # source://activesupport//lib/active_support/inflector/inflections.rb#231 - def clear(scope = T.unsafe(nil)); end - - # Specifies a humanized form of a string by a regular expression rule or - # by a string mapping. When using a regular expression based replacement, - # the normal humanize formatting is called after the replacement. When a - # string is used, the human form should be specified as desired (example: - # 'The name', not 'the_name'). - # - # human /_cnt$/i, '\1_count' - # human 'legacy_col_person_name', 'Name' - # - # source://activesupport//lib/active_support/inflector/inflections.rb#220 - def human(rule, replacement); end - - # Returns the value of attribute humans. - # - # source://activesupport//lib/active_support/inflector/inflections.rb#76 - def humans; end - - # Specifies a new irregular that applies to both pluralization and - # singularization at the same time. This can only be used for strings, not - # regular expressions. You simply pass the irregular in singular and - # plural form. - # - # irregular 'cactus', 'cacti' - # irregular 'person', 'people' - # - # source://activesupport//lib/active_support/inflector/inflections.rb#174 - def irregular(singular, plural); end - - # Specifies a new pluralization rule and its replacement. The rule can - # either be a string or a regular expression. The replacement should - # always be a string that may include references to the matched data from - # the rule. - # - # source://activesupport//lib/active_support/inflector/inflections.rb#151 - def plural(rule, replacement); end - - # Returns the value of attribute plurals. - # - # source://activesupport//lib/active_support/inflector/inflections.rb#76 - def plurals; end - - # Specifies a new singularization rule and its replacement. The rule can - # either be a string or a regular expression. The replacement should - # always be a string that may include references to the matched data from - # the rule. - # - # source://activesupport//lib/active_support/inflector/inflections.rb#161 - def singular(rule, replacement); end - - # Returns the value of attribute singulars. - # - # source://activesupport//lib/active_support/inflector/inflections.rb#76 - def singulars; end - - # Specifies words that are uncountable and should not be inflected. - # - # uncountable 'money' - # uncountable 'money', 'information' - # uncountable %w( money information rice ) - # - # source://activesupport//lib/active_support/inflector/inflections.rb#208 - def uncountable(*words); end - - # Returns the value of attribute uncountables. - # - # source://activesupport//lib/active_support/inflector/inflections.rb#76 - def uncountables; end - - private - - # source://activesupport//lib/active_support/inflector/inflections.rb#250 - def define_acronym_regex_patterns; end - - # Private, for the test suite. - # - # source://activesupport//lib/active_support/inflector/inflections.rb#86 - def initialize_dup(orig); end - - class << self - # source://activesupport//lib/active_support/inflector/inflections.rb#65 - def instance(locale = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/inflector/inflections.rb#69 - def instance_or_fallback(locale); end - end -end - -# source://activesupport//lib/active_support/inflector/inflections.rb#33 -class ActiveSupport::Inflector::Inflections::Uncountables < ::Array - # @return [Uncountables] a new instance of Uncountables - # - # source://activesupport//lib/active_support/inflector/inflections.rb#34 - def initialize; end - - # source://activesupport//lib/active_support/inflector/inflections.rb#44 - def <<(*word); end - - # source://activesupport//lib/active_support/inflector/inflections.rb#48 - def add(words); end - - # source://activesupport//lib/active_support/inflector/inflections.rb#39 - def delete(entry); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/inflector/inflections.rb#55 - def uncountable?(str); end - - private - - # source://activesupport//lib/active_support/inflector/inflections.rb#60 - def to_regex(string); end -end - -# = Inheritable Options -# -# +InheritableOptions+ provides a constructor to build an OrderedOptions -# hash inherited from another hash. -# -# Use this if you already have some hash and you want to create a new one based on it. -# -# h = ActiveSupport::InheritableOptions.new({ girl: 'Mary', boy: 'John' }) -# h.girl # => 'Mary' -# h.boy # => 'John' -# -# If the existing hash has string keys, call Hash#symbolize_keys on it. -# -# h = ActiveSupport::InheritableOptions.new({ 'girl' => 'Mary', 'boy' => 'John' }.symbolize_keys) -# h.girl # => 'Mary' -# h.boy # => 'John' -# -# source://activesupport//lib/active_support/ordered_options.rb#89 -class ActiveSupport::InheritableOptions < ::ActiveSupport::OrderedOptions - # @return [InheritableOptions] a new instance of InheritableOptions - # - # source://activesupport//lib/active_support/ordered_options.rb#90 - def initialize(parent = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/ordered_options.rb#107 - def ==(other); end - - # source://activesupport//lib/active_support/ordered_options.rb#142 - def each(&block); end - - # source://activesupport//lib/active_support/ordered_options.rb#134 - def inheritable_copy; end - - # source://activesupport//lib/active_support/ordered_options.rb#111 - def inspect; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/ordered_options.rb#126 - def key?(key); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/ordered_options.rb#130 - def overridden?(key); end - - # source://activesupport//lib/active_support/ordered_options.rb#119 - def pretty_print(pp); end - - # source://activesupport//lib/active_support/ordered_options.rb#138 - def to_a; end - - # source://activesupport//lib/active_support/ordered_options.rb#103 - def to_h; end - - # source://activesupport//lib/active_support/ordered_options.rb#115 - def to_s; end - - private - - def own_key?(_arg0); end -end - -# source://activesupport//lib/active_support/isolated_execution_state.rb#6 -module ActiveSupport::IsolatedExecutionState - class << self - # source://activesupport//lib/active_support/isolated_execution_state.rb#37 - def [](key); end - - # source://activesupport//lib/active_support/isolated_execution_state.rb#41 - def []=(key, value); end - - # source://activesupport//lib/active_support/isolated_execution_state.rb#53 - def clear; end - - # source://activesupport//lib/active_support/isolated_execution_state.rb#57 - def context; end - - # source://activesupport//lib/active_support/isolated_execution_state.rb#49 - def delete(key); end - - # Returns the value of attribute isolation_level. - # - # source://activesupport//lib/active_support/isolated_execution_state.rb#13 - def isolation_level; end - - # source://activesupport//lib/active_support/isolated_execution_state.rb#15 - def isolation_level=(level); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/isolated_execution_state.rb#45 - def key?(key); end - - # Returns the value of attribute scope. - # - # source://activesupport//lib/active_support/isolated_execution_state.rb#13 - def scope; end - - # source://activesupport//lib/active_support/isolated_execution_state.rb#61 - def share_with(other); end - - # source://activesupport//lib/active_support/isolated_execution_state.rb#33 - def unique_id; end - - private - - # source://activesupport//lib/active_support/isolated_execution_state.rb#69 - def state; end - end -end - -# source://activesupport//lib/active_support/json/decoding.rb#11 -module ActiveSupport::JSON - class << self - # Parses a JSON string (JavaScript Object Notation) into a hash. - # See http://www.json.org for more info. - # - # ActiveSupport::JSON.decode("{\"team\":\"rails\",\"players\":\"36\"}") - # => {"team" => "rails", "players" => "36"} - # - # source://activesupport//lib/active_support/json/decoding.rb#22 - def decode(json); end - - # source://activesupport//lib/active_support/json/encoding.rb#22 - def dump(value, options = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/json/encoding.rb#22 - def encode(value, options = T.unsafe(nil)); end - - # Parses a JSON string (JavaScript Object Notation) into a hash. - # See http://www.json.org for more info. - # - # ActiveSupport::JSON.decode("{\"team\":\"rails\",\"players\":\"36\"}") - # => {"team" => "rails", "players" => "36"} - # - # source://activesupport//lib/active_support/json/decoding.rb#22 - def load(json); end - - # Returns the class of the error that will be raised when there is an - # error in decoding JSON. Using this method means you won't directly - # depend on the ActiveSupport's JSON implementation, in case it changes - # in the future. - # - # begin - # obj = ActiveSupport::JSON.decode(some_string) - # rescue ActiveSupport::JSON.parse_error - # Rails.logger.warn("Attempted to decode invalid JSON: #{some_string}") - # end - # - # source://activesupport//lib/active_support/json/decoding.rb#43 - def parse_error; end - - private - - # source://activesupport//lib/active_support/json/decoding.rb#48 - def convert_dates_from(data); end - end -end - -# source://activesupport//lib/active_support/json/decoding.rb#14 -ActiveSupport::JSON::DATETIME_REGEX = T.let(T.unsafe(nil), Regexp) - -# matches YAML-formatted dates -# -# source://activesupport//lib/active_support/json/decoding.rb#13 -ActiveSupport::JSON::DATE_REGEX = T.let(T.unsafe(nil), Regexp) - -# source://activesupport//lib/active_support/json/encoding.rb#28 -module ActiveSupport::JSON::Encoding - class << self - # If true, encode >, <, & as escaped unicode sequences (e.g. > as \u003e) - # as a safety measure. - # - # source://activesupport//lib/active_support/json/encoding.rb#103 - def escape_html_entities_in_json; end - - # If true, encode >, <, & as escaped unicode sequences (e.g. > as \u003e) - # as a safety measure. - # - # source://activesupport//lib/active_support/json/encoding.rb#103 - def escape_html_entities_in_json=(_arg0); end - - # Sets the encoder used by \Rails to encode Ruby objects into JSON strings - # in +Object#to_json+ and +ActiveSupport::JSON.encode+. - # - # source://activesupport//lib/active_support/json/encoding.rb#111 - def json_encoder; end - - # Sets the encoder used by \Rails to encode Ruby objects into JSON strings - # in +Object#to_json+ and +ActiveSupport::JSON.encode+. - # - # source://activesupport//lib/active_support/json/encoding.rb#111 - def json_encoder=(_arg0); end - - # Sets the precision of encoded time values. - # Defaults to 3 (equivalent to millisecond precision) - # - # source://activesupport//lib/active_support/json/encoding.rb#107 - def time_precision; end - - # Sets the precision of encoded time values. - # Defaults to 3 (equivalent to millisecond precision) - # - # source://activesupport//lib/active_support/json/encoding.rb#107 - def time_precision=(_arg0); end - - # If true, use ISO 8601 format for dates and times. Otherwise, fall back - # to the Active Support legacy format. - # - # source://activesupport//lib/active_support/json/encoding.rb#99 - def use_standard_json_time_format; end - - # If true, use ISO 8601 format for dates and times. Otherwise, fall back - # to the Active Support legacy format. - # - # source://activesupport//lib/active_support/json/encoding.rb#99 - def use_standard_json_time_format=(_arg0); end - end -end - -# source://activesupport//lib/active_support/json/encoding.rb#29 -class ActiveSupport::JSON::Encoding::JSONGemEncoder - # @return [JSONGemEncoder] a new instance of JSONGemEncoder - # - # source://activesupport//lib/active_support/json/encoding.rb#32 - def initialize(options = T.unsafe(nil)); end - - # Encode the given object into a JSON string - # - # source://activesupport//lib/active_support/json/encoding.rb#37 - def encode(value); end - - # Returns the value of attribute options. - # - # source://activesupport//lib/active_support/json/encoding.rb#30 - def options; end - - private - - # Convert an object into a "JSON-ready" representation composed of - # primitives like Hash, Array, String, Symbol, Numeric, - # and +true+/+false+/+nil+. - # Recursively calls #as_json to the object to recursively build a - # fully JSON-ready object. - # - # This allows developers to implement #as_json without having to - # worry about what base types of objects they are allowed to return - # or having to remember to call #as_json recursively. - # - # Note: the +options+ hash passed to +object.to_json+ is only passed - # to +object.as_json+, not any of this method's recursive +#as_json+ - # calls. - # - # source://activesupport//lib/active_support/json/encoding.rb#70 - def jsonify(value); end - - # Encode a "jsonified" Ruby data structure using the JSON gem - # - # source://activesupport//lib/active_support/json/encoding.rb#91 - def stringify(jsonified); end -end - -# = Key Generator -# -# KeyGenerator is a simple wrapper around OpenSSL's implementation of PBKDF2. -# It can be used to derive a number of keys for various purposes from a given secret. -# This lets \Rails applications have a single secure secret, but avoid reusing that -# key in multiple incompatible contexts. -# -# source://activesupport//lib/active_support/key_generator.rb#13 -class ActiveSupport::KeyGenerator - # @return [KeyGenerator] a new instance of KeyGenerator - # - # source://activesupport//lib/active_support/key_generator.rb#28 - def initialize(secret, options = T.unsafe(nil)); end - - # Returns a derived key suitable for use. The default +key_size+ is chosen - # to be compatible with the default settings of ActiveSupport::MessageVerifier. - # i.e. OpenSSL::Digest::SHA1#block_length - # - # source://activesupport//lib/active_support/key_generator.rb#41 - def generate_key(salt, key_size = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/key_generator.rb#45 - def inspect; end - - class << self - # source://activesupport//lib/active_support/key_generator.rb#23 - def hash_digest_class; end - - # source://activesupport//lib/active_support/key_generator.rb#15 - def hash_digest_class=(klass); end - end -end - -# = Lazy Load Hooks -# -# LazyLoadHooks allows \Rails to lazily load a lot of components and thus -# making the app boot faster. Because of this feature now there is no need to -# require +ActiveRecord::Base+ at boot time purely to apply -# configuration. Instead a hook is registered that applies configuration once -# +ActiveRecord::Base+ is loaded. Here +ActiveRecord::Base+ is -# used as example but this feature can be applied elsewhere too. -# -# Here is an example where on_load method is called to register a hook. -# -# initializer 'active_record.initialize_timezone' do -# ActiveSupport.on_load(:active_record) do -# self.time_zone_aware_attributes = true -# self.default_timezone = :utc -# end -# end -# -# When the entirety of +ActiveRecord::Base+ has been -# evaluated then run_load_hooks is invoked. The very last line of -# +ActiveRecord::Base+ is: -# -# ActiveSupport.run_load_hooks(:active_record, ActiveRecord::Base) -# -# run_load_hooks will then execute all the hooks that were registered -# with the on_load method. In the case of the above example, it will -# execute the block of code that is in the +initializer+. -# -# Registering a hook that has already run results in that hook executing -# immediately. This allows hooks to be nested for code that relies on -# multiple lazily loaded components: -# -# initializer "action_text.renderer" do -# ActiveSupport.on_load(:action_controller_base) do -# ActiveSupport.on_load(:action_text_content) do -# self.default_renderer = Class.new(ActionController::Base).renderer -# end -# end -# end -# -# source://activesupport//lib/active_support/lazy_load_hooks.rb#43 -module ActiveSupport::LazyLoadHooks - # Declares a block that will be executed when a \Rails component is fully - # loaded. If the component has already loaded, the block is executed - # immediately. - # - # Options: - # - # * :yield - Yields the object that run_load_hooks to +block+. - # * :run_once - Given +block+ will run only once. - # - # source://activesupport//lib/active_support/lazy_load_hooks.rb#60 - def on_load(name, options = T.unsafe(nil), &block); end - - # Executes all blocks registered to +name+ via on_load, using +base+ as the - # evaluation context. - # - # ActiveSupport.run_load_hooks(:active_record, ActiveRecord::Base) - # - # In the case of the above example, it will execute all hooks registered - # for +:active_record+ within the class +ActiveRecord::Base+. - # - # source://activesupport//lib/active_support/lazy_load_hooks.rb#75 - def run_load_hooks(name, base = T.unsafe(nil)); end - - private - - # source://activesupport//lib/active_support/lazy_load_hooks.rb#91 - def execute_hook(name, base, options, block); end - - # source://activesupport//lib/active_support/lazy_load_hooks.rb#83 - def with_execution_control(name, block, once); end - - class << self - # source://activesupport//lib/active_support/lazy_load_hooks.rb#44 - def extended(base); end - end -end - -# = Active Support Log \Subscriber -# -# +ActiveSupport::LogSubscriber+ is an object set to consume -# ActiveSupport::Notifications with the sole purpose of logging them. -# The log subscriber dispatches notifications to a registered object based -# on its given namespace. -# -# An example would be Active Record log subscriber responsible for logging -# queries: -# -# module ActiveRecord -# class LogSubscriber < ActiveSupport::LogSubscriber -# attach_to :active_record -# -# def sql(event) -# info "#{event.payload[:name]} (#{event.duration}) #{event.payload[:sql]}" -# end -# end -# end -# -# ActiveRecord::LogSubscriber.logger must be set as well, but it is assigned -# automatically in a \Rails environment. -# -# After configured, whenever a "sql.active_record" notification is -# published, it will properly dispatch the event -# (ActiveSupport::Notifications::Event) to the +sql+ method. -# -# Being an ActiveSupport::Notifications consumer, -# +ActiveSupport::LogSubscriber+ exposes a simple interface to check if -# instrumented code raises an exception. It is common to log a different -# message in case of an error, and this can be achieved by extending -# the previous example: -# -# module ActiveRecord -# class LogSubscriber < ActiveSupport::LogSubscriber -# def sql(event) -# exception = event.payload[:exception] -# -# if exception -# exception_object = event.payload[:exception_object] -# -# error "[ERROR] #{event.payload[:name]}: #{exception.join(', ')} " \ -# "(#{exception_object.backtrace.first})" -# else -# # standard logger code -# end -# end -# end -# end -# -# +ActiveSupport::LogSubscriber+ also has some helpers to deal with -# logging. For example, ActiveSupport::LogSubscriber.flush_all! will ensure -# that all logs are flushed, and it is called in Rails::Rack::Logger after a -# request finishes. -# -# source://activesupport//lib/active_support/log_subscriber.rb#64 -class ActiveSupport::LogSubscriber < ::ActiveSupport::Subscriber - # @return [LogSubscriber] a new instance of LogSubscriber - # - # source://activesupport//lib/active_support/log_subscriber.rb#133 - def initialize; end - - # source://activesupport//lib/active_support/log_subscriber.rb#146 - def call(event); end - - # source://activesupport//lib/active_support/log_subscriber.rb#83 - def colorize_logging; end - - # source://activesupport//lib/active_support/log_subscriber.rb#83 - def colorize_logging=(val); end - - # source://activesupport//lib/active_support/log_subscriber.rb#163 - def debug(progname = T.unsafe(nil), &block); end - - # source://activesupport//lib/active_support/log_subscriber.rb#163 - def error(progname = T.unsafe(nil), &block); end - - # source://activesupport//lib/active_support/log_subscriber.rb#158 - def event_levels=(_arg0); end - - # source://activesupport//lib/active_support/log_subscriber.rb#163 - def fatal(progname = T.unsafe(nil), &block); end - - # source://activesupport//lib/active_support/log_subscriber.rb#163 - def info(progname = T.unsafe(nil), &block); end - - # source://activesupport//lib/active_support/log_subscriber.rb#138 - def logger; end - - # source://activesupport//lib/active_support/log_subscriber.rb#152 - def publish_event(event); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/log_subscriber.rb#142 - def silenced?(event); end - - # source://activesupport//lib/active_support/log_subscriber.rb#163 - def unknown(progname = T.unsafe(nil), &block); end - - # source://activesupport//lib/active_support/log_subscriber.rb#163 - def warn(progname = T.unsafe(nil), &block); end - - private - - # Set color by using a symbol or one of the defined constants. Set modes - # by specifying bold, italic, or underline options. Inspired by Highline, - # this method will automatically clear formatting at the end of the returned String. - # - # source://activesupport//lib/active_support/log_subscriber.rb#172 - def color(text, color, mode_options = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/log_subscriber.rb#186 - def log_exception(name, e); end - - # source://activesupport//lib/active_support/log_subscriber.rb#180 - def mode_from(options); end - - class << self - # source://activesupport//lib/active_support/log_subscriber.rb#99 - def attach_to(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/log_subscriber.rb#83 - def colorize_logging; end - - # source://activesupport//lib/active_support/log_subscriber.rb#83 - def colorize_logging=(val); end - - # Flush all log_subscribers' logger. - # - # source://activesupport//lib/active_support/log_subscriber.rb#112 - def flush_all!; end - - # source://activesupport//lib/active_support/log_subscriber.rb#84 - def log_levels; end - - # source://activesupport//lib/active_support/log_subscriber.rb#84 - def log_levels=(value); end - - # source://activesupport//lib/active_support/log_subscriber.rb#84 - def log_levels?; end - - # source://activesupport//lib/active_support/log_subscriber.rb#107 - def log_subscribers; end - - # source://activesupport//lib/active_support/log_subscriber.rb#93 - def logger; end - - # Sets the attribute logger - # - # @param value the value to set the attribute logger to. - # - # source://activesupport//lib/active_support/log_subscriber.rb#105 - def logger=(_arg0); end - - private - - # source://activesupport//lib/active_support/log_subscriber.rb#117 - def fetch_public_methods(subscriber, inherit_all); end - - # source://activesupport//lib/active_support/log_subscriber.rb#121 - def set_event_levels; end - - # source://activesupport//lib/active_support/log_subscriber.rb#127 - def subscribe_log_level(method, level); end - end -end - -# ANSI sequence colors -# -# source://activesupport//lib/active_support/log_subscriber.rb#74 -ActiveSupport::LogSubscriber::BLACK = T.let(T.unsafe(nil), String) - -# source://activesupport//lib/active_support/log_subscriber.rb#78 -ActiveSupport::LogSubscriber::BLUE = T.let(T.unsafe(nil), String) - -# source://activesupport//lib/active_support/log_subscriber.rb#80 -ActiveSupport::LogSubscriber::CYAN = T.let(T.unsafe(nil), String) - -# source://activesupport//lib/active_support/log_subscriber.rb#76 -ActiveSupport::LogSubscriber::GREEN = T.let(T.unsafe(nil), String) - -# source://activesupport//lib/active_support/log_subscriber.rb#86 -ActiveSupport::LogSubscriber::LEVEL_CHECKS = T.let(T.unsafe(nil), Hash) - -# source://activesupport//lib/active_support/log_subscriber.rb#79 -ActiveSupport::LogSubscriber::MAGENTA = T.let(T.unsafe(nil), String) - -# ANSI sequence modes -# -# source://activesupport//lib/active_support/log_subscriber.rb#66 -ActiveSupport::LogSubscriber::MODES = T.let(T.unsafe(nil), Hash) - -# source://activesupport//lib/active_support/log_subscriber.rb#75 -ActiveSupport::LogSubscriber::RED = T.let(T.unsafe(nil), String) - -# source://activesupport//lib/active_support/log_subscriber.rb#81 -ActiveSupport::LogSubscriber::WHITE = T.let(T.unsafe(nil), String) - -# source://activesupport//lib/active_support/log_subscriber.rb#77 -ActiveSupport::LogSubscriber::YELLOW = T.let(T.unsafe(nil), String) - -# source://activesupport//lib/active_support/logger.rb#8 -class ActiveSupport::Logger < ::Logger - include ::ActiveSupport::LoggerSilence - include ::ActiveSupport::LoggerThreadSafeLevel - - # @return [Logger] a new instance of Logger - # - # source://activesupport//lib/active_support/logger.rb#33 - def initialize(*args, **kwargs); end - - # source://activesupport//lib/active_support/logger_silence.rb#12 - def silencer; end - - # source://activesupport//lib/active_support/logger_silence.rb#12 - def silencer=(val); end - - class << self - # Returns true if the logger destination matches one of the sources - # - # logger = Logger.new(STDOUT) - # ActiveSupport::Logger.logger_outputs_to?(logger, STDOUT) - # # => true - # - # logger = Logger.new('/var/log/rails.log') - # ActiveSupport::Logger.logger_outputs_to?(logger, '/var/log/rails.log') - # # => true - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/logger.rb#20 - def logger_outputs_to?(logger, *sources); end - - # source://activesupport//lib/active_support/logger.rb#47 - def normalize_sources(sources); end - - # source://activesupport//lib/active_support/logger_silence.rb#12 - def silencer; end - - # source://activesupport//lib/active_support/logger_silence.rb#12 - def silencer=(val); end - end -end - -# Simple formatter which only displays the message. -# -# source://activesupport//lib/active_support/logger.rb#39 -class ActiveSupport::Logger::SimpleFormatter < ::Logger::Formatter - # This method is invoked when a log event occurs - # - # source://activesupport//lib/active_support/logger.rb#41 - def call(severity, timestamp, progname, msg); end -end - -# source://activesupport//lib/active_support/logger_silence.rb#8 -module ActiveSupport::LoggerSilence - extend ::ActiveSupport::Concern - include ::ActiveSupport::LoggerThreadSafeLevel - - # Silences the logger for the duration of the block. - # - # source://activesupport//lib/active_support/logger_silence.rb#17 - def silence(severity = T.unsafe(nil)); end -end - -# source://activesupport//lib/active_support/logger_thread_safe_level.rb#7 -module ActiveSupport::LoggerThreadSafeLevel - extend ::ActiveSupport::Concern - - # source://activesupport//lib/active_support/logger_thread_safe_level.rb#30 - def level; end - - # source://activesupport//lib/active_support/logger_thread_safe_level.rb#10 - def local_level; end - - # source://activesupport//lib/active_support/logger_thread_safe_level.rb#14 - def local_level=(level); end - - # Change the thread-local level for the duration of the given block. - # - # source://activesupport//lib/active_support/logger_thread_safe_level.rb#35 - def log_at(level); end - - private - - # source://activesupport//lib/active_support/logger_thread_safe_level.rb#43 - def local_level_key; end -end - -# = Active Support Message Encryptor -# -# MessageEncryptor is a simple way to encrypt values which get stored -# somewhere you don't trust. -# -# The cipher text and initialization vector are base64 encoded and returned -# to you. -# -# This can be used in situations similar to the MessageVerifier, but -# where you don't want users to be able to determine the value of the payload. -# -# len = ActiveSupport::MessageEncryptor.key_len -# salt = SecureRandom.random_bytes(len) -# key = ActiveSupport::KeyGenerator.new('password').generate_key(salt, len) # => "\x89\xE0\x156\xAC..." -# crypt = ActiveSupport::MessageEncryptor.new(key) # => # -# encrypted_data = crypt.encrypt_and_sign('my secret data') # => "NlFBTTMwOUV5UlA1QlNEN2xkY2d6eThYWWh..." -# crypt.decrypt_and_verify(encrypted_data) # => "my secret data" -# -# The +decrypt_and_verify+ method will raise an -# +ActiveSupport::MessageEncryptor::InvalidMessage+ exception if the data -# provided cannot be decrypted or verified. -# -# crypt.decrypt_and_verify('not encrypted data') # => ActiveSupport::MessageEncryptor::InvalidMessage -# -# === Confining messages to a specific purpose -# -# By default any message can be used throughout your app. But they can also be -# confined to a specific +:purpose+. -# -# token = crypt.encrypt_and_sign("this is the chair", purpose: :login) -# -# Then that same purpose must be passed when verifying to get the data back out: -# -# crypt.decrypt_and_verify(token, purpose: :login) # => "this is the chair" -# crypt.decrypt_and_verify(token, purpose: :shipping) # => nil -# crypt.decrypt_and_verify(token) # => nil -# -# Likewise, if a message has no purpose it won't be returned when verifying with -# a specific purpose. -# -# token = crypt.encrypt_and_sign("the conversation is lively") -# crypt.decrypt_and_verify(token, purpose: :scare_tactics) # => nil -# crypt.decrypt_and_verify(token) # => "the conversation is lively" -# -# === Making messages expire -# -# By default messages last forever and verifying one year from now will still -# return the original value. But messages can be set to expire at a given -# time with +:expires_in+ or +:expires_at+. -# -# crypt.encrypt_and_sign(parcel, expires_in: 1.month) -# crypt.encrypt_and_sign(doowad, expires_at: Time.now.end_of_year) -# -# Then the messages can be verified and returned up to the expire time. -# Thereafter, verifying returns +nil+. -# -# === Rotating keys -# -# MessageEncryptor also supports rotating out old configurations by falling -# back to a stack of encryptors. Call +rotate+ to build and add an encryptor -# so +decrypt_and_verify+ will also try the fallback. -# -# By default any rotated encryptors use the values of the primary -# encryptor unless specified otherwise. -# -# You'd give your encryptor the new defaults: -# -# crypt = ActiveSupport::MessageEncryptor.new(@secret, cipher: "aes-256-gcm") -# -# Then gradually rotate the old values out by adding them as fallbacks. Any message -# generated with the old values will then work until the rotation is removed. -# -# crypt.rotate old_secret # Fallback to an old secret instead of @secret. -# crypt.rotate cipher: "aes-256-cbc" # Fallback to an old cipher instead of aes-256-gcm. -# -# Though if both the secret and the cipher was changed at the same time, -# the above should be combined into: -# -# crypt.rotate old_secret, cipher: "aes-256-cbc" -# -# source://activesupport//lib/active_support/message_encryptor.rb#90 -class ActiveSupport::MessageEncryptor < ::ActiveSupport::Messages::Codec - include ::ActiveSupport::Messages::Rotator - - # Initialize a new MessageEncryptor. +secret+ must be at least as long as - # the cipher key size. For the default 'aes-256-gcm' cipher, this is 256 - # bits. If you are using a user-entered secret, you can generate a suitable - # key by using ActiveSupport::KeyGenerator or a similar key - # derivation function. - # - # The first additional parameter is used as the signature key for - # MessageVerifier. This allows you to specify keys to encrypt and sign - # data. Ignored when using an AEAD cipher like 'aes-256-gcm'. - # - # ActiveSupport::MessageEncryptor.new('secret', 'signature_secret') - # - # ==== Options - # - # [+:cipher+] - # Cipher to use. Can be any cipher returned by +OpenSSL::Cipher.ciphers+. - # Default is 'aes-256-gcm'. - # - # [+:digest+] - # Digest used for signing. Ignored when using an AEAD cipher like - # 'aes-256-gcm'. - # - # [+:serializer+] - # The serializer used to serialize message data. You can specify any - # object that responds to +dump+ and +load+, or you can choose from - # several preconfigured serializers: +:marshal+, +:json_allow_marshal+, - # +:json+, +:message_pack_allow_marshal+, +:message_pack+. - # - # The preconfigured serializers include a fallback mechanism to support - # multiple deserialization formats. For example, the +:marshal+ serializer - # will serialize using +Marshal+, but can deserialize using +Marshal+, - # ActiveSupport::JSON, or ActiveSupport::MessagePack. This makes it easy - # to migrate between serializers. - # - # The +:marshal+, +:json_allow_marshal+, and +:message_pack_allow_marshal+ - # serializers support deserializing using +Marshal+, but the others do - # not. Beware that +Marshal+ is a potential vector for deserialization - # attacks in cases where a message signing secret has been leaked. If - # possible, choose a serializer that does not support +Marshal+. - # - # The +:message_pack+ and +:message_pack_allow_marshal+ serializers use - # ActiveSupport::MessagePack, which can roundtrip some Ruby types that are - # not supported by JSON, and may provide improved performance. However, - # these require the +msgpack+ gem. - # - # When using \Rails, the default depends on +config.active_support.message_serializer+. - # Otherwise, the default is +:marshal+. - # - # [+:url_safe+] - # By default, MessageEncryptor generates RFC 4648 compliant strings - # which are not URL-safe. In other words, they can contain "+" and "/". - # If you want to generate URL-safe strings (in compliance with "Base 64 - # Encoding with URL and Filename Safe Alphabet" in RFC 4648), you can - # pass +true+. - # - # [+:force_legacy_metadata_serializer+] - # Whether to use the legacy metadata serializer, which serializes the - # message first, then wraps it in an envelope which is also serialized. This - # was the default in \Rails 7.0 and below. - # - # If you don't pass a truthy value, the default is set using - # +config.active_support.use_message_serializer_for_metadata+. - # - # @return [MessageEncryptor] a new instance of MessageEncryptor - # - # source://activesupport//lib/active_support/messages/rotator.rb#6 - def initialize(*args, on_rotation: T.unsafe(nil), **options); end - - # source://activesupport//lib/active_support/message_encryptor.rb#256 - def create_message(value, **options); end - - # Decrypt and verify a message. We need to verify the message in order to - # avoid padding attacks. Reference: https://www.limited-entropy.com/padding-oracle-attacks/. - # - # ==== Options - # - # [+:purpose+] - # The purpose that the message was generated with. If the purpose does not - # match, +decrypt_and_verify+ will return +nil+. - # - # message = encryptor.encrypt_and_sign("hello", purpose: "greeting") - # encryptor.decrypt_and_verify(message, purpose: "greeting") # => "hello" - # encryptor.decrypt_and_verify(message) # => nil - # - # message = encryptor.encrypt_and_sign("bye") - # encryptor.decrypt_and_verify(message) # => "bye" - # encryptor.decrypt_and_verify(message, purpose: "greeting") # => nil - # - # source://activesupport//lib/active_support/message_encryptor.rb#241 - def decrypt_and_verify(message, **options); end - - # Encrypt and sign a message. We need to sign the message in order to avoid - # padding attacks. Reference: https://www.limited-entropy.com/padding-oracle-attacks/. - # - # ==== Options - # - # [+:expires_at+] - # The datetime at which the message expires. After this datetime, - # verification of the message will fail. - # - # message = encryptor.encrypt_and_sign("hello", expires_at: Time.now.tomorrow) - # encryptor.decrypt_and_verify(message) # => "hello" - # # 24 hours later... - # encryptor.decrypt_and_verify(message) # => nil - # - # [+:expires_in+] - # The duration for which the message is valid. After this duration has - # elapsed, verification of the message will fail. - # - # message = encryptor.encrypt_and_sign("hello", expires_in: 24.hours) - # encryptor.decrypt_and_verify(message) # => "hello" - # # 24 hours later... - # encryptor.decrypt_and_verify(message) # => nil - # - # [+:purpose+] - # The purpose of the message. If specified, the same purpose must be - # specified when verifying the message; otherwise, verification will fail. - # (See #decrypt_and_verify.) - # - # source://activesupport//lib/active_support/message_encryptor.rb#220 - def encrypt_and_sign(value, **options); end - - # source://activesupport//lib/active_support/message_encryptor.rb#264 - def inspect; end - - # source://activesupport//lib/active_support/messages/rotator.rb#23 - def read_message(message, on_rotation: T.unsafe(nil), **options); end - - private - - # Returns the value of attribute aead_mode. - # - # source://activesupport//lib/active_support/message_encryptor.rb#371 - def aead_mode; end - - # Returns the value of attribute aead_mode. - # - # source://activesupport//lib/active_support/message_encryptor.rb#371 - def aead_mode?; end - - # source://activesupport//lib/active_support/message_encryptor.rb#295 - def decrypt(encrypted_message); end - - # source://activesupport//lib/active_support/message_encryptor.rb#277 - def encrypt(data); end - - # source://activesupport//lib/active_support/message_encryptor.rb#340 - def extract_part(encrypted_message, rindex, length); end - - # source://activesupport//lib/active_support/message_encryptor.rb#350 - def extract_parts(encrypted_message); end - - # source://activesupport//lib/active_support/message_encryptor.rb#336 - def join_parts(parts); end - - # source://activesupport//lib/active_support/message_encryptor.rb#320 - def length_after_encode(length_before_encode); end - - # source://activesupport//lib/active_support/message_encryptor.rb#332 - def length_of_encoded_auth_tag; end - - # source://activesupport//lib/active_support/message_encryptor.rb#328 - def length_of_encoded_iv; end - - # source://activesupport//lib/active_support/message_encryptor.rb#367 - def new_cipher; end - - # source://activesupport//lib/active_support/message_encryptor.rb#269 - def sign(data); end - - # source://activesupport//lib/active_support/message_encryptor.rb#273 - def verify(data); end - - class << self - # source://activesupport//lib/active_support/message_encryptor.rb#96 - def default_cipher; end - - # Given a cipher, returns the key length of the cipher to help generate the key of desired size - # - # source://activesupport//lib/active_support/message_encryptor.rb#252 - def key_len(cipher = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/message_encryptor.rb#93 - def use_authenticated_message_encryption; end - - # source://activesupport//lib/active_support/message_encryptor.rb#93 - def use_authenticated_message_encryption=(val); end - end -end - -# source://activesupport//lib/active_support/message_encryptor.rb#118 -ActiveSupport::MessageEncryptor::AUTH_TAG_LENGTH = T.let(T.unsafe(nil), Integer) - -# source://activesupport//lib/active_support/message_encryptor.rb#115 -class ActiveSupport::MessageEncryptor::InvalidMessage < ::StandardError; end - -# source://activesupport//lib/active_support/message_encryptor.rb#105 -module ActiveSupport::MessageEncryptor::NullSerializer - class << self - # source://activesupport//lib/active_support/message_encryptor.rb#110 - def dump(value); end - - # source://activesupport//lib/active_support/message_encryptor.rb#106 - def load(value); end - end -end - -# source://activesupport//lib/active_support/message_encryptor.rb#116 -ActiveSupport::MessageEncryptor::OpenSSLCipherError = OpenSSL::Cipher::CipherError - -# source://activesupport//lib/active_support/message_encryptor.rb#119 -ActiveSupport::MessageEncryptor::SEPARATOR = T.let(T.unsafe(nil), String) - -# source://activesupport//lib/active_support/message_encryptors.rb#6 -class ActiveSupport::MessageEncryptors < ::ActiveSupport::Messages::RotationCoordinator - private - - # source://activesupport//lib/active_support/message_encryptors.rb#135 - def build(salt, secret_generator:, secret_generator_options:, **options); end -end - -# = Active Support Message Verifier -# -# +MessageVerifier+ makes it easy to generate and verify messages which are -# signed to prevent tampering. -# -# In a \Rails application, you can use +Rails.application.message_verifier+ -# to manage unique instances of verifiers for each use case. -# {Learn more}[link:classes/Rails/Application.html#method-i-message_verifier]. -# -# This is useful for cases like remember-me tokens and auto-unsubscribe links -# where the session store isn't suitable or available. -# -# First, generate a signed message: -# cookies[:remember_me] = Rails.application.message_verifier(:remember_me).generate([@user.id, 2.weeks.from_now]) -# -# Later verify that message: -# -# id, time = Rails.application.message_verifier(:remember_me).verify(cookies[:remember_me]) -# if time.future? -# self.current_user = User.find(id) -# end -# -# === Signing is not encryption -# -# The signed messages are not encrypted. The payload is merely encoded (Base64 by default) and can be decoded by -# anyone. The signature is just assuring that the message wasn't tampered with. For example: -# -# message = Rails.application.message_verifier('my_purpose').generate('never put secrets here') -# # => "BAhJIhtuZXZlciBwdXQgc2VjcmV0cyBoZXJlBjoGRVQ=--a0c1c0827919da5e949e989c971249355735e140" -# Base64.decode64(message.split("--").first) # no key needed -# # => 'never put secrets here' -# -# If you also need to encrypt the contents, you must use ActiveSupport::MessageEncryptor instead. -# -# === Confine messages to a specific purpose -# -# It's not recommended to use the same verifier for different purposes in your application. -# Doing so could allow a malicious actor to re-use a signed message to perform an unauthorized -# action. -# You can reduce this risk by confining signed messages to a specific +:purpose+. -# -# token = @verifier.generate("signed message", purpose: :login) -# -# Then that same purpose must be passed when verifying to get the data back out: -# -# @verifier.verified(token, purpose: :login) # => "signed message" -# @verifier.verified(token, purpose: :shipping) # => nil -# @verifier.verified(token) # => nil -# -# @verifier.verify(token, purpose: :login) # => "signed message" -# @verifier.verify(token, purpose: :shipping) # => raises ActiveSupport::MessageVerifier::InvalidSignature -# @verifier.verify(token) # => raises ActiveSupport::MessageVerifier::InvalidSignature -# -# Likewise, if a message has no purpose it won't be returned when verifying with -# a specific purpose. -# -# token = @verifier.generate("signed message") -# @verifier.verified(token, purpose: :redirect) # => nil -# @verifier.verified(token) # => "signed message" -# -# @verifier.verify(token, purpose: :redirect) # => raises ActiveSupport::MessageVerifier::InvalidSignature -# @verifier.verify(token) # => "signed message" -# -# === Expiring messages -# -# By default messages last forever and verifying one year from now will still -# return the original value. But messages can be set to expire at a given -# time with +:expires_in+ or +:expires_at+. -# -# @verifier.generate("signed message", expires_in: 1.month) -# @verifier.generate("signed message", expires_at: Time.now.end_of_year) -# -# Messages can then be verified and returned until expiry. -# Thereafter, the +verified+ method returns +nil+ while +verify+ raises -# +ActiveSupport::MessageVerifier::InvalidSignature+. -# -# === Rotating keys -# -# MessageVerifier also supports rotating out old configurations by falling -# back to a stack of verifiers. Call +rotate+ to build and add a verifier so -# either +verified+ or +verify+ will also try verifying with the fallback. -# -# By default any rotated verifiers use the values of the primary -# verifier unless specified otherwise. -# -# You'd give your verifier the new defaults: -# -# verifier = ActiveSupport::MessageVerifier.new(@secret, digest: "SHA512", serializer: JSON) -# -# Then gradually rotate the old values out by adding them as fallbacks. Any message -# generated with the old values will then work until the rotation is removed. -# -# verifier.rotate(old_secret) # Fallback to an old secret instead of @secret. -# verifier.rotate(digest: "SHA256") # Fallback to an old digest instead of SHA512. -# verifier.rotate(serializer: Marshal) # Fallback to an old serializer instead of JSON. -# -# Though the above would most likely be combined into one rotation: -# -# verifier.rotate(old_secret, digest: "SHA256", serializer: Marshal) -# -# source://activesupport//lib/active_support/message_verifier.rb#110 -class ActiveSupport::MessageVerifier < ::ActiveSupport::Messages::Codec - include ::ActiveSupport::Messages::Rotator - - # Initialize a new MessageVerifier with a secret for the signature. - # - # ==== Options - # - # [+:digest+] - # Digest used for signing. The default is "SHA1". See - # +OpenSSL::Digest+ for alternatives. - # - # [+:serializer+] - # The serializer used to serialize message data. You can specify any - # object that responds to +dump+ and +load+, or you can choose from - # several preconfigured serializers: +:marshal+, +:json_allow_marshal+, - # +:json+, +:message_pack_allow_marshal+, +:message_pack+. - # - # The preconfigured serializers include a fallback mechanism to support - # multiple deserialization formats. For example, the +:marshal+ serializer - # will serialize using +Marshal+, but can deserialize using +Marshal+, - # ActiveSupport::JSON, or ActiveSupport::MessagePack. This makes it easy - # to migrate between serializers. - # - # The +:marshal+, +:json_allow_marshal+, and +:message_pack_allow_marshal+ - # serializers support deserializing using +Marshal+, but the others do - # not. Beware that +Marshal+ is a potential vector for deserialization - # attacks in cases where a message signing secret has been leaked. If - # possible, choose a serializer that does not support +Marshal+. - # - # The +:message_pack+ and +:message_pack_allow_marshal+ serializers use - # ActiveSupport::MessagePack, which can roundtrip some Ruby types that are - # not supported by JSON, and may provide improved performance. However, - # these require the +msgpack+ gem. - # - # When using \Rails, the default depends on +config.active_support.message_serializer+. - # Otherwise, the default is +:marshal+. - # - # [+:url_safe+] - # By default, MessageVerifier generates RFC 4648 compliant strings which are - # not URL-safe. In other words, they can contain "+" and "/". If you want to - # generate URL-safe strings (in compliance with "Base 64 Encoding with URL - # and Filename Safe Alphabet" in RFC 4648), you can pass +true+. - # - # [+:force_legacy_metadata_serializer+] - # Whether to use the legacy metadata serializer, which serializes the - # message first, then wraps it in an envelope which is also serialized. This - # was the default in \Rails 7.0 and below. - # - # If you don't pass a truthy value, the default is set using - # +config.active_support.use_message_serializer_for_metadata+. - # - # @raise [ArgumentError] - # @return [MessageVerifier] a new instance of MessageVerifier - # - # source://activesupport//lib/active_support/messages/rotator.rb#6 - def initialize(*args, on_rotation: T.unsafe(nil), **options); end - - # source://activesupport//lib/active_support/message_verifier.rb#308 - def create_message(value, **options); end - - # Generates a signed message for the provided value. - # - # The message is signed with the +MessageVerifier+'s secret. - # Returns Base64-encoded message joined with the generated signature. - # - # verifier = ActiveSupport::MessageVerifier.new("secret") - # verifier.generate("signed message") # => "BAhJIhNzaWduZWQgbWVzc2FnZQY6BkVU--f67d5f27c3ee0b8483cebf2103757455e947493b" - # - # ==== Options - # - # [+:expires_at+] - # The datetime at which the message expires. After this datetime, - # verification of the message will fail. - # - # message = verifier.generate("hello", expires_at: Time.now.tomorrow) - # verifier.verified(message) # => "hello" - # # 24 hours later... - # verifier.verified(message) # => nil - # verifier.verify(message) # => raises ActiveSupport::MessageVerifier::InvalidSignature - # - # [+:expires_in+] - # The duration for which the message is valid. After this duration has - # elapsed, verification of the message will fail. - # - # message = verifier.generate("hello", expires_in: 24.hours) - # verifier.verified(message) # => "hello" - # # 24 hours later... - # verifier.verified(message) # => nil - # verifier.verify(message) # => raises ActiveSupport::MessageVerifier::InvalidSignature - # - # [+:purpose+] - # The purpose of the message. If specified, the same purpose must be - # specified when verifying the message; otherwise, verification will fail. - # (See #verified and #verify.) - # - # source://activesupport//lib/active_support/message_verifier.rb#304 - def generate(value, **options); end - - # source://activesupport//lib/active_support/message_verifier.rb#316 - def inspect; end - - # source://activesupport//lib/active_support/messages/rotator.rb#23 - def read_message(message, on_rotation: T.unsafe(nil), **options); end - - # Checks if a signed message could have been generated by signing an object - # with the +MessageVerifier+'s secret. - # - # verifier = ActiveSupport::MessageVerifier.new("secret") - # signed_message = verifier.generate("signed message") - # verifier.valid_message?(signed_message) # => true - # - # tampered_message = signed_message.chop # editing the message invalidates the signature - # verifier.valid_message?(tampered_message) # => false - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/message_verifier.rb#181 - def valid_message?(message); end - - # Decodes the signed message using the +MessageVerifier+'s secret. - # - # verifier = ActiveSupport::MessageVerifier.new("secret") - # - # signed_message = verifier.generate("signed message") - # verifier.verified(signed_message) # => "signed message" - # - # Returns +nil+ if the message was not signed with the same secret. - # - # other_verifier = ActiveSupport::MessageVerifier.new("different_secret") - # other_verifier.verified(signed_message) # => nil - # - # Returns +nil+ if the message is not Base64-encoded. - # - # invalid_message = "f--46a0120593880c733a53b6dad75b42ddc1c8996d" - # verifier.verified(invalid_message) # => nil - # - # Raises any error raised while decoding the signed message. - # - # incompatible_message = "test--dad7b06c94abba8d46a15fafaef56c327665d5ff" - # verifier.verified(incompatible_message) # => TypeError: incompatible marshal file format - # - # ==== Options - # - # [+:purpose+] - # The purpose that the message was generated with. If the purpose does not - # match, +verified+ will return +nil+. - # - # message = verifier.generate("hello", purpose: "greeting") - # verifier.verified(message, purpose: "greeting") # => "hello" - # verifier.verified(message, purpose: "chatting") # => nil - # verifier.verified(message) # => nil - # - # message = verifier.generate("bye") - # verifier.verified(message) # => "bye" - # verifier.verified(message, purpose: "greeting") # => nil - # - # source://activesupport//lib/active_support/message_verifier.rb#222 - def verified(message, **options); end - - # Decodes the signed message using the +MessageVerifier+'s secret. - # - # verifier = ActiveSupport::MessageVerifier.new("secret") - # signed_message = verifier.generate("signed message") - # - # verifier.verify(signed_message) # => "signed message" - # - # Raises +InvalidSignature+ if the message was not signed with the same - # secret or was not Base64-encoded. - # - # other_verifier = ActiveSupport::MessageVerifier.new("different_secret") - # other_verifier.verify(signed_message) # => ActiveSupport::MessageVerifier::InvalidSignature - # - # ==== Options - # - # [+:purpose+] - # The purpose that the message was generated with. If the purpose does not - # match, +verify+ will raise ActiveSupport::MessageVerifier::InvalidSignature. - # - # message = verifier.generate("hello", purpose: "greeting") - # verifier.verify(message, purpose: "greeting") # => "hello" - # verifier.verify(message, purpose: "chatting") # => raises InvalidSignature - # verifier.verify(message) # => raises InvalidSignature - # - # message = verifier.generate("bye") - # verifier.verify(message) # => "bye" - # verifier.verify(message, purpose: "greeting") # => raises InvalidSignature - # - # source://activesupport//lib/active_support/message_verifier.rb#260 - def verify(message, **options); end - - private - - # source://activesupport//lib/active_support/message_verifier.rb#347 - def digest_length_in_hex; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/message_verifier.rb#364 - def digest_matches_data?(digest, data); end - - # source://activesupport//lib/active_support/message_verifier.rb#326 - def extract_encoded(signed); end - - # source://activesupport//lib/active_support/message_verifier.rb#343 - def generate_digest(data); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/message_verifier.rb#355 - def separator_at?(signed_message, index); end - - # source://activesupport//lib/active_support/message_verifier.rb#359 - def separator_index_for(signed_message); end - - # source://activesupport//lib/active_support/message_verifier.rb#321 - def sign_encoded(encoded); end -end - -# source://activesupport//lib/active_support/message_verifier.rb#113 -class ActiveSupport::MessageVerifier::InvalidSignature < ::StandardError; end - -# source://activesupport//lib/active_support/message_verifier.rb#115 -ActiveSupport::MessageVerifier::SEPARATOR = T.let(T.unsafe(nil), String) - -# source://activesupport//lib/active_support/message_verifier.rb#116 -ActiveSupport::MessageVerifier::SEPARATOR_LENGTH = T.let(T.unsafe(nil), Integer) - -# source://activesupport//lib/active_support/message_verifiers.rb#6 -class ActiveSupport::MessageVerifiers < ::ActiveSupport::Messages::RotationCoordinator - private - - # source://activesupport//lib/active_support/message_verifiers.rb#131 - def build(salt, secret_generator:, secret_generator_options:, **options); end -end - -# source://activesupport//lib/active_support/messages/rotator.rb#4 -module ActiveSupport::Messages; end - -# source://activesupport//lib/active_support/messages/codec.rb#9 -class ActiveSupport::Messages::Codec - include ::ActiveSupport::Messages::Metadata - - # @return [Codec] a new instance of Codec - # - # source://activesupport//lib/active_support/messages/codec.rb#15 - def initialize(**options); end - - private - - # source://activesupport//lib/active_support/messages/codec.rb#45 - def catch_and_ignore(throwable, &block); end - - # source://activesupport//lib/active_support/messages/codec.rb#52 - def catch_and_raise(throwable, as: T.unsafe(nil), &block); end - - # source://activesupport//lib/active_support/messages/codec.rb#29 - def decode(encoded, url_safe: T.unsafe(nil)); end - - # source://activesupport//lib/active_support/messages/codec.rb#39 - def deserialize(serialized); end - - # source://activesupport//lib/active_support/messages/codec.rb#25 - def encode(data, url_safe: T.unsafe(nil)); end - - # source://activesupport//lib/active_support/messages/codec.rb#35 - def serialize(data); end - - # Returns the value of attribute serializer. - # - # source://activesupport//lib/active_support/messages/codec.rb#23 - def serializer; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/messages/codec.rb#60 - def use_message_serializer_for_metadata?; end - - class << self - # source://activesupport//lib/active_support/messages/codec.rb#12 - def default_serializer; end - - # source://activesupport//lib/active_support/messages/codec.rb#12 - def default_serializer=(value); end - end -end - -# source://activesupport//lib/active_support/messages/metadata.rb#9 -module ActiveSupport::Messages::Metadata - private - - # source://activesupport//lib/active_support/messages/metadata.rb#128 - def deserialize_from_json(serialized); end - - # source://activesupport//lib/active_support/messages/metadata.rb#141 - def deserialize_from_json_safe_string(string); end - - # source://activesupport//lib/active_support/messages/metadata.rb#43 - def deserialize_with_metadata(message, **expected_metadata); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/messages/metadata.rb#96 - def dual_serialized_metadata_envelope_json?(string); end - - # source://activesupport//lib/active_support/messages/metadata.rb#78 - def extract_from_metadata_envelope(envelope, purpose: T.unsafe(nil)); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/messages/metadata.rb#92 - def metadata_envelope?(object); end - - # source://activesupport//lib/active_support/messages/metadata.rb#114 - def parse_expiry(expires_at); end - - # source://activesupport//lib/active_support/messages/metadata.rb#100 - def pick_expiry(expires_at, expires_in); end - - # source://activesupport//lib/active_support/messages/metadata.rb#124 - def serialize_to_json(data); end - - # source://activesupport//lib/active_support/messages/metadata.rb#137 - def serialize_to_json_safe_string(data); end - - # source://activesupport//lib/active_support/messages/metadata.rb#30 - def serialize_with_metadata(data, **metadata); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/messages/metadata.rb#60 - def use_message_serializer_for_metadata?; end - - # source://activesupport//lib/active_support/messages/metadata.rb#64 - def wrap_in_metadata_envelope(hash, expires_at: T.unsafe(nil), expires_in: T.unsafe(nil), purpose: T.unsafe(nil)); end - - # source://activesupport//lib/active_support/messages/metadata.rb#71 - def wrap_in_metadata_legacy_envelope(hash, expires_at: T.unsafe(nil), expires_in: T.unsafe(nil), purpose: T.unsafe(nil)); end - - class << self - # source://activesupport//lib/active_support/messages/metadata.rb#10 - def use_message_serializer_for_metadata; end - - # source://activesupport//lib/active_support/messages/metadata.rb#10 - def use_message_serializer_for_metadata=(_arg0); end - end -end - -# source://activesupport//lib/active_support/messages/metadata.rb#12 -ActiveSupport::Messages::Metadata::ENVELOPE_SERIALIZERS = T.let(T.unsafe(nil), Array) - -# source://activesupport//lib/active_support/messages/metadata.rb#19 -ActiveSupport::Messages::Metadata::TIMESTAMP_SERIALIZERS = T.let(T.unsafe(nil), Array) - -# source://activesupport//lib/active_support/messages/rotation_coordinator.rb#7 -class ActiveSupport::Messages::RotationCoordinator - # @raise [ArgumentError] - # @return [RotationCoordinator] a new instance of RotationCoordinator - # - # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#10 - def initialize(&secret_generator); end - - # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#18 - def [](salt); end - - # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#22 - def []=(salt, codec); end - - # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#39 - def clear_rotations; end - - # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#45 - def on_rotation(&callback); end - - # @raise [ArgumentError] - # - # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#26 - def rotate(**options, &block); end - - # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#35 - def rotate_defaults; end - - # Returns the value of attribute transitional. - # - # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#8 - def transitional; end - - # Sets the attribute transitional - # - # @param value the value to set the attribute transitional to. - # - # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#8 - def transitional=(_arg0); end - - private - - # @raise [NotImplementedError] - # - # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#88 - def build(salt, secret_generator:, secret_generator_options:, **options); end - - # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#76 - def build_with_rotations(salt); end - - # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#51 - def changing_configuration!; end - - # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#62 - def normalize_options(options); end -end - -# source://activesupport//lib/active_support/messages/rotator.rb#5 -module ActiveSupport::Messages::Rotator - # source://activesupport//lib/active_support/messages/rotator.rb#6 - def initialize(*args, on_rotation: T.unsafe(nil), **options); end - - # source://activesupport//lib/active_support/messages/rotator.rb#18 - def fall_back_to(fallback); end - - # source://activesupport//lib/active_support/messages/rotator.rb#23 - def read_message(message, on_rotation: T.unsafe(nil), **options); end - - # source://activesupport//lib/active_support/messages/rotator.rb#14 - def rotate(*args, **options); end - - private - - # source://activesupport//lib/active_support/messages/rotator.rb#44 - def build_rotation(*args, **options); end - - # source://activesupport//lib/active_support/messages/rotator.rb#48 - def catch_rotation_error(&block); end -end - -# source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#8 -module ActiveSupport::Messages::SerializerWithFallback - # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#17 - def load(dumped); end - - private - - # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#33 - def detect_format(dumped); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#44 - def fallback?(format); end - - class << self - # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#9 - def [](format); end - end -end - -# source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#48 -module ActiveSupport::Messages::SerializerWithFallback::AllowMarshal - private - - # @return [Boolean] - # - # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#50 - def fallback?(format); end -end - -# source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#78 -module ActiveSupport::Messages::SerializerWithFallback::JsonWithFallback - include ::ActiveSupport::Messages::SerializerWithFallback - extend ::ActiveSupport::Messages::SerializerWithFallback - extend ::ActiveSupport::Messages::SerializerWithFallback::JsonWithFallback - - # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#90 - def _load(dumped); end - - # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#86 - def dump(object); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#96 - def dumped?(dumped); end - - # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#82 - def format; end - - private - - # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#101 - def detect_format(dumped); end -end - -# source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#94 -ActiveSupport::Messages::SerializerWithFallback::JsonWithFallback::JSON_START_WITH = T.let(T.unsafe(nil), Regexp) - -# source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#107 -module ActiveSupport::Messages::SerializerWithFallback::JsonWithFallbackAllowMarshal - include ::ActiveSupport::Messages::SerializerWithFallback - include ::ActiveSupport::Messages::SerializerWithFallback::JsonWithFallback - include ::ActiveSupport::Messages::SerializerWithFallback::AllowMarshal - extend ::ActiveSupport::Messages::SerializerWithFallback - extend ::ActiveSupport::Messages::SerializerWithFallback::JsonWithFallback - extend ::ActiveSupport::Messages::SerializerWithFallback::AllowMarshal - extend ::ActiveSupport::Messages::SerializerWithFallback::JsonWithFallbackAllowMarshal -end - -# source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#55 -module ActiveSupport::Messages::SerializerWithFallback::MarshalWithFallback - include ::ActiveSupport::Messages::SerializerWithFallback - extend ::ActiveSupport::Messages::SerializerWithFallback - extend ::ActiveSupport::Messages::SerializerWithFallback::MarshalWithFallback - - # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#67 - def _load(dumped); end - - # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#63 - def dump(object); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#73 - def dumped?(dumped); end - - # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#59 - def format; end -end - -# source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#71 -ActiveSupport::Messages::SerializerWithFallback::MarshalWithFallback::MARSHAL_SIGNATURE = T.let(T.unsafe(nil), String) - -# source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#113 -module ActiveSupport::Messages::SerializerWithFallback::MessagePackWithFallback - include ::ActiveSupport::Messages::SerializerWithFallback - extend ::ActiveSupport::Messages::SerializerWithFallback - extend ::ActiveSupport::Messages::SerializerWithFallback::MessagePackWithFallback - - # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#125 - def _load(dumped); end - - # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#121 - def dump(object); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#129 - def dumped?(dumped); end - - # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#117 - def format; end - - private - - # @return [Boolean] - # - # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#134 - def available?; end -end - -# source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#143 -module ActiveSupport::Messages::SerializerWithFallback::MessagePackWithFallbackAllowMarshal - include ::ActiveSupport::Messages::SerializerWithFallback - include ::ActiveSupport::Messages::SerializerWithFallback::MessagePackWithFallback - include ::ActiveSupport::Messages::SerializerWithFallback::AllowMarshal - extend ::ActiveSupport::Messages::SerializerWithFallback - extend ::ActiveSupport::Messages::SerializerWithFallback::MessagePackWithFallback - extend ::ActiveSupport::Messages::SerializerWithFallback::AllowMarshal - extend ::ActiveSupport::Messages::SerializerWithFallback::MessagePackWithFallbackAllowMarshal -end - -# source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#149 -ActiveSupport::Messages::SerializerWithFallback::SERIALIZERS = T.let(T.unsafe(nil), Hash) - -# source://activesupport//lib/active_support/multibyte.rb#4 -module ActiveSupport::Multibyte - class << self - # Returns the current proxy class. - # - # source://activesupport//lib/active_support/multibyte.rb#19 - def proxy_class; end - - # The proxy class returned when calling mb_chars. You can use this accessor - # to configure your own proxy class so you can support other encodings. See - # the ActiveSupport::Multibyte::Chars implementation for an example how to - # do this. - # - # ActiveSupport::Multibyte.proxy_class = CharsForUTF32 - # - # source://activesupport//lib/active_support/multibyte.rb#14 - def proxy_class=(klass); end - end -end - -# = Active Support \Multibyte \Chars -# -# Chars enables you to work transparently with UTF-8 encoding in the Ruby -# String class without having extensive knowledge about the encoding. A -# Chars object accepts a string upon initialization and proxies String -# methods in an encoding safe manner. All the normal String methods are also -# implemented on the proxy. -# -# String methods are proxied through the Chars object, and can be accessed -# through the +mb_chars+ method. Methods which would normally return a -# String object now return a Chars object so methods can be chained. -# -# 'The Perfect String '.mb_chars.downcase.strip -# # => # -# -# Chars objects are perfectly interchangeable with String objects as long as -# no explicit class checks are made. If certain methods do explicitly check -# the class, call +to_s+ before you pass chars objects to them. -# -# bad.explicit_checking_method 'T'.mb_chars.downcase.to_s -# -# The default Chars implementation assumes that the encoding of the string -# is UTF-8, if you want to handle different encodings you can write your own -# multibyte string handler and configure it through -# ActiveSupport::Multibyte.proxy_class. -# -# class CharsForUTF32 -# def size -# @wrapped_string.size / 4 -# end -# -# def self.accepts?(string) -# string.length % 4 == 0 -# end -# end -# -# ActiveSupport::Multibyte.proxy_class = CharsForUTF32 -# -# source://activesupport//lib/active_support/multibyte/chars.rb#47 -class ActiveSupport::Multibyte::Chars - include ::Comparable - - # Creates a new Chars instance by wrapping _string_. - # - # @return [Chars] a new instance of Chars - # - # source://activesupport//lib/active_support/multibyte/chars.rb#56 - def initialize(string); end - - # source://activesupport//lib/active_support/multibyte/chars.rb#53 - def <=>(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/multibyte/chars.rb#53 - def =~(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/multibyte/chars.rb#53 - def acts_like_string?(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/multibyte/chars.rb#161 - def as_json(options = T.unsafe(nil)); end - - # Performs composition on all the characters. - # - # 'é'.length # => 1 - # 'é'.mb_chars.compose.to_s.length # => 1 - # - # source://activesupport//lib/active_support/multibyte/chars.rb#140 - def compose; end - - # Performs canonical decomposition on all the characters. - # - # 'é'.length # => 1 - # 'é'.mb_chars.decompose.to_s.length # => 2 - # - # source://activesupport//lib/active_support/multibyte/chars.rb#132 - def decompose; end - - # Returns the number of grapheme clusters in the string. - # - # 'क्षि'.mb_chars.length # => 4 - # 'क्षि'.mb_chars.grapheme_length # => 2 - # - # source://activesupport//lib/active_support/multibyte/chars.rb#148 - def grapheme_length; end - - # Limits the byte size of the string to a number of bytes without breaking - # characters. Usable when the storage for a string is limited for some - # reason. - # - # 'こんにちは'.mb_chars.limit(7).to_s # => "こん" - # - # source://activesupport//lib/active_support/multibyte/chars.rb#115 - def limit(limit); end - - # source://activesupport//lib/active_support/multibyte/chars.rb#53 - def match?(*_arg0, **_arg1, &_arg2); end - - # Forward all undefined methods to the wrapped string. - # - # source://activesupport//lib/active_support/multibyte/chars.rb#62 - def method_missing(method, *_arg1, **_arg2, &_arg3); end - - # Reverses all characters in the string. - # - # 'Café'.mb_chars.reverse.to_s # => 'éfaC' - # - # source://activesupport//lib/active_support/multibyte/chars.rb#106 - def reverse; end - - # source://activesupport//lib/active_support/multibyte/chars.rb#166 - def reverse!(*args); end - - # Works like String#slice!, but returns an instance of - # Chars, or +nil+ if the string was not modified. The string will not be - # modified if the range given is out of bounds - # - # string = 'Welcome' - # string.mb_chars.slice!(3) # => # - # string # => 'Welome' - # string.mb_chars.slice!(0..3) # => # - # string # => 'me' - # - # source://activesupport//lib/active_support/multibyte/chars.rb#96 - def slice!(*args); end - - # Works just like String#split, with the exception that the items - # in the resulting list are Chars instances instead of String. This makes - # chaining methods easier. - # - # 'Café périferôl'.mb_chars.split(/é/).map { |part| part.upcase.to_s } # => ["CAF", " P", "RIFERÔL"] - # - # source://activesupport//lib/active_support/multibyte/chars.rb#83 - def split(*args); end - - # Replaces all ISO-8859-1 or CP1252 characters by their UTF-8 equivalent - # resulting in a valid UTF-8 string. - # - # Passing +true+ will forcibly tidy all bytes, assuming that the string's - # encoding is entirely CP1252 or ISO-8859-1. - # - # source://activesupport//lib/active_support/multibyte/chars.rb#157 - def tidy_bytes(force = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/multibyte/chars.rb#166 - def tidy_bytes!(*args); end - - # Capitalizes the first letter of every word, when possible. - # - # "ÉL QUE SE ENTERÓ".mb_chars.titleize.to_s # => "Él Que Se Enteró" - # "日本語".mb_chars.titleize.to_s # => "日本語" - # - # source://activesupport//lib/active_support/multibyte/chars.rb#123 - def titlecase; end - - # Capitalizes the first letter of every word, when possible. - # - # "ÉL QUE SE ENTERÓ".mb_chars.titleize.to_s # => "Él Que Se Enteró" - # "日本語".mb_chars.titleize.to_s # => "日本語" - # - # source://activesupport//lib/active_support/multibyte/chars.rb#123 - def titleize; end - - # Returns the value of attribute wrapped_string. - # - # source://activesupport//lib/active_support/multibyte/chars.rb#49 - def to_s; end - - # Returns the value of attribute wrapped_string. - # - # source://activesupport//lib/active_support/multibyte/chars.rb#49 - def to_str; end - - # Returns the value of attribute wrapped_string. - # - # source://activesupport//lib/active_support/multibyte/chars.rb#49 - def wrapped_string; end - - private - - # source://activesupport//lib/active_support/multibyte/chars.rb#173 - def chars(string); end - - # Returns +true+ if _obj_ responds to the given method. Private methods - # are included in the search only if the optional second parameter - # evaluates to +true+. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/multibyte/chars.rb#74 - def respond_to_missing?(method, include_private); end -end - -# source://activesupport//lib/active_support/multibyte/unicode.rb#5 -module ActiveSupport::Multibyte::Unicode - extend ::ActiveSupport::Multibyte::Unicode - - # Compose decomposed characters to the composed form. - # - # source://activesupport//lib/active_support/multibyte/unicode.rb#21 - def compose(codepoints); end - - # Decompose composed characters to the decomposed form. - # - # source://activesupport//lib/active_support/multibyte/unicode.rb#12 - def decompose(type, codepoints); end - - # Replaces all ISO-8859-1 or CP1252 characters by their UTF-8 equivalent - # resulting in a valid UTF-8 string. - # - # Passing +true+ will forcibly tidy all bytes, assuming that the string's - # encoding is entirely CP1252 or ISO-8859-1. - # - # source://activesupport//lib/active_support/multibyte/unicode.rb#30 - def tidy_bytes(string, force = T.unsafe(nil)); end - - private - - # source://activesupport//lib/active_support/multibyte/unicode.rb#37 - def recode_windows1252_chars(string); end -end - -# The Unicode version that is supported by the implementation -# -# source://activesupport//lib/active_support/multibyte/unicode.rb#9 -ActiveSupport::Multibyte::Unicode::UNICODE_VERSION = T.let(T.unsafe(nil), String) - -# = \Notifications -# -# +ActiveSupport::Notifications+ provides an instrumentation API for -# Ruby. -# -# == Instrumenters -# -# To instrument an event you just need to do: -# -# ActiveSupport::Notifications.instrument('render', extra: :information) do -# render plain: 'Foo' -# end -# -# That first executes the block and then notifies all subscribers once done. -# -# In the example above +render+ is the name of the event, and the rest is called -# the _payload_. The payload is a mechanism that allows instrumenters to pass -# extra information to subscribers. Payloads consist of a hash whose contents -# are arbitrary and generally depend on the event. -# -# == Subscribers -# -# You can consume those events and the information they provide by registering -# a subscriber. -# -# ActiveSupport::Notifications.subscribe('render') do |event| -# event.name # => "render" -# event.duration # => 10 (in milliseconds) -# event.payload # => { extra: :information } -# event.allocations # => 1826 (objects) -# end -# -# +Event+ objects record CPU time and allocations. If you don't need this -# it's also possible to pass a block that accepts five arguments: -# -# ActiveSupport::Notifications.subscribe('render') do |name, start, finish, id, payload| -# name # => String, name of the event (such as 'render' from above) -# start # => Time, when the instrumented block started execution -# finish # => Time, when the instrumented block ended execution -# id # => String, unique ID for the instrumenter that fired the event -# payload # => Hash, the payload -# end -# -# Here, the +start+ and +finish+ values represent wall-clock time. If you are -# concerned about accuracy, you can register a monotonic subscriber. -# -# ActiveSupport::Notifications.monotonic_subscribe('render') do |name, start, finish, id, payload| -# name # => String, name of the event (such as 'render' from above) -# start # => Float, monotonic time when the instrumented block started execution -# finish # => Float, monotonic time when the instrumented block ended execution -# id # => String, unique ID for the instrumenter that fired the event -# payload # => Hash, the payload -# end -# -# For instance, let's store all "render" events in an array: -# -# events = [] -# -# ActiveSupport::Notifications.subscribe('render') do |event| -# events << event -# end -# -# That code returns right away, you are just subscribing to "render" events. -# The block is saved and will be called whenever someone instruments "render": -# -# ActiveSupport::Notifications.instrument('render', extra: :information) do -# render plain: 'Foo' -# end -# -# event = events.first -# event.name # => "render" -# event.duration # => 10 (in milliseconds) -# event.payload # => { extra: :information } -# event.allocations # => 1826 (objects) -# -# If an exception happens during that particular instrumentation the payload will -# have a key :exception with an array of two elements as value: a string with -# the name of the exception class, and the exception message. -# The :exception_object key of the payload will have the exception -# itself as the value: -# -# event.payload[:exception] # => ["ArgumentError", "Invalid value"] -# event.payload[:exception_object] # => # -# -# As the earlier example depicts, the class ActiveSupport::Notifications::Event -# is able to take the arguments as they come and provide an object-oriented -# interface to that data. -# -# It is also possible to pass an object which responds to call method -# as the second parameter to the subscribe method instead of a block: -# -# module ActionController -# class PageRequest -# def call(name, started, finished, unique_id, payload) -# Rails.logger.debug ['notification:', name, started, finished, unique_id, payload].join(' ') -# end -# end -# end -# -# ActiveSupport::Notifications.subscribe('process_action.action_controller', ActionController::PageRequest.new) -# -# resulting in the following output within the logs including a hash with the payload: -# -# notification: process_action.action_controller 2012-04-13 01:08:35 +0300 2012-04-13 01:08:35 +0300 af358ed7fab884532ec7 { -# controller: "Devise::SessionsController", -# action: "new", -# params: {"action"=>"new", "controller"=>"devise/sessions"}, -# format: :html, -# method: "GET", -# path: "/login/sign_in", -# status: 200, -# view_runtime: 279.3080806732178, -# db_runtime: 40.053 -# } -# -# You can also subscribe to all events whose name matches a certain regexp: -# -# ActiveSupport::Notifications.subscribe(/render/) do |*args| -# ... -# end -# -# and even pass no argument to subscribe, in which case you are subscribing -# to all events. -# -# == Temporary Subscriptions -# -# Sometimes you do not want to subscribe to an event for the entire life of -# the application. There are two ways to unsubscribe. -# -# WARNING: The instrumentation framework is designed for long-running subscribers, -# use this feature sparingly because it wipes some internal caches and that has -# a negative impact on performance. -# -# === Subscribe While a Block Runs -# -# You can subscribe to some event temporarily while some block runs. For -# example, in -# -# callback = lambda {|event| ... } -# ActiveSupport::Notifications.subscribed(callback, "sql.active_record") do -# ... -# end -# -# the callback will be called for all "sql.active_record" events instrumented -# during the execution of the block. The callback is unsubscribed automatically -# after that. -# -# To record +started+ and +finished+ values with monotonic time, -# specify the optional :monotonic option to the -# subscribed method. The :monotonic option is set -# to +false+ by default. -# -# callback = lambda {|name, started, finished, unique_id, payload| ... } -# ActiveSupport::Notifications.subscribed(callback, "sql.active_record", monotonic: true) do -# ... -# end -# -# === Manual Unsubscription -# -# The +subscribe+ method returns a subscriber object: -# -# subscriber = ActiveSupport::Notifications.subscribe("render") do |event| -# ... -# end -# -# To prevent that block from being called anymore, just unsubscribe passing -# that reference: -# -# ActiveSupport::Notifications.unsubscribe(subscriber) -# -# You can also unsubscribe by passing the name of the subscriber object. Note -# that this will unsubscribe all subscriptions with the given name: -# -# ActiveSupport::Notifications.unsubscribe("render") -# -# Subscribers using a regexp or other pattern-matching object will remain subscribed -# to all events that match their original pattern, unless those events match a string -# passed to +unsubscribe+: -# -# subscriber = ActiveSupport::Notifications.subscribe(/render/) { } -# ActiveSupport::Notifications.unsubscribe('render_template.action_view') -# subscriber.matches?('render_template.action_view') # => false -# subscriber.matches?('render_partial.action_view') # => true -# -# == Default Queue -# -# Notifications ships with a queue implementation that consumes and publishes events -# to all log subscribers. You can use any queue implementation you want. -# -# source://activesupport//lib/active_support/notifications/instrumenter.rb#7 -module ActiveSupport::Notifications - class << self - # source://activesupport//lib/active_support/notifications.rb#208 - def instrument(name, payload = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/notifications.rb#269 - def instrumenter; end - - # Performs the same functionality as #subscribe, but the +start+ and - # +finish+ block arguments are in monotonic time instead of wall-clock - # time. Monotonic time will not jump forward or backward (due to NTP or - # Daylights Savings). Use +monotonic_subscribe+ when accuracy of time - # duration is important. For example, computing elapsed time between - # two events. - # - # source://activesupport//lib/active_support/notifications.rb#254 - def monotonic_subscribe(pattern = T.unsafe(nil), callback = T.unsafe(nil), &block); end - - # Returns the value of attribute notifier. - # - # source://activesupport//lib/active_support/notifications.rb#198 - def notifier; end - - # Sets the attribute notifier - # - # @param value the value to set the attribute notifier to. - # - # source://activesupport//lib/active_support/notifications.rb#198 - def notifier=(_arg0); end - - # source://activesupport//lib/active_support/notifications.rb#200 - def publish(name, *args); end - - # source://activesupport//lib/active_support/notifications.rb#204 - def publish_event(event); end - - # Subscribe to a given event name with the passed +block+. - # - # You can subscribe to events by passing a String to match exact event - # names, or by passing a Regexp to match all events that match a pattern. - # - # If the block passed to the method only takes one argument, - # it will yield an +Event+ object to the block: - # - # ActiveSupport::Notifications.subscribe(/render/) do |event| - # @event = event - # end - # - # Otherwise the +block+ will receive five arguments with information - # about the event: - # - # ActiveSupport::Notifications.subscribe('render') do |name, start, finish, id, payload| - # name # => String, name of the event (such as 'render' from above) - # start # => Time, when the instrumented block started execution - # finish # => Time, when the instrumented block ended execution - # id # => String, unique ID for the instrumenter that fired the event - # payload # => Hash, the payload - # end - # - # Raises an error if invalid event name type is passed: - # - # ActiveSupport::Notifications.subscribe(:render) {|event| ...} - # #=> ArgumentError (pattern must be specified as a String, Regexp or empty) - # - # source://activesupport//lib/active_support/notifications.rb#244 - def subscribe(pattern = T.unsafe(nil), callback = T.unsafe(nil), &block); end - - # source://activesupport//lib/active_support/notifications.rb#258 - def subscribed(callback, pattern = T.unsafe(nil), monotonic: T.unsafe(nil), &block); end - - # source://activesupport//lib/active_support/notifications.rb#265 - def unsubscribe(subscriber_or_name); end - - private - - # source://activesupport//lib/active_support/notifications.rb#274 - def registry; end - end -end - -# source://activesupport//lib/active_support/notifications/instrumenter.rb#106 -class ActiveSupport::Notifications::Event - # @return [Event] a new instance of Event - # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#110 - def initialize(name, start, ending, transaction_id, payload); end - - # Returns the number of allocations made between the call to #start! and - # the call to #finish!. - # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#176 - def allocations; end - - # Returns the CPU time (in milliseconds) passed between the call to - # #start! and the call to #finish!. - # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#163 - def cpu_time; end - - # Returns the difference in milliseconds between when the execution of the - # event started and when it ended. - # - # ActiveSupport::Notifications.subscribe('wait') do |event| - # @event = event - # end - # - # ActiveSupport::Notifications.instrument('wait') do - # sleep 1 - # end - # - # @event.duration # => 1000.138 - # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#198 - def duration; end - - # source://activesupport//lib/active_support/notifications/instrumenter.rb#128 - def end; end - - # Record information at the time this event finishes - # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#154 - def finish!; end - - # Returns the time spent in GC (in milliseconds) between the call to #start! - # and the call to #finish! - # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#182 - def gc_time; end - - # Returns the idle time time (in milliseconds) passed between the call to - # #start! and the call to #finish!. - # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#169 - def idle_time; end - - # Returns the value of attribute name. - # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#107 - def name; end - - # Returns the value of attribute payload. - # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#108 - def payload; end - - # Sets the attribute payload - # - # @param value the value to set the attribute payload to. - # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#108 - def payload=(_arg0); end - - # source://activesupport//lib/active_support/notifications/instrumenter.rb#132 - def record; end - - # Record information at the time this event starts - # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#146 - def start!; end - - # source://activesupport//lib/active_support/notifications/instrumenter.rb#124 - def time; end - - # Returns the value of attribute transaction_id. - # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#107 - def transaction_id; end - - private - - # source://activesupport//lib/active_support/notifications/instrumenter.rb#203 - def now; end - - # Likely on JRuby, TruffleRuby - # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#230 - def now_allocations; end - - # source://activesupport//lib/active_support/notifications/instrumenter.rb#210 - def now_cpu; end - - # source://activesupport//lib/active_support/notifications/instrumenter.rb#220 - def now_gc; end -end - -# This is a default queue implementation that ships with Notifications. -# It just pushes events to all registered log subscribers. -# -# This class is thread safe. All methods are reentrant. -# -# source://activesupport//lib/active_support/notifications/fanout.rb#50 -class ActiveSupport::Notifications::Fanout - include ::ActiveSupport::Notifications::FanoutIteration - - # @return [Fanout] a new instance of Fanout - # - # source://activesupport//lib/active_support/notifications/fanout.rb#51 - def initialize; end - - # source://activesupport//lib/active_support/notifications/fanout.rb#298 - def all_listeners_for(name); end - - # source://activesupport//lib/active_support/notifications/fanout.rb#273 - def build_handle(name, id, payload); end - - # source://activesupport//lib/active_support/notifications/fanout.rb#102 - def clear_cache(key = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/notifications/fanout.rb#284 - def finish(name, id, payload, listeners = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/notifications/fanout.rb#188 - def groups_for(name); end - - # source://activesupport//lib/active_support/notifications/fanout.rb#60 - def inspect; end - - # source://activesupport//lib/active_support/notifications/fanout.rb#307 - def listeners_for(name); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/notifications/fanout.rb#311 - def listening?(name); end - - # source://activesupport//lib/active_support/notifications/fanout.rb#290 - def publish(name, *args); end - - # source://activesupport//lib/active_support/notifications/fanout.rb#294 - def publish_event(event); end - - # source://activesupport//lib/active_support/notifications/fanout.rb#277 - def start(name, id, payload); end - - # source://activesupport//lib/active_support/notifications/fanout.rb#65 - def subscribe(pattern = T.unsafe(nil), callable = T.unsafe(nil), monotonic: T.unsafe(nil), &block); end - - # source://activesupport//lib/active_support/notifications/fanout.rb#82 - def unsubscribe(subscriber_or_name); end - - # This is a sync queue, so there is no waiting. - # - # source://activesupport//lib/active_support/notifications/fanout.rb#316 - def wait; end -end - -# source://activesupport//lib/active_support/notifications/fanout.rb#114 -class ActiveSupport::Notifications::Fanout::BaseGroup - include ::ActiveSupport::Notifications::FanoutIteration - - # @return [BaseGroup] a new instance of BaseGroup - # - # source://activesupport//lib/active_support/notifications/fanout.rb#117 - def initialize(listeners, name, id, payload); end - - # source://activesupport//lib/active_support/notifications/fanout.rb#121 - def each(&block); end -end - -# source://activesupport//lib/active_support/notifications/fanout.rb#126 -class ActiveSupport::Notifications::Fanout::BaseTimeGroup < ::ActiveSupport::Notifications::Fanout::BaseGroup - # source://activesupport//lib/active_support/notifications/fanout.rb#131 - def finish(name, id, payload); end - - # source://activesupport//lib/active_support/notifications/fanout.rb#127 - def start(name, id, payload); end -end - -# source://activesupport//lib/active_support/notifications/fanout.rb#167 -class ActiveSupport::Notifications::Fanout::EventObjectGroup < ::ActiveSupport::Notifications::Fanout::BaseGroup - # source://activesupport//lib/active_support/notifications/fanout.rb#173 - def finish(name, id, payload); end - - # source://activesupport//lib/active_support/notifications/fanout.rb#168 - def start(name, id, payload); end - - private - - # source://activesupport//lib/active_support/notifications/fanout.rb#183 - def build_event(name, id, payload); end -end - -# source://activesupport//lib/active_support/notifications/fanout.rb#153 -class ActiveSupport::Notifications::Fanout::EventedGroup < ::ActiveSupport::Notifications::Fanout::BaseGroup - # source://activesupport//lib/active_support/notifications/fanout.rb#160 - def finish(name, id, payload); end - - # source://activesupport//lib/active_support/notifications/fanout.rb#154 - def start(name, id, payload); end -end - -# A +Handle+ is used to record the start and finish time of event. -# -# Both #start and #finish must each be called exactly once. -# -# Where possible, it's best to use the block form: ActiveSupport::Notifications.instrument. -# +Handle+ is a low-level API intended for cases where the block form can't be used. -# -# handle = ActiveSupport::Notifications.instrumenter.build_handle("my.event", {}) -# begin -# handle.start -# # work to be instrumented -# ensure -# handle.finish -# end -# -# source://activesupport//lib/active_support/notifications/fanout.rb#228 -class ActiveSupport::Notifications::Fanout::Handle - include ::ActiveSupport::Notifications::FanoutIteration - - # @return [Handle] a new instance of Handle - # - # source://activesupport//lib/active_support/notifications/fanout.rb#231 - def initialize(notifier, name, id, payload); end - - # source://activesupport//lib/active_support/notifications/fanout.rb#250 - def finish; end - - # source://activesupport//lib/active_support/notifications/fanout.rb#254 - def finish_with_values(name, id, payload); end - - # source://activesupport//lib/active_support/notifications/fanout.rb#241 - def start; end - - private - - # source://activesupport//lib/active_support/notifications/fanout.rb#264 - def ensure_state!(expected); end -end - -# source://activesupport//lib/active_support/notifications/fanout.rb#139 -class ActiveSupport::Notifications::Fanout::MonotonicTimedGroup < ::ActiveSupport::Notifications::Fanout::BaseTimeGroup - private - - # source://activesupport//lib/active_support/notifications/fanout.rb#141 - def now; end -end - -# source://activesupport//lib/active_support/notifications/fanout.rb#319 -module ActiveSupport::Notifications::Fanout::Subscribers - class << self - # source://activesupport//lib/active_support/notifications/fanout.rb#320 - def new(pattern, listener, monotonic); end - end -end - -# source://activesupport//lib/active_support/notifications/fanout.rb#434 -class ActiveSupport::Notifications::Fanout::Subscribers::EventObject < ::ActiveSupport::Notifications::Fanout::Subscribers::Evented - # source://activesupport//lib/active_support/notifications/fanout.rb#435 - def group_class; end - - # source://activesupport//lib/active_support/notifications/fanout.rb#439 - def publish_event(event); end -end - -# source://activesupport//lib/active_support/notifications/fanout.rb#376 -class ActiveSupport::Notifications::Fanout::Subscribers::Evented - # @return [Evented] a new instance of Evented - # - # source://activesupport//lib/active_support/notifications/fanout.rb#379 - def initialize(pattern, delegate); end - - # Returns the value of attribute delegate. - # - # source://activesupport//lib/active_support/notifications/fanout.rb#377 - def delegate; end - - # source://activesupport//lib/active_support/notifications/fanout.rb#387 - def group_class; end - - # Returns the value of attribute pattern. - # - # source://activesupport//lib/active_support/notifications/fanout.rb#377 - def pattern; end - - # source://activesupport//lib/active_support/notifications/fanout.rb#391 - def publish(name, *args); end - - # source://activesupport//lib/active_support/notifications/fanout.rb#397 - def publish_event(event); end - - # Returns the value of attribute silenceable. - # - # source://activesupport//lib/active_support/notifications/fanout.rb#377 - def silenceable; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/notifications/fanout.rb#405 - def silenced?(name); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/notifications/fanout.rb#409 - def subscribed_to?(name); end - - # source://activesupport//lib/active_support/notifications/fanout.rb#413 - def unsubscribe!(name); end -end - -# source://activesupport//lib/active_support/notifications/fanout.rb#339 -class ActiveSupport::Notifications::Fanout::Subscribers::Matcher - # @return [Matcher] a new instance of Matcher - # - # source://activesupport//lib/active_support/notifications/fanout.rb#352 - def initialize(pattern); end - - # source://activesupport//lib/active_support/notifications/fanout.rb#361 - def ===(name); end - - # Returns the value of attribute exclusions. - # - # source://activesupport//lib/active_support/notifications/fanout.rb#340 - def exclusions; end - - # Returns the value of attribute pattern. - # - # source://activesupport//lib/active_support/notifications/fanout.rb#340 - def pattern; end - - # source://activesupport//lib/active_support/notifications/fanout.rb#357 - def unsubscribe!(name); end - - class << self - # source://activesupport//lib/active_support/notifications/fanout.rb#342 - def wrap(pattern); end - end -end - -# source://activesupport//lib/active_support/notifications/fanout.rb#365 -class ActiveSupport::Notifications::Fanout::Subscribers::Matcher::AllMessages - # source://activesupport//lib/active_support/notifications/fanout.rb#366 - def ===(name); end - - # source://activesupport//lib/active_support/notifications/fanout.rb#370 - def unsubscribe!(*_arg0); end -end - -# source://activesupport//lib/active_support/notifications/fanout.rb#428 -class ActiveSupport::Notifications::Fanout::Subscribers::MonotonicTimed < ::ActiveSupport::Notifications::Fanout::Subscribers::Timed - # source://activesupport//lib/active_support/notifications/fanout.rb#429 - def group_class; end -end - -# source://activesupport//lib/active_support/notifications/fanout.rb#418 -class ActiveSupport::Notifications::Fanout::Subscribers::Timed < ::ActiveSupport::Notifications::Fanout::Subscribers::Evented - # source://activesupport//lib/active_support/notifications/fanout.rb#419 - def group_class; end - - # source://activesupport//lib/active_support/notifications/fanout.rb#423 - def publish(name, *args); end -end - -# source://activesupport//lib/active_support/notifications/fanout.rb#146 -class ActiveSupport::Notifications::Fanout::TimedGroup < ::ActiveSupport::Notifications::Fanout::BaseTimeGroup - private - - # source://activesupport//lib/active_support/notifications/fanout.rb#148 - def now; end -end - -# source://activesupport//lib/active_support/notifications/fanout.rb#19 -module ActiveSupport::Notifications::FanoutIteration - private - - # source://activesupport//lib/active_support/notifications/fanout.rb#21 - def iterate_guarding_exceptions(collection); end -end - -# source://activesupport//lib/active_support/notifications/fanout.rb#9 -class ActiveSupport::Notifications::InstrumentationSubscriberError < ::RuntimeError - # @return [InstrumentationSubscriberError] a new instance of InstrumentationSubscriberError - # - # source://activesupport//lib/active_support/notifications/fanout.rb#12 - def initialize(exceptions); end - - # Returns the value of attribute exceptions. - # - # source://activesupport//lib/active_support/notifications/fanout.rb#10 - def exceptions; end -end - -# Instrumenters are stored in a thread local. -# -# source://activesupport//lib/active_support/notifications/instrumenter.rb#9 -class ActiveSupport::Notifications::Instrumenter - # @return [Instrumenter] a new instance of Instrumenter - # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#12 - def initialize(notifier); end - - # Returns a "handle" for an event with the given +name+ and +payload+. - # - # #start and #finish must each be called exactly once on the returned object. - # - # Where possible, it's best to use #instrument, which will record the - # start and finish of the event and correctly handle any exceptions. - # +build_handle+ is a low-level API intended for cases where using - # +instrument+ isn't possible. - # - # See ActiveSupport::Notifications::Fanout::Handle. - # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#78 - def build_handle(name, payload); end - - # Send a finish notification with +name+ and +payload+. - # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#92 - def finish(name, payload); end - - # source://activesupport//lib/active_support/notifications/instrumenter.rb#96 - def finish_with_state(listeners_state, name, payload); end - - # Returns the value of attribute id. - # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#10 - def id; end - - # Given a block, instrument it by measuring the time taken to execute - # and publish it. Without a block, simply send a message via the - # notifier. Notice that events get sent even if an error occurs in the - # passed-in block. - # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#54 - def instrument(name, payload = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/notifications/instrumenter.rb#82 - def new_event(name, payload = T.unsafe(nil)); end - - # Send a start notification with +name+ and +payload+. - # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#87 - def start(name, payload); end - - private - - # source://activesupport//lib/active_support/notifications/instrumenter.rb#101 - def unique_id; end -end - -# source://activesupport//lib/active_support/notifications/instrumenter.rb#21 -class ActiveSupport::Notifications::Instrumenter::LegacyHandle - # @return [LegacyHandle] a new instance of LegacyHandle - # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#34 - def initialize(notifier, name, id, payload); end - - # source://activesupport//lib/active_support/notifications/instrumenter.rb#45 - def finish; end - - # source://activesupport//lib/active_support/notifications/instrumenter.rb#41 - def start; end -end - -# source://activesupport//lib/active_support/notifications/instrumenter.rb#22 -class ActiveSupport::Notifications::Instrumenter::LegacyHandle::Wrapper - # @return [Wrapper] a new instance of Wrapper - # - # source://activesupport//lib/active_support/notifications/instrumenter.rb#23 - def initialize(notifier); end - - # source://activesupport//lib/active_support/notifications/instrumenter.rb#27 - def build_handle(name, id, payload); end - - # source://activesupport//lib/active_support/notifications/instrumenter.rb#31 - def finish(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/notifications/instrumenter.rb#31 - def start(*_arg0, **_arg1, &_arg2); end -end - -# source://activesupport//lib/active_support/number_helper.rb#4 -module ActiveSupport::NumberHelper - extend ::ActiveSupport::Autoload - extend ::ActiveSupport::NumberHelper - - # Formats a +number+ into a currency string. - # - # number_to_currency(1234567890.50) # => "$1,234,567,890.50" - # number_to_currency(1234567890.506) # => "$1,234,567,890.51" - # number_to_currency("12x34") # => "$12x34" - # - # number_to_currency(1234567890.50, unit: "£", separator: ",", delimiter: "") - # # => "£1234567890,50" - # - # The currency unit and number formatting of the current locale will be used - # unless otherwise specified via options. No currency conversion is - # performed. If the user is given a way to change their locale, they will - # also be able to change the relative value of the currency displayed with - # this helper. If your application will ever support multiple locales, you - # may want to specify a constant +:locale+ option or consider using a - # library capable of currency conversion. - # - # ==== Options - # - # [+:locale+] - # The locale to use for formatting. Defaults to the current locale. - # - # number_to_currency(1234567890.506, locale: :fr) - # # => "1 234 567 890,51 €" - # - # [+:precision+] - # The level of precision. Defaults to 2. - # - # number_to_currency(1234567890.123, precision: 3) # => "$1,234,567,890.123" - # number_to_currency(0.456789, precision: 0) # => "$0" - # - # [+:round_mode+] - # Specifies how rounding is performed. See +BigDecimal.mode+. Defaults to - # +:default+. - # - # number_to_currency(1234567890.01, precision: 0, round_mode: :up) - # # => "$1,234,567,891" - # - # [+:unit+] - # The denomination of the currency. Defaults to "$". - # - # [+:separator+] - # The decimal separator. Defaults to ".". - # - # [+:delimiter+] - # The thousands delimiter. Defaults to ",". - # - # [+:format+] - # The format for non-negative numbers. %u represents the currency, - # and %n represents the number. Defaults to "%u%n". - # - # number_to_currency(1234567890.50, format: "%n %u") - # # => "1,234,567,890.50 $" - # - # [+:negative_format+] - # The format for negative numbers. %u and %n behave the - # same as in +:format+, but %n represents the absolute value of - # the number. Defaults to the value of +:format+ prepended with -. - # - # number_to_currency(-1234567890.50, negative_format: "(%u%n)") - # # => "($1,234,567,890.50)" - # - # [+:strip_insignificant_zeros+] - # Whether to remove insignificant zeros after the decimal separator. - # Defaults to false. - # - # number_to_currency(1234567890.50, strip_insignificant_zeros: true) - # # => "$1,234,567,890.5" - # - # source://activesupport//lib/active_support/number_helper.rb#139 - def number_to_currency(number, options = T.unsafe(nil)); end - - # Formats +number+ by grouping thousands with a delimiter. - # - # number_to_delimited(12345678) # => "12,345,678" - # number_to_delimited("123456") # => "123,456" - # number_to_delimited(12345678.9876) # => "12,345,678.9876" - # number_to_delimited("12x34") # => "12x34" - # - # number_to_delimited(12345678.9876, delimiter: ".", separator: ",") - # # => "12.345.678,9876" - # - # ==== Options - # - # [+:locale+] - # The locale to use for formatting. Defaults to the current locale. - # - # number_to_delimited(12345678.05, locale: :fr) - # # => "12 345 678,05" - # - # [+:delimiter+] - # The thousands delimiter. Defaults to ",". - # - # number_to_delimited(12345678, delimiter: ".") - # # => "12.345.678" - # - # [+:separator+] - # The decimal separator. Defaults to ".". - # - # number_to_delimited(12345678.05, separator: " ") - # # => "12,345,678 05" - # - # [+:delimiter_pattern+] - # A regexp to determine the placement of delimiters. Helpful when using - # currency formats like INR. - # - # number_to_delimited("123456.78", delimiter_pattern: /(\d+?)(?=(\d\d)+(\d)(?!\d))/) - # # => "1,23,456.78" - # - # source://activesupport//lib/active_support/number_helper.rb#242 - def number_to_delimited(number, options = T.unsafe(nil)); end - - # Formats +number+ into a more human-friendly representation. Useful for - # numbers that can become very large and too hard to read. - # - # number_to_human(123) # => "123" - # number_to_human(1234) # => "1.23 Thousand" - # number_to_human(12345) # => "12.3 Thousand" - # number_to_human(1234567) # => "1.23 Million" - # number_to_human(1234567890) # => "1.23 Billion" - # number_to_human(1234567890123) # => "1.23 Trillion" - # number_to_human(1234567890123456) # => "1.23 Quadrillion" - # number_to_human(1234567890123456789) # => "1230 Quadrillion" - # - # See #number_to_human_size if you want to pretty-print a file size. - # - # ==== Options - # - # [+:locale+] - # The locale to use for formatting. Defaults to the current locale. - # - # [+:precision+] - # The level of precision. Defaults to 3. - # - # number_to_human(123456, precision: 2) # => "120 Thousand" - # number_to_human(123456, precision: 4) # => "123.5 Thousand" - # - # [+:round_mode+] - # Specifies how rounding is performed. See +BigDecimal.mode+. Defaults to - # +:default+. - # - # number_to_human(123456, precision: 2, round_mode: :up) - # # => "130 Thousand" - # - # [+:significant+] - # Whether +:precision+ should be applied to significant digits instead of - # fractional digits. Defaults to true. - # - # [+:separator+] - # The decimal separator. Defaults to ".". - # - # number_to_human(123456, precision: 4, separator: ",") - # # => "123,5 Thousand" - # - # [+:delimiter+] - # The thousands delimiter. Defaults to ",". - # - # [+:strip_insignificant_zeros+] - # Whether to remove insignificant zeros after the decimal separator. - # Defaults to true. - # - # number_to_human(1000000) # => "1 Million" - # number_to_human(1000000, strip_insignificant_zeros: false) # => "1.00 Million" - # number_to_human(10.01) # => "10" - # number_to_human(10.01, strip_insignificant_zeros: false) # => "10.0" - # - # [+:format+] - # The format of the output. %n represents the number, and - # %u represents the quantifier (e.g., "Thousand"). Defaults to - # "%n %u". - # - # [+:units+] - # A Hash of custom unit quantifier names. - # - # number_to_human(1, units: { unit: "m", thousand: "km" }) # => "1 m" - # number_to_human(100, units: { unit: "m", thousand: "km" }) # => "100 m" - # number_to_human(1000, units: { unit: "m", thousand: "km" }) # => "1 km" - # number_to_human(100000, units: { unit: "m", thousand: "km" }) # => "100 km" - # number_to_human(10000000, units: { unit: "m", thousand: "km" }) # => "10000 km" - # - # The following keys are supported for integer units: +:unit+, +:ten+, - # +:hundred+, +:thousand+, +:million+, +:billion+, +:trillion+, - # +:quadrillion+. Additionally, the following keys are supported for - # fractional units: +:deci+, +:centi+, +:mili+, +:micro+, +:nano+, - # +:pico+, +:femto+. - # - # The Hash can also be defined as a scope in an I18n locale. For example: - # - # en: - # distance: - # centi: - # one: "centimeter" - # other: "centimeters" - # unit: - # one: "meter" - # other: "meters" - # thousand: - # one: "kilometer" - # other: "kilometers" - # - # Then it can be specified by name: - # - # number_to_human(1, units: :distance) # => "1 meter" - # number_to_human(100, units: :distance) # => "100 meters" - # number_to_human(1000, units: :distance) # => "1 kilometer" - # number_to_human(100000, units: :distance) # => "100 kilometers" - # number_to_human(10000000, units: :distance) # => "10000 kilometers" - # number_to_human(0.1, units: :distance) # => "10 centimeters" - # number_to_human(0.01, units: :distance) # => "1 centimeter" - # - # source://activesupport//lib/active_support/number_helper.rb#453 - def number_to_human(number, options = T.unsafe(nil)); end - - # Formats +number+ as bytes into a more human-friendly representation. - # Useful for reporting file sizes to users. - # - # number_to_human_size(123) # => "123 Bytes" - # number_to_human_size(1234) # => "1.21 KB" - # number_to_human_size(12345) # => "12.1 KB" - # number_to_human_size(1234567) # => "1.18 MB" - # number_to_human_size(1234567890) # => "1.15 GB" - # number_to_human_size(1234567890123) # => "1.12 TB" - # number_to_human_size(1234567890123456) # => "1.1 PB" - # number_to_human_size(1234567890123456789) # => "1.07 EB" - # - # See #number_to_human if you want to pretty-print a generic number. - # - # ==== Options - # - # [+:locale+] - # The locale to use for formatting. Defaults to the current locale. - # - # [+:precision+] - # The level of precision. Defaults to 3. - # - # number_to_human_size(123456, precision: 2) # => "120 KB" - # number_to_human_size(1234567, precision: 2) # => "1.2 MB" - # - # [+:round_mode+] - # Specifies how rounding is performed. See +BigDecimal.mode+. Defaults to - # +:default+. - # - # number_to_human_size(123456, precision: 2, round_mode: :up) - # # => "130 KB" - # - # [+:significant+] - # Whether +:precision+ should be applied to significant digits instead of - # fractional digits. Defaults to true. - # - # [+:separator+] - # The decimal separator. Defaults to ".". - # - # number_to_human_size(1234567, separator: ",") - # # => "1,18 MB" - # - # [+:delimiter+] - # The thousands delimiter. Defaults to ",". - # - # [+:strip_insignificant_zeros+] - # Whether to remove insignificant zeros after the decimal separator. - # Defaults to true. - # - # source://activesupport//lib/active_support/number_helper.rb#351 - def number_to_human_size(number, options = T.unsafe(nil)); end - - # Formats +number+ as a percentage string. - # - # number_to_percentage(100) # => "100.000%" - # number_to_percentage("99") # => "99.000%" - # number_to_percentage("99x") # => "99x%" - # - # number_to_percentage(12345.6789, delimiter: ".", separator: ",", precision: 2) - # # => "12.345,68%" - # - # ==== Options - # - # [+:locale+] - # The locale to use for formatting. Defaults to the current locale. - # - # number_to_percentage(1000, locale: :fr) - # # => "1000,000%" - # - # [+:precision+] - # The level of precision, or +nil+ to preserve +number+'s precision. - # Defaults to 2. - # - # number_to_percentage(12.3456789, precision: 4) # => "12.3457%" - # number_to_percentage(99.999, precision: 0) # => "100%" - # number_to_percentage(99.999, precision: nil) # => "99.999%" - # - # [+:round_mode+] - # Specifies how rounding is performed. See +BigDecimal.mode+. Defaults to - # +:default+. - # - # number_to_percentage(12.3456789, precision: 4, round_mode: :down) - # # => "12.3456%" - # - # [+:significant+] - # Whether +:precision+ should be applied to significant digits instead of - # fractional digits. Defaults to false. - # - # number_to_percentage(12345.6789) # => "12345.679%" - # number_to_percentage(12345.6789, significant: true) # => "12300%" - # number_to_percentage(12345.6789, precision: 2) # => "12345.68%" - # number_to_percentage(12345.6789, precision: 2, significant: true) # => "12000%" - # - # [+:separator+] - # The decimal separator. Defaults to ".". - # - # [+:delimiter+] - # The thousands delimiter. Defaults to ",". - # - # [+:strip_insignificant_zeros+] - # Whether to remove insignificant zeros after the decimal separator. - # Defaults to false. - # - # [+:format+] - # The format of the output. %n represents the number. Defaults to - # "%n%". - # - # number_to_percentage(100, format: "%n %") - # # => "100.000 %" - # - # source://activesupport//lib/active_support/number_helper.rb#201 - def number_to_percentage(number, options = T.unsafe(nil)); end - - # Formats +number+ into a phone number. - # - # number_to_phone(5551234) # => "555-1234" - # number_to_phone("5551234") # => "555-1234" - # number_to_phone(1235551234) # => "123-555-1234" - # number_to_phone("12x34") # => "12x34" - # - # number_to_phone(1235551234, delimiter: ".", country_code: 1, extension: 1343) - # # => "+1.123.555.1234 x 1343" - # - # ==== Options - # - # [+:area_code+] - # Whether to use parentheses for the area code. Defaults to false. - # - # number_to_phone(1235551234, area_code: true) - # # => "(123) 555-1234" - # - # [+:delimiter+] - # The digit group delimiter to use. Defaults to "-". - # - # number_to_phone(1235551234, delimiter: " ") - # # => "123 555 1234" - # - # [+:country_code+] - # A country code to prepend. - # - # number_to_phone(1235551234, country_code: 1) - # # => "+1-123-555-1234" - # - # [+:extension+] - # An extension to append. - # - # number_to_phone(1235551234, extension: 555) - # # => "123-555-1234 x 555" - # - # [+:pattern+] - # A regexp that specifies how the digits should be grouped. The first - # three captures from the regexp are treated as digit groups. - # - # number_to_phone(13312345678, pattern: /(\d{3})(\d{4})(\d{4})$/) - # # => "133-1234-5678" - # number_to_phone(75561234567, pattern: /(\d{1,4})(\d{4})(\d{4})$/, area_code: true) - # # => "(755) 6123-4567" - # - # source://activesupport//lib/active_support/number_helper.rb#66 - def number_to_phone(number, options = T.unsafe(nil)); end - - # Formats +number+ to a specific level of precision. - # - # number_to_rounded(12345.6789) # => "12345.679" - # number_to_rounded(12345.6789, precision: 2) # => "12345.68" - # number_to_rounded(12345.6789, precision: 0) # => "12345" - # number_to_rounded(12345, precision: 5) # => "12345.00000" - # - # ==== Options - # - # [+:locale+] - # The locale to use for formatting. Defaults to the current locale. - # - # number_to_rounded(111.234, locale: :fr) - # # => "111,234" - # - # [+:precision+] - # The level of precision, or +nil+ to preserve +number+'s precision. - # Defaults to 3. - # - # number_to_rounded(12345.6789, precision: nil) - # # => "12345.6789" - # - # [+:round_mode+] - # Specifies how rounding is performed. See +BigDecimal.mode+. Defaults to - # +:default+. - # - # number_to_rounded(12.34, precision: 0, round_mode: :up) - # # => "13" - # - # [+:significant+] - # Whether +:precision+ should be applied to significant digits instead of - # fractional digits. Defaults to false. - # - # number_to_rounded(12345.6789) # => "12345.679" - # number_to_rounded(12345.6789, significant: true) # => "12300" - # number_to_rounded(12345.6789, precision: 2) # => "12345.68" - # number_to_rounded(12345.6789, precision: 2, significant: true) # => "12000" - # - # [+:separator+] - # The decimal separator. Defaults to ".". - # - # [+:delimiter+] - # The thousands delimiter. Defaults to ",". - # - # [+:strip_insignificant_zeros+] - # Whether to remove insignificant zeros after the decimal separator. - # Defaults to false. - # - # number_to_rounded(12.34, strip_insignificant_zeros: false) # => "12.340" - # number_to_rounded(12.34, strip_insignificant_zeros: true) # => "12.34" - # number_to_rounded(12.3456, strip_insignificant_zeros: true) # => "12.346" - # - # source://activesupport//lib/active_support/number_helper.rb#298 - def number_to_rounded(number, options = T.unsafe(nil)); end -end - -# source://activesupport//lib/active_support/number_helper/number_converter.rb#12 -class ActiveSupport::NumberHelper::NumberConverter - # @return [NumberConverter] a new instance of NumberConverter - # - # source://activesupport//lib/active_support/number_helper/number_converter.rb#124 - def initialize(number, options); end - - # source://activesupport//lib/active_support/number_helper/number_converter.rb#130 - def execute; end - - # source://activesupport//lib/active_support/number_helper/number_converter.rb#14 - def namespace; end - - # source://activesupport//lib/active_support/number_helper/number_converter.rb#14 - def namespace=(_arg0); end - - # source://activesupport//lib/active_support/number_helper/number_converter.rb#14 - def namespace?; end - - # Returns the value of attribute number. - # - # source://activesupport//lib/active_support/number_helper/number_converter.rb#19 - def number; end - - # Returns the value of attribute opts. - # - # source://activesupport//lib/active_support/number_helper/number_converter.rb#19 - def opts; end - - # source://activesupport//lib/active_support/number_helper/number_converter.rb#17 - def validate_float; end - - # source://activesupport//lib/active_support/number_helper/number_converter.rb#17 - def validate_float=(_arg0); end - - # source://activesupport//lib/active_support/number_helper/number_converter.rb#17 - def validate_float?; end - - private - - # source://activesupport//lib/active_support/number_helper/number_converter.rb#149 - def default_format_options; end - - # source://activesupport//lib/active_support/number_helper/number_converter.rb#174 - def default_value(key); end - - # source://activesupport//lib/active_support/number_helper/number_converter.rb#145 - def format_options; end - - # source://activesupport//lib/active_support/number_helper/number_converter.rb#155 - def i18n_format_options; end - - # source://activesupport//lib/active_support/number_helper/number_converter.rb#141 - def options; end - - # source://activesupport//lib/active_support/number_helper/number_converter.rb#170 - def translate_in_locale(key, **i18n_options); end - - # source://activesupport//lib/active_support/number_helper/number_converter.rb#166 - def translate_number_value_with_default(key, **i18n_options); end - - # source://activesupport//lib/active_support/number_helper/number_converter.rb#178 - def valid_bigdecimal; end - - class << self - # source://activesupport//lib/active_support/number_helper/number_converter.rb#120 - def convert(number, options); end - - # source://activesupport//lib/active_support/number_helper/number_converter.rb#14 - def namespace; end - - # source://activesupport//lib/active_support/number_helper/number_converter.rb#14 - def namespace=(value); end - - # source://activesupport//lib/active_support/number_helper/number_converter.rb#14 - def namespace?; end - - # source://activesupport//lib/active_support/number_helper/number_converter.rb#17 - def validate_float; end - - # source://activesupport//lib/active_support/number_helper/number_converter.rb#17 - def validate_float=(value); end - - # source://activesupport//lib/active_support/number_helper/number_converter.rb#17 - def validate_float?; end - end -end - -# source://activesupport//lib/active_support/number_helper/number_converter.rb#21 -ActiveSupport::NumberHelper::NumberConverter::DEFAULTS = T.let(T.unsafe(nil), Hash) - -# source://activesupport//lib/active_support/number_helper/number_to_currency_converter.rb#7 -class ActiveSupport::NumberHelper::NumberToCurrencyConverter < ::ActiveSupport::NumberHelper::NumberConverter - # source://activesupport//lib/active_support/number_helper/number_to_currency_converter.rb#10 - def convert; end - - private - - # source://activesupport//lib/active_support/number_helper/number_to_currency_converter.rb#38 - def i18n_opts; end - - # source://activesupport//lib/active_support/number_helper/number_to_currency_converter.rb#29 - def options; end - - class << self - # source://activesupport//lib/active_support/number_helper/number_converter.rb#14 - def namespace; end - end -end - -# source://activesupport//lib/active_support/number_helper/number_to_delimited_converter.rb#7 -class ActiveSupport::NumberHelper::NumberToDelimitedConverter < ::ActiveSupport::NumberHelper::NumberConverter - # source://activesupport//lib/active_support/number_helper/number_to_delimited_converter.rb#12 - def convert; end - - private - - # source://activesupport//lib/active_support/number_helper/number_to_delimited_converter.rb#25 - def delimiter_pattern; end - - # source://activesupport//lib/active_support/number_helper/number_to_delimited_converter.rb#17 - def parts; end - - class << self - # source://activesupport//lib/active_support/number_helper/number_converter.rb#17 - def validate_float; end - end -end - -# source://activesupport//lib/active_support/number_helper/number_to_delimited_converter.rb#10 -ActiveSupport::NumberHelper::NumberToDelimitedConverter::DEFAULT_DELIMITER_REGEX = T.let(T.unsafe(nil), Regexp) - -# source://activesupport//lib/active_support/number_helper/number_to_human_converter.rb#7 -class ActiveSupport::NumberHelper::NumberToHumanConverter < ::ActiveSupport::NumberHelper::NumberConverter - # source://activesupport//lib/active_support/number_helper/number_to_human_converter.rb#15 - def convert; end - - private - - # source://activesupport//lib/active_support/number_helper/number_to_human_converter.rb#50 - def calculate_exponent(units); end - - # source://activesupport//lib/active_support/number_helper/number_to_human_converter.rb#38 - def determine_unit(units, exponent); end - - # source://activesupport//lib/active_support/number_helper/number_to_human_converter.rb#34 - def format; end - - # source://activesupport//lib/active_support/number_helper/number_to_human_converter.rb#55 - def unit_exponents(units); end - - class << self - # source://activesupport//lib/active_support/number_helper/number_converter.rb#14 - def namespace; end - - # source://activesupport//lib/active_support/number_helper/number_converter.rb#17 - def validate_float; end - end -end - -# source://activesupport//lib/active_support/number_helper/number_to_human_converter.rb#8 -ActiveSupport::NumberHelper::NumberToHumanConverter::DECIMAL_UNITS = T.let(T.unsafe(nil), Hash) - -# source://activesupport//lib/active_support/number_helper/number_to_human_converter.rb#10 -ActiveSupport::NumberHelper::NumberToHumanConverter::INVERTED_DECIMAL_UNITS = T.let(T.unsafe(nil), Hash) - -# source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#7 -class ActiveSupport::NumberHelper::NumberToHumanSizeConverter < ::ActiveSupport::NumberHelper::NumberConverter - # source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#13 - def convert; end - - private - - # source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#55 - def base; end - - # source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#31 - def conversion_format; end - - # source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#44 - def exponent; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#51 - def smaller_than_base?; end - - # source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#39 - def storage_unit_key; end - - # source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#35 - def unit; end - - class << self - # source://activesupport//lib/active_support/number_helper/number_converter.rb#14 - def namespace; end - - # source://activesupport//lib/active_support/number_helper/number_converter.rb#17 - def validate_float; end - end -end - -# source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#8 -ActiveSupport::NumberHelper::NumberToHumanSizeConverter::STORAGE_UNITS = T.let(T.unsafe(nil), Array) - -# source://activesupport//lib/active_support/number_helper/number_to_percentage_converter.rb#7 -class ActiveSupport::NumberHelper::NumberToPercentageConverter < ::ActiveSupport::NumberHelper::NumberConverter - # source://activesupport//lib/active_support/number_helper/number_to_percentage_converter.rb#10 - def convert; end - - class << self - # source://activesupport//lib/active_support/number_helper/number_converter.rb#14 - def namespace; end - end -end - -# source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#8 -class ActiveSupport::NumberHelper::NumberToPhoneConverter < ::ActiveSupport::NumberHelper::NumberConverter - # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#9 - def convert; end - - private - - # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#16 - def convert_to_phone_number(number); end - - # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#24 - def convert_with_area_code(number); end - - # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#31 - def convert_without_area_code(number); end - - # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#47 - def country_code(code); end - - # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#43 - def delimiter; end - - # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#51 - def phone_ext(ext); end - - # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#55 - def regexp_pattern(default_pattern); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#39 - def start_with_delimiter?(number); end -end - -# source://activesupport//lib/active_support/number_helper/number_to_rounded_converter.rb#7 -class ActiveSupport::NumberHelper::NumberToRoundedConverter < ::ActiveSupport::NumberHelper::NumberConverter - # source://activesupport//lib/active_support/number_helper/number_to_rounded_converter.rb#11 - def convert; end - - private - - # source://activesupport//lib/active_support/number_helper/number_to_rounded_converter.rb#49 - def format_number(number); end - - # source://activesupport//lib/active_support/number_helper/number_to_rounded_converter.rb#45 - def strip_insignificant_zeros; end - - class << self - # source://activesupport//lib/active_support/number_helper/number_converter.rb#14 - def namespace; end - - # source://activesupport//lib/active_support/number_helper/number_converter.rb#17 - def validate_float; end - end -end - -# source://activesupport//lib/active_support/number_helper/rounding_helper.rb#5 -class ActiveSupport::NumberHelper::RoundingHelper - # @return [RoundingHelper] a new instance of RoundingHelper - # - # source://activesupport//lib/active_support/number_helper/rounding_helper.rb#8 - def initialize(options); end - - # source://activesupport//lib/active_support/number_helper/rounding_helper.rb#20 - def digit_count(number); end - - # Returns the value of attribute options. - # - # source://activesupport//lib/active_support/number_helper/rounding_helper.rb#6 - def options; end - - # source://activesupport//lib/active_support/number_helper/rounding_helper.rb#12 - def round(number); end - - private - - # source://activesupport//lib/active_support/number_helper/rounding_helper.rb#37 - def absolute_precision(number); end - - # source://activesupport//lib/active_support/number_helper/rounding_helper.rb#26 - def convert_to_decimal(number); end -end - -# source://activesupport//lib/active_support/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 - # - # source://activesupport//lib/active_support/option_merger.rb#11 - def initialize(context, options); end - - private - - # source://activesupport//lib/active_support/option_merger.rb#16 - def method_missing(method, *arguments, &block); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/option_merger.rb#34 - def respond_to_missing?(*_arg0, **_arg1, &_arg2); end -end - -# DEPRECATED: +ActiveSupport::OrderedHash+ implements a hash that preserves -# insertion order. -# -# oh = ActiveSupport::OrderedHash.new -# oh[:a] = 1 -# oh[:b] = 2 -# oh.keys # => [:a, :b], this order is guaranteed -# -# Also, maps the +omap+ feature for YAML files -# (See https://yaml.org/type/omap.html) to support ordered items -# when loading from YAML. -# -# +ActiveSupport::OrderedHash+ is namespaced to prevent conflicts -# with other implementations. -# -# source://activesupport//lib/active_support/ordered_hash.rb#24 -class ActiveSupport::OrderedHash < ::Hash - # source://activesupport//lib/active_support/ordered_hash.rb#29 - def encode_with(coder); end - - # Returns true to make sure that this hash is extractable via Array#extract_options! - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/ordered_hash.rb#46 - def extractable_options?; end - - # source://activesupport//lib/active_support/ordered_hash.rb#41 - def nested_under_indifferent_access; end - - # source://activesupport//lib/active_support/ordered_hash.rb#37 - def reject(*args, &block); end - - # source://activesupport//lib/active_support/ordered_hash.rb#33 - def select(*args, &block); end - - # source://activesupport//lib/active_support/ordered_hash.rb#25 - def to_yaml_type; end -end - -# = Ordered Options -# -# +OrderedOptions+ inherits from +Hash+ and provides dynamic accessor methods. -# -# With a +Hash+, key-value pairs are typically managed like this: -# -# h = {} -# h[:boy] = 'John' -# h[:girl] = 'Mary' -# h[:boy] # => 'John' -# h[:girl] # => 'Mary' -# h[:dog] # => nil -# -# Using +OrderedOptions+, the above code can be written as: -# -# h = ActiveSupport::OrderedOptions.new -# h.boy = 'John' -# h.girl = 'Mary' -# h.boy # => 'John' -# h.girl # => 'Mary' -# h.dog # => nil -# -# To raise an exception when the value is blank, append a -# bang to the key name, like: -# -# h.dog! # => raises KeyError: :dog is blank -# -# source://activesupport//lib/active_support/ordered_options.rb#33 -class ActiveSupport::OrderedOptions < ::Hash - # source://activesupport//lib/active_support/ordered_options.rb#41 - def [](key); end - - # source://activesupport//lib/active_support/ordered_options.rb#37 - def []=(key, value); end - - # source://activesupport//lib/active_support/ordered_options.rb#45 - def dig(key, *identifiers); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/ordered_options.rb#64 - def extractable_options?; end - - # source://activesupport//lib/active_support/ordered_options.rb#68 - def inspect; end - - # source://activesupport//lib/active_support/ordered_options.rb#49 - def method_missing(method, *args); end - - protected - - # preserve the original #[] method - def _get(_arg0); end - - private - - # @return [Boolean] - # - # source://activesupport//lib/active_support/ordered_options.rb#60 - def respond_to_missing?(name, include_private); end -end - -# source://activesupport//lib/active_support/proxy_object.rb#4 -class ActiveSupport::ProxyObject < ::BasicObject - # Let ActiveSupport::ProxyObject at least raise exceptions. - # - # source://activesupport//lib/active_support/proxy_object.rb#9 - def raise(*args); end - - class << self - # @private - # - # source://activesupport//lib/active_support/proxy_object.rb#13 - def inherited(_subclass); end - 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: -# -# to_prepare -- Run once at application startup, and also from -# +to_run+. -# -# to_run -- Run before a work run that is reloading. If -# +reload_classes_only_on_change+ is true (the default), the class -# unload will have already occurred. -# -# to_complete -- Run after a work run that has reloaded. If -# +reload_classes_only_on_change+ is false, the class unload will -# have occurred after the work run, but before this callback. -# -# before_class_unload -- Run immediately before the classes are -# unloaded. -# -# after_class_unload -- Run immediately after the classes are -# unloaded. -# -# source://activesupport//lib/active_support/reloader.rb#28 -class ActiveSupport::Reloader < ::ActiveSupport::ExecutionWrapper - # @return [Reloader] a new instance of Reloader - # - # source://activesupport//lib/active_support/reloader.rb#99 - def initialize; end - - # source://activesupport//lib/active_support/callbacks.rb#924 - def _class_unload_callbacks; end - - # source://activesupport//lib/active_support/callbacks.rb#924 - def _prepare_callbacks; end - - # source://activesupport//lib/active_support/callbacks.rb#912 - def _run_class_unload_callbacks(&block); end - - # source://activesupport//lib/active_support/callbacks.rb#912 - def _run_prepare_callbacks(&block); end - - # source://activesupport//lib/active_support/reloader.rb#85 - def check; end - - # source://activesupport//lib/active_support/reloader.rb#85 - def check=(_arg0); end - - # source://activesupport//lib/active_support/reloader.rb#85 - def check?; end - - # source://activesupport//lib/active_support/reloader.rb#126 - def class_unload!(&block); end - - # source://activesupport//lib/active_support/reloader.rb#131 - def complete!; end - - # source://activesupport//lib/active_support/reloader.rb#84 - def executor; end - - # source://activesupport//lib/active_support/reloader.rb#84 - def executor=(_arg0); end - - # source://activesupport//lib/active_support/reloader.rb#84 - def executor?; end - - # Release the unload lock if it has been previously obtained - # - # source://activesupport//lib/active_support/reloader.rb#114 - def release_unload_lock!; end - - # Acquire the ActiveSupport::Dependencies::Interlock unload lock, - # ensuring it will be released automatically - # - # source://activesupport//lib/active_support/reloader.rb#106 - def require_unload_lock!; end - - # source://activesupport//lib/active_support/reloader.rb#121 - def run!; end - - class << self - # source://activesupport//lib/active_support/callbacks.rb#70 - def __callbacks; end - - # source://activesupport//lib/active_support/callbacks.rb#916 - def _class_unload_callbacks; end - - # source://activesupport//lib/active_support/callbacks.rb#920 - def _class_unload_callbacks=(value); end - - # source://activesupport//lib/active_support/callbacks.rb#916 - def _prepare_callbacks; end - - # source://activesupport//lib/active_support/callbacks.rb#920 - def _prepare_callbacks=(value); end - - # Registers a callback that will run immediately after the classes are unloaded. - # - # source://activesupport//lib/active_support/reloader.rb#44 - def after_class_unload(*args, &block); end - - # Registers a callback that will run immediately before the classes are unloaded. - # - # source://activesupport//lib/active_support/reloader.rb#39 - def before_class_unload(*args, &block); end - - # source://activesupport//lib/active_support/reloader.rb#85 - def check; end - - # source://activesupport//lib/active_support/reloader.rb#87 - def check!; end - - # source://activesupport//lib/active_support/reloader.rb#85 - def check=(value); end - - # source://activesupport//lib/active_support/reloader.rb#85 - def check?; end - - # source://activesupport//lib/active_support/reloader.rb#84 - def executor; end - - # source://activesupport//lib/active_support/reloader.rb#84 - def executor=(value); end - - # source://activesupport//lib/active_support/reloader.rb#84 - def executor?; end - - # source://activesupport//lib/active_support/reloader.rb#95 - def prepare!; end - - # Initiate a manual reload - # - # source://activesupport//lib/active_support/reloader.rb#51 - def reload!; end - - # source://activesupport//lib/active_support/reloader.rb#91 - def reloaded!; end - - # source://activesupport//lib/active_support/reloader.rb#62 - def run!(reset: T.unsafe(nil)); end - - # Registers a callback that will run once at application startup and every time the code is reloaded. - # - # source://activesupport//lib/active_support/reloader.rb#34 - def to_prepare(*args, &block); end - - # Run the supplied block as a work unit, reloading code as needed - # - # source://activesupport//lib/active_support/reloader.rb#71 - def wrap(**kwargs); end - end -end - -# = Active Support \Rescuable -# -# Rescuable module adds support for easier exception handling. -# -# source://activesupport//lib/active_support/rescuable.rb#11 -module ActiveSupport::Rescuable - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActiveSupport::Rescuable::ClassMethods - - # Internal handler lookup. Delegates to class method. Some libraries call - # this directly, so keeping it around for compatibility. - # - # source://activesupport//lib/active_support/rescuable.rb#172 - def handler_for_rescue(exception); end - - # Delegates to the class method, but uses the instance as the subject for - # rescue_from handlers (method calls, +instance_exec+ blocks). - # - # source://activesupport//lib/active_support/rescuable.rb#166 - def rescue_with_handler(exception); end - - module GeneratedClassMethods - def rescue_handlers; end - def rescue_handlers=(value); end - def rescue_handlers?; end - end - - module GeneratedInstanceMethods - def rescue_handlers; end - def rescue_handlers=(value); end - def rescue_handlers?; end - end -end - -# source://activesupport//lib/active_support/rescuable.rb#18 -module ActiveSupport::Rescuable::ClassMethods - # source://activesupport//lib/active_support/rescuable.rb#105 - def handler_for_rescue(exception, object: T.unsafe(nil)); end - - # Registers exception classes with a handler to be called by rescue_with_handler. - # - # rescue_from receives a series of exception classes or class - # names, and an exception handler specified by a trailing :with - # option containing the name of a method or a Proc object. Alternatively, a block - # can be given as the handler. - # - # Handlers that take one argument will be called with the exception, so - # that the exception can be inspected when dealing with it. - # - # Handlers are inherited. They are searched from right to left, from - # bottom to top, and up the hierarchy. The handler of the first class for - # which exception.is_a?(klass) holds true is the one invoked, if - # any. - # - # class ApplicationController < ActionController::Base - # rescue_from User::NotAuthorized, with: :deny_access - # rescue_from ActiveRecord::RecordInvalid, with: :show_record_errors - # - # rescue_from "MyApp::BaseError" do |exception| - # redirect_to root_url, alert: exception.message - # end - # - # private - # def deny_access - # head :forbidden - # end - # - # def show_record_errors(exception) - # redirect_back_or_to root_url, alert: exception.record.errors.full_messages.to_sentence - # end - # end - # - # Exceptions raised inside exception handlers are not propagated up. - # - # source://activesupport//lib/active_support/rescuable.rb#53 - def rescue_from(*klasses, with: T.unsafe(nil), &block); end - - # Matches an exception to a handler based on the exception class. - # - # If no handler matches the exception, check for a handler matching the - # (optional) +exception.cause+. If no handler matches the exception or its - # cause, this returns +nil+, so you can deal with unhandled exceptions. - # Be sure to re-raise unhandled exceptions if this is what you expect. - # - # begin - # # ... - # rescue => exception - # rescue_with_handler(exception) || raise - # end - # - # Returns the exception if it was handled and +nil+ if it was not. - # - # source://activesupport//lib/active_support/rescuable.rb#90 - def rescue_with_handler(exception, object: T.unsafe(nil), visited_exceptions: T.unsafe(nil)); end - - private - - # source://activesupport//lib/active_support/rescuable.rb#139 - def constantize_rescue_handler_class(class_or_name); end - - # source://activesupport//lib/active_support/rescuable.rb#124 - def find_rescue_handler(exception); end -end - -# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#19 -class ActiveSupport::SafeBuffer < ::String - # @return [SafeBuffer] a new instance of SafeBuffer - # - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#70 - def initialize(str = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#123 - def %(args); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#116 - def *(_); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#112 - def +(other); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#80 - def <<(value); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#38 - def [](*args); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#104 - def []=(arg1, arg2, arg3 = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#88 - def bytesplice(*args, value); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#153 - def capitalize(*args, &block); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 - def capitalize!(*args); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#153 - def chomp(*args, &block); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 - def chomp!(*args); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#153 - def chop(*args, &block); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 - def chop!(*args); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#59 - def chr; end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#80 - def concat(value); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#153 - def delete(*args, &block); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 - def delete!(*args); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#153 - def delete_prefix(*args, &block); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 - def delete_prefix!(*args); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#153 - def delete_suffix(*args, &block); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 - def delete_suffix!(*args); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#153 - def downcase(*args, &block); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 - def downcase!(*args); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#146 - def encode_with(coder); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#167 - def gsub(*args, &block); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#178 - def gsub!(*args, &block); end - - # Returns the value of attribute html_safe. - # - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#134 - def html_safe?; end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#92 - def insert(index, value); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#153 - def lstrip(*args, &block); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 - def lstrip!(*args); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#153 - def next(*args, &block); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 - def next!(*args); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#96 - def prepend(value); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#100 - def replace(value); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#153 - def reverse(*args, &block); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 - def reverse!(*args); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#153 - def rstrip(*args, &block); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 - def rstrip!(*args); end - - # @raise [SafeConcatError] - # - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#65 - def safe_concat(value); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#153 - def scrub(*args, &block); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 - def scrub!(*args); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#38 - def slice(*args); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#51 - def slice!(*args); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#153 - def squeeze(*args, &block); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 - def squeeze!(*args); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#153 - def strip(*args, &block); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 - def strip!(*args); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#167 - def sub(*args, &block); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#178 - def sub!(*args, &block); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#153 - def succ(*args, &block); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 - def succ!(*args); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#153 - def swapcase(*args, &block); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 - def swapcase!(*args); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#142 - def to_param; end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#138 - def to_s; end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#153 - def tr(*args, &block); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 - def tr!(*args); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#153 - def tr_s(*args, &block); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 - def tr_s!(*args); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#153 - def unicode_normalize(*args, &block); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 - def unicode_normalize!(*args); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#153 - def upcase(*args, &block); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 - def upcase!(*args); end - - private - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#193 - def explicit_html_escape_interpolated_argument(arg); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#197 - def implicit_html_escape_interpolated_argument(arg); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#75 - def initialize_copy(other); end - - def original_concat(*_arg0); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#205 - def set_block_back_references(block, match_data); end - - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#211 - def string_into_safe_buffer(new_string, is_html_safe); end -end - -# Raised when ActiveSupport::SafeBuffer#safe_concat is called on unsafe buffers. -# -# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#32 -class ActiveSupport::SafeBuffer::SafeConcatError < ::StandardError - # @return [SafeConcatError] a new instance of SafeConcatError - # - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#33 - def initialize; end -end - -# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#20 -ActiveSupport::SafeBuffer::UNSAFE_STRING_METHODS = T.let(T.unsafe(nil), Array) - -# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#26 -ActiveSupport::SafeBuffer::UNSAFE_STRING_METHODS_WITH_BACKREF = T.let(T.unsafe(nil), Array) - -# = Secure Compare Rotator -# -# The ActiveSupport::SecureCompareRotator is a wrapper around ActiveSupport::SecurityUtils.secure_compare -# and allows you to rotate a previously defined value to a new one. -# -# It can be used as follow: -# -# rotator = ActiveSupport::SecureCompareRotator.new('new_production_value') -# rotator.rotate('previous_production_value') -# rotator.secure_compare!('previous_production_value') -# -# One real use case example would be to rotate a basic auth credentials: -# -# class MyController < ApplicationController -# def authenticate_request -# rotator = ActiveSupport::SecureCompareRotator.new('new_password') -# rotator.rotate('old_password') -# -# authenticate_or_request_with_http_basic do |username, password| -# rotator.secure_compare!(password) -# rescue ActiveSupport::SecureCompareRotator::InvalidMatch -# false -# end -# end -# end -# -# source://activesupport//lib/active_support/secure_compare_rotator.rb#32 -class ActiveSupport::SecureCompareRotator - include ::ActiveSupport::SecurityUtils - - # @return [SecureCompareRotator] a new instance of SecureCompareRotator - # - # source://activesupport//lib/active_support/secure_compare_rotator.rb#37 - def initialize(value, on_rotation: T.unsafe(nil)); end - - # source://activesupport//lib/active_support/secure_compare_rotator.rb#43 - def rotate(previous_value); end - - # source://activesupport//lib/active_support/secure_compare_rotator.rb#47 - def secure_compare!(other_value, on_rotation: T.unsafe(nil)); end -end - -# source://activesupport//lib/active_support/secure_compare_rotator.rb#35 -class ActiveSupport::SecureCompareRotator::InvalidMatch < ::StandardError; end - -# source://activesupport//lib/active_support/security_utils.rb#4 -module ActiveSupport::SecurityUtils - private - - # @raise [ArgumentError] - # - # source://activesupport//lib/active_support/security_utils.rb#11 - def fixed_length_secure_compare(a, b); end - - # Secure string comparison for strings of variable length. - # - # While a timing attack would not be able to discern the content of - # a secret compared via secure_compare, it is possible to determine - # the secret length. This should be considered when using secure_compare - # to compare weak, short secrets to user input. - # - # source://activesupport//lib/active_support/security_utils.rb#33 - def secure_compare(a, b); end - - class << self - # @raise [ArgumentError] - # - # source://activesupport//lib/active_support/security_utils.rb#11 - def fixed_length_secure_compare(a, b); end - - # Secure string comparison for strings of variable length. - # - # While a timing attack would not be able to discern the content of - # a secret compared via secure_compare, it is possible to determine - # the secret length. This should be considered when using secure_compare - # to compare weak, short secrets to user input. - # - # source://activesupport//lib/active_support/security_utils.rb#33 - def secure_compare(a, b); end - end -end - -# = \String Inquirer -# -# Wrapping a string in this class gives you a prettier way to test -# for equality. The value returned by Rails.env is wrapped -# in a StringInquirer object, so instead of calling this: -# -# Rails.env == 'production' -# -# you can call this: -# -# Rails.env.production? -# -# == Instantiating a new \StringInquirer -# -# vehicle = ActiveSupport::StringInquirer.new('car') -# vehicle.car? # => true -# vehicle.bike? # => false -# -# source://activesupport//lib/active_support/string_inquirer.rb#21 -class ActiveSupport::StringInquirer < ::String - private - - # source://activesupport//lib/active_support/string_inquirer.rb#27 - def method_missing(method_name, *_arg1, **_arg2, &_arg3); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/string_inquirer.rb#23 - def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end -end - -# = Active Support \Subscriber -# -# +ActiveSupport::Subscriber+ is an object set to consume -# ActiveSupport::Notifications. The subscriber dispatches notifications to -# a registered object based on its given namespace. -# -# An example would be an Active Record subscriber responsible for collecting -# statistics about queries: -# -# module ActiveRecord -# class StatsSubscriber < ActiveSupport::Subscriber -# attach_to :active_record -# -# def sql(event) -# Statsd.timing("sql.#{event.payload[:name]}", event.duration) -# end -# end -# end -# -# After configured, whenever a "sql.active_record" notification is -# published, it will properly dispatch the event -# (ActiveSupport::Notifications::Event) to the +sql+ method. -# -# We can detach a subscriber as well: -# -# ActiveRecord::StatsSubscriber.detach_from(:active_record) -# -# source://activesupport//lib/active_support/subscriber.rb#32 -class ActiveSupport::Subscriber - # @return [Subscriber] a new instance of Subscriber - # - # source://activesupport//lib/active_support/subscriber.rb#131 - def initialize; end - - # source://activesupport//lib/active_support/subscriber.rb#136 - def call(event); end - - # source://activesupport//lib/active_support/subscriber.rb#129 - def patterns; end - - # source://activesupport//lib/active_support/subscriber.rb#141 - def publish_event(event); end - - class << self - # Attach the subscriber to a namespace. - # - # source://activesupport//lib/active_support/subscriber.rb#35 - def attach_to(namespace, subscriber = T.unsafe(nil), notifier = T.unsafe(nil), inherit_all: T.unsafe(nil)); end - - # Detach the subscriber from a namespace. - # - # source://activesupport//lib/active_support/subscriber.rb#50 - def detach_from(namespace, notifier = T.unsafe(nil)); end - - # Adds event subscribers for all new methods added to the class. - # - # source://activesupport//lib/active_support/subscriber.rb#69 - def method_added(event); end - - # source://activesupport//lib/active_support/subscriber.rb#79 - def subscribers; end - - private - - # source://activesupport//lib/active_support/subscriber.rb#86 - def add_event_subscriber(event); end - - # source://activesupport//lib/active_support/subscriber.rb#124 - def fetch_public_methods(subscriber, inherit_all); end - - # source://activesupport//lib/active_support/subscriber.rb#108 - def find_attached_subscriber; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/subscriber.rb#112 - def invalid_event?(event); end - - # Returns the value of attribute namespace. - # - # source://activesupport//lib/active_support/subscriber.rb#84 - def namespace; end - - # Returns the value of attribute notifier. - # - # source://activesupport//lib/active_support/subscriber.rb#84 - def notifier; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/subscriber.rb#120 - def pattern_subscribed?(pattern); end - - # source://activesupport//lib/active_support/subscriber.rb#116 - def prepare_pattern(event); end - - # source://activesupport//lib/active_support/subscriber.rb#97 - def remove_event_subscriber(event); end - - # Returns the value of attribute subscriber. - # - # source://activesupport//lib/active_support/subscriber.rb#84 - def subscriber; end - end -end - -# = Active Support Tagged Logging -# -# Wraps any standard Logger object to provide tagging capabilities. -# -# May be called with a block: -# -# logger = ActiveSupport::TaggedLogging.new(Logger.new(STDOUT)) -# logger.tagged('BCX') { logger.info 'Stuff' } # Logs "[BCX] Stuff" -# logger.tagged('BCX', "Jason") { |tagged_logger| tagged_logger.info 'Stuff' } # Logs "[BCX] [Jason] Stuff" -# logger.tagged('BCX') { logger.tagged('Jason') { logger.info 'Stuff' } } # Logs "[BCX] [Jason] Stuff" -# -# If called without a block, a new logger will be returned with applied tags: -# -# logger = ActiveSupport::TaggedLogging.new(Logger.new(STDOUT)) -# logger.tagged("BCX").info "Stuff" # Logs "[BCX] Stuff" -# logger.tagged("BCX", "Jason").info "Stuff" # Logs "[BCX] [Jason] Stuff" -# logger.tagged("BCX").tagged("Jason").info "Stuff" # Logs "[BCX] [Jason] Stuff" -# -# This is used by the default Rails.logger as configured by Railties to make -# it easy to stamp log lines with subdomains, request ids, and anything else -# to aid debugging of multi-user production applications. -# -# source://activesupport//lib/active_support/tagged_logging.rb#29 -module ActiveSupport::TaggedLogging - # source://activesupport//lib/active_support/tagged_logging.rb#134 - def clear_tags!(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/tagged_logging.rb#147 - def flush; end - - # source://activesupport//lib/active_support/tagged_logging.rb#134 - def pop_tags(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/tagged_logging.rb#134 - def push_tags(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/tagged_logging.rb#136 - def tagged(*tags); end - - class << self - # source://activesupport//lib/active_support/tagged_logging.rb#116 - def new(logger); end - end -end - -# source://activesupport//lib/active_support/tagged_logging.rb#30 -module ActiveSupport::TaggedLogging::Formatter - # This method is invoked when a log event occurs. - # - # source://activesupport//lib/active_support/tagged_logging.rb#32 - def call(severity, timestamp, progname, msg); end - - # source://activesupport//lib/active_support/tagged_logging.rb#51 - def clear_tags!; end - - # source://activesupport//lib/active_support/tagged_logging.rb#61 - def current_tags; end - - # source://activesupport//lib/active_support/tagged_logging.rb#47 - def pop_tags(count = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/tagged_logging.rb#43 - def push_tags(*tags); end - - # source://activesupport//lib/active_support/tagged_logging.rb#55 - def tag_stack; end - - # source://activesupport//lib/active_support/tagged_logging.rb#36 - def tagged(*tags); end - - # source://activesupport//lib/active_support/tagged_logging.rb#65 - def tags_text; end -end - -# source://activesupport//lib/active_support/tagged_logging.rb#108 -module ActiveSupport::TaggedLogging::LocalTagStorage - # Returns the value of attribute tag_stack. - # - # source://activesupport//lib/active_support/tagged_logging.rb#109 - def tag_stack; end - - # Sets the attribute tag_stack - # - # @param value the value to set the attribute tag_stack to. - # - # source://activesupport//lib/active_support/tagged_logging.rb#109 - def tag_stack=(_arg0); end - - class << self - # @private - # - # source://activesupport//lib/active_support/tagged_logging.rb#111 - def extended(base); end - end -end - -# source://activesupport//lib/active_support/tagged_logging.rb#70 -class ActiveSupport::TaggedLogging::TagStack - # @return [TagStack] a new instance of TagStack - # - # source://activesupport//lib/active_support/tagged_logging.rb#73 - def initialize; end - - # source://activesupport//lib/active_support/tagged_logging.rb#91 - def clear; end - - # source://activesupport//lib/active_support/tagged_logging.rb#96 - def format_message(message); end - - # source://activesupport//lib/active_support/tagged_logging.rb#86 - def pop_tags(count); end - - # source://activesupport//lib/active_support/tagged_logging.rb#78 - def push_tags(tags); end - - # Returns the value of attribute tags. - # - # source://activesupport//lib/active_support/tagged_logging.rb#71 - def tags; end -end - -# source://activesupport//lib/active_support/test_case.rb#21 -class ActiveSupport::TestCase < ::Minitest::Test - include ::ActiveSupport::Testing::SetupAndTeardown - include ::ActiveSupport::Testing::TestsWithoutAssertions - include ::ActiveSupport::Testing::TaggedLogging - include ::ActiveSupport::Callbacks - include ::ActiveSupport::Testing::Assertions - include ::ActiveSupport::Testing::ErrorReporterAssertions - include ::ActiveSupport::Testing::Deprecation - include ::ActiveSupport::Testing::ConstantStubbing - include ::ActiveSupport::Testing::TimeHelpers - include ::ActiveSupport::Testing::FileFixtures - extend ::ActiveSupport::Callbacks::ClassMethods - extend ::ActiveSupport::DescendantsTracker - extend ::ActiveSupport::Testing::SetupAndTeardown::ClassMethods - extend ::ActiveSupport::Testing::Declarative - - # source://activesupport//lib/active_support/callbacks.rb#70 - def __callbacks; end - - # source://activesupport//lib/active_support/callbacks.rb#70 - def __callbacks?; end - - # source://activesupport//lib/active_support/callbacks.rb#912 - def _run_setup_callbacks(&block); end - - # source://activesupport//lib/active_support/callbacks.rb#912 - def _run_teardown_callbacks(&block); end - - # source://activesupport//lib/active_support/callbacks.rb#924 - def _setup_callbacks; end - - # source://activesupport//lib/active_support/callbacks.rb#924 - def _teardown_callbacks; end - - # source://minitest/5.25.1/lib/minitest/assertions.rb#731 - def assert_no_match(matcher, obj, msg = T.unsafe(nil)); end - - # source://minitest/5.25.1/lib/minitest/assertions.rb#660 - def assert_not_empty(obj, msg = T.unsafe(nil)); end - - # source://minitest/5.25.1/lib/minitest/assertions.rb#671 - def assert_not_equal(exp, act, msg = T.unsafe(nil)); end - - # source://minitest/5.25.1/lib/minitest/assertions.rb#683 - def assert_not_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end - - # source://minitest/5.25.1/lib/minitest/assertions.rb#695 - def assert_not_in_epsilon(a, b, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end - - # source://minitest/5.25.1/lib/minitest/assertions.rb#702 - def assert_not_includes(collection, obj, msg = T.unsafe(nil)); end - - # source://minitest/5.25.1/lib/minitest/assertions.rb#713 - def assert_not_instance_of(cls, obj, msg = T.unsafe(nil)); end - - # source://minitest/5.25.1/lib/minitest/assertions.rb#723 - def assert_not_kind_of(cls, obj, msg = T.unsafe(nil)); end - - # source://minitest/5.25.1/lib/minitest/assertions.rb#741 - def assert_not_nil(obj, msg = T.unsafe(nil)); end - - # source://minitest/5.25.1/lib/minitest/assertions.rb#776 - def assert_not_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end - - # source://minitest/5.25.1/lib/minitest/assertions.rb#799 - def assert_not_predicate(o1, op, msg = T.unsafe(nil)); end - - # source://minitest/5.25.1/lib/minitest/assertions.rb#808 - def assert_not_respond_to(obj, meth, msg = T.unsafe(nil), include_all: T.unsafe(nil)); end - - # source://minitest/5.25.1/lib/minitest/assertions.rb#817 - def assert_not_same(exp, act, msg = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/testing/file_fixtures.rb#20 - def file_fixture_path; end - - # source://activesupport//lib/active_support/testing/file_fixtures.rb#20 - def file_fixture_path?; end - - # source://activesupport//lib/active_support/test_case.rb#300 - def inspect; end - - # source://minitest/5.25.1/lib/minitest.rb#375 - def method_name; end - - class << self - # source://activesupport//lib/active_support/callbacks.rb#70 - def __callbacks; end - - # source://activesupport//lib/active_support/callbacks.rb#70 - def __callbacks=(value); end - - # source://activesupport//lib/active_support/callbacks.rb#70 - def __callbacks?; end - - # source://activesupport//lib/active_support/callbacks.rb#916 - def _setup_callbacks; end - - # source://activesupport//lib/active_support/callbacks.rb#920 - def _setup_callbacks=(value); end - - # source://activesupport//lib/active_support/callbacks.rb#916 - def _teardown_callbacks; end - - # source://activesupport//lib/active_support/callbacks.rb#920 - def _teardown_callbacks=(value); end - - # source://activesupport//lib/active_support/testing/file_fixtures.rb#20 - def file_fixture_path; end - - # source://activesupport//lib/active_support/testing/file_fixtures.rb#20 - def file_fixture_path=(value); end - - # source://activesupport//lib/active_support/testing/file_fixtures.rb#20 - def file_fixture_path?; end - - # Parallelizes the test suite. - # - # Takes a +workers+ argument that controls how many times the process - # is forked. For each process a new database will be created suffixed - # with the worker number. - # - # test-database-0 - # test-database-1 - # - # If ENV["PARALLEL_WORKERS"] is set the workers argument will be ignored - # and the environment variable will be used instead. This is useful for CI - # environments, or other environments where you may need more workers than - # you do for local testing. - # - # If the number of workers is set to +1+ or fewer, the tests will not be - # parallelized. - # - # If +workers+ is set to +:number_of_processors+, the number of workers will be - # set to the actual core count on the machine you are on. - # - # The default parallelization method is to fork processes. If you'd like to - # use threads instead you can pass with: :threads to the +parallelize+ - # method. Note the threaded parallelization does not create multiple - # databases and will not work with system tests. - # - # parallelize(workers: :number_of_processors, with: :threads) - # - # The threaded parallelization uses minitest's parallel executor directly. - # The processes parallelization uses a Ruby DRb server. - # - # Because parallelization presents an overhead, it is only enabled when the - # number of tests to run is above the +threshold+ param. The default value is - # 50, and it's configurable via +config.active_support.test_parallelization_threshold+. - # - # source://activesupport//lib/active_support/test_case.rb#81 - def parallelize(workers: T.unsafe(nil), with: T.unsafe(nil), threshold: T.unsafe(nil)); end - - # Set up hook for parallel testing. This can be used if you have multiple - # databases or any behavior that needs to be run after the process is forked - # but before the tests run. - # - # Note: this feature is not available with the threaded parallelization. - # - # In your +test_helper.rb+ add the following: - # - # class ActiveSupport::TestCase - # parallelize_setup do - # # create databases - # end - # end - # - # source://activesupport//lib/active_support/test_case.rb#101 - def parallelize_setup(&block); end - - # Clean up hook for parallel testing. This can be used to drop databases - # if your app uses multiple write/read databases or other clean up before - # the tests finish. This runs before the forked process is closed. - # - # Note: this feature is not available with the threaded parallelization. - # - # In your +test_helper.rb+ add the following: - # - # class ActiveSupport::TestCase - # parallelize_teardown do - # # drop databases - # end - # end - # - # source://activesupport//lib/active_support/test_case.rb#118 - def parallelize_teardown(&block); end - - # Returns the order in which test cases are run. - # - # ActiveSupport::TestCase.test_order # => :random - # - # Possible values are +:random+, +:parallel+, +:alpha+, +:sorted+. - # Defaults to +:random+. - # - # source://activesupport//lib/active_support/test_case.rb#44 - def test_order; end - - # Sets the order in which test cases are run. - # - # ActiveSupport::TestCase.test_order = :random # => :random - # - # Valid values are: - # * +:random+ (to run tests in random order) - # * +:parallel+ (to run tests in parallel) - # * +:sorted+ (to run tests alphabetically by method name) - # * +:alpha+ (equivalent to +:sorted+) - # - # source://activesupport//lib/active_support/test_case.rb#34 - def test_order=(new_order); end - end -end - -# source://activesupport//lib/active_support/test_case.rb#22 -ActiveSupport::TestCase::Assertion = Minitest::Assertion - -# source://activesupport//lib/active_support/testing/tagged_logging.rb#4 -module ActiveSupport::Testing; end - -# source://activesupport//lib/active_support/testing/assertions.rb#7 -module ActiveSupport::Testing::Assertions - # Assertion that the result of evaluating an expression is changed before - # and after invoking the passed in block. - # - # assert_changes 'Status.all_good?' do - # post :create, params: { status: { ok: false } } - # end - # - # You can pass the block as a string to be evaluated in the context of - # the block. A lambda can be passed for the block as well. - # - # assert_changes -> { Status.all_good? } do - # post :create, params: { status: { ok: false } } - # end - # - # The assertion is useful to test side effects. The passed block can be - # anything that can be converted to string with #to_s. - # - # assert_changes :@object do - # @object = 42 - # end - # - # The keyword arguments +:from+ and +:to+ can be given to specify the - # expected initial value and the expected value after the block was - # executed. - # - # assert_changes :@object, from: nil, to: :foo do - # @object = :foo - # end - # - # An error message can be specified. - # - # assert_changes -> { Status.all_good? }, 'Expected the status to be bad' do - # post :create, params: { status: { incident: true } } - # end - # - # source://activesupport//lib/active_support/testing/assertions.rb#191 - def assert_changes(expression, message = T.unsafe(nil), from: T.unsafe(nil), to: T.unsafe(nil), &block); end - - # Test numeric difference between the return value of an expression as a - # result of what is evaluated in the yielded block. - # - # assert_difference 'Article.count' do - # post :create, params: { article: {...} } - # end - # - # An arbitrary expression is passed in and evaluated. - # - # assert_difference 'Article.last.comments(:reload).size' do - # post :create, params: { comment: {...} } - # end - # - # An arbitrary positive or negative difference can be specified. - # The default is +1+. - # - # assert_difference 'Article.count', -1 do - # post :delete, params: { id: ... } - # end - # - # An array of expressions can also be passed in and evaluated. - # - # assert_difference [ 'Article.count', 'Post.count' ], 2 do - # post :create, params: { article: {...} } - # end - # - # A hash of expressions/numeric differences can also be passed in and evaluated. - # - # assert_difference ->{ Article.count } => 1, ->{ Notification.count } => 2 do - # post :create, params: { article: {...} } - # end - # - # A lambda or a list of lambdas can be passed in and evaluated: - # - # assert_difference ->{ Article.count }, 2 do - # post :create, params: { article: {...} } - # end - # - # assert_difference [->{ Article.count }, ->{ Post.count }], 2 do - # post :create, params: { article: {...} } - # end - # - # An error message can be specified. - # - # assert_difference 'Article.count', -1, 'An Article should be destroyed' do - # post :delete, params: { id: ... } - # end - # - # source://activesupport//lib/active_support/testing/assertions.rb#101 - def assert_difference(expression, *args, &block); end - - # Assertion that the result of evaluating an expression is not changed before - # and after invoking the passed in block. - # - # assert_no_changes 'Status.all_good?' do - # post :create, params: { status: { ok: true } } - # end - # - # Provide the optional keyword argument +:from+ to specify the expected - # initial value. - # - # assert_no_changes -> { Status.all_good? }, from: true do - # post :create, params: { status: { ok: true } } - # end - # - # An error message can be specified. - # - # assert_no_changes -> { Status.all_good? }, 'Expected the status to be good' do - # post :create, params: { status: { ok: false } } - # end - # - # source://activesupport//lib/active_support/testing/assertions.rb#238 - def assert_no_changes(expression, message = T.unsafe(nil), from: T.unsafe(nil), &block); end - - # Assertion that the numeric result of evaluating an expression is not - # changed before and after invoking the passed in block. - # - # assert_no_difference 'Article.count' do - # post :create, params: { article: invalid_attributes } - # end - # - # A lambda can be passed in and evaluated. - # - # assert_no_difference -> { Article.count } do - # post :create, params: { article: invalid_attributes } - # end - # - # An error message can be specified. - # - # assert_no_difference 'Article.count', 'An Article should not be created' do - # post :create, params: { article: invalid_attributes } - # end - # - # An array of expressions can also be passed in and evaluated. - # - # assert_no_difference [ 'Article.count', -> { Post.count } ] do - # post :create, params: { article: invalid_attributes } - # end - # - # source://activesupport//lib/active_support/testing/assertions.rb#153 - def assert_no_difference(expression, message = T.unsafe(nil), &block); end - - # Asserts that an expression is not truthy. Passes if +object+ is +nil+ or - # +false+. "Truthy" means "considered true in a conditional" like if - # foo. - # - # assert_not nil # => true - # assert_not false # => true - # assert_not 'foo' # => Expected "foo" to be nil or false - # - # An error message can be specified. - # - # assert_not foo, 'foo should be false' - # - # source://activesupport//lib/active_support/testing/assertions.rb#21 - def assert_not(object, message = T.unsafe(nil)); end - - # Assertion that the block should not raise an exception. - # - # Passes if evaluated code in the yielded block raises no exception. - # - # assert_nothing_raised do - # perform_service(param: 'no_exception') - # end - # - # source://activesupport//lib/active_support/testing/assertions.rb#48 - def assert_nothing_raised; end - - # Asserts that a block raises one of +exp+. This is an enhancement of the - # standard Minitest assertion method with the ability to test error - # messages. - # - # assert_raises(ArgumentError, match: /incorrect param/i) do - # perform_service(param: 'exception') - # end - # - # source://activesupport//lib/active_support/testing/assertions.rb#34 - def assert_raise(*exp, match: T.unsafe(nil), &block); end - - # Asserts that a block raises one of +exp+. This is an enhancement of the - # standard Minitest assertion method with the ability to test error - # messages. - # - # assert_raises(ArgumentError, match: /incorrect param/i) do - # perform_service(param: 'exception') - # end - # - # source://activesupport//lib/active_support/testing/assertions.rb#34 - def assert_raises(*exp, match: T.unsafe(nil), &block); end - - private - - # source://activesupport//lib/active_support/testing/assertions.rb#265 - def _assert_nothing_raised_or_warn(assertion, &block); end -end - -# source://activesupport//lib/active_support/testing/assertions.rb#8 -ActiveSupport::Testing::Assertions::UNTRACKED = T.let(T.unsafe(nil), Object) - -# Resolves a constant from a minitest spec name. -# -# Given the following spec-style test: -# -# describe WidgetsController, :index do -# describe "authenticated user" do -# describe "returns widgets" do -# it "has a controller that exists" do -# assert_kind_of WidgetsController, @controller -# end -# end -# end -# end -# -# The test will have the following name: -# -# "WidgetsController::index::authenticated user::returns widgets" -# -# The constant WidgetsController can be resolved from the name. -# The following code will resolve the constant: -# -# controller = determine_constant_from_test_name(name) do |constant| -# Class === constant && constant < ::ActionController::Metal -# end -# -# source://activesupport//lib/active_support/testing/constant_lookup.rb#32 -module ActiveSupport::Testing::ConstantLookup - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActiveSupport::Testing::ConstantLookup::ClassMethods -end - -# source://activesupport//lib/active_support/testing/constant_lookup.rb#35 -module ActiveSupport::Testing::ConstantLookup::ClassMethods - # source://activesupport//lib/active_support/testing/constant_lookup.rb#36 - def determine_constant_from_test_name(test_name); end -end - -# source://activesupport//lib/active_support/testing/constant_stubbing.rb#5 -module ActiveSupport::Testing::ConstantStubbing - # Changes the value of a constant for the duration of a block. Example: - # - # # World::List::Import::LARGE_IMPORT_THRESHOLD = 5000 - # stub_const(World::List::Import, :LARGE_IMPORT_THRESHOLD, 1) do - # assert_equal 1, World::List::Import::LARGE_IMPORT_THRESHOLD - # end - # - # assert_equal 5000, World::List::Import::LARGE_IMPORT_THRESHOLD - # - # Using this method rather than forcing World::List::Import::LARGE_IMPORT_THRESHOLD = 5000 prevents - # warnings from being thrown, and ensures that the old value is returned after the test has completed. - # - # If the constant doesn't already exists, but you need it set for the duration of the block - # you can do so by passing `exists: false`. - # - # stub_const(object, :SOME_CONST, 1, exists: false) do - # assert_equal 1, SOME_CONST - # end - # - # Note: Stubbing a const will stub it across all threads. So if you have concurrent threads - # (like separate test suites running in parallel) that all depend on the same constant, it's possible - # divergent stubbing will trample on each other. - # - # source://activesupport//lib/active_support/testing/constant_stubbing.rb#28 - def stub_const(mod, constant, new_value, exists: T.unsafe(nil)); end -end - -# source://activesupport//lib/active_support/testing/declarative.rb#5 -module ActiveSupport::Testing::Declarative - # Helper to define a test method using a String. Under the hood, it replaces - # spaces with underscores and defines the test method. - # - # test "verify something" do - # ... - # end - # - # source://activesupport//lib/active_support/testing/declarative.rb#13 - def test(name, &block); end -end - -# source://activesupport//lib/active_support/testing/deprecation.rb#7 -module ActiveSupport::Testing::Deprecation - # :call-seq: - # assert_deprecated(deprecator, &block) - # assert_deprecated(match, deprecator, &block) - # - # Asserts that a matching deprecation warning was emitted by the given deprecator during the execution of the yielded block. - # - # assert_deprecated(/foo/, CustomDeprecator) do - # CustomDeprecator.warn "foo should no longer be used" - # end - # - # The +match+ object may be a +Regexp+, or +String+ appearing in the message. - # - # assert_deprecated('foo', CustomDeprecator) do - # CustomDeprecator.warn "foo should no longer be used" - # end - # - # If the +match+ is omitted (or explicitly +nil+), any deprecation warning will match. - # - # assert_deprecated(CustomDeprecator) do - # CustomDeprecator.warn "foo should no longer be used" - # end - # - # source://activesupport//lib/active_support/testing/deprecation.rb#30 - def assert_deprecated(match = T.unsafe(nil), deprecator = T.unsafe(nil), &block); end - - # Asserts that no deprecation warnings are emitted by the given deprecator during the execution of the yielded block. - # - # assert_not_deprecated(CustomDeprecator) do - # CustomDeprecator.warn "message" # fails assertion - # end - # - # assert_not_deprecated(ActiveSupport::Deprecation.new) do - # CustomDeprecator.warn "message" # passes assertion, different deprecator - # end - # - # source://activesupport//lib/active_support/testing/deprecation.rb#55 - def assert_not_deprecated(deprecator, &block); end - - # Returns the return value of the block and an array of all the deprecation warnings emitted by the given - # +deprecator+ during the execution of the yielded block. - # - # collect_deprecations(CustomDeprecator) do - # CustomDeprecator.warn "message" - # ActiveSupport::Deprecation.new.warn "other message" - # :result - # end # => [:result, ["message"]] - # - # source://activesupport//lib/active_support/testing/deprecation.rb#69 - def collect_deprecations(deprecator); end -end - -# source://activesupport//lib/active_support/testing/error_reporter_assertions.rb#5 -module ActiveSupport::Testing::ErrorReporterAssertions - # Assertion that the block should cause at least one exception to be reported - # to +Rails.error+. - # - # Passes if the evaluated code in the yielded block reports a matching exception. - # - # assert_error_reported(IOError) do - # Rails.error.report(IOError.new("Oops")) - # end - # - # To test further details about the reported exception, you can use the return - # value. - # - # report = assert_error_reported(IOError) do - # # ... - # end - # assert_equal "Oops", report.error.message - # assert_equal "admin", report.context[:section] - # assert_equal :warning, report.severity - # assert_predicate report, :handled? - # - # source://activesupport//lib/active_support/testing/error_reporter_assertions.rb#88 - def assert_error_reported(error_class = T.unsafe(nil), &block); end - - # Assertion that the block should not cause an exception to be reported - # to +Rails.error+. - # - # Passes if evaluated code in the yielded block reports no exception. - # - # assert_no_error_reported do - # perform_service(param: 'no_exception') - # end - # - # source://activesupport//lib/active_support/testing/error_reporter_assertions.rb#62 - def assert_no_error_reported(&block); end -end - -# source://activesupport//lib/active_support/testing/error_reporter_assertions.rb#6 -module ActiveSupport::Testing::ErrorReporterAssertions::ErrorCollector - class << self - # source://activesupport//lib/active_support/testing/error_reporter_assertions.rb#16 - def record; end - - # source://activesupport//lib/active_support/testing/error_reporter_assertions.rb#29 - def report(error, **kwargs); end - - private - - # source://activesupport//lib/active_support/testing/error_reporter_assertions.rb#38 - def subscribe; end - end -end - -# source://activesupport//lib/active_support/testing/error_reporter_assertions.rb#10 -class ActiveSupport::Testing::ErrorReporterAssertions::ErrorCollector::Report < ::Struct - # Returns the value of attribute context - # - # @return [Object] the current value of context - def context; end - - # Sets the attribute context - # - # @param value [Object] the value to set the attribute context to. - # @return [Object] the newly set value - def context=(_); end - - # Returns the value of attribute error - # - # @return [Object] the current value of error - def error; end - - # Sets the attribute error - # - # @param value [Object] the value to set the attribute error to. - # @return [Object] the newly set value - def error=(_); end - - # Returns the value of attribute handled - # - # @return [Object] the current value of handled - def handled; end - - # Sets the attribute handled - # - # @param value [Object] the value to set the attribute handled to. - # @return [Object] the newly set value - def handled=(_); end - - # Returns the value of attribute handled - # - # @return [Object] the current value of handled - def handled?; end - - # Returns the value of attribute severity - # - # @return [Object] the current value of severity - def severity; end - - # Sets the attribute severity - # - # @param value [Object] the value to set the attribute severity to. - # @return [Object] the newly set value - def severity=(_); end - - # Returns the value of attribute source - # - # @return [Object] the current value of source - def source; end - - # Sets the attribute source - # - # @param value [Object] the value to set the attribute source to. - # @return [Object] the newly set value - def source=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# Adds simple access to sample files called file fixtures. -# File fixtures are normal files stored in -# ActiveSupport::TestCase.file_fixture_path. -# -# File fixtures are represented as +Pathname+ objects. -# This makes it easy to extract specific information: -# -# file_fixture("example.txt").read # get the file's content -# file_fixture("example.mp3").size # get the file size -# -# source://activesupport//lib/active_support/testing/file_fixtures.rb#16 -module ActiveSupport::Testing::FileFixtures - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - - # Returns a +Pathname+ to the fixture file named +fixture_name+. - # - # Raises +ArgumentError+ if +fixture_name+ can't be found. - # - # source://activesupport//lib/active_support/testing/file_fixtures.rb#26 - def file_fixture(fixture_name); end - - module GeneratedClassMethods - def file_fixture_path; end - def file_fixture_path=(value); end - def file_fixture_path?; end - end - - module GeneratedInstanceMethods - def file_fixture_path; end - def file_fixture_path?; end - end -end - -# source://activesupport//lib/active_support/testing/isolation.rb#7 -module ActiveSupport::Testing::Isolation - include ::ActiveSupport::Testing::Isolation::Forking - - # source://activesupport//lib/active_support/testing/isolation.rb#22 - def run; end - - class << self - # @return [Boolean] - # - # source://activesupport//lib/active_support/testing/isolation.rb#18 - def forking_env?; end - - # source://activesupport//lib/active_support/testing/isolation.rb#12 - def included(klass); end - end -end - -# source://activesupport//lib/active_support/testing/isolation.rb#37 -module ActiveSupport::Testing::Isolation::Forking - # source://activesupport//lib/active_support/testing/isolation.rb#38 - def run_in_isolation(&blk); end -end - -# source://activesupport//lib/active_support/testing/isolation.rb#75 -module ActiveSupport::Testing::Isolation::Subprocess - # Complicated H4X to get this working in Windows / JRuby with - # no forking. - # - # source://activesupport//lib/active_support/testing/isolation.rb#80 - def run_in_isolation(&blk); end -end - -# source://activesupport//lib/active_support/testing/isolation.rb#76 -ActiveSupport::Testing::Isolation::Subprocess::ORIG_ARGV = T.let(T.unsafe(nil), Array) - -# source://activesupport//lib/active_support/testing/isolation.rb#10 -class ActiveSupport::Testing::Isolation::SubprocessCrashed < ::StandardError; end - -# source://activesupport//lib/active_support/testing/parallelization/server.rb#8 -class ActiveSupport::Testing::Parallelization - # @return [Parallelization] a new instance of Parallelization - # - # source://activesupport//lib/active_support/testing/parallelization.rb#28 - def initialize(worker_count); end - - # source://activesupport//lib/active_support/testing/parallelization.rb#41 - def <<(work); end - - # source://activesupport//lib/active_support/testing/parallelization.rb#18 - def after_fork_hooks; end - - # source://activesupport//lib/active_support/testing/parallelization.rb#26 - def run_cleanup_hooks; end - - # source://activesupport//lib/active_support/testing/parallelization.rb#49 - def shutdown; end - - # source://activesupport//lib/active_support/testing/parallelization.rb#45 - def size; end - - # source://activesupport//lib/active_support/testing/parallelization.rb#35 - def start; end - - class << self - # source://activesupport//lib/active_support/testing/parallelization.rb#14 - def after_fork_hook(&blk); end - - # source://activesupport//lib/active_support/testing/parallelization.rb#18 - def after_fork_hooks; end - - # source://activesupport//lib/active_support/testing/parallelization.rb#22 - def run_cleanup_hook(&blk); end - - # source://activesupport//lib/active_support/testing/parallelization.rb#26 - def run_cleanup_hooks; end - end -end - -# source://activesupport//lib/active_support/testing/parallelization/server.rb#9 -class ActiveSupport::Testing::Parallelization::PrerecordResultClass < ::Struct - # Returns the value of attribute name - # - # @return [Object] the current value of name - def name; end - - # Sets the attribute name - # - # @param value [Object] the value to set the attribute name to. - # @return [Object] the newly set value - def name=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://activesupport//lib/active_support/testing/parallelization/server.rb#11 -class ActiveSupport::Testing::Parallelization::Server - include ::DRb::DRbUndumped - - # @return [Server] a new instance of Server - # - # source://activesupport//lib/active_support/testing/parallelization/server.rb#14 - def initialize; end - - # source://activesupport//lib/active_support/testing/parallelization/server.rb#31 - def <<(o); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/testing/parallelization/server.rb#51 - def active_workers?; end - - # source://activesupport//lib/active_support/testing/parallelization/server.rb#55 - def interrupt; end - - # source://activesupport//lib/active_support/testing/parallelization/server.rb#36 - def pop; end - - # @raise [DRb::DRbConnError] - # - # source://activesupport//lib/active_support/testing/parallelization/server.rb#20 - def record(reporter, result); end - - # source://activesupport//lib/active_support/testing/parallelization/server.rb#59 - def shutdown; end - - # source://activesupport//lib/active_support/testing/parallelization/server.rb#43 - def start_worker(worker_id); end - - # source://activesupport//lib/active_support/testing/parallelization/server.rb#47 - def stop_worker(worker_id); end -end - -# source://activesupport//lib/active_support/testing/parallelization/worker.rb#6 -class ActiveSupport::Testing::Parallelization::Worker - # @return [Worker] a new instance of Worker - # - # source://activesupport//lib/active_support/testing/parallelization/worker.rb#7 - def initialize(number, url); end - - # source://activesupport//lib/active_support/testing/parallelization/worker.rb#80 - def after_fork; end - - # source://activesupport//lib/active_support/testing/parallelization/worker.rb#42 - def perform_job(job); end - - # source://activesupport//lib/active_support/testing/parallelization/worker.rb#86 - def run_cleanup; end - - # source://activesupport//lib/active_support/testing/parallelization/worker.rb#56 - def safe_record(reporter, result); end - - # source://activesupport//lib/active_support/testing/parallelization/worker.rb#14 - def start; end - - # source://activesupport//lib/active_support/testing/parallelization/worker.rb#36 - def work_from_queue; end - - private - - # source://activesupport//lib/active_support/testing/parallelization/worker.rb#93 - def add_setup_exception(result); end - - # source://activesupport//lib/active_support/testing/parallelization/worker.rb#97 - def set_process_title(status); end -end - -# source://activesupport//lib/active_support/testing/parallelize_executor.rb#5 -class ActiveSupport::Testing::ParallelizeExecutor - # @return [ParallelizeExecutor] a new instance of ParallelizeExecutor - # - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#8 - def initialize(size:, with:, threshold: T.unsafe(nil)); end - - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#22 - def <<(work); end - - # Returns the value of attribute parallelize_with. - # - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#6 - def parallelize_with; end - - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#26 - def shutdown; end - - # Returns the value of attribute size. - # - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#6 - def size; end - - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#15 - def start; end - - # Returns the value of attribute threshold. - # - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#6 - def threshold; end - - private - - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#35 - def build_parallel_executor; end - - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#72 - def execution_info; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#60 - def many_workers?; end - - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#31 - def parallel_executor; end - - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#47 - def parallelize; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#52 - def parallelized?; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#56 - def should_parallelize?; end - - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#68 - def show_execution_info; end - - # source://activesupport//lib/active_support/testing/parallelize_executor.rb#64 - def tests_count; end -end - -# Adds support for +setup+ and +teardown+ callbacks. -# These callbacks serve as a replacement to overwriting the -# #setup and #teardown methods of your TestCase. -# -# class ExampleTest < ActiveSupport::TestCase -# setup do -# # ... -# end -# -# teardown do -# # ... -# end -# end -# -# source://activesupport//lib/active_support/testing/setup_and_teardown.rb#20 -module ActiveSupport::Testing::SetupAndTeardown - # source://activesupport//lib/active_support/testing/setup_and_teardown.rb#44 - def after_teardown; end - - # source://activesupport//lib/active_support/testing/setup_and_teardown.rb#39 - def before_setup; end - - class << self - # source://activesupport//lib/active_support/testing/setup_and_teardown.rb#21 - def prepended(klass); end - end -end - -# source://activesupport//lib/active_support/testing/setup_and_teardown.rb#27 -module ActiveSupport::Testing::SetupAndTeardown::ClassMethods - # Add a callback, which runs before TestCase#setup. - # - # source://activesupport//lib/active_support/testing/setup_and_teardown.rb#29 - def setup(*args, &block); end - - # Add a callback, which runs after TestCase#teardown. - # - # source://activesupport//lib/active_support/testing/setup_and_teardown.rb#34 - def teardown(*args, &block); end -end - -# Manages stubs for TimeHelpers -# -# source://activesupport//lib/active_support/testing/time_helpers.rb#9 -class ActiveSupport::Testing::SimpleStubs - # @return [SimpleStubs] a new instance of SimpleStubs - # - # source://activesupport//lib/active_support/testing/time_helpers.rb#12 - def initialize; end - - # Stubs object.method_name with the given block - # If the method is already stubbed, remove that stub - # so that removing this stub will restore the original implementation. - # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 - # target = Time.zone.local(2004, 11, 24, 1, 4, 44) - # simple_stubs.stub_object(Time, :now) { at(target.to_i) } - # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 - # - # source://activesupport//lib/active_support/testing/time_helpers.rb#23 - def stub_object(object, method_name, &block); end - - # Returns true if any stubs are set, false if there are none - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/testing/time_helpers.rb#53 - def stubbed?; end - - # Returns the Stub for object#method_name - # (nil if it is not stubbed) - # - # source://activesupport//lib/active_support/testing/time_helpers.rb#48 - def stubbing(object, method_name); end - - # Remove all object-method stubs held by this instance - # - # source://activesupport//lib/active_support/testing/time_helpers.rb#37 - def unstub_all!; end - - private - - # Restores the original object.method described by the Stub - # - # source://activesupport//lib/active_support/testing/time_helpers.rb#59 - def unstub_object(stub); end -end - -# source://activesupport//lib/active_support/testing/time_helpers.rb#10 -class ActiveSupport::Testing::SimpleStubs::Stub < ::Struct - # Returns the value of attribute method_name - # - # @return [Object] the current value of method_name - def method_name; end - - # Sets the attribute method_name - # - # @param value [Object] the value to set the attribute method_name to. - # @return [Object] the newly set value - def method_name=(_); end - - # Returns the value of attribute object - # - # @return [Object] the current value of object - def object; end - - # Sets the attribute object - # - # @param value [Object] the value to set the attribute object to. - # @return [Object] the newly set value - def object=(_); end - - # Returns the value of attribute original_method - # - # @return [Object] the current value of original_method - def original_method; end - - # Sets the attribute original_method - # - # @param value [Object] the value to set the attribute original_method to. - # @return [Object] the newly set value - def original_method=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# Logs a "PostsControllerTest: test name" heading before each test to -# make test.log easier to search and follow along with. -# -# source://activesupport//lib/active_support/testing/tagged_logging.rb#7 -module ActiveSupport::Testing::TaggedLogging - # source://activesupport//lib/active_support/testing/tagged_logging.rb#10 - def before_setup; end - - # source://activesupport//lib/active_support/testing/tagged_logging.rb#8 - def tagged_logger=(_arg0); end - - private - - # source://activesupport//lib/active_support/testing/tagged_logging.rb#22 - def tagged_logger; end -end - -# Warns when a test case does not perform any assertions. -# -# This is helpful in detecting broken tests that do not perform intended assertions. -# -# source://activesupport//lib/active_support/testing/tests_without_assertions.rb#8 -module ActiveSupport::Testing::TestsWithoutAssertions - # source://activesupport//lib/active_support/testing/tests_without_assertions.rb#9 - def after_teardown; end -end - -# Contains helpers that help you test passage of time. -# -# source://activesupport//lib/active_support/testing/time_helpers.rb#68 -module ActiveSupport::Testing::TimeHelpers - # source://activesupport//lib/active_support/testing/time_helpers.rb#69 - def after_teardown; end - - # Calls +travel_to+ with +Time.now+. Forwards optional with_usec argument. - # - # Time.current # => Sun, 09 Jul 2017 15:34:49 EST -05:00 - # freeze_time - # sleep(1) - # Time.current # => Sun, 09 Jul 2017 15:34:49 EST -05:00 - # - # This method also accepts a block, which will return the current time back to its original - # state at the end of the block: - # - # Time.current # => Sun, 09 Jul 2017 15:34:49 EST -05:00 - # freeze_time do - # sleep(1) - # User.create.created_at # => Sun, 09 Jul 2017 15:34:49 EST -05:00 - # end - # Time.current # => Sun, 09 Jul 2017 15:34:50 EST -05:00 - # - # source://activesupport//lib/active_support/testing/time_helpers.rb#256 - def freeze_time(with_usec: T.unsafe(nil), &block); end - - # Changes current time to the time in the future or in the past by a given time difference by - # stubbing +Time.now+, +Date.today+, and +DateTime.now+. The stubs are automatically removed - # at the end of the test. - # - # Note that the usec for the resulting time will be set to 0 to prevent rounding - # errors with external services, like MySQL (which will round instead of floor, - # leading to off-by-one-second errors), unless the with_usec argument - # is set to true. - # - # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 - # travel 1.day - # Time.current # => Sun, 10 Nov 2013 15:34:49 EST -05:00 - # Date.current # => Sun, 10 Nov 2013 - # DateTime.current # => Sun, 10 Nov 2013 15:34:49 -0500 - # - # This method also accepts a block, which will return the current time back to its original - # state at the end of the block: - # - # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 - # travel 1.day do - # User.create.created_at # => Sun, 10 Nov 2013 15:34:49 EST -05:00 - # end - # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 - # - # source://activesupport//lib/active_support/testing/time_helpers.rb#97 - def travel(duration, with_usec: T.unsafe(nil), &block); end - - # Returns the current time back to its original state, by removing the stubs added by - # +travel+, +travel_to+, and +freeze_time+. - # - # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 - # - # travel_to Time.zone.local(2004, 11, 24, 1, 4, 44) - # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 - # - # travel_back - # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 - # - # This method also accepts a block, which brings the stubs back at the end of the block: - # - # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 - # - # travel_to Time.zone.local(2004, 11, 24, 1, 4, 44) - # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 - # - # travel_back do - # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 - # end - # - # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 - # - # source://activesupport//lib/active_support/testing/time_helpers.rb#230 - def travel_back; end - - # Changes current time to the given time by stubbing +Time.now+, +Time.new+, - # +Date.today+, and +DateTime.now+ to return the time or date passed into this method. - # The stubs are automatically removed at the end of the test. - # - # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 - # travel_to Time.zone.local(2004, 11, 24, 1, 4, 44) - # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 - # Date.current # => Wed, 24 Nov 2004 - # DateTime.current # => Wed, 24 Nov 2004 01:04:44 -0500 - # - # Dates are taken as their timestamp at the beginning of the day in the - # application time zone. Time.current returns said timestamp, - # and Time.now its equivalent in the system time zone. Similarly, - # Date.current returns a date equal to the argument, and - # Date.today the date according to Time.now, which may - # be different. (Note that you rarely want to deal with Time.now, - # or Date.today, in order to honor the application time zone - # please always use Time.current and Date.current.) - # - # Note that the usec for the time passed will be set to 0 to prevent rounding - # errors with external services, like MySQL (which will round instead of floor, - # leading to off-by-one-second errors), unless the with_usec argument - # is set to true. - # - # This method also accepts a block, which will return the current time back to its original - # state at the end of the block: - # - # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 - # travel_to Time.zone.local(2004, 11, 24, 1, 4, 44) do - # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 - # end - # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 - # - # source://activesupport//lib/active_support/testing/time_helpers.rb#133 - def travel_to(date_or_time, with_usec: T.unsafe(nil)); end - - # Returns the current time back to its original state, by removing the stubs added by - # +travel+, +travel_to+, and +freeze_time+. - # - # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 - # - # travel_to Time.zone.local(2004, 11, 24, 1, 4, 44) - # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 - # - # travel_back - # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 - # - # This method also accepts a block, which brings the stubs back at the end of the block: - # - # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 - # - # travel_to Time.zone.local(2004, 11, 24, 1, 4, 44) - # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 - # - # travel_back do - # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 - # end - # - # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 - # - # source://activesupport//lib/active_support/testing/time_helpers.rb#230 - def unfreeze_time; end - - private - - # Returns the value of attribute in_block. - # - # source://activesupport//lib/active_support/testing/time_helpers.rb#265 - def in_block; end - - # Sets the attribute in_block - # - # @param value the value to set the attribute in_block to. - # - # source://activesupport//lib/active_support/testing/time_helpers.rb#265 - def in_block=(_arg0); end - - # source://activesupport//lib/active_support/testing/time_helpers.rb#261 - def simple_stubs; end -end - -# = Active Support \Time With Zone -# -# A Time-like class that can represent a time in any time zone. Necessary -# because standard Ruby Time instances are limited to UTC and the -# system's ENV['TZ'] zone. -# -# You shouldn't ever need to create a TimeWithZone instance directly via +new+. -# Instead use methods +local+, +parse+, +at+, and +now+ on TimeZone instances, -# and +in_time_zone+ on Time and DateTime instances. -# -# Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' -# Time.zone.local(2007, 2, 10, 15, 30, 45) # => Sat, 10 Feb 2007 15:30:45.000000000 EST -05:00 -# Time.zone.parse('2007-02-10 15:30:45') # => Sat, 10 Feb 2007 15:30:45.000000000 EST -05:00 -# Time.zone.at(1171139445) # => Sat, 10 Feb 2007 15:30:45.000000000 EST -05:00 -# Time.zone.now # => Sun, 18 May 2008 13:07:55.754107581 EDT -04:00 -# Time.utc(2007, 2, 10, 20, 30, 45).in_time_zone # => Sat, 10 Feb 2007 15:30:45.000000000 EST -05:00 -# -# See Time and TimeZone for further documentation of these methods. -# -# TimeWithZone instances implement the same API as Ruby Time instances, so -# that Time and TimeWithZone instances are interchangeable. -# -# t = Time.zone.now # => Sun, 18 May 2008 13:27:25.031505668 EDT -04:00 -# t.hour # => 13 -# t.dst? # => true -# t.utc_offset # => -14400 -# t.zone # => "EDT" -# t.to_fs(:rfc822) # => "Sun, 18 May 2008 13:27:25 -0400" -# t + 1.day # => Mon, 19 May 2008 13:27:25.031505668 EDT -04:00 -# t.beginning_of_year # => Tue, 01 Jan 2008 00:00:00.000000000 EST -05:00 -# t > Time.utc(1999) # => true -# t.is_a?(Time) # => true -# t.is_a?(ActiveSupport::TimeWithZone) # => true -# -# source://activesupport//lib/active_support/time_with_zone.rb#44 -class ActiveSupport::TimeWithZone - include ::DateAndTime::Compatibility - include ::Comparable - - # @return [TimeWithZone] a new instance of TimeWithZone - # - # source://activesupport//lib/active_support/time_with_zone.rb#51 - def initialize(utc_time, time_zone, local_time = T.unsafe(nil), period = T.unsafe(nil)); end - - # Adds an interval of time to the current object's time and returns that - # value as a new TimeWithZone object. - # - # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' - # now = Time.zone.now # => Sun, 02 Nov 2014 01:26:28.725182881 EDT -04:00 - # now + 1000 # => Sun, 02 Nov 2014 01:43:08.725182881 EDT -04:00 - # - # If we're adding a Duration of variable length (i.e., years, months, days), - # move forward from #time, otherwise move forward from #utc, for accuracy - # when moving across DST boundaries. - # - # For instance, a time + 24.hours will advance exactly 24 hours, while a - # time + 1.day will advance 23-25 hours, depending on the day. - # - # now + 24.hours # => Mon, 03 Nov 2014 00:26:28.725182881 EST -05:00 - # now + 1.day # => Mon, 03 Nov 2014 01:26:28.725182881 EST -05:00 - # - # source://activesupport//lib/active_support/time_with_zone.rb#299 - def +(other); end - - # Subtracts an interval of time and returns a new TimeWithZone object unless - # the other value +acts_like?+ time. In which case, it will subtract the - # other time and return the difference in seconds as a Float. - # - # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' - # now = Time.zone.now # => Mon, 03 Nov 2014 00:26:28.725182881 EST -05:00 - # now - 1000 # => Mon, 03 Nov 2014 00:09:48.725182881 EST -05:00 - # - # If subtracting a Duration of variable length (i.e., years, months, days), - # move backward from #time, otherwise move backward from #utc, for accuracy - # when moving across DST boundaries. - # - # For instance, a time - 24.hours will go subtract exactly 24 hours, while a - # time - 1.day will subtract 23-25 hours, depending on the day. - # - # now - 24.hours # => Sun, 02 Nov 2014 01:26:28.725182881 EDT -04:00 - # now - 1.day # => Sun, 02 Nov 2014 00:26:28.725182881 EDT -04:00 - # - # If both the TimeWithZone object and the other value act like Time, a Float - # will be returned. - # - # Time.zone.now - 1.day.ago # => 86399.999967 - # - # source://activesupport//lib/active_support/time_with_zone.rb#333 - def -(other); end - - # Use the time in UTC for comparisons. - # - # source://activesupport//lib/active_support/time_with_zone.rb#232 - def <=>(other); end - - # So that +self+ acts_like?(:time). - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/time_with_zone.rb#494 - def acts_like_time?; end - - # Uses Date to provide precise Time calculations for years, months, and days - # according to the proleptic Gregorian calendar. The result is returned as a - # new TimeWithZone object. - # - # The +options+ parameter takes a hash with any of these keys: - # :years, :months, :weeks, :days, - # :hours, :minutes, :seconds. - # - # If advancing by a value of variable length (i.e., years, weeks, months, - # days), move forward from #time, otherwise move forward from #utc, for - # accuracy when moving across DST boundaries. - # - # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' - # now = Time.zone.now # => Sun, 02 Nov 2014 01:26:28.558049687 EDT -04:00 - # now.advance(seconds: 1) # => Sun, 02 Nov 2014 01:26:29.558049687 EDT -04:00 - # now.advance(minutes: 1) # => Sun, 02 Nov 2014 01:27:28.558049687 EDT -04:00 - # now.advance(hours: 1) # => Sun, 02 Nov 2014 01:26:28.558049687 EST -05:00 - # now.advance(days: 1) # => Mon, 03 Nov 2014 01:26:28.558049687 EST -05:00 - # now.advance(weeks: 1) # => Sun, 09 Nov 2014 01:26:28.558049687 EST -05:00 - # now.advance(months: 1) # => Tue, 02 Dec 2014 01:26:28.558049687 EST -05:00 - # now.advance(years: 1) # => Mon, 02 Nov 2015 01:26:28.558049687 EST -05:00 - # - # source://activesupport//lib/active_support/time_with_zone.rb#422 - def advance(options); end - - def after?(_arg0); end - - # Subtracts an interval of time from the current object's time and returns - # the result as a new TimeWithZone object. - # - # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' - # now = Time.zone.now # => Mon, 03 Nov 2014 00:26:28.725182881 EST -05:00 - # now.ago(1000) # => Mon, 03 Nov 2014 00:09:48.725182881 EST -05:00 - # - # If we're subtracting a Duration of variable length (i.e., years, months, - # days), move backward from #time, otherwise move backward from #utc, for - # accuracy when moving across DST boundaries. - # - # For instance, time.ago(24.hours) will move back exactly 24 hours, - # while time.ago(1.day) will move back 23-25 hours, depending on - # the day. - # - # now.ago(24.hours) # => Sun, 02 Nov 2014 01:26:28.725182881 EDT -04:00 - # now.ago(1.day) # => Sun, 02 Nov 2014 00:26:28.725182881 EDT -04:00 - # - # source://activesupport//lib/active_support/time_with_zone.rb#361 - def ago(other); end - - # Coerces time to a string for JSON encoding. The default format is ISO 8601. - # You can get %Y/%m/%d %H:%M:%S +offset style by setting - # ActiveSupport::JSON::Encoding.use_standard_json_time_format - # to +false+. - # - # # With ActiveSupport::JSON::Encoding.use_standard_json_time_format = true - # Time.utc(2005,2,1,15,15,10).in_time_zone("Hawaii").to_json - # # => "2005-02-01T05:15:10.000-10:00" - # - # # With ActiveSupport::JSON::Encoding.use_standard_json_time_format = false - # Time.utc(2005,2,1,15,15,10).in_time_zone("Hawaii").to_json - # # => "2005/02/01 05:15:10 -1000" - # - # source://activesupport//lib/active_support/time_with_zone.rb#166 - def as_json(options = T.unsafe(nil)); end - - def before?(_arg0); end - - # Returns true if the current object's time is within the specified - # +min+ and +max+ time. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/time_with_zone.rb#240 - def between?(min, max); end - - # An instance of ActiveSupport::TimeWithZone is never blank - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/time_with_zone.rb#505 - def blank?; end - - # Returns a new +ActiveSupport::TimeWithZone+ where one or more of the elements have - # been changed according to the +options+ parameter. The time options (:hour, - # :min, :sec, :usec, :nsec) reset cascadingly, - # so if only the hour is passed, then minute, sec, usec, and nsec is set to 0. If the - # hour and minute is passed, then sec, usec, and nsec is set to 0. The +options+ - # parameter takes a hash with any of these keys: :year, :month, - # :day, :hour, :min, :sec, :usec, - # :nsec, :offset, :zone. Pass either :usec - # or :nsec, not both. Similarly, pass either :zone or - # :offset, not both. - # - # t = Time.zone.now # => Fri, 14 Apr 2017 11:45:15.116992711 EST -05:00 - # t.change(year: 2020) # => Tue, 14 Apr 2020 11:45:15.116992711 EST -05:00 - # t.change(hour: 12) # => Fri, 14 Apr 2017 12:00:00.000000000 EST -05:00 - # t.change(min: 30) # => Fri, 14 Apr 2017 11:30:00.000000000 EST -05:00 - # t.change(offset: "-10:00") # => Fri, 14 Apr 2017 11:45:15.116992711 HST -10:00 - # t.change(zone: "Hawaii") # => Fri, 14 Apr 2017 11:45:15.116992711 HST -10:00 - # - # source://activesupport//lib/active_support/time_with_zone.rb#382 - def change(options); end - - # Returns a Time instance of the simultaneous time in the UTC timezone. - # - # source://activesupport//lib/active_support/time_with_zone.rb#63 - def comparable_time; end - - # source://activesupport//lib/active_support/time_with_zone.rb#434 - def day; end - - # Returns true if the current time is within Daylight Savings \Time for the - # specified time zone. - # - # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' - # Time.zone.parse("2012-5-30").dst? # => true - # Time.zone.parse("2012-11-30").dst? # => false - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/time_with_zone.rb#94 - def dst?; end - - # source://activesupport//lib/active_support/time_with_zone.rb#178 - def encode_with(coder); end - - # Returns +true+ if +other+ is equal to current object. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/time_with_zone.rb#275 - def eql?(other); end - - # Returns a formatted string of the offset from UTC, or an alternative - # string if the time zone is already UTC. - # - # Time.zone = 'Eastern Time (US & Canada)' # => "Eastern Time (US & Canada)" - # Time.zone.now.formatted_offset(true) # => "-05:00" - # Time.zone.now.formatted_offset(false) # => "-0500" - # Time.zone = 'UTC' # => "UTC" - # Time.zone.now.formatted_offset(true, "0") # => "0" - # - # source://activesupport//lib/active_support/time_with_zone.rb#125 - def formatted_offset(colon = T.unsafe(nil), alternate_utc_string = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/time_with_zone.rb#513 - def freeze; end - - # Returns true if the current object's time is in the future. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/time_with_zone.rb#270 - def future?; end - - # Returns a Time instance of the simultaneous time in the UTC timezone. - # - # source://activesupport//lib/active_support/time_with_zone.rb#63 - def getgm; end - - # Returns a Time instance of the simultaneous time in the system timezone. - # - # source://activesupport//lib/active_support/time_with_zone.rb#83 - def getlocal(utc_offset = T.unsafe(nil)); end - - # Returns a Time instance of the simultaneous time in the UTC timezone. - # - # source://activesupport//lib/active_support/time_with_zone.rb#63 - def getutc; end - - # Returns true if the current time zone is set to UTC. - # - # Time.zone = 'UTC' # => 'UTC' - # Time.zone.now.utc? # => true - # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' - # Time.zone.now.utc? # => false - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/time_with_zone.rb#105 - def gmt?; end - - # Returns the offset from current time to UTC time in seconds. - # - # source://activesupport//lib/active_support/time_with_zone.rb#111 - def gmt_offset; end - - # Returns a Time instance of the simultaneous time in the UTC timezone. - # - # source://activesupport//lib/active_support/time_with_zone.rb#63 - def gmtime; end - - # Returns the offset from current time to UTC time in seconds. - # - # source://activesupport//lib/active_support/time_with_zone.rb#111 - def gmtoff; end - - # source://activesupport//lib/active_support/time_with_zone.rb#279 - def hash; end - - # source://activesupport//lib/active_support/time_with_zone.rb#434 - def hour; end - - # Returns a string of the object's date and time in the format used by - # HTTP requests. - # - # Time.zone.now.httpdate # => "Tue, 01 Jan 2013 04:39:43 GMT" - # - # source://activesupport//lib/active_support/time_with_zone.rb#186 - def httpdate; end - - # Adds an interval of time to the current object's time and returns that - # value as a new TimeWithZone object. - # - # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' - # now = Time.zone.now # => Sun, 02 Nov 2014 01:26:28.725182881 EDT -04:00 - # now + 1000 # => Sun, 02 Nov 2014 01:43:08.725182881 EDT -04:00 - # - # If we're adding a Duration of variable length (i.e., years, months, days), - # move forward from #time, otherwise move forward from #utc, for accuracy - # when moving across DST boundaries. - # - # For instance, a time + 24.hours will advance exactly 24 hours, while a - # time + 1.day will advance 23-25 hours, depending on the day. - # - # now + 24.hours # => Mon, 03 Nov 2014 00:26:28.725182881 EST -05:00 - # now + 1.day # => Mon, 03 Nov 2014 01:26:28.725182881 EST -05:00 - # - # source://activesupport//lib/active_support/time_with_zone.rb#299 - def in(other); end - - # Returns the simultaneous time in Time.zone, or the specified zone. - # - # source://activesupport//lib/active_support/time_with_zone.rb#77 - def in_time_zone(new_zone = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/time_with_zone.rb#174 - def init_with(coder); end - - # Returns a string of the object's date, time, zone, and offset from UTC. - # - # Time.zone.now.inspect # => "Thu, 04 Dec 2014 11:00:25.624541392 EST -05:00" - # - # source://activesupport//lib/active_support/time_with_zone.rb#140 - def inspect; end - - # Say we're a Time to thwart type checking. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/time_with_zone.rb#499 - def is_a?(klass); end - - # Returns true if the current time is within Daylight Savings \Time for the - # specified time zone. - # - # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' - # Time.zone.parse("2012-5-30").dst? # => true - # Time.zone.parse("2012-11-30").dst? # => false - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/time_with_zone.rb#94 - def isdst; end - - # Returns a string of the object's date and time in the ISO 8601 standard - # format. - # - # Time.zone.now.xmlschema # => "2014-12-04T11:02:37-05:00" - # - # source://activesupport//lib/active_support/time_with_zone.rb#148 - def iso8601(fraction_digits = T.unsafe(nil)); end - - # Say we're a Time to thwart type checking. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/time_with_zone.rb#499 - def kind_of?(klass); end - - # Returns a Time instance of the simultaneous time in the system timezone. - # - # source://activesupport//lib/active_support/time_with_zone.rb#83 - def localtime(utc_offset = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/time_with_zone.rb#519 - def marshal_dump; end - - # source://activesupport//lib/active_support/time_with_zone.rb#523 - def marshal_load(variables); end - - # source://activesupport//lib/active_support/time_with_zone.rb#434 - def mday; end - - # Send the missing method to +time+ instance, and wrap result in a new - # TimeWithZone with the existing +time_zone+. - # - # source://activesupport//lib/active_support/time_with_zone.rb#544 - def method_missing(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/time_with_zone.rb#434 - def min; end - - # source://activesupport//lib/active_support/time_with_zone.rb#434 - def mon; end - - # source://activesupport//lib/active_support/time_with_zone.rb#434 - def month; end - - # Returns true if the current object's time falls within - # the next day (tomorrow). - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/time_with_zone.rb#257 - def next_day?; end - - # source://activesupport//lib/active_support/time_with_zone.rb#434 - def nsec; end - - # Returns true if the current object's time is in the past. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/time_with_zone.rb#245 - def past?; end - - # Returns the underlying +TZInfo::TimezonePeriod+. - # - # source://activesupport//lib/active_support/time_with_zone.rb#72 - def period; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/time_with_zone.rb#509 - def present?; end - - # Returns true if the current object's time falls within - # the previous day (yesterday). - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/time_with_zone.rb#264 - def prev_day?; end - - # respond_to_missing? is not called in some cases, such as when type conversion is - # performed with Kernel#String - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/time_with_zone.rb#529 - def respond_to?(sym, include_priv = T.unsafe(nil)); end - - # Returns a string of the object's date and time in the RFC 2822 standard - # format. - # - # Time.zone.now.rfc2822 # => "Tue, 01 Jan 2013 04:51:39 +0000" - # - # source://activesupport//lib/active_support/time_with_zone.rb#194 - def rfc2822; end - - # Returns a string of the object's date and time in the ISO 8601 standard - # format. - # - # Time.zone.now.xmlschema # => "2014-12-04T11:02:37-05:00" - # - # source://activesupport//lib/active_support/time_with_zone.rb#148 - def rfc3339(fraction_digits = T.unsafe(nil)); end - - # Returns a string of the object's date and time in the RFC 2822 standard - # format. - # - # Time.zone.now.rfc2822 # => "Tue, 01 Jan 2013 04:51:39 +0000" - # - # source://activesupport//lib/active_support/time_with_zone.rb#194 - def rfc822; end - - # source://activesupport//lib/active_support/time_with_zone.rb#434 - def sec; end - - # Adds an interval of time to the current object's time and returns that - # value as a new TimeWithZone object. - # - # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' - # now = Time.zone.now # => Sun, 02 Nov 2014 01:26:28.725182881 EDT -04:00 - # now + 1000 # => Sun, 02 Nov 2014 01:43:08.725182881 EDT -04:00 - # - # If we're adding a Duration of variable length (i.e., years, months, days), - # move forward from #time, otherwise move forward from #utc, for accuracy - # when moving across DST boundaries. - # - # For instance, a time + 24.hours will advance exactly 24 hours, while a - # time + 1.day will advance 23-25 hours, depending on the day. - # - # now + 24.hours # => Mon, 03 Nov 2014 00:26:28.725182881 EST -05:00 - # now + 1.day # => Mon, 03 Nov 2014 01:26:28.725182881 EST -05:00 - # - # source://activesupport//lib/active_support/time_with_zone.rb#299 - def since(other); end - - # Replaces %Z directive with +zone before passing to Time#strftime, - # so that zone information is correct. - # - # source://activesupport//lib/active_support/time_with_zone.rb#226 - def strftime(format); end - - # Returns a Time instance that represents the time in +time_zone+. - # - # source://activesupport//lib/active_support/time_with_zone.rb#58 - def time; end - - # Returns the value of attribute time_zone. - # - # source://activesupport//lib/active_support/time_with_zone.rb#49 - def time_zone; end - - # Returns Array of parts of Time in sequence of - # [seconds, minutes, hours, day, month, year, weekday, yearday, dst?, zone]. - # - # now = Time.zone.now # => Tue, 18 Aug 2015 02:29:27.485278555 UTC +00:00 - # now.to_a # => [27, 29, 2, 18, 8, 2015, 2, 230, false, "UTC"] - # - # source://activesupport//lib/active_support/time_with_zone.rb#445 - def to_a; end - - # source://activesupport//lib/active_support/time_with_zone.rb#434 - def to_date; end - - # Returns an instance of DateTime with the timezone's UTC offset - # - # Time.zone.now.to_datetime # => Tue, 18 Aug 2015 02:32:20 +0000 - # Time.current.in_time_zone('Hawaii').to_datetime # => Mon, 17 Aug 2015 16:32:20 -1000 - # - # source://activesupport//lib/active_support/time_with_zone.rb#478 - def to_datetime; end - - # Returns the object's date and time as a floating-point number of seconds - # since the Epoch (January 1, 1970 00:00 UTC). - # - # Time.zone.now.to_f # => 1417709320.285418 - # - # source://activesupport//lib/active_support/time_with_zone.rb#453 - def to_f; end - - # Returns a string of the object's date and time. - # - # This method is aliased to to_formatted_s. - # - # Accepts an optional format: - # * :default - default value, mimics Ruby Time#to_s format. - # * :db - format outputs time in UTC :db time. See Time#to_fs(:db). - # * Any key in +Time::DATE_FORMATS+ can be used. See active_support/core_ext/time/conversions.rb. - # - # source://activesupport//lib/active_support/time_with_zone.rb#212 - def to_formatted_s(format = T.unsafe(nil)); end - - # Returns a string of the object's date and time. - # - # This method is aliased to to_formatted_s. - # - # Accepts an optional format: - # * :default - default value, mimics Ruby Time#to_s format. - # * :db - format outputs time in UTC :db time. See Time#to_fs(:db). - # * Any key in +Time::DATE_FORMATS+ can be used. See active_support/core_ext/time/conversions.rb. - # - # source://activesupport//lib/active_support/time_with_zone.rb#212 - def to_fs(format = T.unsafe(nil)); end - - # Returns the object's date and time as an integer number of seconds - # since the Epoch (January 1, 1970 00:00 UTC). - # - # Time.zone.now.to_i # => 1417709320 - # - # source://activesupport//lib/active_support/time_with_zone.rb#461 - def to_i; end - - # Returns the object's date and time as a rational number of seconds - # since the Epoch (January 1, 1970 00:00 UTC). - # - # Time.zone.now.to_r # => (708854548642709/500000) - # - # source://activesupport//lib/active_support/time_with_zone.rb#470 - def to_r; end - - # Returns a string of the object's date and time. - # - # source://activesupport//lib/active_support/time_with_zone.rb#200 - def to_s; end - - # Returns an instance of +Time+, either with the same UTC offset - # as +self+ or in the local system timezone depending on the setting - # of +ActiveSupport.to_time_preserves_timezone+. - # - # source://activesupport//lib/active_support/time_with_zone.rb#485 - def to_time; end - - # Returns true if the current object's time falls within - # the current day. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/time_with_zone.rb#251 - def today?; end - - # Returns true if the current object's time falls within - # the next day (tomorrow). - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/time_with_zone.rb#257 - def tomorrow?; end - - # Returns the object's date and time as an integer number of seconds - # since the Epoch (January 1, 1970 00:00 UTC). - # - # Time.zone.now.to_i # => 1417709320 - # - # source://activesupport//lib/active_support/time_with_zone.rb#461 - def tv_sec; end - - # source://activesupport//lib/active_support/time_with_zone.rb#434 - def usec; end - - # Returns a Time instance of the simultaneous time in the UTC timezone. - # - # source://activesupport//lib/active_support/time_with_zone.rb#63 - def utc; end - - # Returns true if the current time zone is set to UTC. - # - # Time.zone = 'UTC' # => 'UTC' - # Time.zone.now.utc? # => true - # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' - # Time.zone.now.utc? # => false - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/time_with_zone.rb#105 - def utc?; end - - # Returns the offset from current time to UTC time in seconds. - # - # source://activesupport//lib/active_support/time_with_zone.rb#111 - def utc_offset; end - - # source://activesupport//lib/active_support/time_with_zone.rb#434 - def wday; end - - # Returns a string of the object's date and time in the ISO 8601 standard - # format. - # - # Time.zone.now.xmlschema # => "2014-12-04T11:02:37-05:00" - # - # source://activesupport//lib/active_support/time_with_zone.rb#148 - def xmlschema(fraction_digits = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/time_with_zone.rb#434 - def yday; end - - # source://activesupport//lib/active_support/time_with_zone.rb#434 - def year; end - - # Returns true if the current object's time falls within - # the previous day (yesterday). - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/time_with_zone.rb#264 - def yesterday?; end - - # Returns the time zone abbreviation. - # - # Time.zone = 'Eastern Time (US & Canada)' # => "Eastern Time (US & Canada)" - # Time.zone.now.zone # => "EST" - # - # source://activesupport//lib/active_support/time_with_zone.rb#133 - def zone; end - - private - - # @return [Boolean] - # - # source://activesupport//lib/active_support/time_with_zone.rb#580 - def duration_of_variable_length?(obj); end - - # source://activesupport//lib/active_support/time_with_zone.rb#561 - def get_period_and_ensure_valid_local_time(period); end - - # source://activesupport//lib/active_support/time_with_zone.rb#553 - def incorporate_utc_offset(time, offset); end - - # Ensure proxy class responds to all methods that underlying time instance - # responds to. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/time_with_zone.rb#537 - def respond_to_missing?(sym, include_priv); end - - # source://activesupport//lib/active_support/time_with_zone.rb#574 - def transfer_time_values_to_utc_constructor(time); end - - # source://activesupport//lib/active_support/time_with_zone.rb#584 - def wrap_with_time_zone(time); end -end - -# source://activesupport//lib/active_support/time_with_zone.rb#45 -ActiveSupport::TimeWithZone::PRECISIONS = T.let(T.unsafe(nil), Hash) - -# source://activesupport//lib/active_support/time_with_zone.rb#551 -ActiveSupport::TimeWithZone::SECONDS_PER_DAY = T.let(T.unsafe(nil), Integer) - -# = Active Support \Time Zone -# -# The TimeZone class serves as a wrapper around +TZInfo::Timezone+ instances. -# It allows us to do the following: -# -# * Limit the set of zones provided by TZInfo to a meaningful subset of 134 -# zones. -# * Retrieve and display zones with a friendlier name -# (e.g., "Eastern \Time (US & Canada)" instead of "America/New_York"). -# * Lazily load +TZInfo::Timezone+ instances only when they're needed. -# * Create ActiveSupport::TimeWithZone instances via TimeZone's +local+, -# +parse+, +at+, and +now+ methods. -# -# If you set config.time_zone in the \Rails Application, you can -# access this TimeZone object via Time.zone: -# -# # application.rb: -# class Application < Rails::Application -# config.time_zone = 'Eastern Time (US & Canada)' -# end -# -# Time.zone # => # -# Time.zone.name # => "Eastern Time (US & Canada)" -# Time.zone.now # => Sun, 18 May 2008 14:30:44 EDT -04:00 -# -# source://activesupport//lib/active_support/values/time_zone.rb#31 -class ActiveSupport::TimeZone - include ::Comparable - - # :stopdoc: - # - # @return [TimeZone] a new instance of TimeZone - # - # source://activesupport//lib/active_support/values/time_zone.rb#311 - def initialize(name, utc_offset = T.unsafe(nil), tzinfo = T.unsafe(nil)); end - - # Compare this time zone to the parameter. The two are compared first on - # their offsets, and then by name. - # - # source://activesupport//lib/active_support/values/time_zone.rb#335 - def <=>(zone); end - - # Compare #name and TZInfo identifier to a supplied regexp, returning +true+ - # if a match is found. - # - # source://activesupport//lib/active_support/values/time_zone.rb#344 - def =~(re); end - - # \Method for creating new ActiveSupport::TimeWithZone instance in time zone - # of +self+ from number of seconds since the Unix epoch. - # - # Time.zone = 'Hawaii' # => "Hawaii" - # Time.utc(2000).to_f # => 946684800.0 - # Time.zone.at(946684800.0) # => Fri, 31 Dec 1999 14:00:00 HST -10:00 - # - # A second argument can be supplied to specify sub-second precision. - # - # Time.zone = 'Hawaii' # => "Hawaii" - # Time.at(946684800, 123456.789).nsec # => 123456789 - # - # source://activesupport//lib/active_support/values/time_zone.rb#381 - def at(*args); end - - # source://activesupport//lib/active_support/values/time_zone.rb#577 - def encode_with(coder); end - - # Returns a formatted string of the offset from UTC, or an alternative - # string if the time zone is already UTC. - # - # zone = ActiveSupport::TimeZone['Central Time (US & Canada)'] - # zone.formatted_offset # => "-06:00" - # zone.formatted_offset(false) # => "-0600" - # - # source://activesupport//lib/active_support/values/time_zone.rb#329 - def formatted_offset(colon = T.unsafe(nil), alternate_utc_string = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/values/time_zone.rb#573 - def init_with(coder); end - - # \Method for creating new ActiveSupport::TimeWithZone instance in time zone - # of +self+ from an ISO 8601 string. - # - # Time.zone = 'Hawaii' # => "Hawaii" - # Time.zone.iso8601('1999-12-31T14:00:00') # => Fri, 31 Dec 1999 14:00:00 HST -10:00 - # - # If the time components are missing then they will be set to zero. - # - # Time.zone = 'Hawaii' # => "Hawaii" - # Time.zone.iso8601('1999-12-31') # => Fri, 31 Dec 1999 00:00:00 HST -10:00 - # - # If the string is invalid then an +ArgumentError+ will be raised unlike +parse+ - # which usually returns +nil+ when given an invalid date string. - # - # source://activesupport//lib/active_support/values/time_zone.rb#398 - def iso8601(str); end - - # \Method for creating new ActiveSupport::TimeWithZone instance in time zone - # of +self+ from given values. - # - # Time.zone = 'Hawaii' # => "Hawaii" - # Time.zone.local(2007, 2, 1, 15, 30, 45) # => Thu, 01 Feb 2007 15:30:45 HST -10:00 - # - # source://activesupport//lib/active_support/values/time_zone.rb#365 - def local(*args); end - - # Adjust the given time to the simultaneous time in UTC. Returns a - # Time.utc() instance. - # - # source://activesupport//lib/active_support/values/time_zone.rb#553 - def local_to_utc(time, dst = T.unsafe(nil)); end - - # Compare #name and TZInfo identifier to a supplied regexp, returning +true+ - # if a match is found. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/values/time_zone.rb#350 - def match?(re); end - - # Returns the value of attribute name. - # - # source://activesupport//lib/active_support/values/time_zone.rb#298 - def name; end - - # Returns an ActiveSupport::TimeWithZone instance representing the current - # time in the time zone represented by +self+. - # - # Time.zone = 'Hawaii' # => "Hawaii" - # Time.zone.now # => Wed, 23 Jan 2008 20:24:27 HST -10:00 - # - # source://activesupport//lib/active_support/values/time_zone.rb#518 - def now; end - - # \Method for creating new ActiveSupport::TimeWithZone instance in time zone - # of +self+ from parsed string. - # - # Time.zone = 'Hawaii' # => "Hawaii" - # Time.zone.parse('1999-12-31 14:00:00') # => Fri, 31 Dec 1999 14:00:00 HST -10:00 - # - # If upper components are missing from the string, they are supplied from - # TimeZone#now: - # - # Time.zone.now # => Fri, 31 Dec 1999 14:00:00 HST -10:00 - # Time.zone.parse('22:30:00') # => Fri, 31 Dec 1999 22:30:00 HST -10:00 - # - # However, if the date component is not provided, but any other upper - # components are supplied, then the day of the month defaults to 1: - # - # Time.zone.parse('Mar 2000') # => Wed, 01 Mar 2000 00:00:00 HST -10:00 - # - # If the string is invalid then an +ArgumentError+ could be raised. - # - # source://activesupport//lib/active_support/values/time_zone.rb#455 - def parse(str, now = T.unsafe(nil)); end - - # Available so that TimeZone instances respond like +TZInfo::Timezone+ - # instances. - # - # source://activesupport//lib/active_support/values/time_zone.rb#565 - def period_for_local(time, dst = T.unsafe(nil)); end - - # Available so that TimeZone instances respond like +TZInfo::Timezone+ - # instances. - # - # source://activesupport//lib/active_support/values/time_zone.rb#559 - def period_for_utc(time); end - - # source://activesupport//lib/active_support/values/time_zone.rb#569 - def periods_for_local(time); end - - # \Method for creating new ActiveSupport::TimeWithZone instance in time zone - # of +self+ from an RFC 3339 string. - # - # Time.zone = 'Hawaii' # => "Hawaii" - # Time.zone.rfc3339('2000-01-01T00:00:00Z') # => Fri, 31 Dec 1999 14:00:00 HST -10:00 - # - # If the time or zone components are missing then an +ArgumentError+ will - # be raised. This is much stricter than either +parse+ or +iso8601+ which - # allow for missing components. - # - # Time.zone = 'Hawaii' # => "Hawaii" - # Time.zone.rfc3339('1999-12-31') # => ArgumentError: invalid date - # - # @raise [ArgumentError] - # - # source://activesupport//lib/active_support/values/time_zone.rb#471 - def rfc3339(str); end - - # Parses +str+ according to +format+ and returns an ActiveSupport::TimeWithZone. - # - # Assumes that +str+ is a time in the time zone +self+, - # unless +format+ includes an explicit time zone. - # (This is the same behavior as +parse+.) - # In either case, the returned TimeWithZone has the timezone of +self+. - # - # Time.zone = 'Hawaii' # => "Hawaii" - # Time.zone.strptime('1999-12-31 14:00:00', '%Y-%m-%d %H:%M:%S') # => Fri, 31 Dec 1999 14:00:00 HST -10:00 - # - # If upper components are missing from the string, they are supplied from - # TimeZone#now: - # - # Time.zone.now # => Fri, 31 Dec 1999 14:00:00 HST -10:00 - # Time.zone.strptime('22:30:00', '%H:%M:%S') # => Fri, 31 Dec 1999 22:30:00 HST -10:00 - # - # However, if the date component is not provided, but any other upper - # components are supplied, then the day of the month defaults to 1: - # - # Time.zone.strptime('Mar 2000', '%b %Y') # => Wed, 01 Mar 2000 00:00:00 HST -10:00 - # - # source://activesupport//lib/active_support/values/time_zone.rb#509 - def strptime(str, format, now = T.unsafe(nil)); end - - # Returns a textual representation of this time zone. - # - # source://activesupport//lib/active_support/values/time_zone.rb#356 - def to_s; end - - # Returns the current date in this time zone. - # - # source://activesupport//lib/active_support/values/time_zone.rb#523 - def today; end - - # Returns the next date in this time zone. - # - # source://activesupport//lib/active_support/values/time_zone.rb#528 - def tomorrow; end - - # Returns the value of attribute tzinfo. - # - # source://activesupport//lib/active_support/values/time_zone.rb#299 - def tzinfo; end - - # Returns the offset of this time zone from UTC in seconds. - # - # source://activesupport//lib/active_support/values/time_zone.rb#319 - def utc_offset; end - - # Adjust the given time to the simultaneous time in the time zone - # represented by +self+. Returns a local time with the appropriate offset - # -- if you want an ActiveSupport::TimeWithZone instance, use - # Time#in_time_zone() instead. - # - # As of tzinfo 2, utc_to_local returns a Time with a non-zero utc_offset. - # See the +utc_to_local_returns_utc_offset_times+ config for more info. - # - # source://activesupport//lib/active_support/values/time_zone.rb#544 - def utc_to_local(time); end - - # Returns the previous date in this time zone. - # - # source://activesupport//lib/active_support/values/time_zone.rb#533 - def yesterday; end - - private - - # @raise [ArgumentError] - # - # source://activesupport//lib/active_support/values/time_zone.rb#583 - def parts_to_time(parts, now); end - - # source://activesupport//lib/active_support/values/time_zone.rb#608 - def time_now; end - - class << self - # Locate a specific time zone object. If the argument is a string, it - # is interpreted to mean the name of the timezone to locate. If it is a - # numeric value it is either the hour offset, or the second offset, of the - # timezone to find. (The first one with that offset will be returned.) - # Returns +nil+ if no such time zone is known to the system. - # - # source://activesupport//lib/active_support/values/time_zone.rb#234 - def [](arg); end - - # Returns an array of all TimeZone objects. There are multiple - # TimeZone objects per time zone, in many cases, to make it easier - # for users to find their own time zone. - # - # source://activesupport//lib/active_support/values/time_zone.rb#225 - def all; end - - # source://activesupport//lib/active_support/values/time_zone.rb#267 - def clear; end - - # A convenience method for returning a collection of TimeZone objects - # for time zones in the country specified by its ISO 3166-1 Alpha2 code. - # - # source://activesupport//lib/active_support/values/time_zone.rb#262 - def country_zones(country_code); end - - # :stopdoc: - def create(*_arg0); end - - # source://activesupport//lib/active_support/values/time_zone.rb#207 - def find_tzinfo(name); end - - # Returns a TimeZone instance with the given name, or +nil+ if no - # such TimeZone instance exists. (This exists to support the use of - # this class with the +composed_of+ macro.) - # - # source://activesupport//lib/active_support/values/time_zone.rb#218 - def new(name); end - - # Assumes self represents an offset from UTC in seconds (as returned from - # Time#utc_offset) and turns this into an +HH:MM formatted string. - # - # ActiveSupport::TimeZone.seconds_to_utc_offset(-21_600) # => "-06:00" - # - # source://activesupport//lib/active_support/values/time_zone.rb#199 - def seconds_to_utc_offset(seconds, colon = T.unsafe(nil)); end - - # A convenience method for returning a collection of TimeZone objects - # for time zones in the USA. - # - # source://activesupport//lib/active_support/values/time_zone.rb#256 - def us_zones; end - - private - - # source://activesupport//lib/active_support/values/time_zone.rb#275 - def load_country_zones(code); end - - # source://activesupport//lib/active_support/values/time_zone.rb#289 - def zones_map; end - end -end - -# Keys are \Rails TimeZone names, values are TZInfo identifiers. -# -# source://activesupport//lib/active_support/values/time_zone.rb#33 -ActiveSupport::TimeZone::MAPPING = T.let(T.unsafe(nil), Hash) - -# source://activesupport//lib/active_support/values/time_zone.rb#188 -ActiveSupport::TimeZone::UTC_OFFSET_WITHOUT_COLON = T.let(T.unsafe(nil), String) - -# source://activesupport//lib/active_support/values/time_zone.rb#187 -ActiveSupport::TimeZone::UTC_OFFSET_WITH_COLON = T.let(T.unsafe(nil), String) - -# source://activesupport//lib/active_support/core_ext/object/json.rb#35 -module ActiveSupport::ToJsonWithActiveSupportEncoder - # source://activesupport//lib/active_support/core_ext/object/json.rb#36 - def to_json(options = T.unsafe(nil)); end -end - -# source://activesupport//lib/active_support/core_ext/object/try.rb#6 -module ActiveSupport::Tryable - # source://activesupport//lib/active_support/core_ext/object/try.rb#7 - def try(*args, **_arg1, &block); end - - # source://activesupport//lib/active_support/core_ext/object/try.rb#20 - def try!(*args, **_arg1, &block); end -end - -# source://activesupport//lib/active_support/gem_version.rb#9 -module ActiveSupport::VERSION; end - -# source://activesupport//lib/active_support/gem_version.rb#10 -ActiveSupport::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) - -# source://activesupport//lib/active_support/gem_version.rb#11 -ActiveSupport::VERSION::MINOR = T.let(T.unsafe(nil), Integer) - -# source://activesupport//lib/active_support/gem_version.rb#13 -ActiveSupport::VERSION::PRE = T.let(T.unsafe(nil), T.untyped) - -# source://activesupport//lib/active_support/gem_version.rb#15 -ActiveSupport::VERSION::STRING = T.let(T.unsafe(nil), String) - -# source://activesupport//lib/active_support/gem_version.rb#12 -ActiveSupport::VERSION::TINY = T.let(T.unsafe(nil), Integer) - -# source://activesupport//lib/active_support/core_ext/hash/conversions.rb#140 -class ActiveSupport::XMLConverter - # @return [XMLConverter] a new instance of XMLConverter - # - # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#151 - def initialize(xml, disallowed_types = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#156 - def to_h; end - - private - - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#222 - def become_array?(value); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#218 - def become_content?(value); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#226 - def become_empty_string?(value); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#232 - def become_hash?(value); end - - # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#172 - def deep_to_h(value); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#241 - def garbage?(value); end - - # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#161 - def normalize_keys(params); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#236 - def nothing?(value); end - - # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#257 - def process_array(value); end - - # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#248 - def process_content(value); end - - # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#185 - def process_hash(value); end -end - -# source://activesupport//lib/active_support/core_ext/hash/conversions.rb#149 -ActiveSupport::XMLConverter::DISALLOWED_TYPES = T.let(T.unsafe(nil), Array) - -# Raised if the XML contains attributes with type="yaml" or -# type="symbol". Read Hash#from_xml for more details. -# -# source://activesupport//lib/active_support/core_ext/hash/conversions.rb#143 -class ActiveSupport::XMLConverter::DisallowedType < ::StandardError - # @return [DisallowedType] a new instance of DisallowedType - # - # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#144 - def initialize(type); end -end - -# = \XmlMini -# -# To use the much faster libxml parser: -# gem "libxml-ruby" -# XmlMini.backend = 'LibXML' -# -# source://activesupport//lib/active_support/xml_mini.rb#17 -module ActiveSupport::XmlMini - extend ::ActiveSupport::XmlMini - - # source://activesupport//lib/active_support/xml_mini.rb#101 - def backend; end - - # source://activesupport//lib/active_support/xml_mini.rb#105 - def backend=(name); end - - # Returns the value of attribute depth. - # - # source://activesupport//lib/active_support/xml_mini.rb#96 - def depth; end - - # Sets the attribute depth - # - # @param value the value to set the attribute depth to. - # - # source://activesupport//lib/active_support/xml_mini.rb#96 - def depth=(_arg0); end - - # source://activesupport//lib/active_support/xml_mini.rb#99 - def parse(*_arg0, **_arg1, &_arg2); end - - # source://activesupport//lib/active_support/xml_mini.rb#152 - def rename_key(key, options = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/xml_mini.rb#119 - def to_tag(key, value, options); end - - # source://activesupport//lib/active_support/xml_mini.rb#111 - def with_backend(name); end - - private - - # source://activesupport//lib/active_support/xml_mini.rb#163 - def _dasherize(key); end - - # source://activesupport//lib/active_support/xml_mini.rb#169 - def _parse_binary(bin, entity); end - - # source://activesupport//lib/active_support/xml_mini.rb#180 - def _parse_file(file, entity); end - - # source://activesupport//lib/active_support/xml_mini.rb#188 - def _parse_hex_binary(bin); end - - # source://activesupport//lib/active_support/xml_mini.rb#200 - def cast_backend_name_to_module(name); end - - # source://activesupport//lib/active_support/xml_mini.rb#192 - def current_thread_backend; end - - # source://activesupport//lib/active_support/xml_mini.rb#196 - def current_thread_backend=(name); end -end - -# source://activesupport//lib/active_support/xml_mini.rb#34 -ActiveSupport::XmlMini::DEFAULT_ENCODINGS = T.let(T.unsafe(nil), Hash) - -# source://activesupport//lib/active_support/xml_mini.rb#56 -ActiveSupport::XmlMini::FORMATTING = T.let(T.unsafe(nil), Hash) - -# This module decorates files deserialized using Hash.from_xml with -# the original_filename and content_type methods. -# -# source://activesupport//lib/active_support/xml_mini.rb#22 -module ActiveSupport::XmlMini::FileLike - # source://activesupport//lib/active_support/xml_mini.rb#29 - def content_type; end - - # source://activesupport//lib/active_support/xml_mini.rb#23 - def content_type=(_arg0); end - - # source://activesupport//lib/active_support/xml_mini.rb#25 - def original_filename; end - - # source://activesupport//lib/active_support/xml_mini.rb#23 - def original_filename=(_arg0); end -end - -# source://activesupport//lib/active_support/xml_mini.rb#67 -ActiveSupport::XmlMini::PARSING = T.let(T.unsafe(nil), Hash) - -# source://activesupport//lib/active_support/xml_mini.rb#39 -ActiveSupport::XmlMini::TYPE_NAMES = T.let(T.unsafe(nil), Hash) - -# source://activesupport//lib/active_support/xml_mini/rexml.rb#8 -module ActiveSupport::XmlMini_REXML - extend ::ActiveSupport::XmlMini_REXML - - # Parse an XML Document string or IO into a simple hash. - # - # Same as XmlSimple::xml_in but doesn't shoot itself in the foot, - # and uses the defaults from Active Support. - # - # data:: - # XML Document string or IO to parse - # - # source://activesupport//lib/active_support/xml_mini/rexml.rb#20 - def parse(data); end - - private - - # Actually converts an XML document element into a data structure. - # - # element:: - # The document element to be collapsed. - # - # source://activesupport//lib/active_support/xml_mini/rexml.rb#63 - def collapse(element, depth); end - - # Determines if a document element has text content - # - # element:: - # XML element to be checked. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/xml_mini/rexml.rb#133 - def empty_content?(element); end - - # Converts the attributes array of an XML element into a hash. - # Returns an empty Hash if node has no attributes. - # - # element:: - # XML element to extract attributes from. - # - # source://activesupport//lib/active_support/xml_mini/rexml.rb#123 - def get_attributes(element); end - - # Adds a new key/value pair to an existing Hash. If the key to be added - # already exists and the existing value associated with key is not - # an Array, it will be wrapped in an Array. Then the new value is - # appended to that Array. - # - # hash:: - # Hash to add key/value pair to. - # key:: - # Key to be added. - # value:: - # Value to be associated with key. - # - # source://activesupport//lib/active_support/xml_mini/rexml.rb#103 - def merge!(hash, key, value); end - - # Convert an XML element and merge into the hash - # - # hash:: - # Hash to merge the converted element into. - # element:: - # XML element to merge into hash - # - # @raise [REXML::ParseException] - # - # source://activesupport//lib/active_support/xml_mini/rexml.rb#54 - def merge_element!(hash, element, depth); end - - # Merge all the texts of an element into the hash - # - # hash:: - # Hash to add the converted element to. - # element:: - # XML element whose texts are to me merged into the hash - # - # source://activesupport//lib/active_support/xml_mini/rexml.rb#81 - def merge_texts!(hash, element); end - - # source://activesupport//lib/active_support/xml_mini/rexml.rb#41 - def require_rexml; end -end - -# source://activesupport//lib/active_support/xml_mini/rexml.rb#11 -ActiveSupport::XmlMini_REXML::CONTENT_KEY = T.let(T.unsafe(nil), String) - -# source://activesupport//lib/active_support/core_ext/object/to_query.rb#39 -class Array - include ::Enumerable - - # source://activesupport//lib/active_support/core_ext/object/json.rb#166 - def as_json(options = T.unsafe(nil)); end - - # Removes all blank elements from the +Array+ in place and returns self. - # Uses Object#blank? for determining if an item is blank. - # - # a = [1, "", nil, 2, " ", [], {}, false, true] - # a.compact_blank! - # # => [1, 2, true] - # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#258 - def compact_blank!; end - - # Returns a deep copy of array. - # - # array = [1, [2, 3]] - # dup = array.deep_dup - # dup[1][2] = 4 - # - # array[1][2] # => nil - # dup[1][2] # => 4 - # - # source://activesupport//lib/active_support/core_ext/object/deep_dup.rb#29 - def deep_dup; end - - # Returns a copy of the Array excluding the specified elements. - # - # ["David", "Rafael", "Aaron", "Todd"].excluding("Aaron", "Todd") # => ["David", "Rafael"] - # [ [ 0, 1 ], [ 1, 0 ] ].excluding([ [ 1, 0 ] ]) # => [ [ 0, 1 ] ] - # - # Note: This is an optimization of Enumerable#excluding that uses Array#- - # instead of Array#reject for performance reasons. - # - # source://activesupport//lib/active_support/core_ext/array/access.rb#47 - def excluding(*elements); end - - # Removes and returns the elements for which the block returns a true value. - # If no block is given, an Enumerator is returned instead. - # - # numbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] - # odd_numbers = numbers.extract! { |number| number.odd? } # => [1, 3, 5, 7, 9] - # numbers # => [0, 2, 4, 6, 8] - # - # source://activesupport//lib/active_support/core_ext/array/extract.rb#10 - def extract!; end - - # Extracts options from a set of arguments. Removes and returns the last - # element in the array if it's a hash, otherwise returns a blank hash. - # - # def options(*args) - # args.extract_options! - # end - # - # options(1, 2) # => {} - # options(1, 2, a: :b) # => {:a=>:b} - # - # source://activesupport//lib/active_support/core_ext/array/extract_options.rb#24 - def extract_options!; end - - # Equal to self[4]. - # - # %w( a b c d e ).fifth # => "e" - # - # source://activesupport//lib/active_support/core_ext/array/access.rb#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 - - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/object/blank.rb#104 - def present?; end - - # Equal to self[1]. - # - # %w( a b c d e ).second # => "b" - # - # source://activesupport//lib/active_support/core_ext/array/access.rb#55 - def second; end - - # Equal to self[-2]. - # - # %w( a b c d e ).second_to_last # => "d" - # - # source://activesupport//lib/active_support/core_ext/array/access.rb#97 - def second_to_last; end - - # 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 - - # Extends Array#to_s to convert a collection of elements into a - # comma separated id list if :db argument is given as the format. - # - # This method is aliased to to_formatted_s. - # - # Blog.all.to_fs(:db) # => "1,2,3" - # Blog.none.to_fs(:db) # => "null" - # [1,2].to_fs # => "[1, 2]" - # - # source://activesupport//lib/active_support/core_ext/array/conversions.rb#94 - def to_formatted_s(format = T.unsafe(nil)); end - - # Extends Array#to_s to convert a collection of elements into a - # comma separated id list if :db argument is given as the format. - # - # This method is aliased to to_formatted_s. - # - # Blog.all.to_fs(:db) # => "1,2,3" - # Blog.none.to_fs(:db) # => "null" - # [1,2].to_fs # => "[1, 2]" - # - # source://activesupport//lib/active_support/core_ext/array/conversions.rb#94 - def to_fs(format = T.unsafe(nil)); end - - # Calls to_param on all its elements and joins the result with - # slashes. This is used by url_for in Action Pack. - # - # source://activesupport//lib/active_support/core_ext/object/to_query.rb#42 - def to_param; end - - # Converts an array into a string suitable for use as a URL query string, - # using the given +key+ as the param name. - # - # ['Rails', 'coding'].to_query('hobbies') # => "hobbies%5B%5D=Rails&hobbies%5B%5D=coding" - # - # source://activesupport//lib/active_support/core_ext/object/to_query.rb#50 - def to_query(key); end - - # Converts the array to a comma-separated sentence where the last element is - # joined by the connector word. - # - # You can pass the following options to change the default behavior. If you - # pass an option key that doesn't exist in the list below, it will raise an - # ArgumentError. - # - # ==== Options - # - # * :words_connector - The sign or word used to join all but the last - # element in arrays with three or more elements (default: ", "). - # * :last_word_connector - The sign or word used to join the last element - # in arrays with three or more elements (default: ", and "). - # * :two_words_connector - The sign or word used to join the elements - # in arrays with two elements (default: " and "). - # * :locale - If +i18n+ is available, you can set a locale and use - # the connector options defined on the 'support.array' namespace in the - # corresponding dictionary file. - # - # ==== Examples - # - # [].to_sentence # => "" - # ['one'].to_sentence # => "one" - # ['one', 'two'].to_sentence # => "one and two" - # ['one', 'two', 'three'].to_sentence # => "one, two, and three" - # - # ['one', 'two'].to_sentence(passing: 'invalid option') - # # => ArgumentError: Unknown key: :passing. Valid keys are: :words_connector, :two_words_connector, :last_word_connector, :locale - # - # ['one', 'two'].to_sentence(two_words_connector: '-') - # # => "one-two" - # - # ['one', 'two', 'three'].to_sentence(words_connector: ' or ', last_word_connector: ' or at least ') - # # => "one or two or at least three" - # - # Using :locale option: - # - # # Given this locale dictionary: - # # - # # es: - # # support: - # # array: - # # words_connector: " o " - # # two_words_connector: " y " - # # last_word_connector: " o al menos " - # - # ['uno', 'dos'].to_sentence(locale: :es) - # # => "uno y dos" - # - # ['uno', 'dos', 'tres'].to_sentence(locale: :es) - # # => "uno o dos o al menos tres" - # - # source://activesupport//lib/active_support/core_ext/array/conversions.rb#60 - def to_sentence(options = T.unsafe(nil)); end - - # Returns a string that represents the array in XML by invoking +to_xml+ - # on each element. Active Record collections delegate their representation - # in XML to this method. - # - # All elements are expected to respond to +to_xml+, if any of them does - # not then an exception is raised. - # - # The root node reflects the class name of the first element in plural - # if all elements belong to the same type and that's not Hash: - # - # customer.projects.to_xml - # - # - # - # - # 20000.0 - # 1567 - # 2008-04-09 - # ... - # - # - # 57230.0 - # 1567 - # 2008-04-15 - # ... - # - # - # - # Otherwise the root element is "objects": - # - # [{ foo: 1, bar: 2}, { baz: 3}].to_xml - # - # - # - # - # 2 - # 1 - # - # - # 3 - # - # - # - # If the collection is empty the root element is "nil-classes" by default: - # - # [].to_xml - # - # - # - # - # To ensure a meaningful root element use the :root option: - # - # customer_with_no_projects.projects.to_xml(root: 'projects') - # - # - # - # - # By default name of the node for the children of root is root.singularize. - # You can change it with the :children option. - # - # The +options+ hash is passed downwards: - # - # Message.all.to_xml(skip_types: true) - # - # - # - # - # 2008-03-07T09:58:18+01:00 - # 1 - # 1 - # 2008-03-07T09:58:18+01:00 - # 1 - # - # - # - # source://activesupport//lib/active_support/core_ext/array/conversions.rb#183 - def to_xml(options = T.unsafe(nil)); end - - # Returns a copy of the Array excluding the specified elements. - # - # ["David", "Rafael", "Aaron", "Todd"].excluding("Aaron", "Todd") # => ["David", "Rafael"] - # [ [ 0, 1 ], [ 1, 0 ] ].excluding([ [ 1, 0 ] ]) # => [ [ 0, 1 ] ] - # - # Note: This is an optimization of Enumerable#excluding that uses Array#- - # instead of Array#reject for performance reasons. - # - # source://activesupport//lib/active_support/core_ext/array/access.rb#47 - def without(*elements); end - - class << self - # Wraps its argument in an array unless it is already an array (or array-like). - # - # Specifically: - # - # * If the argument is +nil+ an empty array is returned. - # * Otherwise, if the argument responds to +to_ary+ it is invoked, and its result returned. - # * Otherwise, returns an array with the argument as its single element. - # - # Array.wrap(nil) # => [] - # Array.wrap([1, 2, 3]) # => [1, 2, 3] - # Array.wrap(0) # => [0] - # - # This method is similar in purpose to Kernel#Array, but there are some differences: - # - # * If the argument responds to +to_ary+ the method is invoked. Kernel#Array - # moves on to try +to_a+ if the returned value is +nil+, but Array.wrap returns - # an array with the argument as its single element right away. - # * If the returned value from +to_ary+ is neither +nil+ nor an +Array+ object, Kernel#Array - # raises an exception, while Array.wrap does not, it just returns the value. - # * It does not call +to_a+ on the argument, if the argument does not respond to +to_ary+ - # it returns an array with the argument as its single element. - # - # The last point is easily explained with some enumerables: - # - # Array(foo: :bar) # => [[:foo, :bar]] - # Array.wrap(foo: :bar) # => [{:foo=>:bar}] - # - # There's also a related idiom that uses the splat operator: - # - # [*object] - # - # which returns [] for +nil+, but calls to Array(object) otherwise. - # - # The differences with Kernel#Array explained above - # apply to the rest of objects. - # - # source://activesupport//lib/active_support/core_ext/array/wrap.rb#39 - def wrap(object); end - end -end - -# source://activesupport//lib/active_support/core_ext/object/json.rb#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 - # those libraries would get in general a wrong number and no way to recover - # other than manually inspecting the string with the JSON code itself. - # - # That's why a JSON string is returned. The JSON literal is not numeric, but - # if the other end knows by contract that the data is supposed to be a - # BigDecimal, it still has the chance to post-process the string and get the - # real value. - # - # source://activesupport//lib/active_support/core_ext/object/json.rb#136 - def as_json(options = T.unsafe(nil)); end - - # source://activesupport//lib/active_support/core_ext/big_decimal/conversions.rb#8 - def to_s(format = T.unsafe(nil)); end -end - -# source://activesupport//lib/active_support/core_ext/class/attribute.rb#5 -class Class < ::Module - include ::ActiveSupport::DescendantsTracker::ReloadedClassesFiltering - - # Declare a class-level attribute whose value is inheritable by subclasses. - # Subclasses can change their own value and it will not impact parent class. - # - # ==== Options - # - # * :instance_reader - Sets the instance reader method (defaults to true). - # * :instance_writer - Sets the instance writer method (defaults to true). - # * :instance_accessor - Sets both instance methods (defaults to true). - # * :instance_predicate - Sets a predicate method (defaults to true). - # * :default - Sets a default value for the attribute (defaults to nil). - # - # ==== Examples - # - # class Base - # class_attribute :setting - # end - # - # class Subclass < Base - # end - # - # Base.setting = true - # Subclass.setting # => true - # Subclass.setting = false - # Subclass.setting # => false - # Base.setting # => true - # - # In the above case as long as Subclass does not assign a value to setting - # by performing Subclass.setting = _something_, Subclass.setting - # would read value assigned to parent class. Once Subclass assigns a value then - # the value assigned by Subclass would be returned. - # - # This matches normal Ruby method inheritance: think of writing an attribute - # on a subclass as overriding the reader method. However, you need to be aware - # when using +class_attribute+ with mutable structures as +Array+ or +Hash+. - # In such cases, you don't want to do changes in place. Instead use setters: - # - # Base.setting = [] - # Base.setting # => [] - # Subclass.setting # => [] - # - # # Appending in child changes both parent and child because it is the same object: - # Subclass.setting << :foo - # Base.setting # => [:foo] - # Subclass.setting # => [:foo] - # - # # Use setters to not propagate changes: - # Base.setting = [] - # Subclass.setting += [:foo] - # Base.setting # => [] - # Subclass.setting # => [:foo] - # - # For convenience, an instance predicate method is defined as well. - # To skip it, pass instance_predicate: false. - # - # Subclass.setting? # => false - # - # Instances may overwrite the class value in the same way: - # - # Base.setting = true - # object = Base.new - # object.setting # => true - # object.setting = false - # object.setting # => false - # Base.setting # => true - # - # To opt out of the instance reader method, pass instance_reader: false. - # - # object.setting # => NoMethodError - # object.setting? # => NoMethodError - # - # To opt out of the instance writer method, pass instance_writer: false. - # - # object.setting = false # => NoMethodError - # - # To opt out of both instance methods, pass instance_accessor: false. - # - # To set a default value for the attribute, pass default:, like so: - # - # class_attribute :settings, default: {} - # - # source://activesupport//lib/active_support/core_ext/class/attribute.rb#85 - def class_attribute(*attrs, instance_accessor: T.unsafe(nil), instance_reader: T.unsafe(nil), instance_writer: T.unsafe(nil), instance_predicate: T.unsafe(nil), default: T.unsafe(nil)); end - - # Returns an array with all classes that are < than its receiver. - # - # class C; end - # C.descendants # => [] - # - # class B < C; end - # C.descendants # => [B] - # - # class A < B; end - # C.descendants # => [B, A] - # - # class D < C; end - # C.descendants # => [B, A, D] - # - # source://activesupport//lib/active_support/descendants_tracker.rb#63 - def descendants; end - - # source://activesupport//lib/active_support/descendants_tracker.rb#59 - def subclasses; end -end - -# source://activesupport//lib/active_support/core_ext/object/json.rb#69 -class Data - # source://activesupport//lib/active_support/core_ext/object/json.rb#70 - def as_json(options = T.unsafe(nil)); end -end - -# source://activesupport//lib/active_support/core_ext/date/zones.rb#6 -class Date - include ::Comparable - include ::DateAndTime::Zones - include ::DateAndTime::Calculations - - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#90 - def +(other); end - - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#100 - def -(other); end - - # Allow Date to be compared with Time by converting to DateTime and relying on the <=> from there. - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#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. - # - # The increments are applied in order of time units from largest to smallest. - # In other words, the date is incremented first by +:years+, then by - # +:months+, then by +:weeks+, then by +:days+. This order can affect the - # result around the end of a month. For example, incrementing first by months - # then by days: - # - # Date.new(2004, 9, 30).advance(months: 1, days: 1) - # # => Sun, 31 Oct 2004 - # - # Whereas incrementing first by days then by months yields a different result: - # - # Date.new(2004, 9, 30).advance(days: 1).advance(months: 1) - # # => Mon, 01 Nov 2004 - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#127 - def advance(options); end - - # Converts Date to a Time (or DateTime if necessary) with the time portion set to the beginning of the day (0:00) - # and then subtracts the specified number of seconds. - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#55 - def ago(seconds); end - - # source://activesupport//lib/active_support/core_ext/object/json.rb#205 - def as_json(options = T.unsafe(nil)); end - - # Converts Date to a Time (or DateTime if necessary) with the time portion set to the beginning of the day (0:00) - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#67 - def at_beginning_of_day; end - - # Converts Date to a Time (or DateTime if necessary) with the time portion set to the end of the day (23:59:59) - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#85 - def at_end_of_day; end - - # Converts Date to a Time (or DateTime if necessary) with the time portion set to the middle of the day (12:00) - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#75 - def at_midday; end - - # Converts Date to a Time (or DateTime if necessary) with the time portion set to the middle of the day (12:00) - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#75 - def at_middle_of_day; end - - # Converts Date to a Time (or DateTime if necessary) with the time portion set to the beginning of the day (0:00) - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#67 - def at_midnight; end - - # Converts Date to a Time (or DateTime if necessary) with the time portion set to the middle of the day (12:00) - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#75 - def at_noon; end - - # Converts Date to a Time (or DateTime if necessary) with the time portion set to the beginning of the day (0:00) - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#67 - def beginning_of_day; end - - # No Date is blank: - # - # Date.today.blank? # => false - # - # @return [false] - # - # source://activesupport//lib/active_support/core_ext/date/blank.rb#11 - def blank?; end - - # Returns a new Date where one or more of the elements have been changed according to the +options+ parameter. - # The +options+ parameter is a hash with a combination of these keys: :year, :month, :day. - # - # Date.new(2007, 5, 12).change(day: 1) # => Date.new(2007, 5, 1) - # Date.new(2007, 5, 12).change(year: 2005, month: 1) # => Date.new(2005, 1, 12) - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#143 - def change(options); end - - # Allow Date to be compared with Time by converting to DateTime and relying on the <=> from there. - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#152 - def compare_with_coercion(other); end - - # Converts Date to a Time (or DateTime if necessary) with the time portion set to the end of the day (23:59:59) - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#85 - def end_of_day; end - - # Converts Date to a Time (or DateTime if necessary) with the time portion set to the beginning of the day (0:00) - # and then adds the specified number of seconds - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#61 - def in(seconds); end - - # Overrides the default inspect method with a human readable one, e.g., "Mon, 21 Feb 2005" - # - # source://activesupport//lib/active_support/core_ext/date/conversions.rb#61 - def inspect; end - - # Converts Date to a Time (or DateTime if necessary) with the time portion set to the middle of the day (12:00) - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#75 - def midday; end - - # Converts Date to a Time (or DateTime if necessary) with the time portion set to the middle of the day (12:00) - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#75 - def middle_of_day; end - - # Converts Date to a Time (or DateTime if necessary) with the time portion set to the beginning of the day (0:00) - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#67 - def midnight; end - - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#100 - def minus_with_duration(other); end - - # Converts Date to a Time (or DateTime if necessary) with the time portion set to the middle of the day (12:00) - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#75 - def noon; end - - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#90 - def plus_with_duration(other); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/date/blank.rb#15 - def present?; end - - # Overrides the default inspect method with a human readable one, e.g., "Mon, 21 Feb 2005" - # - # source://activesupport//lib/active_support/core_ext/date/conversions.rb#61 - def readable_inspect; end - - # Converts Date to a Time (or DateTime if necessary) with the time portion set to the beginning of the day (0:00) - # and then adds the specified number of seconds - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#61 - def since(seconds); end - - # Convert to a formatted string. See DATE_FORMATS for predefined formats. - # - # This method is aliased to to_formatted_s. - # - # date = Date.new(2007, 11, 10) # => Sat, 10 Nov 2007 - # - # date.to_fs(:db) # => "2007-11-10" - # date.to_formatted_s(:db) # => "2007-11-10" - # - # date.to_fs(:short) # => "10 Nov" - # date.to_fs(:number) # => "20071110" - # date.to_fs(:long) # => "November 10, 2007" - # date.to_fs(:long_ordinal) # => "November 10th, 2007" - # date.to_fs(:rfc822) # => "10 Nov 2007" - # date.to_fs(:iso8601) # => "2007-11-10" - # - # == Adding your own date formats to to_fs - # You can add your own formats to the Date::DATE_FORMATS hash. - # Use the format name as the hash key and either a strftime string - # or Proc instance that takes a date argument as the value. - # - # # config/initializers/date_formats.rb - # Date::DATE_FORMATS[:month_and_year] = '%B %Y' - # Date::DATE_FORMATS[:short_ordinal] = ->(date) { date.strftime("%B #{date.day.ordinalize}") } - # - # source://activesupport//lib/active_support/core_ext/date/conversions.rb#47 - def to_formatted_s(format = T.unsafe(nil)); end - - # Convert to a formatted string. See DATE_FORMATS for predefined formats. - # - # This method is aliased to to_formatted_s. - # - # date = Date.new(2007, 11, 10) # => Sat, 10 Nov 2007 - # - # date.to_fs(:db) # => "2007-11-10" - # date.to_formatted_s(:db) # => "2007-11-10" - # - # date.to_fs(:short) # => "10 Nov" - # date.to_fs(:number) # => "20071110" - # date.to_fs(:long) # => "November 10, 2007" - # date.to_fs(:long_ordinal) # => "November 10th, 2007" - # date.to_fs(:rfc822) # => "10 Nov 2007" - # date.to_fs(:iso8601) # => "2007-11-10" - # - # == Adding your own date formats to to_fs - # You can add your own formats to the Date::DATE_FORMATS hash. - # Use the format name as the hash key and either a strftime string - # or Proc instance that takes a date argument as the value. - # - # # config/initializers/date_formats.rb - # Date::DATE_FORMATS[:month_and_year] = '%B %Y' - # Date::DATE_FORMATS[:short_ordinal] = ->(date) { date.strftime("%B #{date.day.ordinalize}") } - # - # source://activesupport//lib/active_support/core_ext/date/conversions.rb#47 - def to_fs(format = T.unsafe(nil)); end - - # Converts a Date instance to a Time, where the time is set to the beginning of the day. - # The timezone can be either +:local+ or +:utc+ (default +:local+). - # - # date = Date.new(2007, 11, 10) # => Sat, 10 Nov 2007 - # - # date.to_time # => 2007-11-10 00:00:00 0800 - # date.to_time(:local) # => 2007-11-10 00:00:00 0800 - # - # date.to_time(:utc) # => 2007-11-10 00:00:00 UTC - # - # NOTE: The +:local+ timezone is Ruby's *process* timezone, i.e. ENV['TZ']. - # If the application's timezone is needed, then use +in_time_zone+ instead. - # - # @raise [ArgumentError] - # - # source://activesupport//lib/active_support/core_ext/date/conversions.rb#81 - def to_time(form = T.unsafe(nil)); end - - # Returns a string which represents the time in used time zone as DateTime - # defined by XML Schema: - # - # date = Date.new(2015, 05, 23) # => Sat, 23 May 2015 - # date.xmlschema # => "2015-05-23T00:00:00+04:00" - # - # source://activesupport//lib/active_support/core_ext/date/conversions.rb#93 - def xmlschema; end - - class << self - # Returns the week start (e.g. +:monday+) for the current request, if this has been set (via Date.beginning_of_week=). - # If Date.beginning_of_week has not been set for the current request, returns the week start specified in config.beginning_of_week. - # If no +config.beginning_of_week+ was specified, returns +:monday+. - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#19 - def beginning_of_week; end - - # Sets Date.beginning_of_week to a week start (e.g. +:monday+) for current request/thread. - # - # This method accepts any of the following day symbols: - # +:monday+, +:tuesday+, +:wednesday+, +:thursday+, +:friday+, +:saturday+, +:sunday+ - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#27 - def beginning_of_week=(week_start); end - - # Returns the value of attribute beginning_of_week_default. - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#14 - def beginning_of_week_default; end - - # Sets the attribute beginning_of_week_default - # - # @param value the value to set the attribute beginning_of_week_default to. - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#14 - def beginning_of_week_default=(_arg0); end - - # Returns Time.zone.today when Time.zone or config.time_zone are set, otherwise just returns Date.today. - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#48 - def current; end - - # Returns week start day symbol (e.g. +:monday+), or raises an +ArgumentError+ for invalid day symbol. - # - # @raise [ArgumentError] - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#32 - def find_beginning_of_week!(week_start); end - - # Returns a new Date representing the date 1 day after today (i.e. tomorrow's date). - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#43 - def tomorrow; end - - # Returns a new Date representing the date 1 day ago (i.e. yesterday's date). - # - # source://activesupport//lib/active_support/core_ext/date/calculations.rb#38 - def yesterday; end - end -end - -# source://activesupport//lib/active_support/core_ext/date/conversions.rb#9 -Date::DATE_FORMATS = T.let(T.unsafe(nil), Hash) - -# source://activesupport//lib/active_support/core_ext/date_and_time/compatibility.rb#6 -module DateAndTime; end - -# source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#7 -module DateAndTime::Calculations - # Returns true if the date/time falls after date_or_time. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#72 - def after?(date_or_time); end - - # Returns a Range representing the whole day of the current date/time. - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#310 - def all_day; end - - # Returns a Range representing the whole month of the current date/time. - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#321 - def all_month; end - - # Returns a Range representing the whole quarter of the current date/time. - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#326 - def all_quarter; end - - # Returns a Range representing the whole week of the current date/time. - # Week starts on start_day, default is Date.beginning_of_week or config.beginning_of_week when set. - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#316 - def all_week(start_day = T.unsafe(nil)); end - - # Returns a Range representing the whole year of the current date/time. - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#331 - def all_year; end - - # Returns a new date/time at the start of the month. - # - # today = Date.today # => Thu, 18 Jun 2015 - # today.beginning_of_month # => Mon, 01 Jun 2015 - # - # +DateTime+ objects will have a time set to 0:00. - # - # now = DateTime.current # => Thu, 18 Jun 2015 15:23:13 +0000 - # now.beginning_of_month # => Mon, 01 Jun 2015 00:00:00 +0000 - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#125 - def at_beginning_of_month; end - - # Returns a new date/time at the start of the quarter. - # - # today = Date.today # => Fri, 10 Jul 2015 - # today.beginning_of_quarter # => Wed, 01 Jul 2015 - # - # +DateTime+ objects will have a time set to 0:00. - # - # now = DateTime.current # => Fri, 10 Jul 2015 18:41:29 +0000 - # now.beginning_of_quarter # => Wed, 01 Jul 2015 00:00:00 +0000 - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#139 - def at_beginning_of_quarter; end - - # Returns a new date/time representing the start of this week on the given day. - # Week is assumed to start on +start_day+, default is - # +Date.beginning_of_week+ or +config.beginning_of_week+ when set. - # +DateTime+ objects have their time set to 0:00. - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#267 - def at_beginning_of_week(start_day = T.unsafe(nil)); end - - # Returns a new date/time at the beginning of the year. - # - # today = Date.today # => Fri, 10 Jul 2015 - # today.beginning_of_year # => Thu, 01 Jan 2015 - # - # +DateTime+ objects will have a time set to 0:00. - # - # now = DateTime.current # => Fri, 10 Jul 2015 18:41:29 +0000 - # now.beginning_of_year # => Thu, 01 Jan 2015 00:00:00 +0000 - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#179 - def at_beginning_of_year; end - - # Returns a new date/time representing the end of the month. - # DateTime objects will have a time set to 23:59:59. - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#296 - def at_end_of_month; end - - # Returns a new date/time at the end of the quarter. - # - # today = Date.today # => Fri, 10 Jul 2015 - # today.end_of_quarter # => Wed, 30 Sep 2015 - # - # +DateTime+ objects will have a time set to 23:59:59. - # - # now = DateTime.current # => Fri, 10 Jul 2015 18:41:29 +0000 - # now.end_of_quarter # => Wed, 30 Sep 2015 23:59:59 +0000 - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#154 - def at_end_of_quarter; end - - # Returns a new date/time representing the end of this week on the given day. - # Week is assumed to start on +start_day+, default is - # +Date.beginning_of_week+ or +config.beginning_of_week+ when set. - # DateTime objects have their time set to 23:59:59. - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#283 - def at_end_of_week(start_day = T.unsafe(nil)); end - - # Returns a new date/time representing the end of the year. - # DateTime objects will have a time set to 23:59:59. - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#304 - def at_end_of_year; end - - # Returns true if the date/time falls before date_or_time. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#67 - def before?(date_or_time); end - - # Returns a new date/time at the start of the month. - # - # today = Date.today # => Thu, 18 Jun 2015 - # today.beginning_of_month # => Mon, 01 Jun 2015 - # - # +DateTime+ objects will have a time set to 0:00. - # - # now = DateTime.current # => Thu, 18 Jun 2015 15:23:13 +0000 - # now.beginning_of_month # => Mon, 01 Jun 2015 00:00:00 +0000 - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#125 - def beginning_of_month; end - - # Returns a new date/time at the start of the quarter. - # - # today = Date.today # => Fri, 10 Jul 2015 - # today.beginning_of_quarter # => Wed, 01 Jul 2015 - # - # +DateTime+ objects will have a time set to 0:00. - # - # now = DateTime.current # => Fri, 10 Jul 2015 18:41:29 +0000 - # now.beginning_of_quarter # => Wed, 01 Jul 2015 00:00:00 +0000 - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#139 - def beginning_of_quarter; end - - # Returns a new date/time representing the start of this week on the given day. - # Week is assumed to start on +start_day+, default is - # +Date.beginning_of_week+ or +config.beginning_of_week+ when set. - # +DateTime+ objects have their time set to 0:00. - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#267 - def beginning_of_week(start_day = T.unsafe(nil)); end - - # Returns a new date/time at the beginning of the year. - # - # today = Date.today # => Fri, 10 Jul 2015 - # today.beginning_of_year # => Thu, 01 Jan 2015 - # - # +DateTime+ objects will have a time set to 0:00. - # - # now = DateTime.current # => Fri, 10 Jul 2015 18:41:29 +0000 - # now.beginning_of_year # => Thu, 01 Jan 2015 00:00:00 +0000 - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#179 - def beginning_of_year; end - - # Returns a new date/time the specified number of days ago. - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#77 - def days_ago(days); end - - # Returns a new date/time the specified number of days in the future. - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#82 - def days_since(days); end - - # Returns the number of days to the start of the week on the given day. - # Week is assumed to start on +start_day+, default is - # +Date.beginning_of_week+ or +config.beginning_of_week+ when set. - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#258 - def days_to_week_start(start_day = T.unsafe(nil)); end - - # Returns a new date/time representing the end of the month. - # DateTime objects will have a time set to 23:59:59. - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#296 - def end_of_month; end - - # Returns a new date/time at the end of the quarter. - # - # today = Date.today # => Fri, 10 Jul 2015 - # today.end_of_quarter # => Wed, 30 Sep 2015 - # - # +DateTime+ objects will have a time set to 23:59:59. - # - # now = DateTime.current # => Fri, 10 Jul 2015 18:41:29 +0000 - # now.end_of_quarter # => Wed, 30 Sep 2015 23:59:59 +0000 - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#154 - def end_of_quarter; end - - # Returns a new date/time representing the end of this week on the given day. - # Week is assumed to start on +start_day+, default is - # +Date.beginning_of_week+ or +config.beginning_of_week+ when set. - # DateTime objects have their time set to 23:59:59. - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#283 - def end_of_week(start_day = T.unsafe(nil)); end - - # Returns a new date/time representing the end of the year. - # DateTime objects will have a time set to 23:59:59. - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#304 - def end_of_year; end - - # Returns true if the date/time is in the future. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#52 - def future?; end - - # Short-hand for months_ago(1). - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#240 - def last_month; end - - # Short-hand for months_ago(3). - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#245 - def last_quarter; end - - # Returns a new date/time representing the given day in the previous week. - # Week is assumed to start on +start_day+, default is - # +Date.beginning_of_week+ or +config.beginning_of_week+ when set. - # DateTime objects have their time set to 0:00 unless +same_time+ is true. - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#223 - def last_week(start_day = T.unsafe(nil), same_time: T.unsafe(nil)); end - - # Returns a new date/time representing the previous weekday. - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#230 - def last_weekday; end - - # Short-hand for years_ago(1). - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#251 - def last_year; end - - # Returns Monday of this week assuming that week starts on Monday. - # +DateTime+ objects have their time set to 0:00. - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#275 - def monday; end - - # Returns a new date/time the specified number of months ago. - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#97 - def months_ago(months); end - - # Returns a new date/time the specified number of months in the future. - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#102 - def months_since(months); end - - # Returns true if the date/time is tomorrow. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#35 - def next_day?; end - - # Returns a new date/time representing the next occurrence of the specified day of week. - # - # today = Date.today # => Thu, 14 Dec 2017 - # today.next_occurring(:monday) # => Mon, 18 Dec 2017 - # today.next_occurring(:thursday) # => Thu, 21 Dec 2017 - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#340 - def next_occurring(day_of_week); end - - # Short-hand for months_since(3). - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#215 - def next_quarter; end - - # Returns a new date/time representing the given day in the next week. - # - # today = Date.today # => Thu, 07 May 2015 - # today.next_week # => Mon, 11 May 2015 - # - # The +given_day_in_next_week+ defaults to the beginning of the week - # which is determined by +Date.beginning_of_week+ or +config.beginning_of_week+ - # when set. - # - # today = Date.today # => Thu, 07 May 2015 - # today.next_week(:friday) # => Fri, 15 May 2015 - # - # +DateTime+ objects have their time set to 0:00 unless +same_time+ is true. - # - # now = DateTime.current # => Thu, 07 May 2015 13:31:16 +0000 - # now.next_week # => Mon, 11 May 2015 00:00:00 +0000 - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#200 - def next_week(given_day_in_next_week = T.unsafe(nil), same_time: T.unsafe(nil)); end - - # Returns a new date/time representing the next weekday. - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#206 - def next_weekday; end - - # Returns true if the date/time does not fall on a Saturday or Sunday. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#62 - def on_weekday?; end - - # Returns true if the date/time falls on a Saturday or Sunday. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#57 - def on_weekend?; end - - # Returns true if the date/time is in the past. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#47 - def past?; end - - # Returns true if the date/time is yesterday. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#41 - def prev_day?; end - - # Returns a new date/time representing the previous occurrence of the specified day of week. - # - # today = Date.today # => Thu, 14 Dec 2017 - # today.prev_occurring(:monday) # => Mon, 11 Dec 2017 - # today.prev_occurring(:thursday) # => Thu, 07 Dec 2017 - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#351 - def prev_occurring(day_of_week); end - - # Short-hand for months_ago(3). - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#245 - def prev_quarter; end - - # Returns a new date/time representing the given day in the previous week. - # Week is assumed to start on +start_day+, default is - # +Date.beginning_of_week+ or +config.beginning_of_week+ when set. - # DateTime objects have their time set to 0:00 unless +same_time+ is true. - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#223 - def prev_week(start_day = T.unsafe(nil), same_time: T.unsafe(nil)); end - - # Returns a new date/time representing the previous weekday. - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#230 - def prev_weekday; end - - # Returns the quarter for a date/time. - # - # Date.new(2010, 1, 31).quarter # => 1 - # Date.new(2010, 4, 12).quarter # => 2 - # Date.new(2010, 9, 15).quarter # => 3 - # Date.new(2010, 12, 25).quarter # => 4 - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#166 - def quarter; end - - # Returns Sunday of this week assuming that week starts on Monday. - # +DateTime+ objects have their time set to 23:59:59. - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#290 - def sunday; end - - # Returns true if the date/time is today. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#30 - def today?; end - - # Returns a new date/time representing tomorrow. - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#25 - def tomorrow; end - - # Returns true if the date/time is tomorrow. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#35 - def tomorrow?; end - - # Returns a new date/time the specified number of weeks ago. - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#87 - def weeks_ago(weeks); end - - # Returns a new date/time the specified number of weeks in the future. - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#92 - def weeks_since(weeks); end - - # Returns a new date/time the specified number of years ago. - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#107 - def years_ago(years); end - - # Returns a new date/time the specified number of years in the future. - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#112 - def years_since(years); end - - # Returns a new date/time representing yesterday. - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#20 - def yesterday; end - - # Returns true if the date/time is yesterday. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#41 - def yesterday?; end - - private - - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#370 - def copy_time_to(other); end - - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#366 - def days_span(day); end - - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#358 - def first_hour(date_or_time); end - - # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#362 - def last_hour(date_or_time); end -end - -# source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#8 -DateAndTime::Calculations::DAYS_INTO_WEEK = T.let(T.unsafe(nil), Hash) - -# source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#17 -DateAndTime::Calculations::WEEKEND_DAYS = T.let(T.unsafe(nil), Array) - -# source://activesupport//lib/active_support/core_ext/date_and_time/compatibility.rb#7 -module DateAndTime::Compatibility - # source://activesupport//lib/active_support/core_ext/date_and_time/compatibility.rb#39 - def preserve_timezone; end - - # source://activesupport//lib/active_support/core_ext/date_and_time/compatibility.rb#56 - def utc_to_local_returns_utc_offset_times; end - - class << self - # -- - # This re-implements the behaviour of the mattr_reader, instead - # of prepending on to it, to avoid overcomplicating a module that - # is in turn included in several places. This will all go away in - # Rails 8.0 anyway. - # - # source://activesupport//lib/active_support/core_ext/date_and_time/compatibility.rb#24 - def preserve_timezone; end - - # source://activesupport//lib/active_support/core_ext/date_and_time/compatibility.rb#15 - def preserve_timezone=(val); end - - # source://activesupport//lib/active_support/core_ext/date_and_time/compatibility.rb#56 - def utc_to_local_returns_utc_offset_times; end - - # source://activesupport//lib/active_support/core_ext/date_and_time/compatibility.rb#56 - def utc_to_local_returns_utc_offset_times=(val); end - end -end - -# source://activesupport//lib/active_support/core_ext/date_and_time/zones.rb#4 -module DateAndTime::Zones - # Returns the simultaneous time in Time.zone if a zone is given or - # if Time.zone_default is set. Otherwise, it returns the current time. - # - # Time.zone = 'Hawaii' # => 'Hawaii' - # Time.utc(2000).in_time_zone # => Fri, 31 Dec 1999 14:00:00 HST -10:00 - # Date.new(2000).in_time_zone # => Sat, 01 Jan 2000 00:00:00 HST -10:00 - # - # This method is similar to Time#localtime, except that it uses Time.zone as the local zone - # instead of the operating system's time zone. - # - # You can also pass in a TimeZone instance or string that identifies a TimeZone as an argument, - # and the conversion will be based on that zone instead of Time.zone. - # - # Time.utc(2000).in_time_zone('Alaska') # => Fri, 31 Dec 1999 15:00:00 AKST -09:00 - # Date.new(2000).in_time_zone('Alaska') # => Sat, 01 Jan 2000 00:00:00 AKST -09:00 - # - # source://activesupport//lib/active_support/core_ext/date_and_time/zones.rb#20 - def in_time_zone(zone = T.unsafe(nil)); end - - private - - # source://activesupport//lib/active_support/core_ext/date_and_time/zones.rb#32 - def time_with_zone(time, zone); end -end - -# source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#5 -class DateTime < ::Date - include ::DateAndTime::Compatibility - - # Layers additional behavior on DateTime#<=> so that Time and - # ActiveSupport::TimeWithZone instances can be compared with a DateTime. - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#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, - # :minutes, :seconds. - # - # Just like Date#advance, increments are applied in order of time units from - # largest to smallest. This order can affect the result around the end of a - # month. - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#82 - def advance(options); end - - # Returns a new DateTime representing the time a number of seconds ago. - # Do not use this method in combination with x.months, use months_ago instead! - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#109 - def ago(seconds); end - - # source://activesupport//lib/active_support/core_ext/object/json.rb#215 - def as_json(options = T.unsafe(nil)); end - - # Returns a new DateTime representing the start of the day (0:00). - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#122 - def at_beginning_of_day; end - - # Returns a new DateTime representing the start of the hour (hh:00:00). - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#146 - def at_beginning_of_hour; end - - # Returns a new DateTime representing the start of the minute (hh:mm:00). - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#158 - def at_beginning_of_minute; end - - # Returns a new DateTime representing the end of the day (23:59:59). - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#140 - def at_end_of_day; end - - # Returns a new DateTime representing the end of the hour (hh:59:59). - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#152 - def at_end_of_hour; end - - # Returns a new DateTime representing the end of the minute (hh:mm:59). - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#164 - def at_end_of_minute; end - - # Returns a new DateTime representing the middle of the day (12:00) - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#130 - def at_midday; end - - # Returns a new DateTime representing the middle of the day (12:00) - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#130 - def at_middle_of_day; end - - # Returns a new DateTime representing the start of the day (0:00). - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#122 - def at_midnight; end - - # Returns a new DateTime representing the middle of the day (12:00) - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#130 - def at_noon; end - - # Returns a new DateTime representing the start of the day (0:00). - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#122 - def beginning_of_day; end - - # Returns a new DateTime representing the start of the hour (hh:00:00). - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#146 - def beginning_of_hour; end - - # Returns a new DateTime representing the start of the minute (hh:mm:00). - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#158 - def beginning_of_minute; end - - # No DateTime is ever blank: - # - # DateTime.now.blank? # => false - # - # @return [false] - # - # source://activesupport//lib/active_support/core_ext/date_time/blank.rb#11 - def blank?; end - - # Returns a new DateTime where one or more of the elements have been changed - # according to the +options+ parameter. The time options (:hour, - # :min, :sec) reset cascadingly, so if only the hour is - # passed, then minute and sec is set to 0. If the hour and minute is passed, - # then sec is set to 0. The +options+ parameter takes a hash with any of these - # keys: :year, :month, :day, :hour, - # :min, :sec, :offset, :start. - # - # DateTime.new(2012, 8, 29, 22, 35, 0).change(day: 1) # => DateTime.new(2012, 8, 1, 22, 35, 0) - # DateTime.new(2012, 8, 29, 22, 35, 0).change(year: 1981, day: 1) # => DateTime.new(1981, 8, 1, 22, 35, 0) - # DateTime.new(2012, 8, 29, 22, 35, 0).change(year: 1981, hour: 0) # => DateTime.new(1981, 8, 29, 0, 0, 0) - # - # @raise [ArgumentError] - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#51 - def change(options); end - - # Returns a new DateTime representing the end of the day (23:59:59). - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#140 - def end_of_day; end - - # Returns a new DateTime representing the end of the hour (hh:59:59). - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#152 - def end_of_hour; end - - # Returns a new DateTime representing the end of the minute (hh:mm:59). - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#164 - def end_of_minute; end - - # Returns a formatted string of the offset from UTC, or an alternative - # string if the time zone is already UTC. - # - # datetime = DateTime.civil(2000, 1, 1, 0, 0, 0, Rational(-6, 24)) - # datetime.formatted_offset # => "-06:00" - # datetime.formatted_offset(false) # => "-0600" - # - # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#51 - def formatted_offset(colon = T.unsafe(nil), alternate_utc_string = T.unsafe(nil)); end - - # Returns a Time instance of the simultaneous time in the UTC timezone. - # - # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)) # => Mon, 21 Feb 2005 10:11:12 -0600 - # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)).utc # => Mon, 21 Feb 2005 16:11:12 UTC - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#184 - def getgm; end - - # Returns a Time instance of the simultaneous time in the system timezone. - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#170 - def getlocal(utc_offset = T.unsafe(nil)); end - - # Returns a Time instance of the simultaneous time in the UTC timezone. - # - # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)) # => Mon, 21 Feb 2005 10:11:12 -0600 - # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)).utc # => Mon, 21 Feb 2005 16:11:12 UTC - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#184 - def getutc; end - - # Returns a Time instance of the simultaneous time in the UTC timezone. - # - # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)) # => Mon, 21 Feb 2005 10:11:12 -0600 - # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)).utc # => Mon, 21 Feb 2005 16:11:12 UTC - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#184 - def gmtime; end - - # Returns a new DateTime representing the time a number of seconds since the - # instance time. Do not use this method in combination with x.months, use - # months_since instead! - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#116 - def in(seconds); end - - # Overrides the default inspect method with a human readable one, e.g., "Mon, 21 Feb 2005 14:30:00 +0000". - # - # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#56 - def inspect; end - - # Returns a Time instance of the simultaneous time in the system timezone. - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#170 - def localtime(utc_offset = T.unsafe(nil)); end - - # Returns a new DateTime representing the middle of the day (12:00) - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#130 - def midday; end - - # Returns a new DateTime representing the middle of the day (12:00) - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#130 - def middle_of_day; end - - # Returns a new DateTime representing the start of the day (0:00). - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#122 - def midnight; end - - # Returns a new DateTime representing the middle of the day (12:00) - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#130 - def noon; end - - # Returns the fraction of a second as nanoseconds - # - # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#94 - def nsec; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/date_time/blank.rb#15 - def present?; end - - # Overrides the default inspect method with a human readable one, e.g., "Mon, 21 Feb 2005 14:30:00 +0000". - # - # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#56 - def readable_inspect; end - - # Returns the number of seconds since 00:00:00. - # - # DateTime.new(2012, 8, 29, 0, 0, 0).seconds_since_midnight # => 0 - # DateTime.new(2012, 8, 29, 12, 34, 56).seconds_since_midnight # => 45296 - # DateTime.new(2012, 8, 29, 23, 59, 59).seconds_since_midnight # => 86399 - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#20 - def seconds_since_midnight; end - - # Returns the number of seconds until 23:59:59. - # - # DateTime.new(2012, 8, 29, 0, 0, 0).seconds_until_end_of_day # => 86399 - # DateTime.new(2012, 8, 29, 12, 34, 56).seconds_until_end_of_day # => 41103 - # DateTime.new(2012, 8, 29, 23, 59, 59).seconds_until_end_of_day # => 0 - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#29 - def seconds_until_end_of_day; end - - # Returns a new DateTime representing the time a number of seconds since the - # instance time. Do not use this method in combination with x.months, use - # months_since instead! - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#116 - def since(seconds); end - - # Returns the fraction of a second as a +Rational+ - # - # DateTime.new(2012, 8, 29, 0, 0, 0.5).subsec # => (1/2) - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#36 - def subsec; end - - # Converts +self+ to a floating-point number of seconds, including fractional microseconds, since the Unix epoch. - # - # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#79 - def to_f; end - - # Convert to a formatted string. See Time::DATE_FORMATS for predefined formats. - # - # This method is aliased to to_formatted_s. - # - # === Examples - # datetime = DateTime.civil(2007, 12, 4, 0, 0, 0, 0) # => Tue, 04 Dec 2007 00:00:00 +0000 - # - # datetime.to_fs(:db) # => "2007-12-04 00:00:00" - # datetime.to_formatted_s(:db) # => "2007-12-04 00:00:00" - # datetime.to_fs(:number) # => "20071204000000" - # datetime.to_fs(:short) # => "04 Dec 00:00" - # datetime.to_fs(:long) # => "December 04, 2007 00:00" - # datetime.to_fs(:long_ordinal) # => "December 4th, 2007 00:00" - # datetime.to_fs(:rfc822) # => "Tue, 04 Dec 2007 00:00:00 +0000" - # datetime.to_fs(:iso8601) # => "2007-12-04T00:00:00+00:00" - # - # == Adding your own datetime formats to to_fs - # DateTime formats are shared with Time. You can add your own to the - # Time::DATE_FORMATS hash. Use the format name as the hash key and - # either a strftime string or Proc instance that takes a time or - # datetime argument as the value. - # - # # config/initializers/time_formats.rb - # Time::DATE_FORMATS[:month_and_year] = '%B %Y' - # Time::DATE_FORMATS[:short_ordinal] = lambda { |time| time.strftime("%B #{time.day.ordinalize}") } - # - # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#35 - def to_formatted_s(format = T.unsafe(nil)); end - - # Convert to a formatted string. See Time::DATE_FORMATS for predefined formats. - # - # This method is aliased to to_formatted_s. - # - # === Examples - # datetime = DateTime.civil(2007, 12, 4, 0, 0, 0, 0) # => Tue, 04 Dec 2007 00:00:00 +0000 - # - # datetime.to_fs(:db) # => "2007-12-04 00:00:00" - # datetime.to_formatted_s(:db) # => "2007-12-04 00:00:00" - # datetime.to_fs(:number) # => "20071204000000" - # datetime.to_fs(:short) # => "04 Dec 00:00" - # datetime.to_fs(:long) # => "December 04, 2007 00:00" - # datetime.to_fs(:long_ordinal) # => "December 4th, 2007 00:00" - # datetime.to_fs(:rfc822) # => "Tue, 04 Dec 2007 00:00:00 +0000" - # datetime.to_fs(:iso8601) # => "2007-12-04T00:00:00+00:00" - # - # == Adding your own datetime formats to to_fs - # DateTime formats are shared with Time. You can add your own to the - # Time::DATE_FORMATS hash. Use the format name as the hash key and - # either a strftime string or Proc instance that takes a time or - # datetime argument as the value. - # - # # config/initializers/time_formats.rb - # Time::DATE_FORMATS[:month_and_year] = '%B %Y' - # Time::DATE_FORMATS[:short_ordinal] = lambda { |time| time.strftime("%B #{time.day.ordinalize}") } - # - # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#35 - def to_fs(format = T.unsafe(nil)); end - - # Converts +self+ to an integer number of seconds since the Unix epoch. - # - # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#84 - 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#89 - def usec; end - - # Returns a Time instance of the simultaneous time in the UTC timezone. - # - # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)) # => Mon, 21 Feb 2005 10:11:12 -0600 - # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)).utc # => Mon, 21 Feb 2005 16:11:12 UTC - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#184 - def utc; end - - # Returns +true+ if offset == 0. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#197 - def utc?; end - - # Returns the offset value in seconds. - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#202 - def utc_offset; end - - private - - # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#99 - def offset_in_seconds; end - - # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#103 - def seconds_since_unix_epoch; end - - class << self - # Returns DateTime with local offset for given year if format is local else - # offset is zero. - # - # DateTime.civil_from_format :local, 2012 - # # => Sun, 01 Jan 2012 00:00:00 +0300 - # DateTime.civil_from_format :local, 2012, 12, 17 - # # => Mon, 17 Dec 2012 00:00:00 +0000 - # - # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#69 - def civil_from_format(utc_or_local, year, month = T.unsafe(nil), day = T.unsafe(nil), hour = T.unsafe(nil), min = T.unsafe(nil), sec = T.unsafe(nil)); end - - # Returns Time.zone.now.to_datetime when Time.zone or - # config.time_zone are set, otherwise returns - # Time.now.to_datetime. - # - # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#10 - def current; end - end -end - -# source://activesupport//lib/active_support/core_ext/object/try.rb#117 -class Delegator < ::BasicObject - include ::ActiveSupport::Tryable -end - -# source://activesupport//lib/active_support/core_ext/digest/uuid.rb#7 -module Digest::UUID - class << self - # Returns the nil UUID. This is a special form of UUID that is specified to - # have all 128 bits set to zero. - # - # source://activesupport//lib/active_support/core_ext/digest/uuid.rb#58 - def nil_uuid; end - - # 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#62 - 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 - include ::ActiveSupport::CoreExt::ERBUtilPrivate - extend ::ActiveSupport::CoreExt::ERBUtil - - private - - # A utility method for escaping HTML without affecting existing escaped entities. - # - # html_escape_once('1 < 2 & 3') - # # => "1 < 2 & 3" - # - # html_escape_once('<< Accept & Checkout') - # # => "<< Accept & Checkout" - # - # source://activesupport//lib/active_support/core_ext/erb/util.rb#63 - def html_escape_once(s); end - - # A utility method for escaping HTML entities in JSON strings. Specifically, the - # &, > and < characters are replaced with their equivalent unicode escaped form - - # \u0026, \u003e, and \u003c. The Unicode sequences \u2028 and \u2029 are also - # escaped as they are treated as newline characters in some JavaScript engines. - # These sequences have identical meaning as the original characters inside the - # context of a JSON string, so assuming the input is a valid and well-formed - # JSON value, the output will have equivalent meaning when parsed: - # - # json = JSON.generate({ name: ""}) - # # => "{\"name\":\"\"}" - # - # json_escape(json) - # # => "{\"name\":\"\\u003C/script\\u003E\\u003Cscript\\u003Ealert('PWNED!!!')\\u003C/script\\u003E\"}" - # - # JSON.parse(json) == JSON.parse(json_escape(json)) - # # => true - # - # The intended use case for this method is to escape JSON strings before including - # them inside a script tag to avoid XSS vulnerability: - # - # - # - # It is necessary to +raw+ the result of +json_escape+, so that quotation marks - # don't get converted to " entities. +json_escape+ doesn't - # automatically flag the result as HTML safe, since the raw value is unsafe to - # use inside HTML attributes. - # - # If your JSON is being used downstream for insertion into the DOM, be aware of - # whether or not it is being inserted via html(). Most jQuery plugins do this. - # If that is the case, be sure to +html_escape+ or +sanitize+ any user-generated - # content returned by your JSON. - # - # If you need to output JSON elsewhere in your HTML, you can just do something - # like this, as any unsafe characters (including quotation marks) will be - # automatically escaped for you: - # - #
...
- # - # WARNING: this helper only works with valid JSON. Using this on non-JSON values - # will open up serious XSS vulnerabilities. For example, if you replace the - # +current_user.to_json+ in the example above with user input instead, the browser - # will happily eval() that string as JavaScript. - # - # The escaping performed in this method is identical to those performed in the - # Active Support JSON encoder when +ActiveSupport.escape_html_entities_in_json+ is - # set to true. Because this transformation is idempotent, this helper can be - # applied even if +ActiveSupport.escape_html_entities_in_json+ is already true. - # - # Therefore, when you are unsure if +ActiveSupport.escape_html_entities_in_json+ - # is enabled, or if you are unsure where your JSON string originated from, it - # is recommended that you always apply this helper (other libraries, such as the - # JSON gem, do not provide this kind of protection by default; also some gems - # might override +to_json+ to bypass Active Support's encoder). - # - # source://activesupport//lib/active_support/core_ext/erb/util.rb#124 - def json_escape(s); end - - # A utility method for escaping XML names of tags and names of attributes. - # - # xml_name_escape('1 < 2 & 3') - # # => "1___2___3" - # - # It follows the requirements of the specification: https://www.w3.org/TR/REC-xml/#NT-Name - # - # source://activesupport//lib/active_support/core_ext/erb/util.rb#142 - def xml_name_escape(name); end - - class << self - # source://activesupport//lib/active_support/core_ext/erb/util.rb#25 - def h(s); end - - # source://activesupport//lib/active_support/core_ext/erb/util.rb#25 - def html_escape(s); end - - # A utility method for escaping HTML without affecting existing escaped entities. - # - # html_escape_once('1 < 2 & 3') - # # => "1 < 2 & 3" - # - # html_escape_once('<< Accept & Checkout') - # # => "<< Accept & Checkout" - # - # source://activesupport//lib/active_support/core_ext/erb/util.rb#63 - def html_escape_once(s); end - - # A utility method for escaping HTML entities in JSON strings. Specifically, the - # &, > and < characters are replaced with their equivalent unicode escaped form - - # \u0026, \u003e, and \u003c. The Unicode sequences \u2028 and \u2029 are also - # escaped as they are treated as newline characters in some JavaScript engines. - # These sequences have identical meaning as the original characters inside the - # context of a JSON string, so assuming the input is a valid and well-formed - # JSON value, the output will have equivalent meaning when parsed: - # - # json = JSON.generate({ name: ""}) - # # => "{\"name\":\"\"}" - # - # json_escape(json) - # # => "{\"name\":\"\\u003C/script\\u003E\\u003Cscript\\u003Ealert('PWNED!!!')\\u003C/script\\u003E\"}" - # - # JSON.parse(json) == JSON.parse(json_escape(json)) - # # => true - # - # The intended use case for this method is to escape JSON strings before including - # them inside a script tag to avoid XSS vulnerability: - # - # - # - # It is necessary to +raw+ the result of +json_escape+, so that quotation marks - # don't get converted to " entities. +json_escape+ doesn't - # automatically flag the result as HTML safe, since the raw value is unsafe to - # use inside HTML attributes. - # - # If your JSON is being used downstream for insertion into the DOM, be aware of - # whether or not it is being inserted via html(). Most jQuery plugins do this. - # If that is the case, be sure to +html_escape+ or +sanitize+ any user-generated - # content returned by your JSON. - # - # If you need to output JSON elsewhere in your HTML, you can just do something - # like this, as any unsafe characters (including quotation marks) will be - # automatically escaped for you: - # - #
...
- # - # WARNING: this helper only works with valid JSON. Using this on non-JSON values - # will open up serious XSS vulnerabilities. For example, if you replace the - # +current_user.to_json+ in the example above with user input instead, the browser - # will happily eval() that string as JavaScript. - # - # The escaping performed in this method is identical to those performed in the - # Active Support JSON encoder when +ActiveSupport.escape_html_entities_in_json+ is - # set to true. Because this transformation is idempotent, this helper can be - # applied even if +ActiveSupport.escape_html_entities_in_json+ is already true. - # - # Therefore, when you are unsure if +ActiveSupport.escape_html_entities_in_json+ - # is enabled, or if you are unsure where your JSON string originated from, it - # is recommended that you always apply this helper (other libraries, such as the - # JSON gem, do not provide this kind of protection by default; also some gems - # might override +to_json+ to bypass Active Support's encoder). - # - # source://activesupport//lib/active_support/core_ext/erb/util.rb#124 - def json_escape(s); end - - # Tokenizes a line of ERB. This is really just for error reporting and - # nobody should use it. - # - # source://activesupport//lib/active_support/core_ext/erb/util.rb#161 - def tokenize(source); end - - # source://activesupport//lib/active_support/core_ext/erb/util.rb#10 - def unwrapped_html_escape(s); end - - # A utility method for escaping XML names of tags and names of attributes. - # - # xml_name_escape('1 < 2 & 3') - # # => "1___2___3" - # - # It follows the requirements of the specification: https://www.w3.org/TR/REC-xml/#NT-Name - # - # source://activesupport//lib/active_support/core_ext/erb/util.rb#142 - def xml_name_escape(name); end - end -end - -# source://activesupport//lib/active_support/core_ext/erb/util.rb#40 -ERB::Util::HTML_ESCAPE = T.let(T.unsafe(nil), Hash) - -# source://activesupport//lib/active_support/core_ext/erb/util.rb#41 -ERB::Util::HTML_ESCAPE_ONCE_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://activesupport//lib/active_support/core_ext/erb/util.rb#49 -ERB::Util::INVALID_TAG_NAME_FOLLOWING_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://activesupport//lib/active_support/core_ext/erb/util.rb#47 -ERB::Util::INVALID_TAG_NAME_START_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://activesupport//lib/active_support/core_ext/erb/util.rb#50 -ERB::Util::SAFE_XML_TAG_NAME_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://activesupport//lib/active_support/core_ext/erb/util.rb#48 -ERB::Util::TAG_NAME_FOLLOWING_CODEPOINTS = T.let(T.unsafe(nil), String) - -# source://activesupport//lib/active_support/core_ext/erb/util.rb#51 -ERB::Util::TAG_NAME_REPLACEMENT_CHAR = T.let(T.unsafe(nil), String) - -# Following XML requirements: https://www.w3.org/TR/REC-xml/#NT-Name -# -# source://activesupport//lib/active_support/core_ext/erb/util.rb#44 -ERB::Util::TAG_NAME_START_CODEPOINTS = T.let(T.unsafe(nil), String) - -# source://activesupport//lib/active_support/core_ext/enumerable.rb#18 -module Enumerable - include ::ActiveSupport::ToJsonWithActiveSupportEncoder - extend ::ActiveSupport::EnumerableCoreExt::Constants - - # source://activesupport//lib/active_support/core_ext/object/json.rb#148 - def as_json(options = T.unsafe(nil)); end - - # Returns a new +Array+ without the blank items. - # Uses Object#blank? for determining if an item is blank. - # - # [1, "", nil, 2, " ", [], {}, false, true].compact_blank - # # => [1, 2, true] - # - # Set.new([nil, "", 1, false]).compact_blank - # # => [1] - # - # When called on a +Hash+, returns a new +Hash+ without the blank values. - # - # { a: "", b: 1, c: nil, d: [], e: false, f: true }.compact_blank - # # => { b: 1, f: true } - # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#184 - def compact_blank; end - - # The negative of the Enumerable#include?. Returns +true+ if the - # collection does not include the object. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#118 - def exclude?(object); end - - # Returns a copy of the enumerable excluding the specified elements. - # - # ["David", "Rafael", "Aaron", "Todd"].excluding "Aaron", "Todd" - # # => ["David", "Rafael"] - # - # ["David", "Rafael", "Aaron", "Todd"].excluding %w[ Aaron Todd ] - # # => ["David", "Rafael"] - # - # {foo: 1, bar: 2, baz: 3}.excluding :bar - # # => {foo: 1, baz: 3} - # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#132 - def excluding(*elements); end - - # Returns a new +Array+ where the order has been set to that provided in the +series+, based on the +key+ of the - # objects in the original enumerable. - # - # [ Person.find(5), Person.find(3), Person.find(1) ].in_order_of(:id, [ 1, 5, 3 ]) - # # => [ Person.find(1), Person.find(5), Person.find(3) ] - # - # If the +series+ include keys that have no corresponding element in the Enumerable, these are ignored. - # If the Enumerable has additional elements that aren't named in the +series+, these are not included in the result. - # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#196 - def in_order_of(key, series); end - - # Returns a new array that includes the passed elements. - # - # [ 1, 2, 3 ].including(4, 5) - # # => [ 1, 2, 3, 4, 5 ] - # - # ["David", "Rafael"].including %w[ Aaron Todd ] - # # => ["David", "Rafael", "Aaron", "Todd"] - # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#112 - def including(*elements); end - - # Convert an enumerable to a hash, using the block result as the key and the - # element as the value. - # - # people.index_by(&:login) - # # => { "nextangle" => , "chade-" => , ...} - # - # people.index_by { |person| "#{person.first_name} #{person.last_name}" } - # # => { "Chade- Fowlersburg-e" => , "David Heinemeier Hansson" => , ...} - # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#52 - def index_by; end - - # Convert an enumerable to a hash, using the element as the key and the block - # result as the value. - # - # post = Post.new(title: "hey there", body: "what's up?") - # - # %i( title body ).index_with { |attr_name| post.public_send(attr_name) } - # # => { title: "hey there", body: "what's up?" } - # - # If an argument is passed instead of a block, it will be used as the value - # for all elements: - # - # %i( created_at updated_at ).index_with(Time.now) - # # => { created_at: 2020-03-09 22:31:47, updated_at: 2020-03-09 22:31:47 } - # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#75 - def index_with(default = T.unsafe(nil)); end - - # Returns +true+ if the enumerable has more than 1 element. Functionally - # equivalent to enum.to_a.size > 1. Can be called with a block too, - # much like any?, so people.many? { |p| p.age > 26 } returns +true+ - # if more than one person is over 26. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#93 - def many?; end - - # Calculates the maximum from the extracted elements. - # - # payments = [Payment.new(5), Payment.new(15), Payment.new(10)] - # payments.maximum(:price) # => 15 - # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#40 - def maximum(key); end - - # Calculates the minimum from the extracted elements. - # - # payments = [Payment.new(5), Payment.new(15), Payment.new(10)] - # payments.minimum(:price) # => 5 - # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#32 - def minimum(key); end - - # Extract the given key from the first element in the enumerable. - # - # [{ name: "David" }, { name: "Rafael" }, { name: "Aaron" }].pick(:name) - # # => "David" - # - # [{ id: 1, name: "David" }, { id: 2, name: "Rafael" }].pick(:id, :name) - # # => [1, "David"] - # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#161 - def pick(*keys); end - - # Extract the given key from each element in the enumerable. - # - # [{ name: "David" }, { name: "Rafael" }, { name: "Aaron" }].pluck(:name) - # # => ["David", "Rafael", "Aaron"] - # - # [{ id: 1, name: "David" }, { id: 2, name: "Rafael" }].pluck(:id, :name) - # # => [[1, "David"], [2, "Rafael"]] - # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#145 - def pluck(*keys); end - - # Returns the sole item in the enumerable. If there are no items, or more - # than one item, raises +Enumerable::SoleItemExpectedError+. - # - # ["x"].sole # => "x" - # Set.new.sole # => Enumerable::SoleItemExpectedError: no item found - # { a: 1, b: 2 }.sole # => Enumerable::SoleItemExpectedError: multiple items found - # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#206 - def sole; end - - # Returns a copy of the enumerable excluding the specified elements. - # - # ["David", "Rafael", "Aaron", "Todd"].excluding "Aaron", "Todd" - # # => ["David", "Rafael"] - # - # ["David", "Rafael", "Aaron", "Todd"].excluding %w[ Aaron Todd ] - # # => ["David", "Rafael"] - # - # {foo: 1, bar: 2, baz: 3}.excluding :bar - # # => {foo: 1, baz: 3} - # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#132 - def without(*elements); end -end - -# Error generated by +sole+ when called on an enumerable that doesn't have -# exactly one item. -# -# source://activesupport//lib/active_support/core_ext/enumerable.rb#21 -class Enumerable::SoleItemExpectedError < ::StandardError; end - -# source://activesupport//lib/active_support/core_ext/object/json.rb#250 -class Exception - # source://activesupport//lib/active_support/core_ext/object/json.rb#251 - def as_json(options = T.unsafe(nil)); end -end - -# 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 - - # +false+ is blank: - # - # false.blank? # => true - # - # @return [true] - # - # source://activesupport//lib/active_support/core_ext/object/blank.rb#71 - def blank?; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/object/blank.rb#75 - def present?; end - - # Returns +self+. - # - # source://activesupport//lib/active_support/core_ext/object/to_query.rb#34 - def to_param; end -end - -# source://activesupport//lib/active_support/core_ext/file/atomic.rb#5 -class File < ::IO - class << self - # Write to a file atomically. Useful for situations where you don't - # want other processes or threads to see half-written files. - # - # File.atomic_write('important.file') do |file| - # file.write('hello') - # end - # - # This method needs to create a temporary file. By default it will create it - # in the same directory as the destination file. If you don't like this - # behavior you can provide a different directory but it must be on the - # same physical filesystem as the file you're trying to write. - # - # File.atomic_write('/data/something.important', '/data/tmp') do |file| - # file.write('hello') - # end - # - # source://activesupport//lib/active_support/core_ext/file/atomic.rb#21 - def atomic_write(file_name, temp_dir = T.unsafe(nil)); end - - # Private utility method. - # - # source://activesupport//lib/active_support/core_ext/file/atomic.rb#56 - def probe_stat_in(dir); end - end -end - -# source://activesupport//lib/active_support/core_ext/object/json.rb#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. - # - # source://activesupport//lib/active_support/core_ext/object/json.rb#121 - def as_json(options = T.unsafe(nil)); end -end - -# source://activesupport//lib/active_support/core_ext/hash/deep_merge.rb#5 -class Hash - include ::Enumerable - include ::ActiveSupport::DeepMergeable - - # source://activesupport//lib/active_support/core_ext/object/json.rb#172 - def as_json(options = T.unsafe(nil)); end - - # Validates all keys in a hash match *valid_keys, raising - # +ArgumentError+ on a mismatch. - # - # Note that keys are treated differently than HashWithIndifferentAccess, - # meaning that string and symbol keys will not match. - # - # { name: 'Rob', years: '28' }.assert_valid_keys(:name, :age) # => raises "ArgumentError: Unknown key: :years. Valid keys are: :name, :age" - # { name: 'Rob', age: '28' }.assert_valid_keys('name', 'age') # => raises "ArgumentError: Unknown key: :name. Valid keys are: 'name', 'age'" - # { name: 'Rob', age: '28' }.assert_valid_keys(:name, :age) # => passes, raises nothing - # - # source://activesupport//lib/active_support/core_ext/hash/keys.rb#48 - def assert_valid_keys(*valid_keys); end - - # Hash#reject has its own definition, so this needs one too. - # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#217 - def compact_blank; end - - # Removes all blank values from the +Hash+ in place and returns self. - # Uses Object#blank? for determining if a value is blank. - # - # h = { a: "", b: 1, c: nil, d: [], e: false, f: true } - # h.compact_blank! - # # => { b: 1, f: true } - # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#227 - def compact_blank!; end - - # Returns a deep copy of hash. - # - # hash = { a: { b: 'b' } } - # dup = hash.deep_dup - # dup[:a][:c] = 'c' - # - # hash[:a][:c] # => nil - # dup[:a][:c] # => "c" - # - # source://activesupport//lib/active_support/core_ext/object/deep_dup.rb#43 - def deep_dup; end - - # :method: deep_merge! - # :call-seq: deep_merge!(other_hash, &block) - # - # Same as #deep_merge, but modifies +self+. - # - # -- - # Implemented by ActiveSupport::DeepMergeable#deep_merge!. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/hash/deep_merge.rb#39 - def deep_merge?(other); end - - # Returns a new hash with all keys converted to strings. - # This includes the keys from the root hash and from all - # nested hashes and arrays. - # - # hash = { person: { name: 'Rob', age: '28' } } - # - # hash.deep_stringify_keys - # # => {"person"=>{"name"=>"Rob", "age"=>"28"}} - # - # source://activesupport//lib/active_support/core_ext/hash/keys.rb#84 - def deep_stringify_keys; end - - # Destructively converts all keys to strings. - # This includes the keys from the root hash and from all - # nested hashes and arrays. - # - # source://activesupport//lib/active_support/core_ext/hash/keys.rb#91 - def deep_stringify_keys!; end - - # Returns a new hash with all keys converted to symbols, as long as - # they respond to +to_sym+. This includes the keys from the root hash - # and from all nested hashes and arrays. - # - # hash = { 'person' => { 'name' => 'Rob', 'age' => '28' } } - # - # hash.deep_symbolize_keys - # # => {:person=>{:name=>"Rob", :age=>"28"}} - # - # source://activesupport//lib/active_support/core_ext/hash/keys.rb#103 - def deep_symbolize_keys; end - - # Destructively converts all keys to symbols, as long as they respond - # to +to_sym+. This includes the keys from the root hash and from all - # nested hashes and arrays. - # - # source://activesupport//lib/active_support/core_ext/hash/keys.rb#110 - def deep_symbolize_keys!; end - - # Returns a new hash with all keys converted by the block operation. - # This includes the keys from the root hash and from all - # nested hashes and arrays. - # - # hash = { person: { name: 'Rob', age: '28' } } - # - # hash.deep_transform_keys{ |key| key.to_s.upcase } - # # => {"PERSON"=>{"NAME"=>"Rob", "AGE"=>"28"}} - # - # source://activesupport//lib/active_support/core_ext/hash/keys.rb#65 - def deep_transform_keys(&block); end - - # Destructively converts all keys by using the block operation. - # This includes the keys from the root hash and from all - # nested hashes and arrays. - # - # source://activesupport//lib/active_support/core_ext/hash/keys.rb#72 - def deep_transform_keys!(&block); end - - # 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 } - # hash # => { a: true, b: false } - # - # source://activesupport//lib/active_support/core_ext/hash/except.rb#20 - def except!(*keys); end - - # Removes and returns the key/value pairs matching the given keys. - # - # hash = { a: 1, b: 2, c: 3, d: 4 } - # hash.extract!(:a, :b) # => {:a=>1, :b=>2} - # hash # => {:c=>3, :d=>4} - # - # source://activesupport//lib/active_support/core_ext/hash/slice.rb#24 - def extract!(*keys); end - - # By default, only instances of Hash itself are extractable. - # Subclasses of Hash may implement this method and return - # true to declare themselves as extractable. If a Hash - # is extractable, Array#extract_options! pops it from - # the Array when it is the last element of the Array. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/array/extract_options.rb#9 - def extractable_options?; end - - # Returns an ActiveSupport::HashWithIndifferentAccess out of its receiver: - # - # { a: 1 }.with_indifferent_access['a'] # => 1 - # Called when object is nested under an object that receives - # #with_indifferent_access. This method will be called on the current object - # by the enclosing object and is aliased to #with_indifferent_access by - # default. Subclasses of Hash may override this method to return +self+ if - # converting to an ActiveSupport::HashWithIndifferentAccess would not be - # desirable. - # - # b = { b: 1 } - # { a: b }.with_indifferent_access['a'] # calls b.nested_under_indifferent_access - # # => {"b"=>1} - # - # source://activesupport//lib/active_support/core_ext/hash/indifferent_access.rb#9 - def nested_under_indifferent_access; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/object/blank.rb#118 - def present?; end - - # Merges the caller into +other_hash+. For example, - # - # options = options.reverse_merge(size: 25, velocity: 10) - # - # is equivalent to - # - # options = { size: 25, velocity: 10 }.merge(options) - # - # This is particularly useful for initializing an options hash - # with default values. - # - # source://activesupport//lib/active_support/core_ext/hash/reverse_merge.rb#14 - def reverse_merge(other_hash); end - - # Destructive +reverse_merge+. - # - # source://activesupport//lib/active_support/core_ext/hash/reverse_merge.rb#20 - def reverse_merge!(other_hash); end - - # Destructive +reverse_merge+. - # - # source://activesupport//lib/active_support/core_ext/hash/reverse_merge.rb#20 - def reverse_update(other_hash); end - - # Replaces the hash with only the given keys. - # Returns a hash containing the removed key/value pairs. - # - # hash = { a: 1, b: 2, c: 3, d: 4 } - # hash.slice!(:a, :b) # => {:c=>3, :d=>4} - # hash # => {:a=>1, :b=>2} - # - # source://activesupport//lib/active_support/core_ext/hash/slice.rb#10 - def slice!(*keys); end - - # Returns a new hash with all keys converted to strings. - # - # hash = { name: 'Rob', age: '28' } - # - # hash.stringify_keys - # # => {"name"=>"Rob", "age"=>"28"} - # - # source://activesupport//lib/active_support/core_ext/hash/keys.rb#10 - def stringify_keys; end - - # Destructively converts all keys to strings. Same as - # +stringify_keys+, but modifies +self+. - # - # source://activesupport//lib/active_support/core_ext/hash/keys.rb#16 - def stringify_keys!; end - - # Returns a new hash with all keys converted to symbols, as long as - # they respond to +to_sym+. - # - # hash = { 'name' => 'Rob', 'age' => '28' } - # - # hash.symbolize_keys - # # => {:name=>"Rob", :age=>"28"} - # - # source://activesupport//lib/active_support/core_ext/hash/keys.rb#27 - def symbolize_keys; end - - # Destructively converts all keys to symbols, as long as they respond - # to +to_sym+. Same as +symbolize_keys+, but modifies +self+. - # - # source://activesupport//lib/active_support/core_ext/hash/keys.rb#34 - def symbolize_keys!; end - - # Returns a new hash with all keys converted to symbols, as long as - # they respond to +to_sym+. - # - # hash = { 'name' => 'Rob', 'age' => '28' } - # - # hash.symbolize_keys - # # => {:name=>"Rob", :age=>"28"} - # - # source://activesupport//lib/active_support/core_ext/hash/keys.rb#27 - def to_options; end - - # Destructively converts all keys to symbols, as long as they respond - # to +to_sym+. Same as +symbolize_keys+, but modifies +self+. - # - # source://activesupport//lib/active_support/core_ext/hash/keys.rb#34 - def to_options!; end - - # Returns a string representation of the receiver suitable for use as a URL - # query string: - # - # {name: 'David', nationality: 'Danish'}.to_query - # # => "name=David&nationality=Danish" - # - # An optional namespace can be passed to enclose key names: - # - # {name: 'David', nationality: 'Danish'}.to_query('user') - # # => "user%5Bname%5D=David&user%5Bnationality%5D=Danish" - # - # The string pairs "key=value" that conform the query string - # are sorted lexicographically in ascending order. - # - # source://activesupport//lib/active_support/core_ext/object/to_query.rb#75 - def to_param(namespace = T.unsafe(nil)); end - - # Returns a string representation of the receiver suitable for use as a URL - # query string: - # - # {name: 'David', nationality: 'Danish'}.to_query - # # => "name=David&nationality=Danish" - # - # An optional namespace can be passed to enclose key names: - # - # {name: 'David', nationality: 'Danish'}.to_query('user') - # # => "user%5Bname%5D=David&user%5Bnationality%5D=Danish" - # - # The string pairs "key=value" that conform the query string - # are sorted lexicographically in ascending order. - # - # source://activesupport//lib/active_support/core_ext/object/to_query.rb#75 - def to_query(namespace = T.unsafe(nil)); end - - # Returns a string containing an XML representation of its receiver: - # - # { foo: 1, bar: 2 }.to_xml - # # => - # # - # # - # # 1 - # # 2 - # # - # - # To do so, the method loops over the pairs and builds nodes that depend on - # the _values_. Given a pair +key+, +value+: - # - # * If +value+ is a hash there's a recursive call with +key+ as :root. - # - # * If +value+ is an array there's a recursive call with +key+ as :root, - # and +key+ singularized as :children. - # - # * If +value+ is a callable object it must expect one or two arguments. Depending - # on the arity, the callable is invoked with the +options+ hash as first argument - # with +key+ as :root, and +key+ singularized as second argument. The - # callable can add nodes by using options[:builder]. - # - # {foo: lambda { |options, key| options[:builder].b(key) }}.to_xml - # # => "foo" - # - # * If +value+ responds to +to_xml+ the method is invoked with +key+ as :root. - # - # class Foo - # def to_xml(options) - # options[:builder].bar 'fooing!' - # end - # end - # - # { foo: Foo.new }.to_xml(skip_instruct: true) - # # => - # # - # # fooing! - # # - # - # * Otherwise, a node with +key+ as tag is created with a string representation of - # +value+ as text node. If +value+ is +nil+ an attribute "nil" set to "true" is added. - # Unless the option :skip_types exists and is true, an attribute "type" is - # added as well according to the following mapping: - # - # XML_TYPE_NAMES = { - # "Symbol" => "symbol", - # "Integer" => "integer", - # "BigDecimal" => "decimal", - # "Float" => "float", - # "TrueClass" => "boolean", - # "FalseClass" => "boolean", - # "Date" => "date", - # "DateTime" => "dateTime", - # "Time" => "dateTime" - # } - # - # By default the root node is "hash", but that's configurable via the :root option. - # - # The default XML builder is a fresh instance of +Builder::XmlMarkup+. You can - # configure your own builder with the :builder option. The method also accepts - # options like :dasherize and friends, they are forwarded to the builder. - # - # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#74 - def to_xml(options = T.unsafe(nil)); end - - # Merges the caller into +other_hash+. For example, - # - # options = options.reverse_merge(size: 25, velocity: 10) - # - # is equivalent to - # - # options = { size: 25, velocity: 10 }.merge(options) - # - # This is particularly useful for initializing an options hash - # with default values. - # - # source://activesupport//lib/active_support/core_ext/hash/reverse_merge.rb#14 - def with_defaults(other_hash); end - - # Destructive +reverse_merge+. - # - # source://activesupport//lib/active_support/core_ext/hash/reverse_merge.rb#20 - def with_defaults!(other_hash); end - - # Returns an ActiveSupport::HashWithIndifferentAccess out of its receiver: - # - # { a: 1 }.with_indifferent_access['a'] # => 1 - # - # source://activesupport//lib/active_support/core_ext/hash/indifferent_access.rb#9 - def with_indifferent_access; end - - private - - # Support methods for deep transforming nested hashes and arrays. - # - # source://activesupport//lib/active_support/core_ext/hash/keys.rb#116 - def _deep_transform_keys_in_object(object, &block); end - - # source://activesupport//lib/active_support/core_ext/hash/keys.rb#129 - def _deep_transform_keys_in_object!(object, &block); end - - # Support methods for deep transforming nested hashes and arrays. - # - # source://activesupport//lib/active_support/core_ext/hash/deep_transform_values.rb#25 - def _deep_transform_values_in_object(object, &block); end - - # source://activesupport//lib/active_support/core_ext/hash/deep_transform_values.rb#36 - def _deep_transform_values_in_object!(object, &block); end - - class << self - # Builds a Hash from XML just like Hash.from_xml, but also allows Symbol and YAML. - # - # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#133 - def from_trusted_xml(xml); end - - # Returns a Hash containing a collection of pairs when the key is the node name and the value is - # its content - # - # xml = <<-XML - # - # - # 1 - # 2 - # - # XML - # - # hash = Hash.from_xml(xml) - # # => {"hash"=>{"foo"=>1, "bar"=>2}} - # - # +DisallowedType+ is raised if the XML contains attributes with type="yaml" or - # type="symbol". Use Hash.from_trusted_xml to - # parse this XML. - # - # Custom +disallowed_types+ can also be passed in the form of an - # array. - # - # xml = <<-XML - # - # - # 1 - # "David" - # - # XML - # - # hash = Hash.from_xml(xml, ['integer']) - # # => ActiveSupport::XMLConverter::DisallowedType: Disallowed type attribute: "integer" - # - # Note that passing custom disallowed types will override the default types, - # which are Symbol and YAML. - # - # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#128 - def from_xml(xml, disallowed_types = T.unsafe(nil)); end - end -end - -# :stopdoc: -# -# source://activesupport//lib/active_support/hash_with_indifferent_access.rb#441 -HashWithIndifferentAccess = ActiveSupport::HashWithIndifferentAccess - -# source://activesupport//lib/active_support/core_ext/object/json.rb#153 -class IO - include ::Enumerable - include ::File::Constants - - # source://activesupport//lib/active_support/core_ext/object/json.rb#154 - def as_json(options = T.unsafe(nil)); end -end - -class IO::Buffer - include ::Comparable - - def initialize(*_arg0); end - - def &(_arg0); end - def <=>(_arg0); end - def ^(_arg0); end - def and!(_arg0); end - def clear(*_arg0); end - def copy(*_arg0); end - def each(*_arg0); end - def each_byte(*_arg0); end - def empty?; end - def external?; end - def free; end - def get_string(*_arg0); end - def get_value(_arg0, _arg1); end - def get_values(_arg0, _arg1); end - def hexdump(*_arg0); end - def inspect; end - def internal?; end - def locked; end - def locked?; end - def mapped?; end - def not!; end - def null?; end - def or!(_arg0); end - def pread(*_arg0); end - def private?; end - def pwrite(*_arg0); end - def read(*_arg0); end - def readonly?; end - def resize(_arg0); end - def set_string(*_arg0); end - def set_value(_arg0, _arg1, _arg2); end - def set_values(_arg0, _arg1, _arg2); end - def shared?; end - def size; end - def slice(*_arg0); end - def to_s; end - def transfer; end - def valid?; end - def values(*_arg0); end - def write(*_arg0); end - def xor!(_arg0); end - def |(_arg0); end - def ~; end - - private - - def initialize_copy(_arg0); end - - class << self - def for(_arg0); end - def map(*_arg0); end - def size_of(_arg0); end - def string(_arg0); end - end -end - -class IO::Buffer::AccessError < ::RuntimeError; end -class IO::Buffer::AllocationError < ::RuntimeError; end -IO::Buffer::BIG_ENDIAN = T.let(T.unsafe(nil), Integer) -IO::Buffer::DEFAULT_SIZE = T.let(T.unsafe(nil), Integer) -IO::Buffer::EXTERNAL = T.let(T.unsafe(nil), Integer) -IO::Buffer::HOST_ENDIAN = T.let(T.unsafe(nil), Integer) -IO::Buffer::INTERNAL = T.let(T.unsafe(nil), Integer) -class IO::Buffer::InvalidatedError < ::RuntimeError; end -IO::Buffer::LITTLE_ENDIAN = T.let(T.unsafe(nil), Integer) -IO::Buffer::LOCKED = T.let(T.unsafe(nil), Integer) -class IO::Buffer::LockedError < ::RuntimeError; end -IO::Buffer::MAPPED = T.let(T.unsafe(nil), Integer) -class IO::Buffer::MaskError < ::ArgumentError; end -IO::Buffer::NETWORK_ENDIAN = T.let(T.unsafe(nil), Integer) -IO::Buffer::PAGE_SIZE = T.let(T.unsafe(nil), Integer) -IO::Buffer::PRIVATE = T.let(T.unsafe(nil), Integer) -IO::Buffer::READONLY = T.let(T.unsafe(nil), Integer) -IO::Buffer::SHARED = T.let(T.unsafe(nil), Integer) - -class IO::ConsoleMode - def echo=(_arg0); end - def raw(*_arg0); end - def raw!(*_arg0); end - - private - - def initialize_copy(_arg0); end -end - -class IO::EAGAINWaitReadable < ::Errno::EAGAIN - include ::IO::WaitReadable -end - -class IO::EAGAINWaitWritable < ::Errno::EAGAIN - include ::IO::WaitWritable -end - -class IO::EINPROGRESSWaitReadable < ::Errno::EINPROGRESS - include ::IO::WaitReadable -end - -class IO::EINPROGRESSWaitWritable < ::Errno::EINPROGRESS - include ::IO::WaitWritable -end - -IO::EWOULDBLOCKWaitReadable = IO::EAGAINWaitReadable -IO::EWOULDBLOCKWaitWritable = IO::EAGAINWaitWritable -IO::PRIORITY = T.let(T.unsafe(nil), Integer) -IO::READABLE = T.let(T.unsafe(nil), Integer) -class IO::TimeoutError < ::IOError; end -IO::WRITABLE = T.let(T.unsafe(nil), Integer) - -# source://activesupport//lib/active_support/core_ext/object/json.rb#237 -class IPAddr - # source://activesupport//lib/active_support/core_ext/object/json.rb#238 - def as_json(options = T.unsafe(nil)); end -end - -# source://activesupport//lib/active_support/core_ext/integer/time.rb#6 -class Integer < ::Numeric - include ::ActiveSupport::NumericWithFormat - - # 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/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. - # - # source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#20 - def enable_warnings(&block); end - - # Sets $VERBOSE to +nil+ for the duration of the block and back to its original - # value afterwards. - # - # silence_warnings do - # value = noisy_call # no warning voiced - # end - # - # noisy_call # warning voiced - # - # source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#14 - def silence_warnings(&block); end - - # Blocks and ignores any exception passed as argument if raised within the block. - # - # suppress(ZeroDivisionError) do - # 1/0 - # puts 'This code is NOT reached' - # end - # - # puts 'This code gets executed and nothing related to ZeroDivisionError was seen' - # - # source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#41 - def suppress(*exception_classes); end - - # Sets $VERBOSE for the duration of the block and back to its original - # value afterwards. - # - # source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#26 - def with_warnings(flag); end - - class << self - # A shortcut to define a toplevel concern, not within a module. - # - # See Module::Concerning for more. - # - # source://activesupport//lib/active_support/core_ext/kernel/concern.rb#11 - def concern(topic, &module_definition); end - - # Sets $VERBOSE to +true+ for the duration of the block and back to its - # original value afterwards. - # - # source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#20 - def enable_warnings(&block); end - - # Sets $VERBOSE to +nil+ for the duration of the block and back to its original - # value afterwards. - # - # silence_warnings do - # value = noisy_call # no warning voiced - # end - # - # noisy_call # warning voiced - # - # source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#14 - def silence_warnings(&block); end - - # Blocks and ignores any exception passed as argument if raised within the block. - # - # suppress(ZeroDivisionError) do - # 1/0 - # puts 'This code is NOT reached' - # end - # - # puts 'This code gets executed and nothing related to ZeroDivisionError was seen' - # - # source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#41 - def suppress(*exception_classes); end - - # Sets $VERBOSE for the duration of the block and back to its original - # value afterwards. - # - # source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#26 - def with_warnings(flag); end - end -end - -# 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 - -# == Attribute Accessors per Thread -# -# Extends the module object with class/module and instance accessors for -# class/module attributes, just like the native attr* accessors for instance -# attributes, but does so on a per-thread basis. -# -# So the values are scoped within the Thread.current space under the class name -# of the module. -# -# Note that it can also be scoped per-fiber if +Rails.application.config.active_support.isolation_level+ -# is set to +:fiber+. -# -# source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#8 -class Module - include ::Module::Concerning - - # Allows you to make aliases for attributes, which includes - # getter, setter, and a predicate. - # - # class Content < ActiveRecord::Base - # # has a title attribute - # end - # - # class Email < Content - # alias_attribute :subject, :title - # end - # - # e = Email.find(1) - # e.title # => "Superstars" - # e.subject # => "Superstars" - # e.subject? # => true - # e.subject = "Megastars" - # e.title # => "Megastars" - # - # source://activesupport//lib/active_support/core_ext/module/aliasing.rb#21 - def alias_attribute(new_name, old_name); end - - # A module may or may not have a name. - # - # module M; end - # M.name # => "M" - # - # m = Module.new - # m.name # => nil - # - # +anonymous?+ method returns true if module does not have a name, false otherwise: - # - # Module.new.anonymous? # => true - # - # module M; end - # M.anonymous? # => false - # - # A module gets a name when it is first assigned to a constant. Either - # via the +module+ or +class+ keyword or by an explicit assignment: - # - # m = Module.new # creates an anonymous module - # m.anonymous? # => true - # M = m # m gets a name here as a side-effect - # m.name # => "M" - # m.anonymous? # => false - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/module/anonymous.rb#27 - def anonymous?; end - - # source://activesupport//lib/active_support/core_ext/object/json.rb#53 - def as_json(options = T.unsafe(nil)); end - - # Declares an attribute reader and writer backed by an internally-named instance - # variable. - # - # source://activesupport//lib/active_support/core_ext/module/attr_internal.rb#16 - def attr_internal(*attrs); end - - # Declares an attribute reader and writer backed by an internally-named instance - # variable. - # - # source://activesupport//lib/active_support/core_ext/module/attr_internal.rb#16 - def attr_internal_accessor(*attrs); end - - # Declares an attribute reader backed by an internally-named instance variable. - # - # source://activesupport//lib/active_support/core_ext/module/attr_internal.rb#5 - def attr_internal_reader(*attrs); end - - # Declares an attribute writer backed by an internally-named instance variable. - # - # source://activesupport//lib/active_support/core_ext/module/attr_internal.rb#10 - def attr_internal_writer(*attrs); end - - # Defines both class and instance accessors for class attributes. - # All class and instance methods created will be public, even if - # this method is called with a private or protected access modifier. - # - # module HairColors - # mattr_accessor :hair_colors - # end - # - # class Person - # include HairColors - # end - # - # HairColors.hair_colors = [:brown, :black, :blonde, :red] - # HairColors.hair_colors # => [:brown, :black, :blonde, :red] - # Person.new.hair_colors # => [:brown, :black, :blonde, :red] - # - # If a subclass changes the value then that would also change the value for - # parent class. Similarly if parent class changes the value then that would - # change the value of subclasses too. - # - # class Citizen < Person - # end - # - # Citizen.new.hair_colors << :blue - # Person.new.hair_colors # => [:brown, :black, :blonde, :red, :blue] - # - # To omit the instance writer method, pass instance_writer: false. - # To omit the instance reader method, pass instance_reader: false. - # - # module HairColors - # mattr_accessor :hair_colors, instance_writer: false, instance_reader: false - # end - # - # class Person - # include HairColors - # end - # - # Person.new.hair_colors = [:brown] # => NoMethodError - # Person.new.hair_colors # => NoMethodError - # - # Or pass instance_accessor: false, to omit both instance methods. - # - # module HairColors - # mattr_accessor :hair_colors, instance_accessor: false - # end - # - # class Person - # include HairColors - # end - # - # Person.new.hair_colors = [:brown] # => NoMethodError - # Person.new.hair_colors # => NoMethodError - # - # You can set a default value for the attribute. - # - # module HairColors - # mattr_accessor :hair_colors, default: [:brown, :black, :blonde, :red] - # mattr_accessor(:hair_styles) { [:long, :short] } - # end - # - # class Person - # include HairColors - # end - # - # Person.class_variable_get("@@hair_colors") # => [:brown, :black, :blonde, :red] - # Person.class_variable_get("@@hair_styles") # => [:long, :short] - # - # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#208 - def cattr_accessor(*syms, instance_reader: T.unsafe(nil), instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), &blk); end - - # Defines a class attribute and creates a class and instance reader methods. - # The underlying class variable is set to +nil+, if it is not previously - # defined. All class and instance methods created will be public, even if - # this method is called with a private or protected access modifier. - # - # module HairColors - # mattr_reader :hair_colors - # end - # - # HairColors.hair_colors # => nil - # HairColors.class_variable_set("@@hair_colors", [:brown, :black]) - # HairColors.hair_colors # => [:brown, :black] - # - # The attribute name must be a valid method name in Ruby. - # - # module Foo - # mattr_reader :"1_Badname" - # end - # # => NameError: invalid attribute name: 1_Badname - # - # To omit the instance reader method, pass - # instance_reader: false or instance_accessor: false. - # - # module HairColors - # mattr_reader :hair_colors, instance_reader: false - # end - # - # class Person - # include HairColors - # end - # - # Person.new.hair_colors # => NoMethodError - # - # You can set a default value for the attribute. - # - # module HairColors - # mattr_reader :hair_colors, default: [:brown, :black, :blonde, :red] - # mattr_reader(:hair_styles) { [:long, :short] } - # end - # - # class Person - # include HairColors - # end - # - # Person.new.hair_colors # => [:brown, :black, :blonde, :red] - # Person.new.hair_styles # => [:long, :short] - # - # @raise [TypeError] - # - # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#55 - def cattr_reader(*syms, instance_reader: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), location: T.unsafe(nil)); end - - # Defines a class attribute and creates a class and instance writer methods to - # allow assignment to the attribute. All class and instance methods created - # will be public, even if this method is called with a private or protected - # access modifier. - # - # module HairColors - # mattr_writer :hair_colors - # end - # - # class Person - # include HairColors - # end - # - # HairColors.hair_colors = [:brown, :black] - # Person.class_variable_get("@@hair_colors") # => [:brown, :black] - # Person.new.hair_colors = [:blonde, :red] - # HairColors.class_variable_get("@@hair_colors") # => [:blonde, :red] - # - # To omit the instance writer method, pass - # instance_writer: false or instance_accessor: false. - # - # module HairColors - # mattr_writer :hair_colors, instance_writer: false - # end - # - # class Person - # include HairColors - # end - # - # Person.new.hair_colors = [:blonde, :red] # => NoMethodError - # - # You can set a default value for the attribute. - # - # module HairColors - # mattr_writer :hair_colors, default: [:brown, :black, :blonde, :red] - # mattr_writer(:hair_styles) { [:long, :short] } - # end - # - # class Person - # include HairColors - # end - # - # Person.class_variable_get("@@hair_colors") # => [:brown, :black, :blonde, :red] - # Person.class_variable_get("@@hair_styles") # => [:long, :short] - # - # @raise [TypeError] - # - # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#121 - def cattr_writer(*syms, instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), location: T.unsafe(nil)); end - - # Returns a copy of module or class if it's anonymous. If it's - # named, returns +self+. - # - # Object.deep_dup == Object # => true - # klass = Class.new - # klass.deep_dup == klass # => false - # - # source://activesupport//lib/active_support/core_ext/object/deep_dup.rb#64 - def deep_dup; end - - # Provides a +delegate+ class method to easily expose contained objects' - # public methods as your own. - # - # ==== Options - # * :to - Specifies the target object name as a symbol or string - # * :prefix - Prefixes the new method with the target name or a custom prefix - # * :allow_nil - If set to true, prevents a +ActiveSupport::DelegationError+ - # from being raised - # * :private - If set to true, changes method visibility to private - # - # The macro receives one or more method names (specified as symbols or - # strings) and the name of the target object via the :to option - # (also a symbol or string). - # - # Delegation is particularly useful with Active Record associations: - # - # class Greeter < ActiveRecord::Base - # def hello - # 'hello' - # end - # - # def goodbye - # 'goodbye' - # end - # end - # - # class Foo < ActiveRecord::Base - # belongs_to :greeter - # delegate :hello, to: :greeter - # end - # - # Foo.new.hello # => "hello" - # Foo.new.goodbye # => NoMethodError: undefined method `goodbye' for # - # - # Multiple delegates to the same target are allowed: - # - # class Foo < ActiveRecord::Base - # belongs_to :greeter - # delegate :hello, :goodbye, to: :greeter - # end - # - # Foo.new.goodbye # => "goodbye" - # - # Methods can be delegated to instance variables, class variables, or constants - # by providing them as a symbols: - # - # class Foo - # CONSTANT_ARRAY = [0,1,2,3] - # @@class_array = [4,5,6,7] - # - # def initialize - # @instance_array = [8,9,10,11] - # end - # delegate :sum, to: :CONSTANT_ARRAY - # delegate :min, to: :@@class_array - # delegate :max, to: :@instance_array - # end - # - # Foo.new.sum # => 6 - # Foo.new.min # => 4 - # Foo.new.max # => 11 - # - # It's also possible to delegate a method to the class by using +:class+: - # - # class Foo - # def self.hello - # "world" - # end - # - # delegate :hello, to: :class - # end - # - # Foo.new.hello # => "world" - # - # Delegates can optionally be prefixed using the :prefix option. If the value - # is true, the delegate methods are prefixed with the name of the object being - # delegated to. - # - # Person = Struct.new(:name, :address) - # - # class Invoice < Struct.new(:client) - # delegate :name, :address, to: :client, prefix: true - # end - # - # john_doe = Person.new('John Doe', 'Vimmersvej 13') - # invoice = Invoice.new(john_doe) - # invoice.client_name # => "John Doe" - # invoice.client_address # => "Vimmersvej 13" - # - # It is also possible to supply a custom prefix. - # - # class Invoice < Struct.new(:client) - # delegate :name, :address, to: :client, prefix: :customer - # end - # - # invoice = Invoice.new(john_doe) - # invoice.customer_name # => 'John Doe' - # invoice.customer_address # => 'Vimmersvej 13' - # - # The delegated methods are public by default. - # Pass private: true to change that. - # - # class User < ActiveRecord::Base - # has_one :profile - # delegate :first_name, to: :profile - # delegate :date_of_birth, to: :profile, private: true - # - # def age - # Date.today.year - date_of_birth.year - # end - # end - # - # User.new.first_name # => "Tomas" - # User.new.date_of_birth # => NoMethodError: private method `date_of_birth' called for # - # User.new.age # => 2 - # - # If the target is +nil+ and does not respond to the delegated method a - # +ActiveSupport::DelegationError+ is raised. If you wish to instead return +nil+, - # use the :allow_nil option. - # - # class User < ActiveRecord::Base - # has_one :profile - # delegate :age, to: :profile - # end - # - # User.new.age - # # => ActiveSupport::DelegationError: User#age delegated to profile.age, but profile is nil - # - # But if not having a profile yet is fine and should not be an error - # condition: - # - # class User < ActiveRecord::Base - # has_one :profile - # delegate :age, to: :profile, allow_nil: true - # end - # - # User.new.age # nil - # - # Note that if the target is not +nil+ then the call is attempted regardless of the - # :allow_nil option, and thus an exception is still raised if said object - # does not respond to the method: - # - # class Foo - # def initialize(bar) - # @bar = bar - # end - # - # delegate :name, to: :@bar, allow_nil: true - # end - # - # Foo.new("Bar").name # raises NoMethodError: undefined method `name' - # - # The target method must be public, otherwise it will raise +NoMethodError+. - # - # source://activesupport//lib/active_support/core_ext/module/delegation.rb#160 - def delegate(*methods, to: T.unsafe(nil), prefix: T.unsafe(nil), allow_nil: T.unsafe(nil), private: T.unsafe(nil)); end - - # When building decorators, a common pattern may emerge: - # - # class Partition - # def initialize(event) - # @event = event - # end - # - # def person - # detail.person || creator - # end - # - # private - # def respond_to_missing?(name, include_private = false) - # @event.respond_to?(name, include_private) - # end - # - # def method_missing(method, *args, &block) - # @event.send(method, *args, &block) - # end - # end - # - # With Module#delegate_missing_to, the above is condensed to: - # - # class Partition - # delegate_missing_to :@event - # - # def initialize(event) - # @event = event - # end - # - # def person - # detail.person || creator - # end - # end - # - # The target can be anything callable within the object, e.g. instance - # variables, methods, constants, etc. - # - # The delegated method must be public on the target, otherwise it will - # raise +ActiveSupport::DelegationError+. If you wish to instead return +nil+, - # use the :allow_nil option. - # - # The marshal_dump and _dump methods are exempt from - # delegation due to possible interference when calling - # Marshal.dump(object), should the delegation target method - # of object add or remove instance variables. - # - # source://activesupport//lib/active_support/core_ext/module/delegation.rb#218 - def delegate_missing_to(target, allow_nil: T.unsafe(nil)); end - - # deprecate :foo, deprecator: MyLib.deprecator - # deprecate :foo, bar: "warning!", deprecator: MyLib.deprecator - # - # A deprecator is typically an instance of ActiveSupport::Deprecation, but you can also pass any object that responds - # to deprecation_warning(deprecated_method_name, message, caller_backtrace) where you can implement your - # custom warning behavior. - # - # class MyLib::Deprecator - # def deprecation_warning(deprecated_method_name, message, caller_backtrace = nil) - # message = "#{deprecated_method_name} is deprecated and will be removed from MyLibrary | #{message}" - # Kernel.warn message - # end - # end - # - # source://activesupport//lib/active_support/core_ext/module/deprecation.rb#17 - def deprecate(*method_names, deprecator:, **options); end - - # Defines both class and instance accessors for class attributes. - # All class and instance methods created will be public, even if - # this method is called with a private or protected access modifier. - # - # module HairColors - # mattr_accessor :hair_colors - # end - # - # class Person - # include HairColors - # end - # - # HairColors.hair_colors = [:brown, :black, :blonde, :red] - # HairColors.hair_colors # => [:brown, :black, :blonde, :red] - # Person.new.hair_colors # => [:brown, :black, :blonde, :red] - # - # If a subclass changes the value then that would also change the value for - # parent class. Similarly if parent class changes the value then that would - # change the value of subclasses too. - # - # class Citizen < Person - # end - # - # Citizen.new.hair_colors << :blue - # Person.new.hair_colors # => [:brown, :black, :blonde, :red, :blue] - # - # To omit the instance writer method, pass instance_writer: false. - # To omit the instance reader method, pass instance_reader: false. - # - # module HairColors - # mattr_accessor :hair_colors, instance_writer: false, instance_reader: false - # end - # - # class Person - # include HairColors - # end - # - # Person.new.hair_colors = [:brown] # => NoMethodError - # Person.new.hair_colors # => NoMethodError - # - # Or pass instance_accessor: false, to omit both instance methods. - # - # module HairColors - # mattr_accessor :hair_colors, instance_accessor: false - # end - # - # class Person - # include HairColors - # end - # - # Person.new.hair_colors = [:brown] # => NoMethodError - # Person.new.hair_colors # => NoMethodError - # - # You can set a default value for the attribute. - # - # module HairColors - # mattr_accessor :hair_colors, default: [:brown, :black, :blonde, :red] - # mattr_accessor(:hair_styles) { [:long, :short] } - # end - # - # class Person - # include HairColors - # end - # - # Person.class_variable_get("@@hair_colors") # => [:brown, :black, :blonde, :red] - # Person.class_variable_get("@@hair_styles") # => [:long, :short] - # - # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#208 - def mattr_accessor(*syms, instance_reader: T.unsafe(nil), instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), &blk); end - - # Defines a class attribute and creates a class and instance reader methods. - # The underlying class variable is set to +nil+, if it is not previously - # defined. All class and instance methods created will be public, even if - # this method is called with a private or protected access modifier. - # - # module HairColors - # mattr_reader :hair_colors - # end - # - # HairColors.hair_colors # => nil - # HairColors.class_variable_set("@@hair_colors", [:brown, :black]) - # HairColors.hair_colors # => [:brown, :black] - # - # The attribute name must be a valid method name in Ruby. - # - # module Foo - # mattr_reader :"1_Badname" - # end - # # => NameError: invalid attribute name: 1_Badname - # - # To omit the instance reader method, pass - # instance_reader: false or instance_accessor: false. - # - # module HairColors - # mattr_reader :hair_colors, instance_reader: false - # end - # - # class Person - # include HairColors - # end - # - # Person.new.hair_colors # => NoMethodError - # - # You can set a default value for the attribute. - # - # module HairColors - # mattr_reader :hair_colors, default: [:brown, :black, :blonde, :red] - # mattr_reader(:hair_styles) { [:long, :short] } - # end - # - # class Person - # include HairColors - # end - # - # Person.new.hair_colors # => [:brown, :black, :blonde, :red] - # Person.new.hair_styles # => [:long, :short] - # - # @raise [TypeError] - # - # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#55 - def mattr_reader(*syms, instance_reader: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), location: T.unsafe(nil)); end - - # Defines a class attribute and creates a class and instance writer methods to - # allow assignment to the attribute. All class and instance methods created - # will be public, even if this method is called with a private or protected - # access modifier. - # - # module HairColors - # mattr_writer :hair_colors - # end - # - # class Person - # include HairColors - # end - # - # HairColors.hair_colors = [:brown, :black] - # Person.class_variable_get("@@hair_colors") # => [:brown, :black] - # Person.new.hair_colors = [:blonde, :red] - # HairColors.class_variable_get("@@hair_colors") # => [:blonde, :red] - # - # To omit the instance writer method, pass - # instance_writer: false or instance_accessor: false. - # - # module HairColors - # mattr_writer :hair_colors, instance_writer: false - # end - # - # class Person - # include HairColors - # end - # - # Person.new.hair_colors = [:blonde, :red] # => NoMethodError - # - # You can set a default value for the attribute. - # - # module HairColors - # mattr_writer :hair_colors, default: [:brown, :black, :blonde, :red] - # mattr_writer(:hair_styles) { [:long, :short] } - # end - # - # class Person - # include HairColors - # end - # - # Person.class_variable_get("@@hair_colors") # => [:brown, :black, :blonde, :red] - # Person.class_variable_get("@@hair_styles") # => [:long, :short] - # - # @raise [TypeError] - # - # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#121 - def mattr_writer(*syms, instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://activesupport//lib/active_support/core_ext/module/redefine_method.rb#30 - def method_visibility(method); end - - # Returns the module which contains this one according to its name. - # - # module M - # module N - # end - # end - # X = M::N - # - # M::N.module_parent # => M - # X.module_parent # => M - # - # The parent of top-level and anonymous modules is Object. - # - # M.module_parent # => Object - # Module.new.module_parent # => Object - # - # source://activesupport//lib/active_support/core_ext/module/introspection.rb#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. - # - # source://activesupport//lib/active_support/core_ext/module/redefine_method.rb#17 - def redefine_method(method, &block); end - - # Replaces the existing singleton method definition, if there is one, with - # the passed block as its body. - # - # source://activesupport//lib/active_support/core_ext/module/redefine_method.rb#26 - def redefine_singleton_method(method, &block); end - - # Removes the named method, if it exists. - # - # source://activesupport//lib/active_support/core_ext/module/remove_method.rb#7 - def remove_possible_method(method); end - - # Removes the named singleton method, if it exists. - # - # source://activesupport//lib/active_support/core_ext/module/remove_method.rb#14 - def remove_possible_singleton_method(method); end - - # Marks the named method as intended to be redefined, if it exists. - # Suppresses the Ruby method redefinition warning. Prefer - # #redefine_method where possible. - # - # source://activesupport//lib/active_support/core_ext/module/redefine_method.rb#7 - def silence_redefinition_of_method(method); end - - # Defines both class and instance accessors for class attributes. - # - # class Account - # thread_mattr_accessor :user - # end - # - # Account.user = "DHH" - # Account.user # => "DHH" - # Account.new.user # => "DHH" - # - # Unlike +mattr_accessor+, values are *not* shared with subclasses or parent classes. - # If a subclass changes the value, the parent class' value is not changed. - # If the parent class changes the value, the value of subclasses is not changed. - # - # class Customer < Account - # end - # - # Account.user # => "DHH" - # Customer.user # => nil - # Customer.user = "Rafael" - # Customer.user # => "Rafael" - # Account.user # => "DHH" - # - # To omit the instance writer method, pass instance_writer: false. - # To omit the instance reader method, pass instance_reader: false. - # - # class Current - # thread_mattr_accessor :user, instance_writer: false, instance_reader: false - # end - # - # Current.new.user = "DHH" # => NoMethodError - # Current.new.user # => NoMethodError - # - # Or pass instance_accessor: false, to omit both instance methods. - # - # class Current - # thread_mattr_accessor :user, instance_accessor: false - # end - # - # Current.new.user = "DHH" # => NoMethodError - # Current.new.user # => NoMethodError - # - # A default value may be specified using the +:default+ option. Because - # multiple threads can access the default value, non-frozen default values - # will be duped and frozen. - # - # source://activesupport//lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#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#41 - def attr_internal_define(attr_name, type); end - - class << self - # Returns the value of attribute attr_internal_naming_format. - # - # source://activesupport//lib/active_support/core_ext/module/attr_internal.rb#23 - def attr_internal_naming_format; end - - # source://activesupport//lib/active_support/core_ext/module/attr_internal.rb#25 - def attr_internal_naming_format=(format); end - end -end - -# == Bite-sized separation of concerns -# -# We often find ourselves with a medium-sized chunk of behavior that we'd -# like to extract, but only mix in to a single class. -# -# Extracting a plain old Ruby object to encapsulate it and collaborate or -# delegate to the original object is often a good choice, but when there's -# no additional state to encapsulate or we're making DSL-style declarations -# about the parent class, introducing new collaborators can obfuscate rather -# than simplify. -# -# The typical route is to just dump everything in a monolithic class, perhaps -# with a comment, as a least-bad alternative. Using modules in separate files -# means tedious sifting to get a big-picture view. -# -# == Dissatisfying ways to separate small concerns -# -# === Using comments: -# -# class Todo < ApplicationRecord -# # Other todo implementation -# # ... -# -# ## Event tracking -# has_many :events -# -# before_create :track_creation -# -# private -# def track_creation -# # ... -# end -# end -# -# === With an inline module: -# -# Noisy syntax. -# -# class Todo < ApplicationRecord -# # Other todo implementation -# # ... -# -# module EventTracking -# extend ActiveSupport::Concern -# -# included do -# has_many :events -# before_create :track_creation -# end -# -# private -# def track_creation -# # ... -# end -# end -# include EventTracking -# end -# -# === Mix-in noise exiled to its own file: -# -# Once our chunk of behavior starts pushing the scroll-to-understand-it -# boundary, we give in and move it to a separate file. At this size, the -# increased overhead can be a reasonable tradeoff even if it reduces our -# at-a-glance perception of how things work. -# -# class Todo < ApplicationRecord -# # Other todo implementation -# # ... -# -# include TodoEventTracking -# end -# -# == Introducing Module#concerning -# -# By quieting the mix-in noise, we arrive at a natural, low-ceremony way to -# separate bite-sized concerns. -# -# class Todo < ApplicationRecord -# # Other todo implementation -# # ... -# -# concerning :EventTracking do -# included do -# has_many :events -# before_create :track_creation -# end -# -# private -# def track_creation -# # ... -# end -# end -# end -# -# Todo.ancestors -# # => [Todo, Todo::EventTracking, ApplicationRecord, Object] -# -# This small step has some wonderful ripple effects. We can -# * grok the behavior of our class in one glance, -# * clean up monolithic junk-drawer classes by separating their concerns, and -# * stop leaning on protected/private for crude "this is internal stuff" modularity. -# -# === Prepending concerning -# -# concerning supports a prepend: true argument which will prepend the -# concern instead of using include for it. -# -# source://activesupport//lib/active_support/core_ext/module/concerning.rb#112 -module Module::Concerning - # A low-cruft shortcut to define a concern. - # - # concern :EventTracking do - # ... - # end - # - # is equivalent to - # - # module EventTracking - # extend ActiveSupport::Concern - # - # ... - # end - # - # source://activesupport//lib/active_support/core_ext/module/concerning.rb#132 - def concern(topic, &module_definition); end - - # Define a new concern and mix it in. - # - # source://activesupport//lib/active_support/core_ext/module/concerning.rb#114 - def concerning(topic, prepend: T.unsafe(nil), &block); end -end - -# source://activesupport//lib/active_support/core_ext/module/delegation.rb#5 -Module::DelegationError = ActiveSupport::DelegationError - -# 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/name_error.rb#53 -NameError::UNBOUND_METHOD_MODULE_NAME = T.let(T.unsafe(nil), UnboundMethod) - -# source://activesupport//lib/active_support/core_ext/object/to_query.rb#18 -class NilClass - # source://activesupport//lib/active_support/core_ext/object/json.rb#95 - def as_json(options = T.unsafe(nil)); end - - # +nil+ is blank: - # - # nil.blank? # => true - # - # @return [true] - # - # source://activesupport//lib/active_support/core_ext/object/blank.rb#56 - def blank?; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/object/blank.rb#60 - def present?; end - - # Returns +self+. - # - # source://activesupport//lib/active_support/core_ext/object/to_query.rb#20 - def to_param; end - - # Calling +try+ on +nil+ always returns +nil+. - # It becomes especially helpful when navigating through associations that may return +nil+. - # - # nil.try(:name) # => nil - # - # Without +try+ - # @person && @person.children.any? && @person.children.first.name - # - # With +try+ - # @person.try(:children).try(:first).try(:name) - # - # source://activesupport//lib/active_support/core_ext/object/try.rb#148 - def try(*_arg0); end - - # Calling +try!+ on +nil+ always returns +nil+. - # - # nil.try!(:name) # => nil - # - # source://activesupport//lib/active_support/core_ext/object/try.rb#155 - def try!(*_arg0); end -end - -# source://activesupport//lib/active_support/core_ext/numeric/time.rb#9 -class Numeric - include ::Comparable - - # source://activesupport//lib/active_support/core_ext/object/json.rb#113 - def as_json(options = T.unsafe(nil)); end - - # No number is blank: - # - # 1.blank? # => false - # 0.blank? # => false - # - # @return [false] - # - # source://activesupport//lib/active_support/core_ext/object/blank.rb#177 - def blank?; end - - # Enables the use of byte calculations and declarations, like 45.bytes + 2.6.megabytes - # - # 2.bytes # => 2 - # - # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#15 - def byte; end - - # Enables the use of byte calculations and declarations, like 45.bytes + 2.6.megabytes - # - # 2.bytes # => 2 - # - # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#15 - def bytes; end - - # Returns a Duration instance matching the number of days provided. - # - # 2.days # => 2 days - # - # source://activesupport//lib/active_support/core_ext/numeric/time.rb#37 - def day; end - - # Returns a Duration instance matching the number of days provided. - # - # 2.days # => 2 days - # - # source://activesupport//lib/active_support/core_ext/numeric/time.rb#37 - def days; end - - # Returns the number of bytes equivalent to the exabytes provided. - # - # 2.exabytes # => 2_305_843_009_213_693_952 - # - # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#63 - def exabyte; end - - # Returns the number of bytes equivalent to the exabytes provided. - # - # 2.exabytes # => 2_305_843_009_213_693_952 - # - # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#63 - def exabytes; end - - # Returns a Duration instance matching the number of fortnights provided. - # - # 2.fortnights # => 4 weeks - # - # source://activesupport//lib/active_support/core_ext/numeric/time.rb#53 - def fortnight; end - - # Returns a Duration instance matching the number of fortnights provided. - # - # 2.fortnights # => 4 weeks - # - # source://activesupport//lib/active_support/core_ext/numeric/time.rb#53 - def fortnights; end - - # Returns the number of bytes equivalent to the gigabytes provided. - # - # 2.gigabytes # => 2_147_483_648 - # - # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#39 - def gigabyte; end - - # Returns the number of bytes equivalent to the gigabytes provided. - # - # 2.gigabytes # => 2_147_483_648 - # - # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#39 - def gigabytes; end - - # 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 - # - # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#23 - def kilobyte; end - - # Returns the number of bytes equivalent to the kilobytes provided. - # - # 2.kilobytes # => 2048 - # - # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#23 - def kilobytes; end - - # Returns the number of bytes equivalent to the megabytes provided. - # - # 2.megabytes # => 2_097_152 - # - # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#31 - def megabyte; end - - # Returns the number of bytes equivalent to the megabytes provided. - # - # 2.megabytes # => 2_097_152 - # - # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#31 - def megabytes; end - - # Returns a Duration instance matching the number of minutes provided. - # - # 2.minutes # => 2 minutes - # - # source://activesupport//lib/active_support/core_ext/numeric/time.rb#21 - def minute; end - - # Returns a Duration instance matching the number of minutes provided. - # - # 2.minutes # => 2 minutes - # - # source://activesupport//lib/active_support/core_ext/numeric/time.rb#21 - def minutes; end - - # Returns the number of bytes equivalent to the petabytes provided. - # - # 2.petabytes # => 2_251_799_813_685_248 - # - # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#55 - def petabyte; end - - # Returns the number of bytes equivalent to the petabytes provided. - # - # 2.petabytes # => 2_251_799_813_685_248 - # - # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#55 - def petabytes; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/object/blank.rb#181 - def present?; end - - # Returns a Duration instance matching the number of seconds provided. - # - # 2.seconds # => 2 seconds - # - # source://activesupport//lib/active_support/core_ext/numeric/time.rb#13 - def second; end - - # Returns a Duration instance matching the number of seconds provided. - # - # 2.seconds # => 2 seconds - # - # source://activesupport//lib/active_support/core_ext/numeric/time.rb#13 - def seconds; end - - # Returns the number of bytes equivalent to the terabytes provided. - # - # 2.terabytes # => 2_199_023_255_552 - # - # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#47 - def terabyte; end - - # Returns the number of bytes equivalent to the terabytes provided. - # - # 2.terabytes # => 2_199_023_255_552 - # - # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#47 - def terabytes; end - - # Returns 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 - # - # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#71 - def zettabyte; end - - # Returns the number of bytes equivalent to the zettabytes provided. - # - # 2.zettabytes # => 2_361_183_241_434_822_606_848 - # - # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#71 - def zettabytes; end -end - -# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#9 -Numeric::EXABYTE = T.let(T.unsafe(nil), Integer) - -# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#6 -Numeric::GIGABYTE = T.let(T.unsafe(nil), Integer) - -# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#4 -Numeric::KILOBYTE = T.let(T.unsafe(nil), Integer) - -# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#5 -Numeric::MEGABYTE = T.let(T.unsafe(nil), Integer) - -# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#8 -Numeric::PETABYTE = T.let(T.unsafe(nil), Integer) - -# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#7 -Numeric::TERABYTE = T.let(T.unsafe(nil), Integer) - -# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#10 -Numeric::ZETTABYTE = T.let(T.unsafe(nil), Integer) - -# -- -# Most objects are cloneable, but not all. For example you can't dup methods: -# -# method(:puts).dup # => TypeError: allocator undefined for Method -# -# Classes may signal their instances are not duplicable removing +dup+/+clone+ -# or raising exceptions from them. So, to dup an arbitrary object you normally -# use an optimistic approach and are ready to catch an exception, say: -# -# arbitrary_object.dup rescue object -# -# Rails dups objects in a few critical spots where they are not that arbitrary. -# That rescue is very expensive (like 40 times slower than a predicate), and it -# is often triggered. -# -# That's why we hardcode the following cases and check duplicable? instead of -# using that rescue idiom. -# ++ -# -# source://activesupport//lib/active_support/core_ext/object/acts_like.rb#3 -class Object < ::BasicObject - include ::ActiveSupport::Dependencies::RequireDependency - include ::Kernel - include ::PP::ObjectMixin - include ::ActiveSupport::Tryable - include ::ActiveSupport::ToJsonWithActiveSupportEncoder - - # Provides a way to check whether some class acts like some other class based on the existence of - # an appropriately-named marker method. - # - # A class that provides the same interface as SomeClass may define a marker method named - # acts_like_some_class? to signal its compatibility to callers of - # acts_like?(:some_class). - # - # For example, Active Support extends Date to define an acts_like_date? method, - # and extends Time to define acts_like_time?. As a result, developers can call - # x.acts_like?(:time) and x.acts_like?(:date) to test duck-type compatibility, - # and classes that are able to act like Time can also define an acts_like_time? - # method to interoperate. - # - # Note that the marker method is only expected to exist. It isn't called, so its body or return - # value are irrelevant. - # - # ==== Example: A class that provides the same interface as String - # - # This class may define: - # - # class Stringish - # def acts_like_string? - # end - # end - # - # Then client code can query for duck-type-safeness this way: - # - # Stringish.new.acts_like?(:string) # => true - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/object/acts_like.rb#33 - def acts_like?(duck); end - - # source://activesupport//lib/active_support/core_ext/object/json.rb#59 - def as_json(options = T.unsafe(nil)); end - - # An object is blank if it's false, empty, or a whitespace string. - # For example, +nil+, '', ' ', [], {}, and +false+ are all blank. - # - # This simplifies - # - # !address || address.empty? - # - # to - # - # address.blank? - # - # @return [true, false] - # - # source://activesupport//lib/active_support/core_ext/object/blank.rb#18 - def blank?; end - - # Returns a deep copy of object if it's duplicable. If it's - # not duplicable, returns +self+. - # - # object = Object.new - # dup = object.deep_dup - # dup.instance_variable_set(:@a, 1) - # - # object.instance_variable_defined?(:@a) # => false - # dup.instance_variable_defined?(:@a) # => true - # - # source://activesupport//lib/active_support/core_ext/object/deep_dup.rb#15 - def deep_dup; end - - # Can you safely dup this object? - # - # False for method objects; - # true otherwise. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/object/duplicable.rb#26 - def duplicable?; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#7 - def html_safe?; end - - # Returns true if this object is included in the argument. - # - # When argument is a +Range+, +#cover?+ is used to properly handle inclusion - # check within open ranges. Otherwise, argument must be any object which responds - # to +#include?+. Usage: - # - # characters = ["Konata", "Kagami", "Tsukasa"] - # "Konata".in?(characters) # => true - # - # For non +Range+ arguments, this will throw an +ArgumentError+ if the argument - # doesn't respond to +#include?+. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/object/inclusion.rb#15 - def in?(another_object); end - - # Returns a hash with string keys that maps instance variable names without "@" to their - # corresponding values. - # - # class C - # def initialize(x, y) - # @x, @y = x, y - # end - # end - # - # C.new(0, 1).instance_values # => {"x" => 0, "y" => 1} - # - # source://activesupport//lib/active_support/core_ext/object/instance_variables.rb#14 - def instance_values; end - - # Returns an array of instance variable names as strings including "@". - # - # class C - # def initialize(x, y) - # @x, @y = x, y - # end - # end - # - # C.new(0, 1).instance_variable_names # => ["@y", "@x"] - # - # source://activesupport//lib/active_support/core_ext/object/instance_variables.rb#29 - def instance_variable_names; end - - # Returns the receiver if it's present otherwise returns +nil+. - # object.presence is equivalent to - # - # object.present? ? object : nil - # - # For example, something like - # - # state = params[:state] if params[:state].present? - # country = params[:country] if params[:country].present? - # region = state || country || 'US' - # - # becomes - # - # region = params[:state].presence || params[:country].presence || 'US' - # - # @return [Object] - # - # source://activesupport//lib/active_support/core_ext/object/blank.rb#45 - def presence; end - - # Returns the receiver if it's included in the argument otherwise returns +nil+. - # Argument must be any object which responds to +#include?+. Usage: - # - # params[:bucket_type].presence_in %w( project calendar ) - # - # This will throw an +ArgumentError+ if the argument doesn't respond to +#include?+. - # - # @return [Object] - # - # source://activesupport//lib/active_support/core_ext/object/inclusion.rb#34 - def presence_in(another_object); end - - # An object is present if it's not blank. - # - # @return [true, false] - # - # source://activesupport//lib/active_support/core_ext/object/blank.rb#25 - def present?; end - - # Alias of to_s. - # - # source://activesupport//lib/active_support/core_ext/object/to_query.rb#7 - def to_param; end - - # Converts an object into a string suitable for use as a URL query string, - # using the given key as the param name. - # - # source://activesupport//lib/active_support/core_ext/object/to_query.rb#13 - def to_query(key); end - - # Set and restore public attributes around a block. - # - # client.timeout # => 5 - # client.with(timeout: 1) do |c| - # c.timeout # => 1 - # end - # client.timeout # => 5 - # - # The receiver is yielded to the provided block. - # - # This method is a shorthand for the common begin/ensure pattern: - # - # old_value = object.attribute - # begin - # object.attribute = new_value - # # do things - # ensure - # object.attribute = old_value - # end - # - # It can be used on any object as long as both the reader and writer methods - # are public. - # - # source://activesupport//lib/active_support/core_ext/object/with.rb#26 - def with(**attributes); end - - # An elegant way to factor duplication out of options passed to a series of - # method calls. Each method called in the block, with the block variable as - # the receiver, will have its options merged with the default +options+ - # Hash or Hash-like object provided. Each method called on - # the block variable must take an options hash as its final argument. - # - # Without with_options, this code contains duplication: - # - # class Account < ActiveRecord::Base - # has_many :customers, dependent: :destroy - # has_many :products, dependent: :destroy - # has_many :invoices, dependent: :destroy - # has_many :expenses, dependent: :destroy - # end - # - # Using with_options, we can remove the duplication: - # - # class Account < ActiveRecord::Base - # with_options dependent: :destroy do |assoc| - # assoc.has_many :customers - # assoc.has_many :products - # assoc.has_many :invoices - # assoc.has_many :expenses - # end - # end - # - # It can also be used with an explicit receiver: - # - # I18n.with_options locale: user.locale, scope: 'newsletter' do |i18n| - # subject i18n.t :subject - # body i18n.t :body, user_name: user.name - # end - # - # When you don't pass an explicit receiver, it executes the whole block - # in merging options context: - # - # class Account < ActiveRecord::Base - # with_options dependent: :destroy do - # has_many :customers - # has_many :products - # has_many :invoices - # has_many :expenses - # end - # end - # - # with_options can also be nested since the call is forwarded to its receiver. - # - # NOTE: Each nesting level will merge inherited defaults in addition to their own. - # - # class Post < ActiveRecord::Base - # with_options if: :persisted?, length: { minimum: 50 } do - # validates :content, if: -> { content.present? } - # end - # end - # - # The code is equivalent to: - # - # validates :content, length: { minimum: 50 }, if: -> { content.present? } - # - # Hence the inherited default for +if+ key is ignored. - # - # NOTE: You cannot call class methods implicitly inside of +with_options+. - # You can access these methods using the class name instead: - # - # class Phone < ActiveRecord::Base - # enum :phone_number_type, { home: 0, office: 1, mobile: 2 } - # - # with_options presence: true do - # validates :phone_number_type, inclusion: { in: Phone.phone_number_types.keys } - # end - # end - # - # When the block argument is omitted, the decorated Object instance is returned: - # - # module MyStyledHelpers - # def styled - # with_options style: "color: red;" - # end - # end - # - # styled.link_to "I'm red", "/" - # # => I'm red - # - # styled.button_tag "I'm red too!" - # # => - # - # source://activesupport//lib/active_support/core_ext/object/with_options.rb#92 - def with_options(options, &block); end -end - -# source://activesupport//lib/active_support/core_ext/object/json.rb#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 - - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/pathname/blank.rb#17 - def present?; end -end - -module Process - extend ::ActiveSupport::ForkTracker::CoreExt - - class << self - # source://activesupport//lib/active_support/fork_tracker.rb#6 - def _fork; end - end -end - -# source://activesupport//lib/active_support/core_ext/object/json.rb#244 -class Process::Status - # source://activesupport//lib/active_support/core_ext/object/json.rb#245 - def as_json(options = T.unsafe(nil)); end -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. - # - # source://activesupport//lib/active_support/core_ext/enumerable.rb#236 - def sum(initial_value = T.unsafe(nil)); end -end - -# source://activesupport//lib/active_support/core_ext/object/json.rb#141 -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 - # SecureRandom.base36 generates a random base36 string in lowercase. - # - # The argument _n_ specifies the length of the random string to be generated. - # - # If _n_ is not specified or is +nil+, 16 is assumed. It may be larger in the future. - # This method can be used over +base58+ if a deterministic case key is necessary. - # - # The result will contain alphanumeric characters in lowercase. - # - # p SecureRandom.base36 # => "4kugl2pdqmscqtje" - # p SecureRandom.base36(24) # => "77tmhrhjfvfdwodq8w7ev2m7" - # - # source://activesupport//lib/active_support/core_ext/securerandom.rb#34 - def base36(n = T.unsafe(nil)); end - - # SecureRandom.base58 generates a random base58 string. - # - # The argument _n_ specifies the length of the random string to be generated. - # - # If _n_ is not specified or is +nil+, 16 is assumed. It may be larger in the future. - # - # The result may contain alphanumeric characters except 0, O, I, and l. - # - # p SecureRandom.base58 # => "4kUgL2pdQMSCQtjE" - # p SecureRandom.base58(24) # => "77TMHrHJFvFDwodq8w7Ev2m7" - # - # source://activesupport//lib/active_support/core_ext/securerandom.rb#19 - def base58(n = T.unsafe(nil)); end - end -end - -# source://activesupport//lib/active_support/core_ext/securerandom.rb#7 -SecureRandom::BASE36_ALPHABET = T.let(T.unsafe(nil), Array) - -# source://activesupport//lib/active_support/core_ext/securerandom.rb#6 -SecureRandom::BASE58_ALPHABET = T.let(T.unsafe(nil), Array) - -# source://activesupport//lib/active_support/core_ext/object/duplicable.rb#62 -module Singleton - mixes_in_class_methods ::Singleton::SingletonClassMethods - - # Singleton instances are not duplicable: - # - # Class.new.include(Singleton).instance.dup # TypeError (can't dup instance of singleton - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/object/duplicable.rb#66 - def duplicable?; end -end - -# String inflections define new methods on the String class to transform names for different purposes. -# For instance, you can figure out the name of a table from the name of a class. -# -# 'ScaleScore'.tableize # => "scale_scores" -# -# source://activesupport//lib/active_support/core_ext/string/multibyte.rb#5 -class String - include ::Comparable - - # Enables more predictable duck-typing on String-like classes. See Object#acts_like?. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/string/behavior.rb#5 - def acts_like_string?; end - - # source://activesupport//lib/active_support/core_ext/object/json.rb#101 - def as_json(options = T.unsafe(nil)); end - - # If you pass a single integer, returns a substring of one character at that - # position. The first character of the string is at position 0, the next at - # position 1, and so on. If a range is supplied, a substring containing - # characters at offsets given by the range is returned. In both cases, if an - # offset is negative, it is counted from the end of the string. Returns +nil+ - # if the initial offset falls outside the string. Returns an empty string if - # the beginning of the range is greater than the end of the string. - # - # str = "hello" - # str.at(0) # => "h" - # str.at(1..3) # => "ell" - # str.at(-2) # => "l" - # str.at(-2..-1) # => "lo" - # str.at(5) # => nil - # str.at(5..-1) # => "" - # - # If a Regexp is given, the matching portion of the string is returned. - # If a String is given, that given string is returned if it occurs in - # the string. In both cases, +nil+ is returned if there is no match. - # - # str = "hello" - # str.at(/lo/) # => "lo" - # str.at(/ol/) # => nil - # str.at("lo") # => "lo" - # str.at("ol") # => nil - # - # source://activesupport//lib/active_support/core_ext/string/access.rb#29 - def at(position); end - - # A string is blank if it's empty or contains whitespaces only: - # - # ''.blank? # => true - # ' '.blank? # => true - # "\t\n\r".blank? # => true - # ' blah '.blank? # => false - # - # Unicode whitespace is supported: - # - # "\u00a0".blank? # => true - # - # @return [true, false] - # - # source://activesupport//lib/active_support/core_ext/object/blank.rb#153 - def blank?; end - - # By default, +camelize+ converts strings to UpperCamelCase. If the argument to camelize - # is set to :lower then camelize produces lowerCamelCase. - # - # +camelize+ will also convert '/' to '::' which is useful for converting paths to namespaces. - # - # 'active_record'.camelize # => "ActiveRecord" - # 'active_record'.camelize(:lower) # => "activeRecord" - # 'active_record/errors'.camelize # => "ActiveRecord::Errors" - # 'active_record/errors'.camelize(:lower) # => "activeRecord::Errors" - # - # See ActiveSupport::Inflector.camelize. - # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#101 - def camelcase(first_letter = T.unsafe(nil)); end - - # By default, +camelize+ converts strings to UpperCamelCase. If the argument to camelize - # is set to :lower then camelize produces lowerCamelCase. - # - # +camelize+ will also convert '/' to '::' which is useful for converting paths to namespaces. - # - # 'active_record'.camelize # => "ActiveRecord" - # 'active_record'.camelize(:lower) # => "activeRecord" - # 'active_record/errors'.camelize # => "ActiveRecord::Errors" - # 'active_record/errors'.camelize(:lower) # => "activeRecord::Errors" - # - # See ActiveSupport::Inflector.camelize. - # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#101 - def camelize(first_letter = T.unsafe(nil)); end - - # Creates a class name from a plural table name like \Rails does for table names to models. - # Note that this returns a string and not a class. (To convert to an actual class - # follow +classify+ with +constantize+.) - # - # 'ham_and_eggs'.classify # => "HamAndEgg" - # 'posts'.classify # => "Post" - # - # See ActiveSupport::Inflector.classify. - # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#239 - def classify; end - - # +constantize+ tries to find a declared constant with the name specified - # in the string. It raises a NameError when the name is not in CamelCase - # or is not initialized. - # - # 'Module'.constantize # => Module - # 'Class'.constantize # => Class - # 'blargle'.constantize # => NameError: wrong constant name blargle - # - # See ActiveSupport::Inflector.constantize. - # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#73 - def constantize; end - - # Replaces underscores with dashes in the string. - # - # 'puni_puni'.dasherize # => "puni-puni" - # - # See ActiveSupport::Inflector.dasherize. - # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#148 - def dasherize; end - - # Removes the rightmost segment from the constant expression in the string. - # - # 'Net::HTTP'.deconstantize # => "Net" - # '::Net::HTTP'.deconstantize # => "::Net" - # 'String'.deconstantize # => "" - # '::String'.deconstantize # => "" - # ''.deconstantize # => "" - # - # See ActiveSupport::Inflector.deconstantize. - # - # See also +demodulize+. - # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#177 - def deconstantize; end - - # Removes the module part from the constant expression in the string. - # - # 'ActiveSupport::Inflector::Inflections'.demodulize # => "Inflections" - # 'Inflections'.demodulize # => "Inflections" - # '::Inflections'.demodulize # => "Inflections" - # ''.demodulize # => '' - # - # See ActiveSupport::Inflector.demodulize. - # - # See also +deconstantize+. - # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#162 - def demodulize; end - - # Converts the first character to lowercase. - # - # 'If they enjoyed The Matrix'.downcase_first # => "if they enjoyed The Matrix" - # 'I'.downcase_first # => "i" - # ''.downcase_first # => "" - # - # See ActiveSupport::Inflector.downcase_first. - # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#284 - def downcase_first; end - - # The inverse of String#include?. Returns true if the string - # does not include the other string. - # - # "hello".exclude? "lo" # => false - # "hello".exclude? "ol" # => true - # "hello".exclude? ?h # => false - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/string/exclude.rb#10 - def exclude?(string); end - - # Returns the first character. If a limit is supplied, returns a substring - # from the beginning of the string until it reaches the limit value. If the - # given limit is greater than or equal to the string length, returns a copy of self. - # - # str = "hello" - # str.first # => "h" - # str.first(1) # => "h" - # str.first(2) # => "he" - # str.first(0) # => "" - # str.first(6) # => "hello" - # - # source://activesupport//lib/active_support/core_ext/string/access.rb#78 - def first(limit = T.unsafe(nil)); end - - # Creates a foreign key name from a class name. - # +separate_class_name_and_id_with_underscore+ sets whether - # the method should put '_' between the name and 'id'. - # - # 'Message'.foreign_key # => "message_id" - # 'Message'.foreign_key(false) # => "messageid" - # 'Admin::Post'.foreign_key # => "post_id" - # - # See ActiveSupport::Inflector.foreign_key. - # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#297 - def foreign_key(separate_class_name_and_id_with_underscore = T.unsafe(nil)); end - - # Returns a substring from the given position to the end of the string. - # If the position is negative, it is counted from the end of the string. - # - # str = "hello" - # str.from(0) # => "hello" - # str.from(3) # => "lo" - # str.from(-2) # => "lo" - # - # You can mix it with +to+ method and do fun things like: - # - # str = "hello" - # str.from(0).to(-1) # => "hello" - # str.from(1).to(-2) # => "ell" - # - # source://activesupport//lib/active_support/core_ext/string/access.rb#46 - def from(position); end - - # Marks a string as trusted safe. It will be inserted into HTML with no - # additional escaping performed. It is your responsibility to ensure that the - # string contains no malicious content. This method is equivalent to the - # +raw+ helper in views. It is recommended that you use +sanitize+ instead of - # this method. It should never be called on user input. - # - # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#225 - def html_safe; end - - # Capitalizes the first word, turns underscores into spaces, and (by default) strips a - # trailing '_id' if present. - # Like +titleize+, this is meant for creating pretty output. - # - # The capitalization of the first word can be turned off by setting the - # optional parameter +capitalize+ to false. - # By default, this parameter is true. - # - # The trailing '_id' can be kept and capitalized by setting the - # optional parameter +keep_id_suffix+ to true. - # By default, this parameter is false. - # - # 'employee_salary'.humanize # => "Employee salary" - # 'author_id'.humanize # => "Author" - # 'author_id'.humanize(capitalize: false) # => "author" - # '_id'.humanize # => "Id" - # 'author_id'.humanize(keep_id_suffix: true) # => "Author id" - # - # See ActiveSupport::Inflector.humanize. - # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#262 - def humanize(capitalize: T.unsafe(nil), keep_id_suffix: T.unsafe(nil)); end - - # Converts String to a TimeWithZone in the current zone if Time.zone or Time.zone_default - # is set, otherwise converts String to a Time via String#to_time - # - # source://activesupport//lib/active_support/core_ext/string/zones.rb#9 - def in_time_zone(zone = T.unsafe(nil)); end - - # Indents the lines in the receiver: - # - # < - # def some_method - # some_code - # end - # - # The second argument, +indent_string+, specifies which indent string to - # use. The default is +nil+, which tells the method to make a guess by - # peeking at the first indented line, and fall back to a space if there is - # none. - # - # " foo".indent(2) # => " foo" - # "foo\n\t\tbar".indent(2) # => "\t\tfoo\n\t\t\t\tbar" - # "foo".indent(2, "\t") # => "\t\tfoo" - # - # While +indent_string+ is typically one space or tab, it may be any string. - # - # The third argument, +indent_empty_lines+, is a flag that says whether - # empty lines should be indented. Default is false. - # - # "foo\n\nbar".indent(2) # => " foo\n\n bar" - # "foo\n\nbar".indent(2, nil, true) # => " foo\n \n bar" - # - # source://activesupport//lib/active_support/core_ext/string/indent.rb#42 - def indent(amount, indent_string = T.unsafe(nil), indent_empty_lines = T.unsafe(nil)); end - - # Same as +indent+, except it indents the receiver in-place. - # - # Returns the indented string, or +nil+ if there was nothing to indent. - # - # source://activesupport//lib/active_support/core_ext/string/indent.rb#7 - def indent!(amount, indent_string = T.unsafe(nil), indent_empty_lines = T.unsafe(nil)); end - - # Wraps the current string in the ActiveSupport::StringInquirer class, - # which gives you a prettier way to test for equality. - # - # env = 'production'.inquiry - # env.production? # => true - # env.development? # => false - # - # source://activesupport//lib/active_support/core_ext/string/inquiry.rb#13 - def inquiry; end - - # Returns +true+ if string has utf_8 encoding. - # - # utf_8_str = "some string".encode "UTF-8" - # iso_str = "some string".encode "ISO-8859-1" - # - # utf_8_str.is_utf8? # => true - # iso_str.is_utf8? # => false - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/string/multibyte.rb#48 - def is_utf8?; end - - # Returns the last character of the string. If a limit is supplied, returns a substring - # from the end of the string until it reaches the limit value (counting backwards). If - # the given limit is greater than or equal to the string length, returns a copy of self. - # - # str = "hello" - # str.last # => "o" - # str.last(1) # => "o" - # str.last(2) # => "lo" - # str.last(0) # => "" - # str.last(6) # => "hello" - # - # source://activesupport//lib/active_support/core_ext/string/access.rb#92 - def last(limit = T.unsafe(nil)); end - - # == Multibyte proxy - # - # +mb_chars+ is a multibyte safe proxy for string methods. - # - # It creates and returns an instance of the ActiveSupport::Multibyte::Chars class which - # encapsulates the original string. A Unicode safe version of all the String methods are defined on this proxy - # class. If the proxy class doesn't respond to a certain method, it's forwarded to the encapsulated string. - # - # >> "lj".mb_chars.upcase.to_s - # => "LJ" - # - # NOTE: Ruby 2.4 and later support native Unicode case mappings: - # - # >> "lj".upcase - # => "LJ" - # - # == \Method chaining - # - # All the methods on the Chars proxy which normally return a string will return a Chars object. This allows - # method chaining on the result of any of these methods. - # - # name.mb_chars.reverse.length # => 12 - # - # == Interoperability and configuration - # - # The Chars object tries to be as interchangeable with String objects as possible: sorting and comparing between - # String and Char work like expected. The bang! methods change the internal string representation in the Chars - # object. Interoperability problems can be resolved easily with a +to_s+ call. - # - # For more information about the methods defined on the Chars proxy see ActiveSupport::Multibyte::Chars. For - # information about how to change the default Multibyte behavior see ActiveSupport::Multibyte. - # - # source://activesupport//lib/active_support/core_ext/string/multibyte.rb#37 - def mb_chars; end - - # Replaces special characters in a string so that it may be used as part of a 'pretty' URL. - # - # If the optional parameter +locale+ is specified, - # the word will be parameterized as a word of that language. - # By default, this parameter is set to nil and it will use - # the configured I18n.locale. - # - # class Person - # def to_param - # "#{id}-#{name.parameterize}" - # end - # end - # - # @person = Person.find(1) - # # => # - # - # <%= link_to(@person.name, person_path) %> - # # => Donald E. Knuth - # - # To preserve the case of the characters in a string, use the +preserve_case+ argument. - # - # class Person - # def to_param - # "#{id}-#{name.parameterize(preserve_case: true)}" - # end - # end - # - # @person = Person.find(1) - # # => # - # - # <%= link_to(@person.name, person_path) %> - # # => Donald E. Knuth - # - # See ActiveSupport::Inflector.parameterize. - # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#215 - def parameterize(separator: T.unsafe(nil), preserve_case: T.unsafe(nil), locale: T.unsafe(nil)); end - - # Returns the plural form of the word in the string. - # - # If the optional parameter +count+ is specified, - # the singular form will be returned if count == 1. - # For any other value of +count+ the plural will be returned. - # - # If the optional parameter +locale+ is specified, - # the word will be pluralized as a word of that language. - # By default, this parameter is set to :en. - # You must define your own inflection rules for languages other than English. - # - # 'post'.pluralize # => "posts" - # 'octopus'.pluralize # => "octopi" - # 'sheep'.pluralize # => "sheep" - # 'words'.pluralize # => "words" - # 'the blue mailman'.pluralize # => "the blue mailmen" - # 'CamelOctopus'.pluralize # => "CamelOctopi" - # 'apple'.pluralize(1) # => "apple" - # 'apple'.pluralize(2) # => "apples" - # 'ley'.pluralize(:es) # => "leyes" - # 'ley'.pluralize(1, :es) # => "ley" - # - # See ActiveSupport::Inflector.pluralize. - # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#35 - def pluralize(count = T.unsafe(nil), locale = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/object/blank.rb#165 - def present?; end - - # Returns a new string with all occurrences of the patterns removed. - # str = "foo bar test" - # str.remove(" test") # => "foo bar" - # str.remove(" test", /bar/) # => "foo " - # str # => "foo bar test" - # - # source://activesupport//lib/active_support/core_ext/string/filters.rb#32 - def remove(*patterns); end - - # Alters the string by removing all occurrences of the patterns. - # str = "foo bar test" - # str.remove!(" test", /bar/) # => "foo " - # str # => "foo " - # - # source://activesupport//lib/active_support/core_ext/string/filters.rb#40 - def remove!(*patterns); end - - # +safe_constantize+ tries to find a declared constant with the name specified - # in the string. It returns +nil+ when the name is not in CamelCase - # or is not initialized. - # - # 'Module'.safe_constantize # => Module - # 'Class'.safe_constantize # => Class - # 'blargle'.safe_constantize # => nil - # - # See ActiveSupport::Inflector.safe_constantize. - # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#86 - def safe_constantize; end - - # The reverse of +pluralize+, returns the singular form of a word in a string. - # - # If the optional parameter +locale+ is specified, - # the word will be singularized as a word of that language. - # By default, this parameter is set to :en. - # You must define your own inflection rules for languages other than English. - # - # 'posts'.singularize # => "post" - # 'octopi'.singularize # => "octopus" - # 'sheep'.singularize # => "sheep" - # 'word'.singularize # => "word" - # 'the blue mailmen'.singularize # => "the blue mailman" - # 'CamelOctopi'.singularize # => "CamelOctopus" - # 'leyes'.singularize(:es) # => "ley" - # - # See ActiveSupport::Inflector.singularize. - # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#60 - def singularize(locale = T.unsafe(nil)); end - - # Returns the string, first removing all whitespace on both ends of - # the string, and then changing remaining consecutive whitespace - # groups into one space each. - # - # Note that it handles both ASCII and Unicode whitespace. - # - # %{ Multi-line - # string }.squish # => "Multi-line string" - # " foo bar \n \t boo".squish # => "foo bar boo" - # - # source://activesupport//lib/active_support/core_ext/string/filters.rb#13 - def squish; end - - # Performs a destructive squish. See String#squish. - # str = " foo bar \n \t boo" - # str.squish! # => "foo bar boo" - # str # => "foo bar boo" - # - # source://activesupport//lib/active_support/core_ext/string/filters.rb#21 - def squish!; end - - # Strips indentation in heredocs. - # - # For example in - # - # if options[:usage] - # puts <<-USAGE.strip_heredoc - # This command does such and such. - # - # Supported options are: - # -h This message - # ... - # USAGE - # end - # - # the user would see the usage message aligned against the left margin. - # - # Technically, it looks for the least indented non-empty line - # in the whole string, and removes that amount of leading whitespace. - # - # source://activesupport//lib/active_support/core_ext/string/strip.rb#22 - def strip_heredoc; end - - # Creates the name of a table like \Rails does for models to table names. This method - # uses the +pluralize+ method on the last word in the string. - # - # 'RawScaledScorer'.tableize # => "raw_scaled_scorers" - # 'ham_and_egg'.tableize # => "ham_and_eggs" - # 'fancyCategory'.tableize # => "fancy_categories" - # - # See ActiveSupport::Inflector.tableize. - # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#227 - def tableize; end - - # Capitalizes all the words and replaces some characters in the string to create - # a nicer looking title. +titleize+ is meant for creating pretty output. It is not - # used in the \Rails internals. - # - # The trailing '_id','Id'.. can be kept and capitalized by setting the - # optional parameter +keep_id_suffix+ to true. - # By default, this parameter is false. - # - # 'man from the boondocks'.titleize # => "Man From The Boondocks" - # 'x-men: the last stand'.titleize # => "X Men: The Last Stand" - # 'string_ending_with_id'.titleize(keep_id_suffix: true) # => "String Ending With Id" - # - # See ActiveSupport::Inflector.titleize. - # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#126 - def titlecase(keep_id_suffix: T.unsafe(nil)); end - - # Capitalizes all the words and replaces some characters in the string to create - # a nicer looking title. +titleize+ is meant for creating pretty output. It is not - # used in the \Rails internals. - # - # The trailing '_id','Id'.. can be kept and capitalized by setting the - # optional parameter +keep_id_suffix+ to true. - # By default, this parameter is false. - # - # 'man from the boondocks'.titleize # => "Man From The Boondocks" - # 'x-men: the last stand'.titleize # => "X Men: The Last Stand" - # 'string_ending_with_id'.titleize(keep_id_suffix: true) # => "String Ending With Id" - # - # See ActiveSupport::Inflector.titleize. - # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#126 - def titleize(keep_id_suffix: T.unsafe(nil)); end - - # Returns a substring from the beginning of the string to the given position. - # If the position is negative, it is counted from the end of the string. - # - # str = "hello" - # str.to(0) # => "h" - # str.to(3) # => "hell" - # str.to(-2) # => "hell" - # - # You can mix it with +from+ method and do fun things like: - # - # str = "hello" - # str.from(0).to(-1) # => "hello" - # str.from(1).to(-2) # => "ell" - # - # source://activesupport//lib/active_support/core_ext/string/access.rb#63 - def to(position); end - - # Converts a string to a Date value. - # - # "1-1-2012".to_date # => Sun, 01 Jan 2012 - # "01/01/2012".to_date # => Sun, 01 Jan 2012 - # "2012-12-13".to_date # => Thu, 13 Dec 2012 - # "12/13/2012".to_date # => ArgumentError: invalid date - # - # source://activesupport//lib/active_support/core_ext/string/conversions.rb#47 - def to_date; end - - # Converts a string to a DateTime value. - # - # "1-1-2012".to_datetime # => Sun, 01 Jan 2012 00:00:00 +0000 - # "01/01/2012 23:59:59".to_datetime # => Sun, 01 Jan 2012 23:59:59 +0000 - # "2012-12-13 12:50".to_datetime # => Thu, 13 Dec 2012 12:50:00 +0000 - # "12/13/2012".to_datetime # => ArgumentError: invalid date - # - # source://activesupport//lib/active_support/core_ext/string/conversions.rb#57 - def to_datetime; end - - # Converts a string to a Time value. - # The +form+ can be either +:utc+ or +:local+ (default +:local+). - # - # The time is parsed using Time.parse method. - # If +form+ is +:local+, then the time is in the system timezone. - # If the date part is missing then the current date is used and if - # the time part is missing then it is assumed to be 00:00:00. - # - # "13-12-2012".to_time # => 2012-12-13 00:00:00 +0100 - # "06:12".to_time # => 2012-12-13 06:12:00 +0100 - # "2012-12-13 06:12".to_time # => 2012-12-13 06:12:00 +0100 - # "2012-12-13T06:12".to_time # => 2012-12-13 06:12:00 +0100 - # "2012-12-13T06:12".to_time(:utc) # => 2012-12-13 06:12:00 UTC - # "12/13/2012".to_time # => ArgumentError: argument out of range - # "1604326192".to_time # => ArgumentError: argument out of range - # - # source://activesupport//lib/active_support/core_ext/string/conversions.rb#22 - def to_time(form = T.unsafe(nil)); end - - # Truncates a given +text+ to length truncate_to if +text+ is longer than truncate_to: - # - # 'Once upon a time in a world far far away'.truncate(27) - # # => "Once upon a time in a wo..." - # - # Pass a string or regexp :separator to truncate +text+ at a natural break: - # - # 'Once upon a time in a world far far away'.truncate(27, separator: ' ') - # # => "Once upon a time in a..." - # - # 'Once upon a time in a world far far away'.truncate(27, separator: /\s/) - # # => "Once upon a time in a..." - # - # The last characters will be replaced with the :omission string (defaults to "..."). - # The total length will not exceed truncate_to unless both +text+ and :omission - # are longer than truncate_to: - # - # 'And they found that many people were sleeping better.'.truncate(25, omission: '... (continued)') - # # => "And they f... (continued)" - # - # 'And they found that many people were sleeping better.'.truncate(4, omission: '... (continued)') - # # => "... (continued)" - # - # source://activesupport//lib/active_support/core_ext/string/filters.rb#70 - def truncate(truncate_to, options = T.unsafe(nil)); end - - # Truncates +text+ to at most truncate_to bytes in length without - # breaking string encoding by splitting multibyte characters or breaking - # grapheme clusters ("perceptual characters") by truncating at combining - # characters. - # - # >> "🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪".size - # => 20 - # >> "🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪".bytesize - # => 80 - # >> "🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪".truncate_bytes(20) - # => "🔪🔪🔪🔪…" - # - # The truncated text ends with the :omission string, defaulting - # to "…", for a total length not exceeding truncate_to. - # - # Raises +ArgumentError+ when the bytesize of :omission exceeds truncate_to. - # - # source://activesupport//lib/active_support/core_ext/string/filters.rb#101 - def truncate_bytes(truncate_to, omission: T.unsafe(nil)); end - - # Truncates a given +text+ after a given number of words (words_count): - # - # 'Once upon a time in a world far far away'.truncate_words(4) - # # => "Once upon a time..." - # - # Pass a string or regexp :separator to specify a different separator of words: - # - # 'Once
upon
a
time
in
a
world'.truncate_words(5, separator: '
') - # # => "Once
upon
a
time
in..." - # - # The last characters will be replaced with the :omission string (defaults to "..."): - # - # 'And they found that many people were sleeping better.'.truncate_words(5, omission: '... (continued)') - # # => "And they found that many... (continued)" - # - # source://activesupport//lib/active_support/core_ext/string/filters.rb#142 - def truncate_words(words_count, options = T.unsafe(nil)); end - - # The reverse of +camelize+. Makes an underscored, lowercase form from the expression in the string. - # - # +underscore+ will also change '::' to '/' to convert namespaces to paths. - # - # 'ActiveModel'.underscore # => "active_model" - # 'ActiveModel::Errors'.underscore # => "active_model/errors" - # - # See ActiveSupport::Inflector.underscore. - # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#139 - def underscore; end - - # Converts the first character to uppercase. - # - # 'what a Lovely Day'.upcase_first # => "What a Lovely Day" - # 'w'.upcase_first # => "W" - # ''.upcase_first # => "" - # - # See ActiveSupport::Inflector.upcase_first. - # - # source://activesupport//lib/active_support/core_ext/string/inflections.rb#273 - def upcase_first; end -end - -# source://activesupport//lib/active_support/core_ext/object/blank.rb#136 -String::BLANK_RE = T.let(T.unsafe(nil), Regexp) - -# source://activesupport//lib/active_support/core_ext/object/blank.rb#137 -String::ENCODED_BLANKS = T.let(T.unsafe(nil), Concurrent::Map) - -# source://activesupport//lib/active_support/core_ext/object/json.rb#76 -class Struct - include ::Enumerable - - # source://activesupport//lib/active_support/core_ext/object/json.rb#77 - def as_json(options = T.unsafe(nil)); end -end - -# source://activesupport//lib/active_support/core_ext/object/blank.rb#123 -class Symbol - include ::Comparable - - # source://activesupport//lib/active_support/core_ext/object/json.rb#107 - def as_json(options = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/object/blank.rb#130 - def present?; end -end - -class Thread - # source://activesupport//lib/active_support/isolated_execution_state.rb#9 - def active_support_execution_state; end - - # source://activesupport//lib/active_support/isolated_execution_state.rb#9 - def active_support_execution_state=(_arg0); end -end - -# 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#285 - def +(other); end - - # Time#- can also be used to determine the number of seconds between two Time instances. - # We're layering on additional behavior so that ActiveSupport::TimeWithZone instances - # are coerced into values that Time#- will recognize - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#308 - def -(other); end - - # Layers additional behavior on Time#<=> so that DateTime and ActiveSupport::TimeWithZone instances - # can be chronologically compared with a Time - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#317 - def <=>(other); end - - # Duck-types as a Time-like class. See Object#acts_like?. - # - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/time/acts_like.rb#7 - def acts_like_time?; end - - # Uses Date to provide precise Time calculations for years, months, and days - # according to the proleptic Gregorian calendar. The +options+ parameter - # takes a hash with any of these keys: :years, :months, - # :weeks, :days, :hours, :minutes, - # :seconds. - # - # Time.new(2015, 8, 1, 14, 35, 0).advance(seconds: 1) # => 2015-08-01 14:35:01 -0700 - # Time.new(2015, 8, 1, 14, 35, 0).advance(minutes: 1) # => 2015-08-01 14:36:00 -0700 - # Time.new(2015, 8, 1, 14, 35, 0).advance(hours: 1) # => 2015-08-01 15:35:00 -0700 - # Time.new(2015, 8, 1, 14, 35, 0).advance(days: 1) # => 2015-08-02 14:35:00 -0700 - # Time.new(2015, 8, 1, 14, 35, 0).advance(weeks: 1) # => 2015-08-08 14:35:00 -0700 - # - # Just like Date#advance, increments are applied in order of time units from - # largest to smallest. This order can affect the result around the end of a - # month. - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#187 - def advance(options); end - - # Returns a new Time representing the time a number of seconds ago, this is basically a wrapper around the Numeric extension - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#213 - def ago(seconds); end - - # source://activesupport//lib/active_support/core_ext/object/json.rb#195 - def as_json(options = T.unsafe(nil)); end - - # Returns a new Time representing the start of the day (0:00) - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#226 - def at_beginning_of_day; end - - # Returns a new Time representing the start of the hour (x:00) - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#255 - def at_beginning_of_hour; end - - # Returns a new Time representing the start of the minute (x:xx:00) - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#271 - def at_beginning_of_minute; end - - # Returns a new Time representing the end of the day, 23:59:59.999999 - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#244 - def at_end_of_day; end - - # Returns a new Time representing the end of the hour, x:59:59.999999 - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#261 - def at_end_of_hour; end - - # Returns a new Time representing the end of the minute, x:xx:59.999999 - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#277 - def at_end_of_minute; end - - # Returns a new Time representing the middle of the day (12:00) - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#234 - def at_midday; end - - # Returns a new Time representing the middle of the day (12:00) - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#234 - def at_middle_of_day; end - - # Returns a new Time representing the start of the day (0:00) - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#226 - def at_midnight; end - - # Returns a new Time representing the middle of the day (12:00) - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#234 - def at_noon; end - - # Returns a new Time representing the start of the day (0:00) - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#226 - def beginning_of_day; end - - # Returns a new Time representing the start of the hour (x:00) - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#255 - def beginning_of_hour; end - - # Returns a new Time representing the start of the minute (x:xx:00) - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#271 - def beginning_of_minute; end - - # No Time is blank: - # - # Time.now.blank? # => false - # - # @return [false] - # - # source://activesupport//lib/active_support/core_ext/object/blank.rb#192 - def blank?; end - - # Returns a new Time where one or more of the elements have been changed according - # to the +options+ parameter. The time options (:hour, :min, - # :sec, :usec, :nsec) reset cascadingly, so if only - # the hour is passed, then minute, sec, usec, and nsec is set to 0. If the hour - # and minute is passed, then sec, usec, and nsec is set to 0. The +options+ parameter - # takes a hash with any of these keys: :year, :month, :day, - # :hour, :min, :sec, :usec, :nsec, - # :offset. Pass either :usec or :nsec, not both. - # - # Time.new(2012, 8, 29, 22, 35, 0).change(day: 1) # => Time.new(2012, 8, 1, 22, 35, 0) - # Time.new(2012, 8, 29, 22, 35, 0).change(year: 1981, day: 1) # => Time.new(1981, 8, 1, 22, 35, 0) - # Time.new(2012, 8, 29, 22, 35, 0).change(year: 1981, hour: 0) # => Time.new(1981, 8, 29, 0, 0, 0) - # - # @raise [ArgumentError] - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#123 - def change(options); end - - # Layers additional behavior on Time#<=> so that DateTime and ActiveSupport::TimeWithZone instances - # can be chronologically compared with a Time - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#317 - def compare_with_coercion(other); end - - # Returns a new Time representing the end of the day, 23:59:59.999999 - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#244 - def end_of_day; end - - # Returns a new Time representing the end of the hour, x:59:59.999999 - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#261 - def end_of_hour; end - - # Returns a new Time representing the end of the minute, x:xx:59.999999 - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#277 - def end_of_minute; end - - # Layers additional behavior on Time#eql? so that ActiveSupport::TimeWithZone instances - # can be eql? to an equivalent Time - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#337 - def eql?(other); end - - # Layers additional behavior on Time#eql? so that ActiveSupport::TimeWithZone instances - # can be eql? to an equivalent Time - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#337 - def eql_with_coercion(other); end - - # Returns a formatted string of the offset from UTC, or an alternative - # string if the time zone is already UTC. - # - # Time.local(2000).formatted_offset # => "-06:00" - # Time.local(2000).formatted_offset(false) # => "-0600" - # - # source://activesupport//lib/active_support/core_ext/time/conversions.rb#67 - def formatted_offset(colon = T.unsafe(nil), alternate_utc_string = T.unsafe(nil)); end - - # Returns a new Time representing the time a number of seconds since the instance time - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#218 - def in(seconds); end - - # Returns a new Time representing the middle of the day (12:00) - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#234 - def midday; end - - # Returns a new Time representing the middle of the day (12:00) - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#234 - def middle_of_day; end - - # Returns a new Time representing the start of the day (0:00) - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#226 - def midnight; end - - # Time#- can also be used to determine the number of seconds between two Time instances. - # We're layering on additional behavior so that ActiveSupport::TimeWithZone instances - # are coerced into values that Time#- will recognize - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#308 - def minus_with_coercion(other); end - - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#295 - def minus_with_duration(other); end - - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#295 - def minus_without_coercion(other); end - - # Returns a new time the specified number of days in the future. - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#351 - def next_day(days = T.unsafe(nil)); end - - # Returns a new time the specified number of months in the future. - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#361 - def next_month(months = T.unsafe(nil)); end - - # Returns a new time the specified number of years in the future. - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#371 - def next_year(years = T.unsafe(nil)); end - - # Returns a new Time representing the middle of the day (12:00) - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#234 - def noon; end - - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#285 - def plus_with_duration(other); end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/object/blank.rb#196 - def present?; end - - # source://activesupport//lib/active_support/core_ext/time/compatibility.rb#17 - def preserve_timezone; end - - # Returns a new time the specified number of days ago. - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#346 - def prev_day(days = T.unsafe(nil)); end - - # Returns a new time the specified number of months ago. - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#356 - def prev_month(months = T.unsafe(nil)); end - - # Returns a new time the specified number of years ago. - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#366 - def prev_year(years = T.unsafe(nil)); end - - # Returns the fraction of a second as a +Rational+ - # - # Time.new(2012, 8, 29, 0, 0, 0.5).sec_fraction # => (1/2) - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#107 - def sec_fraction; end - - # Returns the number of seconds since 00:00:00. - # - # Time.new(2012, 8, 29, 0, 0, 0).seconds_since_midnight # => 0.0 - # Time.new(2012, 8, 29, 12, 34, 56).seconds_since_midnight # => 45296.0 - # Time.new(2012, 8, 29, 23, 59, 59).seconds_since_midnight # => 86399.0 - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#91 - def seconds_since_midnight; end - - # Returns the number of seconds until 23:59:59. - # - # Time.new(2012, 8, 29, 0, 0, 0).seconds_until_end_of_day # => 86399 - # Time.new(2012, 8, 29, 12, 34, 56).seconds_until_end_of_day # => 41103 - # Time.new(2012, 8, 29, 23, 59, 59).seconds_until_end_of_day # => 0 - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#100 - def seconds_until_end_of_day; end - - # Returns a new Time representing the time a number of seconds since the instance time - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#218 - def since(seconds); end - - # Converts to a formatted string. See DATE_FORMATS for built-in formats. - # - # This method is aliased to to_formatted_s. - # - # time = Time.now # => 2007-01-18 06:10:17 -06:00 - # - # time.to_fs(:time) # => "06:10" - # time.to_formatted_s(:time) # => "06:10" - # - # time.to_fs(:db) # => "2007-01-18 06:10:17" - # time.to_fs(:number) # => "20070118061017" - # time.to_fs(:short) # => "18 Jan 06:10" - # time.to_fs(:long) # => "January 18, 2007 06:10" - # time.to_fs(:long_ordinal) # => "January 18th, 2007 06:10" - # time.to_fs(:rfc822) # => "Thu, 18 Jan 2007 06:10:17 -0600" - # time.to_fs(:iso8601) # => "2007-01-18T06:10:17-06:00" - # - # == Adding your own time formats to +to_fs+ - # You can add your own formats to the Time::DATE_FORMATS hash. - # Use the format name as the hash key and either a strftime string - # or Proc instance that takes a time argument as the value. - # - # # config/initializers/time_formats.rb - # Time::DATE_FORMATS[:month_and_year] = '%B %Y' - # Time::DATE_FORMATS[:short_ordinal] = ->(time) { time.strftime("%B #{time.day.ordinalize}") } - # - # source://activesupport//lib/active_support/core_ext/time/conversions.rb#53 - def to_formatted_s(format = T.unsafe(nil)); end - - # Converts to a formatted string. See DATE_FORMATS for built-in formats. - # - # This method is aliased to to_formatted_s. - # - # time = Time.now # => 2007-01-18 06:10:17 -06:00 - # - # time.to_fs(:time) # => "06:10" - # time.to_formatted_s(:time) # => "06:10" - # - # time.to_fs(:db) # => "2007-01-18 06:10:17" - # time.to_fs(:number) # => "20070118061017" - # time.to_fs(:short) # => "18 Jan 06:10" - # time.to_fs(:long) # => "January 18, 2007 06:10" - # time.to_fs(:long_ordinal) # => "January 18th, 2007 06:10" - # time.to_fs(:rfc822) # => "Thu, 18 Jan 2007 06:10:17 -0600" - # time.to_fs(:iso8601) # => "2007-01-18T06:10:17-06:00" - # - # == Adding your own time formats to +to_fs+ - # You can add your own formats to the Time::DATE_FORMATS hash. - # Use the format name as the hash key and either a strftime string - # or Proc instance that takes a time argument as the value. - # - # # config/initializers/time_formats.rb - # Time::DATE_FORMATS[:month_and_year] = '%B %Y' - # Time::DATE_FORMATS[:short_ordinal] = ->(time) { time.strftime("%B #{time.day.ordinalize}") } - # - # source://activesupport//lib/active_support/core_ext/time/conversions.rb#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 - - private - - # source://activesupport//lib/active_support/core_ext/time/compatibility.rb#24 - def active_support_local_zone; end - - class << self - # Overriding case equality method so that it returns true for ActiveSupport::TimeWithZone instances - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#18 - def ===(other); end - - # Layers additional behavior on Time.at so that ActiveSupport::TimeWithZone and DateTime - # instances can be used when called with a single argument - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#45 - def at(time_or_number, *args, **_arg2); end - - # Layers additional behavior on Time.at so that ActiveSupport::TimeWithZone and DateTime - # instances can be used when called with a single argument - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#45 - def at_with_coercion(time_or_number, *args, **_arg2); end - - # Returns Time.zone.now when Time.zone or config.time_zone are set, otherwise just returns Time.now. - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#39 - def current; end - - # Returns the number of days in the given month. - # If no year is specified, it will use the current year. - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#24 - def days_in_month(month, year = T.unsafe(nil)); end - - # Returns the number of days in the given year. - # If no year is specified, it will use the current year. - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#34 - def days_in_year(year = T.unsafe(nil)); end - - # Returns a TimeZone instance matching the time zone provided. - # Accepts the time zone in any format supported by Time.zone=. - # Returns +nil+ for invalid time zones. - # - # Time.find_zone "America/New_York" # => # - # Time.find_zone "NOT-A-TIMEZONE" # => nil - # - # source://activesupport//lib/active_support/core_ext/time/zones.rb#93 - def find_zone(time_zone); end - - # Returns a TimeZone instance matching the time zone provided. - # Accepts the time zone in any format supported by Time.zone=. - # Raises an +ArgumentError+ for invalid time zones. - # - # Time.find_zone! "America/New_York" # => # - # Time.find_zone! "EST" # => # - # Time.find_zone! -5.hours # => # - # Time.find_zone! nil # => nil - # Time.find_zone! false # => false - # Time.find_zone! "NOT-A-TIMEZONE" # => ArgumentError: Invalid Timezone: NOT-A-TIMEZONE - # - # source://activesupport//lib/active_support/core_ext/time/zones.rb#81 - def find_zone!(time_zone); end - - # Creates a +Time+ instance from an RFC 3339 string. - # - # Time.rfc3339('1999-12-31T14:00:00-10:00') # => 2000-01-01 00:00:00 -1000 - # - # If the time or offset components are missing then an +ArgumentError+ will be raised. - # - # Time.rfc3339('1999-12-31') # => ArgumentError: invalid date - # - # @raise [ArgumentError] - # - # source://activesupport//lib/active_support/core_ext/time/calculations.rb#69 - def rfc3339(str); end - - # Allows override of Time.zone locally inside supplied block; - # resets Time.zone to existing value when done. - # - # class ApplicationController < ActionController::Base - # around_action :set_time_zone - # - # private - # def set_time_zone - # Time.use_zone(current_user.timezone) { yield } - # end - # end - # - # NOTE: This won't affect any ActiveSupport::TimeWithZone - # objects that have already been created, e.g. any model timestamp - # attributes that have been read before the block will remain in - # the application's default timezone. - # - # source://activesupport//lib/active_support/core_ext/time/zones.rb#61 - def use_zone(time_zone); end - - # Returns the TimeZone for the current request, if this has been set (via Time.zone=). - # If Time.zone has not been set for the current request, returns the TimeZone specified in config.time_zone. - # - # source://activesupport//lib/active_support/core_ext/time/zones.rb#14 - def zone; end - - # Sets Time.zone to a TimeZone object for the current request/thread. - # - # This method accepts any of the following: - # - # * A \Rails TimeZone object. - # * An identifier for a \Rails TimeZone object (e.g., "Eastern \Time (US & Canada)", -5.hours). - # * A +TZInfo::Timezone+ object. - # * An identifier for a +TZInfo::Timezone+ object (e.g., "America/New_York"). - # - # Here's an example of how you might set Time.zone on a per request basis and reset it when the request is done. - # current_user.time_zone just needs to return a string identifying the user's preferred time zone: - # - # class ApplicationController < ActionController::Base - # around_action :set_time_zone - # - # def set_time_zone - # if logged_in? - # Time.use_zone(current_user.time_zone) { yield } - # else - # yield - # end - # end - # end - # - # source://activesupport//lib/active_support/core_ext/time/zones.rb#41 - def zone=(time_zone); end - - # Returns the value of attribute zone_default. - # - # source://activesupport//lib/active_support/core_ext/time/zones.rb#10 - def zone_default; end - - # Sets the attribute zone_default - # - # @param value the value to set the attribute zone_default to. - # - # source://activesupport//lib/active_support/core_ext/time/zones.rb#10 - def zone_default=(_arg0); end - end -end - -# source://activesupport//lib/active_support/core_ext/time/calculations.rb#14 -Time::COMMON_YEAR_DAYS_IN_MONTH = T.let(T.unsafe(nil), Array) - -# source://activesupport//lib/active_support/core_ext/time/conversions.rb#8 -Time::DATE_FORMATS = T.let(T.unsafe(nil), Hash) - -# source://activesupport//lib/active_support/core_ext/object/to_query.rb#25 -class TrueClass - # source://activesupport//lib/active_support/core_ext/object/json.rb#83 - def as_json(options = T.unsafe(nil)); end - - # +true+ is not blank: - # - # true.blank? # => false - # - # @return [false] - # - # source://activesupport//lib/active_support/core_ext/object/blank.rb#86 - def blank?; end - - # @return [Boolean] - # - # source://activesupport//lib/active_support/core_ext/object/blank.rb#90 - def present?; end - - # Returns +self+. - # - # source://activesupport//lib/active_support/core_ext/object/to_query.rb#27 - def to_param; end -end - -# source://activesupport//lib/active_support/core_ext/object/json.rb#224 -class URI::Generic - include ::URI::RFC2396_REGEXP - - # source://activesupport//lib/active_support/core_ext/object/json.rb#225 - def as_json(options = T.unsafe(nil)); end -end diff --git a/sorbet/rbi/gems/base64@0.2.0.rbi b/sorbet/rbi/gems/base64@0.2.0.rbi deleted file mode 100644 index 7f733b0..0000000 --- a/sorbet/rbi/gems/base64@0.2.0.rbi +++ /dev/null @@ -1,9 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `base64` gem. -# Please instead update this file by running `bin/tapioca gem base64`. - - -# THIS IS AN EMPTY RBI FILE. -# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/benchmark@0.3.0.rbi b/sorbet/rbi/gems/benchmark@0.3.0.rbi deleted file mode 100644 index c5d84c8..0000000 --- a/sorbet/rbi/gems/benchmark@0.3.0.rbi +++ /dev/null @@ -1,592 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `benchmark` gem. -# Please instead update this file by running `bin/tapioca gem benchmark`. - - -# The Benchmark module provides methods to measure and report the time -# used to execute Ruby code. -# -# * Measure the time to construct the string given by the expression -# "a"*1_000_000_000: -# -# require 'benchmark' -# -# puts Benchmark.measure { "a"*1_000_000_000 } -# -# On my machine (OSX 10.8.3 on i5 1.7 GHz) this generates: -# -# 0.350000 0.400000 0.750000 ( 0.835234) -# -# This report shows the user CPU time, system CPU time, the sum of -# the user and system CPU times, and the elapsed real time. The unit -# of time is seconds. -# -# * Do some experiments sequentially using the #bm method: -# -# require 'benchmark' -# -# n = 5000000 -# Benchmark.bm do |x| -# x.report { for i in 1..n; a = "1"; end } -# x.report { n.times do ; a = "1"; end } -# x.report { 1.upto(n) do ; a = "1"; end } -# end -# -# The result: -# -# user system total real -# 1.010000 0.000000 1.010000 ( 1.014479) -# 1.000000 0.000000 1.000000 ( 0.998261) -# 0.980000 0.000000 0.980000 ( 0.981335) -# -# * Continuing the previous example, put a label in each report: -# -# require 'benchmark' -# -# n = 5000000 -# Benchmark.bm(7) do |x| -# x.report("for:") { for i in 1..n; a = "1"; end } -# x.report("times:") { n.times do ; a = "1"; end } -# x.report("upto:") { 1.upto(n) do ; a = "1"; end } -# end -# -# The result: -# -# user system total real -# for: 1.010000 0.000000 1.010000 ( 1.015688) -# times: 1.000000 0.000000 1.000000 ( 1.003611) -# upto: 1.030000 0.000000 1.030000 ( 1.028098) -# -# * The times for some benchmarks depend on the order in which items -# are run. These differences are due to the cost of memory -# allocation and garbage collection. To avoid these discrepancies, -# the #bmbm method is provided. For example, to compare ways to -# sort an array of floats: -# -# require 'benchmark' -# -# array = (1..1000000).map { rand } -# -# Benchmark.bmbm do |x| -# x.report("sort!") { array.dup.sort! } -# x.report("sort") { array.dup.sort } -# end -# -# The result: -# -# Rehearsal ----------------------------------------- -# sort! 1.490000 0.010000 1.500000 ( 1.490520) -# sort 1.460000 0.000000 1.460000 ( 1.463025) -# -------------------------------- total: 2.960000sec -# -# user system total real -# sort! 1.460000 0.000000 1.460000 ( 1.460465) -# sort 1.450000 0.010000 1.460000 ( 1.448327) -# -# * Report statistics of sequential experiments with unique labels, -# using the #benchmark method: -# -# require 'benchmark' -# include Benchmark # we need the CAPTION and FORMAT constants -# -# n = 5000000 -# Benchmark.benchmark(CAPTION, 7, FORMAT, ">total:", ">avg:") do |x| -# tf = x.report("for:") { for i in 1..n; a = "1"; end } -# tt = x.report("times:") { n.times do ; a = "1"; end } -# tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end } -# [tf+tt+tu, (tf+tt+tu)/3] -# end -# -# The result: -# -# user system total real -# for: 0.950000 0.000000 0.950000 ( 0.952039) -# times: 0.980000 0.000000 0.980000 ( 0.984938) -# upto: 0.950000 0.000000 0.950000 ( 0.946787) -# >total: 2.880000 0.000000 2.880000 ( 2.883764) -# >avg: 0.960000 0.000000 0.960000 ( 0.961255) -module Benchmark - private - - # Invokes the block with a Benchmark::Report object, which - # may be used to collect and report on the results of individual - # benchmark tests. Reserves +label_width+ leading spaces for - # labels on each line. Prints +caption+ at the top of the - # report, and uses +format+ to format each line. - # (Note: +caption+ must contain a terminating newline character, - # see the default Benchmark::Tms::CAPTION for an example.) - # - # Returns an array of Benchmark::Tms objects. - # - # If the block returns an array of - # Benchmark::Tms objects, these will be used to format - # additional lines of output. If +labels+ parameter are - # given, these are used to label these extra lines. - # - # _Note_: Other methods provide a simpler interface to this one, and are - # suitable for nearly all benchmarking requirements. See the examples in - # Benchmark, and the #bm and #bmbm methods. - # - # Example: - # - # require 'benchmark' - # include Benchmark # we need the CAPTION and FORMAT constants - # - # n = 5000000 - # Benchmark.benchmark(CAPTION, 7, FORMAT, ">total:", ">avg:") do |x| - # tf = x.report("for:") { for i in 1..n; a = "1"; end } - # tt = x.report("times:") { n.times do ; a = "1"; end } - # tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end } - # [tf+tt+tu, (tf+tt+tu)/3] - # end - # - # Generates: - # - # user system total real - # for: 0.970000 0.000000 0.970000 ( 0.970493) - # times: 0.990000 0.000000 0.990000 ( 0.989542) - # upto: 0.970000 0.000000 0.970000 ( 0.972854) - # >total: 2.930000 0.000000 2.930000 ( 2.932889) - # >avg: 0.976667 0.000000 0.976667 ( 0.977630) - # - # source://benchmark//benchmark.rb#170 - def benchmark(caption = T.unsafe(nil), label_width = T.unsafe(nil), format = T.unsafe(nil), *labels); end - - # A simple interface to the #benchmark method, #bm generates sequential - # reports with labels. +label_width+ and +labels+ parameters have the same - # meaning as for #benchmark. - # - # require 'benchmark' - # - # n = 5000000 - # Benchmark.bm(7) do |x| - # x.report("for:") { for i in 1..n; a = "1"; end } - # x.report("times:") { n.times do ; a = "1"; end } - # x.report("upto:") { 1.upto(n) do ; a = "1"; end } - # end - # - # Generates: - # - # user system total real - # for: 0.960000 0.000000 0.960000 ( 0.957966) - # times: 0.960000 0.000000 0.960000 ( 0.960423) - # upto: 0.950000 0.000000 0.950000 ( 0.954864) - # - # source://benchmark//benchmark.rb#209 - def bm(label_width = T.unsafe(nil), *labels, &blk); end - - # Sometimes benchmark results are skewed because code executed - # earlier encounters different garbage collection overheads than - # that run later. #bmbm attempts to minimize this effect by running - # the tests twice, the first time as a rehearsal in order to get the - # runtime environment stable, the second time for - # real. GC.start is executed before the start of each of - # the real timings; the cost of this is not included in the - # timings. In reality, though, there's only so much that #bmbm can - # do, and the results are not guaranteed to be isolated from garbage - # collection and other effects. - # - # Because #bmbm takes two passes through the tests, it can - # calculate the required label width. - # - # require 'benchmark' - # - # array = (1..1000000).map { rand } - # - # Benchmark.bmbm do |x| - # x.report("sort!") { array.dup.sort! } - # x.report("sort") { array.dup.sort } - # end - # - # Generates: - # - # Rehearsal ----------------------------------------- - # sort! 1.440000 0.010000 1.450000 ( 1.446833) - # sort 1.440000 0.000000 1.440000 ( 1.448257) - # -------------------------------- total: 2.890000sec - # - # user system total real - # sort! 1.460000 0.000000 1.460000 ( 1.458065) - # sort 1.450000 0.000000 1.450000 ( 1.455963) - # - # #bmbm yields a Benchmark::Job object and returns an array of - # Benchmark::Tms objects. - # - # source://benchmark//benchmark.rb#251 - def bmbm(width = T.unsafe(nil)); end - - # Returns the time used to execute the given block as a - # Benchmark::Tms object. Takes +label+ option. - # - # require 'benchmark' - # - # n = 1000000 - # - # time = Benchmark.measure do - # n.times { a = "1" } - # end - # puts time - # - # Generates: - # - # 0.220000 0.000000 0.220000 ( 0.227313) - # - # source://benchmark//benchmark.rb#296 - def measure(label = T.unsafe(nil)); end - - # Returns the elapsed real time used to execute the given block. - # - # source://benchmark//benchmark.rb#311 - def realtime; end - - class << self - # Invokes the block with a Benchmark::Report object, which - # may be used to collect and report on the results of individual - # benchmark tests. Reserves +label_width+ leading spaces for - # labels on each line. Prints +caption+ at the top of the - # report, and uses +format+ to format each line. - # (Note: +caption+ must contain a terminating newline character, - # see the default Benchmark::Tms::CAPTION for an example.) - # - # Returns an array of Benchmark::Tms objects. - # - # If the block returns an array of - # Benchmark::Tms objects, these will be used to format - # additional lines of output. If +labels+ parameter are - # given, these are used to label these extra lines. - # - # _Note_: Other methods provide a simpler interface to this one, and are - # suitable for nearly all benchmarking requirements. See the examples in - # Benchmark, and the #bm and #bmbm methods. - # - # Example: - # - # require 'benchmark' - # include Benchmark # we need the CAPTION and FORMAT constants - # - # n = 5000000 - # Benchmark.benchmark(CAPTION, 7, FORMAT, ">total:", ">avg:") do |x| - # tf = x.report("for:") { for i in 1..n; a = "1"; end } - # tt = x.report("times:") { n.times do ; a = "1"; end } - # tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end } - # [tf+tt+tu, (tf+tt+tu)/3] - # end - # - # Generates: - # - # user system total real - # for: 0.970000 0.000000 0.970000 ( 0.970493) - # times: 0.990000 0.000000 0.990000 ( 0.989542) - # upto: 0.970000 0.000000 0.970000 ( 0.972854) - # >total: 2.930000 0.000000 2.930000 ( 2.932889) - # >avg: 0.976667 0.000000 0.976667 ( 0.977630) - # - # source://benchmark//benchmark.rb#170 - def benchmark(caption = T.unsafe(nil), label_width = T.unsafe(nil), format = T.unsafe(nil), *labels); end - - # A simple interface to the #benchmark method, #bm generates sequential - # reports with labels. +label_width+ and +labels+ parameters have the same - # meaning as for #benchmark. - # - # require 'benchmark' - # - # n = 5000000 - # Benchmark.bm(7) do |x| - # x.report("for:") { for i in 1..n; a = "1"; end } - # x.report("times:") { n.times do ; a = "1"; end } - # x.report("upto:") { 1.upto(n) do ; a = "1"; end } - # end - # - # Generates: - # - # user system total real - # for: 0.960000 0.000000 0.960000 ( 0.957966) - # times: 0.960000 0.000000 0.960000 ( 0.960423) - # upto: 0.950000 0.000000 0.950000 ( 0.954864) - # - # source://benchmark//benchmark.rb#209 - def bm(label_width = T.unsafe(nil), *labels, &blk); end - - # Sometimes benchmark results are skewed because code executed - # earlier encounters different garbage collection overheads than - # that run later. #bmbm attempts to minimize this effect by running - # the tests twice, the first time as a rehearsal in order to get the - # runtime environment stable, the second time for - # real. GC.start is executed before the start of each of - # the real timings; the cost of this is not included in the - # timings. In reality, though, there's only so much that #bmbm can - # do, and the results are not guaranteed to be isolated from garbage - # collection and other effects. - # - # Because #bmbm takes two passes through the tests, it can - # calculate the required label width. - # - # require 'benchmark' - # - # array = (1..1000000).map { rand } - # - # Benchmark.bmbm do |x| - # x.report("sort!") { array.dup.sort! } - # x.report("sort") { array.dup.sort } - # end - # - # Generates: - # - # Rehearsal ----------------------------------------- - # sort! 1.440000 0.010000 1.450000 ( 1.446833) - # sort 1.440000 0.000000 1.440000 ( 1.448257) - # -------------------------------- total: 2.890000sec - # - # user system total real - # sort! 1.460000 0.000000 1.460000 ( 1.458065) - # sort 1.450000 0.000000 1.450000 ( 1.455963) - # - # #bmbm yields a Benchmark::Job object and returns an array of - # Benchmark::Tms objects. - # - # source://benchmark//benchmark.rb#251 - def bmbm(width = T.unsafe(nil)); end - - # Returns the time used to execute the given block as a - # Benchmark::Tms object. Takes +label+ option. - # - # require 'benchmark' - # - # n = 1000000 - # - # time = Benchmark.measure do - # n.times { a = "1" } - # end - # puts time - # - # Generates: - # - # 0.220000 0.000000 0.220000 ( 0.227313) - # - # source://benchmark//benchmark.rb#296 - def measure(label = T.unsafe(nil)); end - - # Returns the elapsed real time used to execute the given block. - # - # source://benchmark//benchmark.rb#311 - def realtime; end - end -end - -# A Job is a sequence of labelled blocks to be processed by the -# Benchmark.bmbm method. It is of little direct interest to the user. -class Benchmark::Job - # Returns an initialized Job instance. - # Usually, one doesn't call this method directly, as new - # Job objects are created by the #bmbm method. - # +width+ is a initial value for the label offset used in formatting; - # the #bmbm method passes its +width+ argument to this constructor. - # - # @return [Job] a new instance of Job - # - # source://benchmark//benchmark.rb#331 - def initialize(width); end - - # Registers the given label and block pair in the job list. - # - # @raise [ArgumentError] - # - # source://benchmark//benchmark.rb#339 - def item(label = T.unsafe(nil), &blk); end - - # An array of 2-element arrays, consisting of label and block pairs. - # - # source://benchmark//benchmark.rb#351 - def list; end - - # Registers the given label and block pair in the job list. - # - # @raise [ArgumentError] - # - # source://benchmark//benchmark.rb#339 - def report(label = T.unsafe(nil), &blk); end - - # Length of the widest label in the #list. - # - # source://benchmark//benchmark.rb#354 - def width; end -end - -# This class is used by the Benchmark.benchmark and Benchmark.bm methods. -# It is of little direct interest to the user. -class Benchmark::Report - # Returns an initialized Report instance. - # Usually, one doesn't call this method directly, as new - # Report objects are created by the #benchmark and #bm methods. - # +width+ and +format+ are the label offset and - # format string used by Tms#format. - # - # @return [Report] a new instance of Report - # - # source://benchmark//benchmark.rb#369 - def initialize(width = T.unsafe(nil), format = T.unsafe(nil)); end - - # Prints the +label+ and measured time for the block, - # formatted by +format+. See Tms#format for the - # formatting rules. - # - # source://benchmark//benchmark.rb#378 - def item(label = T.unsafe(nil), *format, &blk); end - - # An array of Benchmark::Tms objects representing each item. - # - # source://benchmark//benchmark.rb#388 - def list; end - - # Prints the +label+ and measured time for the block, - # formatted by +format+. See Tms#format for the - # formatting rules. - # - # source://benchmark//benchmark.rb#378 - def report(label = T.unsafe(nil), *format, &blk); end -end - -# A data object, representing the times associated with a benchmark -# measurement. -class Benchmark::Tms - # Returns an initialized Tms object which has - # +utime+ as the user CPU time, +stime+ as the system CPU time, - # +cutime+ as the children's user CPU time, +cstime+ as the children's - # system CPU time, +real+ as the elapsed real time and +label+ as the label. - # - # @return [Tms] a new instance of Tms - # - # source://benchmark//benchmark.rb#432 - def initialize(utime = T.unsafe(nil), stime = T.unsafe(nil), cutime = T.unsafe(nil), cstime = T.unsafe(nil), real = T.unsafe(nil), label = T.unsafe(nil)); end - - # Returns a new Tms object obtained by memberwise multiplication - # of the individual times for this Tms object by +x+. - # - # source://benchmark//benchmark.rb#480 - def *(x); end - - # Returns a new Tms object obtained by memberwise summation - # of the individual times for this Tms object with those of the +other+ - # Tms object. - # This method and #/() are useful for taking statistics. - # - # source://benchmark//benchmark.rb#467 - def +(other); end - - # Returns a new Tms object obtained by memberwise subtraction - # of the individual times for the +other+ Tms object from those of this - # Tms object. - # - # source://benchmark//benchmark.rb#474 - def -(other); end - - # Returns a new Tms object obtained by memberwise division - # of the individual times for this Tms object by +x+. - # This method and #+() are useful for taking statistics. - # - # source://benchmark//benchmark.rb#487 - def /(x); end - - # Returns a new Tms object whose times are the sum of the times for this - # Tms object, plus the time required to execute the code block (+blk+). - # - # source://benchmark//benchmark.rb#441 - def add(&blk); end - - # An in-place version of #add. - # Changes the times of this Tms object by making it the sum of the times - # for this Tms object, plus the time required to execute - # the code block (+blk+). - # - # source://benchmark//benchmark.rb#451 - def add!(&blk); end - - # System CPU time of children - # - # source://benchmark//benchmark.rb#415 - def cstime; end - - # User CPU time of children - # - # source://benchmark//benchmark.rb#412 - def cutime; end - - # Returns the contents of this Tms object as - # a formatted string, according to a +format+ string - # like that passed to Kernel.format. In addition, #format - # accepts the following extensions: - # - # %u:: Replaced by the user CPU time, as reported by Tms#utime. - # %y:: Replaced by the system CPU time, as reported by #stime (Mnemonic: y of "s*y*stem") - # %U:: Replaced by the children's user CPU time, as reported by Tms#cutime - # %Y:: Replaced by the children's system CPU time, as reported by Tms#cstime - # %t:: Replaced by the total CPU time, as reported by Tms#total - # %r:: Replaced by the elapsed real time, as reported by Tms#real - # %n:: Replaced by the label string, as reported by Tms#label (Mnemonic: n of "*n*ame") - # - # If +format+ is not given, FORMAT is used as default value, detailing the - # user, system and real elapsed time. - # - # source://benchmark//benchmark.rb#506 - def format(format = T.unsafe(nil), *args); end - - # Label - # - # source://benchmark//benchmark.rb#424 - def label; end - - # Elapsed real time - # - # source://benchmark//benchmark.rb#418 - def real; end - - # System CPU time - # - # source://benchmark//benchmark.rb#409 - def stime; end - - # Returns a new 6-element array, consisting of the - # label, user CPU time, system CPU time, children's - # user CPU time, children's system CPU time and elapsed - # real time. - # - # source://benchmark//benchmark.rb#531 - def to_a; end - - # Returns a hash containing the same data as `to_a`. - # - # source://benchmark//benchmark.rb#538 - def to_h; end - - # Same as #format. - # - # source://benchmark//benchmark.rb#521 - def to_s; end - - # Total time, that is +utime+ + +stime+ + +cutime+ + +cstime+ - # - # source://benchmark//benchmark.rb#421 - def total; end - - # User CPU time - # - # source://benchmark//benchmark.rb#406 - def utime; end - - protected - - # Returns a new Tms object obtained by memberwise operation +op+ - # of the individual times for this Tms object with those of the other - # Tms object (+x+). - # - # +op+ can be a mathematical operation such as +, -, - # *, / - # - # source://benchmark//benchmark.rb#559 - def memberwise(op, x); end -end - -# source://benchmark//benchmark.rb#124 -Benchmark::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/bigdecimal.rbi b/sorbet/rbi/gems/bigdecimal.rbi deleted file mode 100644 index cbee900..0000000 --- a/sorbet/rbi/gems/bigdecimal.rbi +++ /dev/null @@ -1,86 +0,0 @@ -# This file is autogenerated. Do not edit it by hand. Regenerate it with: -# srb rbi gems - -# typed: false -# -# If you would like to make changes to this file, great! Please create the gem's shim here: -# -# https://github.com/sorbet/sorbet-typed/new/master?filename=lib/bigdecimal/all/bigdecimal.rbi -# -# bigdecimal-3.1.8 - -module Kernel - def BigDecimal(*arg0); end - def self.BigDecimal(*arg0); end -end -class BigDecimal < Numeric - def %(arg0); end - def *(arg0); end - def **(arg0); end - def +(arg0); end - def +@; end - def -(arg0); end - def -@; end - def /(arg0); end - def <(arg0); end - def <=(arg0); end - def <=>(arg0); end - def ==(arg0); end - def ===(arg0); end - def >(arg0); end - def >=(arg0); end - def _dump(*arg0); end - def abs; end - def add(arg0, arg1); end - def ceil(*arg0); end - def clone; end - def coerce(arg0); end - def div(*arg0); end - def divmod(arg0); end - def dup; end - def eql?(arg0); end - def exponent; end - def finite?; end - def fix; end - def floor(*arg0); end - def frac; end - def hash; end - def infinite?; end - def inspect; end - def modulo(arg0); end - def mult(arg0, arg1); end - def n_significant_digits; end - def nan?; end - def nonzero?; end - def power(*arg0); end - def precision; end - def precision_scale; end - def precs; end - def quo(*arg0); end - def remainder(arg0); end - def round(*arg0); end - def scale; end - def self._load(arg0); end - def self.double_fig; end - def self.interpret_loosely(arg0); end - def self.limit(*arg0); end - def self.mode(*arg0); end - def self.save_exception_mode; end - def self.save_limit; end - def self.save_rounding_mode; end - def sign; end - def split; end - def sqrt(arg0); end - def sub(arg0, arg1); end - def to_f; end - def to_i; end - def to_int; end - def to_r; end - def to_s(*arg0); end - def truncate(*arg0); end - def zero?; end -end -module BigMath - def self.exp(arg0, arg1); end - def self.log(arg0, arg1); end -end diff --git a/sorbet/rbi/gems/bigdecimal@3.1.8.rbi b/sorbet/rbi/gems/bigdecimal@3.1.8.rbi deleted file mode 100644 index c52d9ff..0000000 --- a/sorbet/rbi/gems/bigdecimal@3.1.8.rbi +++ /dev/null @@ -1,9 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `bigdecimal` gem. -# Please instead update this file by running `bin/tapioca gem bigdecimal`. - - -# THIS IS AN EMPTY RBI FILE. -# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/concurrent-ruby.rbi b/sorbet/rbi/gems/concurrent-ruby.rbi deleted file mode 100644 index 44ea559..0000000 --- a/sorbet/rbi/gems/concurrent-ruby.rbi +++ /dev/null @@ -1,1651 +0,0 @@ -# This file is autogenerated. Do not edit it by hand. Regenerate it with: -# srb rbi gems - -# typed: true -# -# If you would like to make changes to this file, great! Please create the gem's shim here: -# -# https://github.com/sorbet/sorbet-typed/new/master?filename=lib/concurrent-ruby/all/concurrent-ruby.rbi -# -# concurrent-ruby-1.3.4 - -module Concurrent - def abort_transaction; end - def atomically; end - def call_dataflow(method, executor, *inputs, &block); end - def dataflow!(*inputs, &block); end - def dataflow(*inputs, &block); end - def dataflow_with!(executor, *inputs, &block); end - def dataflow_with(executor, *inputs, &block); end - def leave_transaction; end - def monotonic_time(unit = nil); end - def self.abort_transaction; end - def self.atomically; end - def self.available_processor_count; end - def self.call_dataflow(method, executor, *inputs, &block); end - def self.cpu_quota; end - def self.cpu_shares; end - def self.create_simple_logger(level = nil, output = nil); end - def self.create_stdlib_logger(level = nil, output = nil); end - def self.dataflow!(*inputs, &block); end - def self.dataflow(*inputs, &block); end - def self.dataflow_with!(executor, *inputs, &block); end - def self.dataflow_with(executor, *inputs, &block); end - def self.disable_at_exit_handlers!; end - def self.executor(executor_identifier); end - def self.global_fast_executor; end - def self.global_immediate_executor; end - def self.global_io_executor; end - def self.global_logger; end - def self.global_logger=(value); end - def self.global_timer_set; end - def self.leave_transaction; end - def self.monotonic_time(unit = nil); end - def self.mutex_owned_per_thread?; end - def self.new_fast_executor(opts = nil); end - def self.new_io_executor(opts = nil); end - def self.physical_processor_count; end - def self.processor_count; end - def self.processor_counter; end - def self.use_simple_logger(level = nil, output = nil); end - def self.use_stdlib_logger(level = nil, output = nil); end - extend Concurrent::Concern::Deprecation - extend Concurrent::Concern::Logging - extend Concurrent::Utility::EngineDetector - extend Concurrent::Utility::NativeExtensionLoader -end -module Concurrent::Utility -end -module Concurrent::Utility::EngineDetector - def on_cruby?; end - def on_jruby?; end - def on_linux?; end - def on_osx?; end - def on_truffleruby?; end - def on_windows?; end - def ruby_version(version = nil, comparison, major, minor, patch); end -end -module Concurrent::Collection -end -class Concurrent::Collection::NonConcurrentMapBackend - def [](key); end - def []=(key, value); end - def clear; end - def compute(key); end - def compute_if_absent(key); end - def compute_if_present(key); end - def delete(key); end - def delete_pair(key, value); end - def dupped_backend; end - def each_pair; end - def get_and_set(key, value); end - def get_or_default(key, default_value); end - def initialize(options = nil, &default_proc); end - def initialize_copy(other); end - def key?(key); end - def merge_pair(key, value); end - def pair?(key, expected_value); end - def replace_if_exists(key, new_value); end - def replace_pair(key, old_value, new_value); end - def set_backend(default_proc); end - def size; end - def store_computed_value(key, new_value); end -end -class Concurrent::Collection::MriMapBackend < Concurrent::Collection::NonConcurrentMapBackend - def []=(key, value); end - def clear; end - def compute(key); end - def compute_if_absent(key); end - def compute_if_present(key); end - def delete(key); end - def delete_pair(key, value); end - def get_and_set(key, value); end - def initialize(options = nil, &default_proc); end - def merge_pair(key, value); end - def replace_if_exists(key, new_value); end - def replace_pair(key, old_value, new_value); end -end -class Concurrent::Map < Concurrent::Collection::MriMapBackend - def each; end - def each_key; end - def each_pair; end - def each_value; end - def empty?; end - def fetch(key, default_value = nil); end - def fetch_or_store(key, default_value = nil); end - def get(key); end - def initialize_copy(other); end - def inspect; end - def key(value); end - def keys; end - def marshal_dump; end - def marshal_load(hash); end - def populate_from(hash); end - def put(key, value); end - def put_if_absent(key, value); end - def raise_fetch_no_key; end - def validate_options_hash!(options); end - def value?(value); end - def values; end -end -module Concurrent::ThreadSafe -end -module Concurrent::ThreadSafe::Util - def self.make_synchronized_on_cruby(klass); end - def self.make_synchronized_on_truffleruby(klass); end -end -class Concurrent::Hash < Hash -end -class Concurrent::Error < StandardError -end -class Concurrent::ConfigurationError < Concurrent::Error -end -class Concurrent::CancelledOperationError < Concurrent::Error -end -class Concurrent::LifecycleError < Concurrent::Error -end -class Concurrent::ImmutabilityError < Concurrent::Error -end -class Concurrent::IllegalOperationError < Concurrent::Error -end -class Concurrent::InitializationError < Concurrent::Error -end -class Concurrent::MaxRestartFrequencyError < Concurrent::Error -end -class Concurrent::MultipleAssignmentError < Concurrent::Error - def initialize(message = nil, inspection_data = nil); end - def inspect; end - def inspection_data; end -end -class Concurrent::RejectedExecutionError < Concurrent::Error -end -class Concurrent::ResourceLimitError < Concurrent::Error -end -class Concurrent::TimeoutError < Concurrent::Error -end -class Concurrent::MultipleErrors < Concurrent::Error - def errors; end - def initialize(errors, message = nil); end -end -class Concurrent::ConcurrentUpdateError < ThreadError -end -module Concurrent::Synchronization - def self.full_memory_barrier; end -end -class Concurrent::Synchronization::AbstractObject - def full_memory_barrier; end - def initialize; end - def self.attr_volatile(*names); end -end -module Concurrent::Utility::NativeExtensionLoader - def allow_c_extensions?; end - def c_extensions_loaded?; end - def java_extensions_loaded?; end - def load_error_path(error); end - def load_native_extensions; end - def set_c_extensions_loaded; end - def set_java_extensions_loaded; end - def try_load_c_extension(path); end -end -module Concurrent::Synchronization::SafeInitialization - def new(*args, &block); end -end -module Concurrent::Synchronization::Volatile - def full_memory_barrier; end - def self.included(base); end -end -module Concurrent::Synchronization::Volatile::ClassMethods - def attr_volatile(*names); end -end -module Concurrent::AtomicDirectUpdate - def try_update!; end - def try_update; end - def update; end -end -module Concurrent::AtomicNumericCompareAndSetWrapper - def compare_and_set(old_value, new_value); end -end -class Concurrent::MutexAtomicReference - def _compare_and_set(old_value, new_value); end - def compare_and_swap(old_value, new_value); end - def get; end - def get_and_set(new_value); end - def initialize(value = nil); end - def set(new_value); end - def swap(new_value); end - def synchronize; end - def value; end - def value=(new_value); end - extend Concurrent::Synchronization::SafeInitialization - include Concurrent::AtomicDirectUpdate - include Concurrent::AtomicNumericCompareAndSetWrapper -end -class Concurrent::AtomicReference < Concurrent::MutexAtomicReference - def inspect; end - def to_s; end -end -class Concurrent::Synchronization::Object < Concurrent::Synchronization::AbstractObject - def __initialize_atomic_fields__; end - def initialize; end - def self.atomic_attribute?(name); end - def self.atomic_attributes(inherited = nil); end - def self.attr_atomic(*names); end - def self.define_initialize_atomic_fields; end - def self.ensure_safe_initialization_when_final_fields_are_present; end - def self.safe_initialization!; end - def self.safe_initialization?; end - extend Concurrent::Synchronization::Volatile::ClassMethods - include Concurrent::Synchronization::Volatile -end -class Concurrent::Synchronization::AbstractLockableObject < Concurrent::Synchronization::Object - def ns_broadcast; end - def ns_signal; end - def ns_wait(timeout = nil); end - def ns_wait_until(timeout = nil, &condition); end - def synchronize; end -end -module Concurrent::Synchronization::ConditionSignalling - def ns_broadcast; end - def ns_signal; end -end -class Concurrent::Synchronization::MutexLockableObject < Concurrent::Synchronization::AbstractLockableObject - def initialize; end - def initialize_copy(other); end - def ns_wait(timeout = nil); end - def synchronize; end - extend Concurrent::Synchronization::SafeInitialization - include Concurrent::Synchronization::ConditionSignalling -end -class Concurrent::Synchronization::MonitorLockableObject < Concurrent::Synchronization::AbstractLockableObject - def initialize; end - def initialize_copy(other); end - def ns_wait(timeout = nil); end - def synchronize; end - extend Concurrent::Synchronization::SafeInitialization - include Concurrent::Synchronization::ConditionSignalling -end -class Concurrent::Synchronization::LockableObject < Concurrent::Synchronization::MutexLockableObject - def new_condition; end -end -class Concurrent::Event < Concurrent::Synchronization::LockableObject - def initialize; end - def ns_initialize; end - def ns_set; end - def reset; end - def set; end - def set?; end - def try?; end - def wait(timeout = nil); end -end -module Concurrent::Concern -end -module Concurrent::Concern::Dereferenceable - def apply_deref_options(value); end - def deref; end - def ns_set_deref_options(opts); end - def set_deref_options(opts = nil); end - def value; end - def value=(value); end -end -module Concurrent::Concern::Obligation - def compare_and_set_state(next_state, *expected_current); end - def complete?; end - def event; end - def exception(*args); end - def fulfilled?; end - def get_arguments_from(opts = nil); end - def if_state(*expected_states); end - def incomplete?; end - def init_obligation; end - def no_error!(timeout = nil); end - def ns_check_state?(expected); end - def ns_set_state(value); end - def pending?; end - def realized?; end - def reason; end - def rejected?; end - def set_state(success, value, reason); end - def state; end - def state=(value); end - def unscheduled?; end - def value!(timeout = nil); end - def value(timeout = nil); end - def wait!(timeout = nil); end - def wait(timeout = nil); end - include Concurrent::Concern::Dereferenceable -end -module Concurrent::Concern::Logging - def log(level, progname, message = nil, &block); end - include Logger::Severity -end -module Concurrent::Concern::Deprecation - def deprecated(message, strip = nil); end - def deprecated_method(old_name, new_name); end - extend Concurrent::Concern::Deprecation - include Concurrent::Concern::Logging -end -module Concurrent::ExecutorService - def <<(task); end - def can_overflow?; end - def post(*args, &task); end - def serialized?; end - include Concurrent::Concern::Logging -end -class Concurrent::AbstractExecutorService < Concurrent::Synchronization::LockableObject - def auto_terminate=(value); end - def auto_terminate?; end - def fallback_action(*args); end - def fallback_policy; end - def initialize(opts = nil, &block); end - def kill; end - def name; end - def ns_auto_terminate?; end - def ns_execute(*args, &task); end - def ns_kill_execution; end - def ns_shutdown_execution; end - def running?; end - def shutdown; end - def shutdown?; end - def shuttingdown?; end - def to_s; end - def wait_for_termination(timeout = nil); end - include Concurrent::Concern::Deprecation - include Concurrent::ExecutorService -end -module Concurrent::SerialExecutorService - def serialized?; end - include Concurrent::ExecutorService -end -class Concurrent::ImmediateExecutor < Concurrent::AbstractExecutorService - def <<(task); end - def initialize; end - def kill; end - def post(*args, &task); end - def running?; end - def shutdown; end - def shutdown?; end - def shuttingdown?; end - def wait_for_termination(timeout = nil); end - include Concurrent::SerialExecutorService -end -class Concurrent::Delay < Concurrent::Synchronization::LockableObject - def execute_task_once; end - def initialize(opts = nil, &block); end - def ns_initialize(opts, &block); end - def reconfigure(&block); end - def value!(timeout = nil); end - def value(timeout = nil); end - def wait(timeout = nil); end - include Concurrent::Concern::Obligation -end -class Concurrent::RubyExecutorService < Concurrent::AbstractExecutorService - def initialize(*args, &block); end - def kill; end - def ns_running?; end - def ns_shutdown?; end - def ns_shutdown_execution; end - def ns_shuttingdown?; end - def post(*args, &task); end - def shutdown; end - def stop_event; end - def stopped_event; end - def wait_for_termination(timeout = nil); end -end -class Concurrent::RubyThreadPoolExecutor < Concurrent::RubyExecutorService - def active_count; end - def can_overflow?; end - def completed_task_count; end - def idletime; end - def initialize(opts = nil); end - def largest_length; end - def length; end - def max_length; end - def max_queue; end - def min_length; end - def ns_add_busy_worker; end - def ns_assign_worker(*args, &task); end - def ns_enqueue(*args, &task); end - def ns_execute(*args, &task); end - def ns_initialize(opts); end - def ns_kill_execution; end - def ns_limited_queue?; end - def ns_prune_pool; end - def ns_ready_worker(worker, last_message, success = nil); end - def ns_remove_busy_worker(worker); end - def ns_reset_if_forked; end - def ns_shutdown_execution; end - def ns_worker_died(worker); end - def prune_pool; end - def queue_length; end - def ready_worker(worker, last_message); end - def remaining_capacity; end - def remove_busy_worker(worker); end - def scheduled_task_count; end - def synchronous; end - def worker_died(worker); end - def worker_task_completed; end -end -class Concurrent::RubyThreadPoolExecutor::Worker - def <<(message); end - def create_worker(queue, pool, idletime); end - def initialize(pool, id); end - def kill; end - def run_task(pool, task, args); end - def stop; end - include Concurrent::Concern::Logging -end -class Concurrent::ThreadPoolExecutor < Concurrent::RubyThreadPoolExecutor -end -class Concurrent::FixedThreadPool < Concurrent::ThreadPoolExecutor - def initialize(num_threads, opts = nil); end -end -class Concurrent::CachedThreadPool < Concurrent::ThreadPoolExecutor - def initialize(opts = nil); end - def ns_initialize(opts); end -end -class Concurrent::Utility::ProcessorCounter - def available_processor_count; end - def compute_cpu_quota; end - def compute_cpu_shares; end - def compute_physical_processor_count; end - def compute_processor_count; end - def cpu_quota; end - def cpu_shares; end - def initialize; end - def physical_processor_count; end - def processor_count; end - def run(command); end -end -class Concurrent::MutexAtomicBoolean - def false?; end - def initialize(initial = nil); end - def make_false; end - def make_true; end - def ns_make_value(value); end - def synchronize; end - def true?; end - def value; end - def value=(value); end - extend Concurrent::Synchronization::SafeInitialization -end -class Concurrent::AtomicBoolean < Concurrent::MutexAtomicBoolean - def inspect; end - def to_s; end -end -module Concurrent::Utility::NativeInteger - def ensure_integer(value); end - def ensure_integer_and_bounds(value); end - def ensure_lower_bound(value); end - def ensure_positive(value); end - def ensure_positive_and_no_zero(value); end - def ensure_upper_bound(value); end - extend Concurrent::Utility::NativeInteger -end -class Concurrent::MutexAtomicFixnum - def compare_and_set(expect, update); end - def decrement(delta = nil); end - def down(delta = nil); end - def increment(delta = nil); end - def initialize(initial = nil); end - def ns_set(value); end - def synchronize; end - def up(delta = nil); end - def update; end - def value; end - def value=(value); end - extend Concurrent::Synchronization::SafeInitialization -end -class Concurrent::AtomicFixnum < Concurrent::MutexAtomicFixnum - def inspect; end - def to_s; end -end -class Concurrent::CyclicBarrier < Concurrent::Synchronization::LockableObject - def broken?; end - def initialize(parties, &block); end - def ns_generation_done(generation, status, continue = nil); end - def ns_initialize(parties, &block); end - def ns_next_generation; end - def number_waiting; end - def parties; end - def reset; end - def wait(timeout = nil); end -end -class Concurrent::CyclicBarrier::Generation < Struct - def self.[](*arg0); end - def self.inspect; end - def self.keyword_init?; end - def self.members; end - def self.new(*arg0); end - def status; end - def status=(_); end -end -class Concurrent::MutexCountDownLatch < Concurrent::Synchronization::LockableObject - def count; end - def count_down; end - def initialize(count = nil); end - def ns_initialize(count); end - def wait(timeout = nil); end -end -class Concurrent::CountDownLatch < Concurrent::MutexCountDownLatch -end -class Concurrent::Synchronization::Lock < Concurrent::Synchronization::LockableObject - def broadcast; end - def ns_broadcast; end - def ns_signal; end - def ns_wait(timeout = nil); end - def ns_wait_until(timeout = nil, &condition); end - def signal; end - def synchronize; end - def wait(timeout = nil); end - def wait_until(timeout = nil, &condition); end -end -class Concurrent::ReadWriteLock < Concurrent::Synchronization::Object - def acquire_read_lock; end - def acquire_write_lock; end - def has_waiters?; end - def initialize; end - def max_readers?(c = nil); end - def max_writers?(c = nil); end - def release_read_lock; end - def release_write_lock; end - def running_readers(c = nil); end - def running_readers?(c = nil); end - def running_writer?(c = nil); end - def waiting_writer?(c = nil); end - def waiting_writers(c = nil); end - def with_read_lock; end - def with_write_lock; end - def write_locked?; end - extend Concurrent::Synchronization::SafeInitialization -end -class Concurrent::AbstractLocals - def fetch(index); end - def free_index(index); end - def initialize; end - def local_finalizer(index); end - def locals!; end - def locals; end - def next_index(local); end - def set(index, value); end - def synchronize; end - def thread_fiber_finalizer(array_object_id); end - def weak_synchronize; end -end -class Concurrent::ThreadLocals < Concurrent::AbstractLocals - def locals!; end - def locals; end -end -class Concurrent::FiberLocals < Concurrent::AbstractLocals - def locals!; end - def locals; end -end -class Concurrent::FiberLocalVar - def bind(value); end - def default; end - def initialize(default = nil, &default_block); end - def value; end - def value=(value); end -end -class Concurrent::ThreadLocalVar - def bind(value); end - def default; end - def initialize(default = nil, &default_block); end - def value; end - def value=(value); end -end -class Concurrent::ReentrantReadWriteLock < Concurrent::Synchronization::Object - def acquire_read_lock; end - def acquire_write_lock; end - def initialize; end - def max_readers?(c = nil); end - def max_writers?(c = nil); end - def release_read_lock; end - def release_write_lock; end - def running_readers(c = nil); end - def running_readers?(c = nil); end - def running_writer?(c = nil); end - def try_read_lock; end - def try_write_lock; end - def waiting_or_running_writer?(c = nil); end - def waiting_writers(c = nil); end - def with_read_lock; end - def with_write_lock; end - extend Concurrent::Synchronization::SafeInitialization -end -class Concurrent::MutexSemaphore < Concurrent::Synchronization::LockableObject - def acquire(permits = nil); end - def available_permits; end - def drain_permits; end - def initialize(count); end - def ns_initialize(count); end - def reduce_permits(reduction); end - def release(permits = nil); end - def try_acquire(permits = nil, timeout = nil); end - def try_acquire_now(permits); end - def try_acquire_timed(permits, timeout); end -end -class Concurrent::Semaphore < Concurrent::MutexSemaphore -end -class Concurrent::SimpleExecutorService < Concurrent::RubyExecutorService - def <<(task); end - def kill; end - def ns_initialize(*args); end - def post(*args, &task); end - def running?; end - def self.<<(task); end - def self.post(*args); end - def shutdown; end - def shutdown?; end - def shuttingdown?; end - def wait_for_termination(timeout = nil); end -end -class Concurrent::IndirectImmediateExecutor < Concurrent::ImmediateExecutor - def initialize; end - def post(*args, &task); end -end -class Concurrent::RubySingleThreadExecutor < Concurrent::RubyThreadPoolExecutor - def initialize(opts = nil); end -end -class Concurrent::SafeTaskExecutor < Concurrent::Synchronization::LockableObject - def execute(*args); end - def initialize(task, opts = nil); end -end -class Concurrent::SerializedExecution < Concurrent::Synchronization::LockableObject - def call_job(job); end - def initialize; end - def ns_initialize; end - def post(executor, *args, &task); end - def posts(posts); end - def work(job); end - include Concurrent::Concern::Logging -end -class Concurrent::SerializedExecution::Job < Struct - def args; end - def args=(_); end - def block; end - def block=(_); end - def call; end - def executor; end - def executor=(_); end - def self.[](*arg0); end - def self.inspect; end - def self.keyword_init?; end - def self.members; end - def self.new(*arg0); end -end -class Concurrent::SerializedExecutionDelegator < SimpleDelegator - def initialize(executor); end - def post(*args, &task); end - include Concurrent::SerialExecutorService -end -class Concurrent::SingleThreadExecutor < Concurrent::RubySingleThreadExecutor -end -class Concurrent::Collection::CopyOnWriteObserverSet < Concurrent::Synchronization::LockableObject - def add_observer(observer = nil, func = nil, &block); end - def clear_observers_and_return_old; end - def count_observers; end - def delete_observer(observer); end - def delete_observers; end - def initialize; end - def notify_and_delete_observers(*args, &block); end - def notify_observers(*args, &block); end - def notify_to(observers, *args); end - def ns_initialize; end - def observers; end - def observers=(new_set); end -end -class Concurrent::Collection::CopyOnNotifyObserverSet < Concurrent::Synchronization::LockableObject - def add_observer(observer = nil, func = nil, &block); end - def count_observers; end - def delete_observer(observer); end - def delete_observers; end - def duplicate_and_clear_observers; end - def duplicate_observers; end - def initialize; end - def notify_and_delete_observers(*args, &block); end - def notify_observers(*args, &block); end - def notify_to(observers, *args); end - def ns_initialize; end -end -module Concurrent::Concern::Observable - def add_observer(observer = nil, func = nil, &block); end - def count_observers; end - def delete_observer(observer); end - def delete_observers; end - def observers; end - def observers=(arg0); end - def with_observer(observer = nil, func = nil, &block); end -end -class Concurrent::IVar < Concurrent::Synchronization::LockableObject - def add_observer(observer = nil, func = nil, &block); end - def check_for_block_or_value!(block_given, value); end - def complete(success, value, reason); end - def complete_without_notification(success, value, reason); end - def fail(reason = nil); end - def initialize(value = nil, opts = nil, &block); end - def notify_observers(value, reason); end - def ns_complete_without_notification(success, value, reason); end - def ns_initialize(value, opts); end - def safe_execute(task, args = nil); end - def set(value = nil); end - def try_set(value = nil, &block); end - include Concurrent::Concern::Obligation - include Concurrent::Concern::Observable -end -module Concurrent::Options - def self.executor(executor_identifier); end - def self.executor_from_options(opts = nil); end -end -class Concurrent::ScheduledTask < Concurrent::IVar - def <=>(other); end - def cancel; end - def cancelled?; end - def execute; end - def executor; end - def fail(reason = nil); end - def initial_delay; end - def initialize(delay, opts = nil, &task); end - def ns_reschedule(delay); end - def ns_schedule(delay); end - def process_task; end - def processing?; end - def reschedule(delay); end - def reset; end - def schedule_time; end - def self.execute(delay, opts = nil, &task); end - def set(value = nil); end - def try_set(value = nil, &block); end - include Comparable -end -class Concurrent::Collection::RubyNonConcurrentPriorityQueue - def <<(item); end - def clear; end - def delete(item); end - def deq; end - def empty?; end - def enq(item); end - def has_priority?(item); end - def include?(item); end - def initialize(opts = nil); end - def length; end - def ordered?(x, y); end - def peek; end - def pop; end - def push(item); end - def self.from_list(list, opts = nil); end - def shift; end - def sink(k); end - def size; end - def swap(x, y); end - def swim(k); end -end -class Concurrent::Collection::NonConcurrentPriorityQueue < Concurrent::Collection::RubyNonConcurrentPriorityQueue - def <<(item); end - def deq; end - def enq(item); end - def has_priority?(item); end - def shift; end - def size; end -end -class Concurrent::TimerSet < Concurrent::RubyExecutorService - def <<(task); end - def initialize(opts = nil); end - def kill; end - def ns_initialize(opts); end - def ns_post_task(task); end - def ns_reset_if_forked; end - def ns_shutdown_execution; end - def post(delay, *args, &task); end - def post_task(task); end - def process_tasks; end - def remove_task(task); end -end -class Concurrent::Synchronization::Condition < Concurrent::Synchronization::LockableObject - def broadcast; end - def initialize(lock); end - def ns_broadcast; end - def ns_signal; end - def ns_wait(timeout = nil); end - def ns_wait_until(timeout = nil, &condition); end - def self.new(*args, &block); end - def self.private_new(*args, &block); end - def signal; end - def wait(timeout = nil); end - def wait_until(timeout = nil, &condition); end -end -class Concurrent::AtomicMarkableReference < Concurrent::Synchronization::Object - def __initialize_atomic_fields__; end - def compare_and_set(expected_val, new_val, expected_mark, new_mark); end - def compare_and_set_reference(expected, value); end - def compare_and_swap(expected_val, new_val, expected_mark, new_mark); end - def get; end - def immutable_array(*args); end - def initialize(value = nil, mark = nil); end - def mark; end - def marked?; end - def reference; end - def reference=(value); end - def set(new_val, new_mark); end - def swap_reference(value); end - def try_update!; end - def try_update; end - def update; end - def update_reference(&block); end - def value; end - extend Concurrent::Synchronization::SafeInitialization -end -class Concurrent::Agent < Concurrent::Synchronization::LockableObject - def <<(action); end - def await; end - def await_for!(timeout); end - def await_for(timeout); end - def deref; end - def enqueue_action_job(action, args, executor); end - def enqueue_await_job(latch); end - def error; end - def error_mode; end - def execute_next_job; end - def failed?; end - def handle_error(error); end - def initialize(initial, opts = nil); end - def ns_enqueue_job(job, index = nil); end - def ns_find_last_job_for_thread; end - def ns_initialize(initial, opts); end - def ns_post_next_job; end - def ns_validate(value); end - def post(*args, &action); end - def reason; end - def restart(new_value, opts = nil); end - def self.await(*agents); end - def self.await_for!(timeout, *agents); end - def self.await_for(timeout, *agents); end - def send!(*args, &action); end - def send(*args, &action); end - def send_off!(*args, &action); end - def send_off(*args, &action); end - def send_via!(executor, *args, &action); end - def send_via(executor, *args, &action); end - def stopped?; end - def value; end - def wait(timeout = nil); end - include Concurrent::Concern::Observable -end -class Concurrent::Agent::Job < Struct - def action; end - def action=(_); end - def args; end - def args=(_); end - def caller; end - def caller=(_); end - def executor; end - def executor=(_); end - def self.[](*arg0); end - def self.inspect; end - def self.keyword_init?; end - def self.members; end - def self.new(*arg0); end -end -class Concurrent::Agent::Error < StandardError - def initialize(message = nil); end -end -class Concurrent::Agent::ValidationError < Concurrent::Agent::Error - def initialize(message = nil); end -end -class Concurrent::Atom < Concurrent::Synchronization::Object - def __initialize_atomic_fields__; end - def compare_and_set(old_value, new_value); end - def compare_and_set_value(expected, value); end - def deref; end - def initialize(value, opts = nil); end - def reset(new_value); end - def swap(*args); end - def swap_value(value); end - def update_value(&block); end - def valid?(new_value); end - def value; end - def value=(value); end - extend Concurrent::Synchronization::SafeInitialization - include Concurrent::Concern::Observable -end -class Concurrent::Array < Array -end -class Concurrent::CRubySet < Set - def &(*args); end - def +(*args); end - def -(*args); end - def <(*args); end - def <<(*args); end - def <=(*args); end - def <=>(*args); end - def ==(*args); end - def ===(*args); end - def >(*args); end - def >=(*args); end - def ^(*args); end - def add(*args); end - def add?(*args); end - def classify(*args); end - def clear(*args); end - def collect!(*args); end - def compare_by_identity(*args); end - def compare_by_identity?(*args); end - def delete(*args); end - def delete?(*args); end - def delete_if(*args); end - def difference(*args); end - def disjoint?(*args); end - def divide(*args); end - def each(*args); end - def empty?(*args); end - def eql?(*args); end - def filter!(*args); end - def flatten!(*args); end - def flatten(*args); end - def flatten_merge(*args); end - def freeze(*args); end - def hash(*args); end - def include?(*args); end - def initialize(*args, &block); end - def initialize_copy(other); end - def inspect(*args); end - def intersect?(*args); end - def intersection(*args); end - def join(*args); end - def keep_if(*args); end - def length(*args); end - def map!(*args); end - def member?(*args); end - def merge(*args); end - def pretty_print(*args); end - def pretty_print_cycle(*args); end - def proper_subset?(*args); end - def proper_superset?(*args); end - def reject!(*args); end - def replace(*args); end - def reset(*args); end - def select!(*args); end - def size(*args); end - def subset?(*args); end - def subtract(*args); end - def superset?(*args); end - def to_a(*args); end - def to_s(*args); end - def to_set(*args); end - def union(*args); end - def |(*args); end -end -class Concurrent::Set < Concurrent::CRubySet -end -class Concurrent::Tuple - def cas(i, old_value, new_value); end - def compare_and_set(i, old_value, new_value); end - def each; end - def get(i); end - def initialize(size); end - def set(i, value); end - def size; end - def volatile_get(i); end - def volatile_set(i, value); end - include Enumerable -end -module Concurrent::Async - def async; end - def await; end - def call; end - def cast; end - def init_synchronization; end - def self.included(base); end - def self.validate_argc(obj, method, *args); end -end -module Concurrent::Async::ClassMethods - def new(*args, **, &block); end -end -class Concurrent::Async::AsyncDelegator < Concurrent::Synchronization::LockableObject - def initialize(delegate); end - def method_missing(method, *args, &block); end - def perform; end - def reset_if_forked; end - def respond_to_missing?(method, include_private = nil); end -end -class Concurrent::Async::AwaitDelegator - def initialize(delegate); end - def method_missing(method, *args, &block); end - def respond_to_missing?(method, include_private = nil); end -end -class Concurrent::Future < Concurrent::IVar - def cancel; end - def cancelled?; end - def execute; end - def initialize(opts = nil, &block); end - def ns_initialize(value, opts); end - def self.execute(opts = nil, &block); end - def set(value = nil, &block); end - def wait_or_cancel(timeout); end -end -class Concurrent::DependencyCounter - def initialize(count, &block); end - def update(time, value, reason); end -end -class Concurrent::Maybe < Concurrent::Synchronization::Object - def <=>(other); end - def fulfilled?; end - def initialize(just, nothing); end - def just; end - def just?; end - def nothing; end - def nothing?; end - def or(other); end - def reason; end - def rejected?; end - def self.from(*args); end - def self.just(value); end - def self.new(*args, &block); end - def self.nothing(error = nil); end - def value; end - extend Concurrent::Synchronization::SafeInitialization - include Comparable -end -class Concurrent::AbstractExchanger < Concurrent::Synchronization::Object - def do_exchange(value, timeout); end - def exchange!(value, timeout = nil); end - def exchange(value, timeout = nil); end - def initialize; end - def try_exchange(value, timeout = nil); end -end -class Concurrent::RubyExchanger < Concurrent::AbstractExchanger - def __initialize_atomic_fields__; end - def compare_and_set_slot(expected, value); end - def do_exchange(value, timeout); end - def initialize; end - def slot; end - def slot=(value); end - def swap_slot(value); end - def update_slot(&block); end - extend Concurrent::Synchronization::SafeInitialization -end -class Concurrent::RubyExchanger::Node < Concurrent::Synchronization::Object - def __initialize_atomic_fields__; end - def compare_and_set_value(expected, value); end - def initialize(item); end - def item; end - def latch; end - def swap_value(value); end - def update_value(&block); end - def value; end - def value=(value); end - extend Concurrent::Synchronization::SafeInitialization -end -class Concurrent::Exchanger < Concurrent::RubyExchanger -end -module Concurrent::Synchronization::AbstractStruct - def initialize(*values); end - def length; end - def members; end - def ns_each; end - def ns_each_pair; end - def ns_equality(other); end - def ns_get(member); end - def ns_initialize_copy; end - def ns_inspect; end - def ns_merge(other, &block); end - def ns_select; end - def ns_to_h; end - def ns_values; end - def ns_values_at(indexes); end - def pr_underscore(clazz); end - def self.define_struct_class(parent, base, name, members, &block); end - def size; end -end -module Concurrent::ImmutableStruct - def ==(other); end - def [](member); end - def each(&block); end - def each_pair(&block); end - def initialize_copy(original); end - def inspect; end - def merge(other, &block); end - def select(&block); end - def self.included(base); end - def self.new(*args, &block); end - def to_a; end - def to_h; end - def to_s; end - def values; end - def values_at(*indexes); end - include Concurrent::Synchronization::AbstractStruct -end -module Concurrent::MutableStruct - def ==(other); end - def [](member); end - def []=(member, value); end - def each(&block); end - def each_pair(&block); end - def initialize_copy(original); end - def inspect; end - def merge(other, &block); end - def select(&block); end - def self.new(*args, &block); end - def to_a; end - def to_h; end - def to_s; end - def values; end - def values_at(*indexes); end - include Concurrent::Synchronization::AbstractStruct -end -class Concurrent::MVar < Concurrent::Synchronization::Object - def borrow(timeout = nil); end - def empty?; end - def full?; end - def initialize(value = nil, opts = nil); end - def modify!; end - def modify(timeout = nil); end - def put(value, timeout = nil); end - def set!(value); end - def synchronize(&block); end - def take(timeout = nil); end - def try_put!(value); end - def try_take!; end - def unlocked_empty?; end - def unlocked_full?; end - def wait_for_empty(timeout); end - def wait_for_full(timeout); end - def wait_while(condition, timeout); end - extend Concurrent::Synchronization::SafeInitialization - include Concurrent::Concern::Dereferenceable -end -class Concurrent::PromiseExecutionError < StandardError -end -class Concurrent::Promise < Concurrent::IVar - def catch(&block); end - def complete(success, value, reason); end - def execute; end - def fail(reason = nil); end - def flat_map(&block); end - def initialize(opts = nil, &block); end - def notify_child(child); end - def ns_initialize(value, opts); end - def on_error(&block); end - def on_fulfill(result); end - def on_reject(reason); end - def on_success(&block); end - def realize(task); end - def rescue(&block); end - def root?; end - def self.aggregate(method, *promises); end - def self.all?(*promises); end - def self.any?(*promises); end - def self.execute(opts = nil, &block); end - def self.fulfill(value, opts = nil); end - def self.reject(reason, opts = nil); end - def self.zip(*promises); end - def set(value = nil, &block); end - def set_pending; end - def set_state!(success, value, reason); end - def synchronized_set_state!(success, value, reason); end - def then(*args, &block); end - def zip(*others); end -end -module Concurrent::SettableStruct - def ==(other); end - def [](member); end - def []=(member, value); end - def each(&block); end - def each_pair(&block); end - def initialize_copy(original); end - def inspect; end - def merge(other, &block); end - def select(&block); end - def self.new(*args, &block); end - def to_a; end - def to_h; end - def to_s; end - def values; end - def values_at(*indexes); end - include Concurrent::Synchronization::AbstractStruct -end -class Concurrent::TimerTask < Concurrent::RubyExecutorService - def <<(task); end - def calculate_next_interval(start_time); end - def execute; end - def execute_task(completion); end - def execution_interval; end - def execution_interval=(value); end - def initialize(opts = nil, &task); end - def interval_type; end - def ns_initialize(opts, &task); end - def ns_kill_execution; end - def ns_shutdown_execution; end - def post(*args, &task); end - def running?; end - def schedule_next_task(interval = nil); end - def self.execute(opts = nil, &task); end - def timeout_interval; end - def timeout_interval=(value); end - include Concurrent::Concern::Dereferenceable - include Concurrent::Concern::Observable -end -class Concurrent::TVar < Concurrent::Synchronization::Object - def initialize(value); end - def unsafe_lock; end - def unsafe_value; end - def unsafe_value=(value); end - def value; end - def value=(value); end - extend Concurrent::Synchronization::SafeInitialization -end -class Concurrent::Transaction - def abort; end - def commit; end - def initialize; end - def open(tvar); end - def read(tvar); end - def self.current; end - def self.current=(transaction); end - def unlock; end - def write(tvar, value); end -end -class Concurrent::Transaction::OpenEntry < Struct - def modified; end - def modified=(_); end - def self.[](*arg0); end - def self.inspect; end - def self.keyword_init?; end - def self.members; end - def self.new(*arg0); end - def value; end - def value=(_); end -end -class Concurrent::Transaction::AbortError < StandardError -end -class Concurrent::Transaction::LeaveError < StandardError -end -class Concurrent::LockFreeStack < Concurrent::Synchronization::Object - def __initialize_atomic_fields__; end - def clear; end - def clear_each(&block); end - def clear_if(head); end - def compare_and_clear(head); end - def compare_and_pop(head); end - def compare_and_push(head, value); end - def compare_and_set_head(expected, value); end - def each(head = nil); end - def empty?(head = nil); end - def head; end - def head=(value); end - def initialize(head = nil); end - def inspect; end - def peek; end - def pop; end - def push(value); end - def replace_if(head, new_head); end - def self.of1(value); end - def self.of2(value1, value2); end - def swap_head(value); end - def to_s; end - def update_head(&block); end - extend Concurrent::Synchronization::SafeInitialization - include Enumerable -end -class Concurrent::LockFreeStack::Node - def initialize(value, next_node); end - def next_node; end - def self.[](*, **); end - def value; end - def value=(arg0); end -end -module Concurrent::ReInclude - def extended(base); end - def include(*modules); end - def included(base); end -end -module Concurrent::Promises - extend Concurrent::Promises::FactoryMethods -end -module Concurrent::Promises::FactoryMethods - def any(*futures_and_or_events); end - def any_event(*futures_and_or_events); end - def any_event_on(default_executor, *futures_and_or_events); end - def any_fulfilled_future(*futures_and_or_events); end - def any_fulfilled_future_on(default_executor, *futures_and_or_events); end - def any_resolved_future(*futures_and_or_events); end - def any_resolved_future_on(default_executor, *futures_and_or_events); end - def delay(*args, &task); end - def delay_on(default_executor, *args, &task); end - def fulfilled_future(value, default_executor = nil); end - def future(*args, &task); end - def future_on(default_executor, *args, &task); end - def make_future(argument = nil, default_executor = nil); end - def rejected_future(reason, default_executor = nil); end - def resolvable_event; end - def resolvable_event_on(default_executor = nil); end - def resolvable_future; end - def resolvable_future_on(default_executor = nil); end - def resolved_event(default_executor = nil); end - def resolved_future(fulfilled, value, reason, default_executor = nil); end - def schedule(intended_time, *args, &task); end - def schedule_on(default_executor, intended_time, *args, &task); end - def zip(*futures_and_or_events); end - def zip_events(*futures_and_or_events); end - def zip_events_on(default_executor, *futures_and_or_events); end - def zip_futures(*futures_and_or_events); end - def zip_futures_on(default_executor, *futures_and_or_events); end - extend Concurrent::Promises::FactoryMethods - extend Concurrent::Promises::FactoryMethods::Configuration - extend Concurrent::ReInclude - include Concurrent::Promises::FactoryMethods::Configuration -end -module Concurrent::Promises::FactoryMethods::Configuration - def default_executor; end -end -module Concurrent::Promises::InternalStates -end -class Concurrent::Promises::InternalStates::State - def resolved?; end - def to_sym; end -end -class Concurrent::Promises::InternalStates::Pending < Concurrent::Promises::InternalStates::State - def resolved?; end - def to_sym; end -end -class Concurrent::Promises::InternalStates::Reserved < Concurrent::Promises::InternalStates::Pending -end -class Concurrent::Promises::InternalStates::ResolvedWithResult < Concurrent::Promises::InternalStates::State - def apply; end - def fulfilled?; end - def reason; end - def resolved?; end - def result; end - def to_sym; end - def value; end -end -class Concurrent::Promises::InternalStates::Fulfilled < Concurrent::Promises::InternalStates::ResolvedWithResult - def apply(args, block); end - def fulfilled?; end - def initialize(value); end - def reason; end - def to_sym; end - def value; end -end -class Concurrent::Promises::InternalStates::FulfilledArray < Concurrent::Promises::InternalStates::Fulfilled - def apply(args, block); end -end -class Concurrent::Promises::InternalStates::Rejected < Concurrent::Promises::InternalStates::ResolvedWithResult - def apply(args, block); end - def fulfilled?; end - def initialize(reason); end - def reason; end - def to_sym; end - def value; end -end -class Concurrent::Promises::InternalStates::PartiallyRejected < Concurrent::Promises::InternalStates::ResolvedWithResult - def apply(args, block); end - def fulfilled?; end - def initialize(value, reason); end - def reason; end - def to_sym; end - def value; end -end -class Concurrent::Promises::AbstractEventFuture < Concurrent::Synchronization::Object - def __initialize_atomic_fields__; end - def add_callback(method, *args); end - def add_callback_clear_delayed_node(node); end - def add_callback_notify_blocked(promise, index); end - def async_callback_on_resolution(state, executor, args, callback); end - def blocks; end - def call_callback(method, state, args); end - def call_callbacks(state); end - def callback_clear_delayed_node(state, node); end - def callback_notify_blocked(state, promise, index); end - def callbacks; end - def chain(*args, &task); end - def chain_on(executor, *args, &task); end - def chain_resolvable(resolvable); end - def compare_and_set_internal_state(expected, value); end - def default_executor; end - def initialize(promise, default_executor); end - def inspect; end - def internal_state; end - def internal_state=(value); end - def on_resolution!(*args, &callback); end - def on_resolution(*args, &callback); end - def on_resolution_using(executor, *args, &callback); end - def pending?; end - def promise; end - def resolve_with(state, raise_on_reassign = nil, reserved = nil); end - def resolved?; end - def state; end - def swap_internal_state(value); end - def tangle(resolvable); end - def to_s; end - def touch; end - def touched?; end - def update_internal_state(&block); end - def wait(timeout = nil); end - def wait_until_resolved(timeout); end - def waiting_threads; end - def with_async(executor, *args, &block); end - def with_default_executor(executor); end - def with_hidden_resolvable; end - extend Concurrent::Synchronization::SafeInitialization - include Concurrent::Promises::InternalStates -end -class Concurrent::Promises::Event < Concurrent::Promises::AbstractEventFuture - def &(other); end - def any(event_or_future); end - def callback_on_resolution(state, args, callback); end - def delay; end - def rejected_resolution(raise_on_reassign, state); end - def schedule(intended_time); end - def then(*args, &task); end - def to_event; end - def to_future; end - def with_default_executor(executor); end - def zip(other); end - def |(event_or_future); end -end -class Concurrent::Promises::Future < Concurrent::Promises::AbstractEventFuture - def &(other); end - def any(event_or_future); end - def apply(args, block); end - def async_callback_on_fulfillment(state, executor, args, callback); end - def async_callback_on_rejection(state, executor, args, callback); end - def callback_on_fulfillment(state, args, callback); end - def callback_on_rejection(state, args, callback); end - def callback_on_resolution(state, args, callback); end - def delay; end - def exception(*args); end - def flat(level = nil); end - def flat_event; end - def flat_future(level = nil); end - def fulfilled?; end - def inspect; end - def on_fulfillment!(*args, &callback); end - def on_fulfillment(*args, &callback); end - def on_fulfillment_using(executor, *args, &callback); end - def on_rejection!(*args, &callback); end - def on_rejection(*args, &callback); end - def on_rejection_using(executor, *args, &callback); end - def reason(timeout = nil, timeout_value = nil); end - def rejected?; end - def rejected_resolution(raise_on_reassign, state); end - def rescue(*args, &task); end - def rescue_on(executor, *args, &task); end - def result(timeout = nil); end - def run(run_test = nil); end - def run_test(v); end - def schedule(intended_time); end - def then(*args, &task); end - def then_on(executor, *args, &task); end - def to_event; end - def to_future; end - def to_s; end - def value!(timeout = nil, timeout_value = nil); end - def value(timeout = nil, timeout_value = nil); end - def wait!(timeout = nil); end - def wait_until_resolved!(timeout = nil); end - def with_default_executor(executor); end - def zip(other); end - def |(event_or_future); end -end -module Concurrent::Promises::Resolvable - include Concurrent::Promises::InternalStates -end -class Concurrent::Promises::ResolvableEvent < Concurrent::Promises::Event - def resolve(raise_on_reassign = nil, reserved = nil); end - def wait(timeout = nil, resolve_on_timeout = nil); end - def with_hidden_resolvable; end - include Concurrent::Promises::Resolvable -end -class Concurrent::Promises::ResolvableFuture < Concurrent::Promises::Future - def evaluate_to!(*args, &block); end - def evaluate_to(*args, &block); end - def fulfill(value, raise_on_reassign = nil, reserved = nil); end - def reason(timeout = nil, timeout_value = nil, resolve_on_timeout = nil); end - def reject(reason, raise_on_reassign = nil, reserved = nil); end - def resolve(fulfilled = nil, value = nil, reason = nil, raise_on_reassign = nil, reserved = nil); end - def result(timeout = nil, resolve_on_timeout = nil); end - def value!(timeout = nil, timeout_value = nil, resolve_on_timeout = nil); end - def value(timeout = nil, timeout_value = nil, resolve_on_timeout = nil); end - def wait!(timeout = nil, resolve_on_timeout = nil); end - def wait(timeout = nil, resolve_on_timeout = nil); end - def with_hidden_resolvable; end - include Concurrent::Promises::Resolvable -end -class Concurrent::Promises::AbstractPromise < Concurrent::Synchronization::Object - def default_executor; end - def delayed_because; end - def evaluate_to(*args, block); end - def event; end - def future; end - def initialize(future); end - def inspect; end - def resolve_with(new_state, raise_on_reassign = nil); end - def state; end - def to_s; end - def touch; end - extend Concurrent::Synchronization::SafeInitialization - include Concurrent::Promises::InternalStates -end -class Concurrent::Promises::ResolvableEventPromise < Concurrent::Promises::AbstractPromise - def initialize(default_executor); end -end -class Concurrent::Promises::ResolvableFuturePromise < Concurrent::Promises::AbstractPromise - def evaluate_to(*args, block); end - def initialize(default_executor); end -end -class Concurrent::Promises::InnerPromise < Concurrent::Promises::AbstractPromise -end -class Concurrent::Promises::BlockedPromise < Concurrent::Promises::InnerPromise - def blocked_by; end - def clear_and_propagate_touch(stack_or_element = nil); end - def delayed_because; end - def initialize(delayed, blockers_count, future); end - def on_blocker_resolution(future, index); end - def on_resolvable(resolved_future, index); end - def process_on_blocker_resolution(future, index); end - def resolvable?(countdown, future, index); end - def self.add_delayed(delayed1, delayed2); end - def self.new(*args, &block); end - def self.new_blocked_by(blockers, *args, &block); end - def self.new_blocked_by1(blocker, *args, &block); end - def self.new_blocked_by2(blocker1, blocker2, *args, &block); end - def touch; end -end -class Concurrent::Promises::BlockedTaskPromise < Concurrent::Promises::BlockedPromise - def executor; end - def initialize(delayed, blockers_count, default_executor, executor, args, &task); end -end -class Concurrent::Promises::ThenPromise < Concurrent::Promises::BlockedTaskPromise - def initialize(delayed, blockers_count, default_executor, executor, args, &task); end - def on_resolvable(resolved_future, index); end -end -class Concurrent::Promises::RescuePromise < Concurrent::Promises::BlockedTaskPromise - def initialize(delayed, blockers_count, default_executor, executor, args, &task); end - def on_resolvable(resolved_future, index); end -end -class Concurrent::Promises::ChainPromise < Concurrent::Promises::BlockedTaskPromise - def on_resolvable(resolved_future, index); end -end -class Concurrent::Promises::ImmediateEventPromise < Concurrent::Promises::InnerPromise - def initialize(default_executor); end -end -class Concurrent::Promises::ImmediateFuturePromise < Concurrent::Promises::InnerPromise - def initialize(default_executor, fulfilled, value, reason); end -end -class Concurrent::Promises::AbstractFlatPromise < Concurrent::Promises::BlockedPromise - def add_delayed_of(future); end - def initialize(delayed_because, blockers_count, event_or_future); end - def on_resolvable(resolved_future, index); end - def resolvable?(countdown, future, index); end - def touch; end - def touched?; end -end -class Concurrent::Promises::FlatEventPromise < Concurrent::Promises::AbstractFlatPromise - def initialize(delayed, blockers_count, default_executor); end - def process_on_blocker_resolution(future, index); end -end -class Concurrent::Promises::FlatFuturePromise < Concurrent::Promises::AbstractFlatPromise - def initialize(delayed, blockers_count, levels, default_executor); end - def process_on_blocker_resolution(future, index); end -end -class Concurrent::Promises::RunFuturePromise < Concurrent::Promises::AbstractFlatPromise - def initialize(delayed, blockers_count, default_executor, run_test); end - def process_on_blocker_resolution(future, index); end -end -class Concurrent::Promises::ZipEventEventPromise < Concurrent::Promises::BlockedPromise - def initialize(delayed, blockers_count, default_executor); end - def on_resolvable(resolved_future, index); end -end -class Concurrent::Promises::ZipFutureEventPromise < Concurrent::Promises::BlockedPromise - def initialize(delayed, blockers_count, default_executor); end - def on_resolvable(resolved_future, index); end - def process_on_blocker_resolution(future, index); end -end -class Concurrent::Promises::EventWrapperPromise < Concurrent::Promises::BlockedPromise - def initialize(delayed, blockers_count, default_executor); end - def on_resolvable(resolved_future, index); end -end -class Concurrent::Promises::FutureWrapperPromise < Concurrent::Promises::BlockedPromise - def initialize(delayed, blockers_count, default_executor); end - def on_resolvable(resolved_future, index); end -end -class Concurrent::Promises::ZipFuturesPromise < Concurrent::Promises::BlockedPromise - def initialize(delayed, blockers_count, default_executor); end - def on_resolvable(resolved_future, index); end - def process_on_blocker_resolution(future, index); end -end -class Concurrent::Promises::ZipEventsPromise < Concurrent::Promises::BlockedPromise - def initialize(delayed, blockers_count, default_executor); end - def on_resolvable(resolved_future, index); end -end -class Concurrent::Promises::AbstractAnyPromise < Concurrent::Promises::BlockedPromise -end -class Concurrent::Promises::AnyResolvedEventPromise < Concurrent::Promises::AbstractAnyPromise - def initialize(delayed, blockers_count, default_executor); end - def on_resolvable(resolved_future, index); end - def resolvable?(countdown, future, index); end -end -class Concurrent::Promises::AnyResolvedFuturePromise < Concurrent::Promises::AbstractAnyPromise - def initialize(delayed, blockers_count, default_executor); end - def on_resolvable(resolved_future, index); end - def resolvable?(countdown, future, index); end -end -class Concurrent::Promises::AnyFulfilledFuturePromise < Concurrent::Promises::AnyResolvedFuturePromise - def resolvable?(countdown, event_or_future, index); end -end -class Concurrent::Promises::DelayPromise < Concurrent::Promises::InnerPromise - def delayed_because; end - def initialize(default_executor); end - def touch; end -end -class Concurrent::Promises::ScheduledPromise < Concurrent::Promises::InnerPromise - def initialize(default_executor, intended_time); end - def inspect; end - def intended_time; end -end -class Concurrent::SynchronizedDelegator < SimpleDelegator - def initialize(obj); end - def method_missing(method, *args, &block); end - def setup; end - def teardown; end -end diff --git a/sorbet/rbi/gems/concurrent-ruby@1.3.4.rbi b/sorbet/rbi/gems/concurrent-ruby@1.3.4.rbi deleted file mode 100644 index 11d0bfb..0000000 --- a/sorbet/rbi/gems/concurrent-ruby@1.3.4.rbi +++ /dev/null @@ -1,9 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `concurrent-ruby` gem. -# Please instead update this file by running `bin/tapioca gem concurrent-ruby`. - - -# THIS IS AN EMPTY RBI FILE. -# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/connection_pool.rbi b/sorbet/rbi/gems/connection_pool.rbi deleted file mode 100644 index 859194f..0000000 --- a/sorbet/rbi/gems/connection_pool.rbi +++ /dev/null @@ -1,60 +0,0 @@ -# This file is autogenerated. Do not edit it by hand. Regenerate it with: -# srb rbi gems - -# typed: strict -# -# If you would like to make changes to this file, great! Please create the gem's shim here: -# -# https://github.com/sorbet/sorbet-typed/new/master?filename=lib/connection_pool/all/connection_pool.rbi -# -# connection_pool-2.4.1 - -class ConnectionPool - def auto_reload_after_fork; end - def available; end - def checkin(force: nil); end - def checkout(options = nil); end - def initialize(options = nil, &block); end - def reload(&block); end - def self.after_fork; end - def self.wrap(options, &block); end - def shutdown(&block); end - def size; end - def then(options = nil); end - def with(options = nil); end -end -class ConnectionPool::TimedStack - def <<(obj, options = nil); end - def connection_stored?(options = nil); end - def current_time; end - def empty?; end - def fetch_connection(options = nil); end - def initialize(size = nil, &block); end - def length; end - def max; end - def pop(timeout = nil, options = nil); end - def push(obj, options = nil); end - def shutdown(reload: nil, &block); end - def shutdown_connections(options = nil); end - def store_connection(obj, options = nil); end - def try_create(options = nil); end -end -class ConnectionPool::Wrapper < BasicObject - def initialize(options = nil, &block); end - def method_missing(name, *args, **kwargs, &block); end - def pool_available; end - def pool_shutdown(&block); end - def pool_size; end - def respond_to?(id, *args); end - def with(&block); end - def wrapped_pool; end -end -class ConnectionPool::Error < RuntimeError -end -class ConnectionPool::PoolShuttingDownError < ConnectionPool::Error -end -class ConnectionPool::TimeoutError < Timeout::Error -end -module ConnectionPool::ForkTracker - def _fork; end -end diff --git a/sorbet/rbi/gems/connection_pool@2.4.1.rbi b/sorbet/rbi/gems/connection_pool@2.4.1.rbi deleted file mode 100644 index 3d9f595..0000000 --- a/sorbet/rbi/gems/connection_pool@2.4.1.rbi +++ /dev/null @@ -1,9 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `connection_pool` gem. -# Please instead update this file by running `bin/tapioca gem connection_pool`. - - -# THIS IS AN EMPTY RBI FILE. -# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/drb.rbi b/sorbet/rbi/gems/drb.rbi deleted file mode 100644 index 94252c1..0000000 --- a/sorbet/rbi/gems/drb.rbi +++ /dev/null @@ -1,220 +0,0 @@ -# This file is autogenerated. Do not edit it by hand. Regenerate it with: -# srb rbi gems - -# typed: false -# -# If you would like to make changes to this file, great! Please create the gem's shim here: -# -# https://github.com/sorbet/sorbet-typed/new/master?filename=lib/drb/all/drb.rbi -# -# drb-2.2.1 - -module DRb - def config; end - def current_server; end - def fetch_server(uri); end - def front; end - def here?(uri); end - def install_acl(acl); end - def install_id_conv(idconv); end - def mutex; end - def primary_server; end - def primary_server=(arg0); end - def regist_server(server); end - def remove_server(server); end - def self.config; end - def self.current_server; end - def self.fetch_server(uri); end - def self.front; end - def self.here?(uri); end - def self.install_acl(acl); end - def self.install_id_conv(idconv); end - def self.mutex; end - def self.primary_server; end - def self.primary_server=(arg0); end - def self.regist_server(server); end - def self.remove_server(server); end - def self.start_service(uri = nil, front = nil, config = nil); end - def self.stop_service; end - def self.thread; end - def self.to_id(obj); end - def self.to_obj(ref); end - def self.uri; end - def start_service(uri = nil, front = nil, config = nil); end - def stop_service; end - def thread; end - def to_id(obj); end - def to_obj(ref); end - def uri; end -end -class DRb::DRbObject - def ==(other); end - def __drbref; end - def __drburi; end - def _dump(lv); end - def eql?(other); end - def hash; end - def initialize(obj, uri = nil); end - def method_missing(msg_id, *a, **, &b); end - def pretty_print(q); end - def pretty_print_cycle(q); end - def respond_to?(msg_id, priv = nil); end - def self._load(s); end - def self.new_with(uri, ref); end - def self.new_with_uri(uri); end - def self.prepare_backtrace(uri, result); end - def self.with_friend(uri); end -end -class DRb::DRbServer - def alive?; end - def any_to_s(obj); end - def check_insecure_method(obj, msg_id); end - def config; end - def error_print(exception); end - def front; end - def here?(uri); end - def initialize(uri = nil, front = nil, config_or_acl = nil); end - def insecure_method?(msg_id); end - def main_loop; end - def run; end - def self.default_acl(acl); end - def self.default_argc_limit(argc); end - def self.default_id_conv(idconv); end - def self.default_load_limit(sz); end - def self.make_config(hash = nil); end - def self.verbose; end - def self.verbose=(on); end - def shutdown; end - def stop_service; end - def thread; end - def to_id(obj); end - def to_obj(ref); end - def uri; end - def verbose; end - def verbose=(v); end -end -module DRb::DRbServer::InvokeMethod18Mixin - def block_yield(x); end - def perform_with_block; end -end -class DRb::DRbError < RuntimeError -end -class DRb::DRbConnError < DRb::DRbError -end -class DRb::DRbIdConv - def to_id(obj); end - def to_obj(ref); end -end -module DRb::DRbUndumped - def _dump(dummy); end -end -class DRb::DRbServerNotFound < DRb::DRbError -end -class DRb::DRbBadURI < DRb::DRbError -end -class DRb::DRbBadScheme < DRb::DRbError -end -class DRb::DRbUnknownError < DRb::DRbError - def _dump(lv); end - def initialize(unknown); end - def self._load(s); end - def unknown; end -end -class DRb::DRbRemoteError < DRb::DRbError - def initialize(error); end - def reason; end -end -class DRb::DRbUnknown - def _dump(lv); end - def buf; end - def exception; end - def initialize(err, buf); end - def name; end - def reload; end - def self._load(s); end -end -class DRb::DRbArray - def _dump(lv); end - def initialize(ary); end - def self._load(s); end -end -class DRb::DRbMessage - def dump(obj, error = nil); end - def initialize(config); end - def load(soc); end - def make_proxy(obj, error = nil); end - def recv_reply(stream); end - def recv_request(stream); end - def send_reply(stream, succ, result); end - def send_request(stream, ref, msg_id, arg, b); end -end -module DRb::DRbProtocol - def add_protocol(prot); end - def auto_load(uri); end - def open(uri, config, first = nil); end - def open_server(uri, config, first = nil); end - def self.add_protocol(prot); end - def self.auto_load(uri); end - def self.open(uri, config, first = nil); end - def self.open_server(uri, config, first = nil); end - def self.uri_option(uri, config, first = nil); end - def uri_option(uri, config, first = nil); end -end -class DRb::DRbTCPSocket - def accept; end - def accept_or_shutdown; end - def alive?; end - def close; end - def close_shutdown_pipe; end - def initialize(uri, soc, config = nil); end - def peeraddr; end - def recv_reply; end - def recv_request; end - def self.getservername; end - def self.open(uri, config); end - def self.open_server(uri, config); end - def self.open_server_inaddr_any(host, port); end - def self.parse_uri(uri); end - def self.uri_option(uri, config); end - def send_reply(succ, result); end - def send_request(ref, msg_id, arg, b); end - def set_sockopt(soc); end - def shutdown; end - def stream; end - def uri; end -end -class DRb::DRbURIOption - def ==(other); end - def eql?(other); end - def hash; end - def initialize(option); end - def option; end - def to_s; end -end -class DRb::ThreadObject - def _execute; end - def alive?; end - def initialize(&blk); end - def kill; end - def method_missing(msg, *arg, &blk); end - include MonitorMixin -end -class DRb::DRbConn - def alive?; end - def close; end - def initialize(remote_uri); end - def self.make_pool; end - def self.open(remote_uri); end - def self.stop_pool; end - def send_message(ref, msg_id, arg, block); end - def uri; end -end -class DRb::DRbServer::InvokeMethod - def check_insecure_method; end - def init_with_client; end - def initialize(drb_server, client); end - def perform; end - def perform_without_block; end - def setup_message; end - include DRb::DRbServer::InvokeMethod18Mixin -end diff --git a/sorbet/rbi/gems/drb@2.2.1.rbi b/sorbet/rbi/gems/drb@2.2.1.rbi deleted file mode 100644 index 4c77c96..0000000 --- a/sorbet/rbi/gems/drb@2.2.1.rbi +++ /dev/null @@ -1,1301 +0,0 @@ -# typed: false - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `drb` gem. -# Please instead update this file by running `bin/tapioca gem drb`. - - -# for ruby-1.8.0 -# -# source://drb//lib/drb/eq.rb#2 -module DRb - private - - # Get the configuration of the current server. - # - # If there is no current server, this returns the default configuration. - # See #current_server and DRbServer::make_config. - # - # source://drb//lib/drb/drb.rb#1832 - def config; end - - # Get the 'current' server. - # - # In the context of execution taking place within the main - # thread of a dRuby server (typically, as a result of a remote - # call on the server or one of its objects), the current - # server is that server. Otherwise, the current server is - # the primary server. - # - # If the above rule fails to find a server, a DRbServerNotFound - # error is raised. - # - # @raise [DRbServerNotFound] - # - # source://drb//lib/drb/drb.rb#1789 - def current_server; end - - # Retrieves the server with the given +uri+. - # - # See also regist_server and remove_server. - # - # source://drb//lib/drb/drb.rb#1934 - def fetch_server(uri); end - - # Get the front object of the current server. - # - # This raises a DRbServerNotFound error if there is no current server. - # See #current_server. - # - # source://drb//lib/drb/drb.rb#1843 - def front; end - - # Is +uri+ the URI for the current local server? - # - # @return [Boolean] - # - # source://drb//lib/drb/drb.rb#1822 - def here?(uri); end - - # Set the default ACL to +acl+. - # - # See DRb::DRbServer.default_acl. - # - # source://drb//lib/drb/drb.rb#1888 - def install_acl(acl); end - - # Set the default id conversion object. - # - # This is expected to be an instance such as DRb::DRbIdConv that responds to - # #to_id and #to_obj that can convert objects to and from DRb references. - # - # See DRbServer#default_id_conv. - # - # source://drb//lib/drb/drb.rb#1880 - def install_id_conv(idconv); end - - # source://drb//lib/drb/drb.rb#1894 - def mutex; end - - # The primary local dRuby server. - # - # This is the server created by the #start_service call. - # - # source://drb//lib/drb/drb.rb#1776 - def primary_server; end - - # The primary local dRuby server. - # - # This is the server created by the #start_service call. - # - # source://drb//lib/drb/drb.rb#1776 - def primary_server=(_arg0); end - - # Registers +server+ with DRb. - # - # This is called when a new DRb::DRbServer is created. - # - # If there is no primary server then +server+ becomes the primary server. - # - # Example: - # - # require 'drb' - # - # s = DRb::DRbServer.new # automatically calls regist_server - # DRb.fetch_server s.uri #=> # - # - # source://drb//lib/drb/drb.rb#1912 - def regist_server(server); end - - # Removes +server+ from the list of registered servers. - # - # source://drb//lib/drb/drb.rb#1921 - def remove_server(server); end - - # Start a dRuby server locally. - # - # The new dRuby server will become the primary server, even - # if another server is currently the primary server. - # - # +uri+ is the URI for the server to bind to. If nil, - # the server will bind to random port on the default local host - # name and use the default dRuby protocol. - # - # +front+ is the server's front object. This may be nil. - # - # +config+ is the configuration for the new server. This may - # be nil. - # - # See DRbServer::new. - # - # source://drb//lib/drb/drb.rb#1768 - def start_service(uri = T.unsafe(nil), front = T.unsafe(nil), config = T.unsafe(nil)); end - - # Stop the local dRuby server. - # - # This operates on the primary server. If there is no primary - # server currently running, it is a noop. - # - # source://drb//lib/drb/drb.rb#1801 - def stop_service; end - - # Get the thread of the primary server. - # - # This returns nil if there is no primary server. See #primary_server. - # - # source://drb//lib/drb/drb.rb#1869 - def thread; end - - # Get a reference id for an object using the current server. - # - # This raises a DRbServerNotFound error if there is no current server. - # See #current_server. - # - # source://drb//lib/drb/drb.rb#1860 - def to_id(obj); end - - # Convert a reference into an object using the current server. - # - # This raises a DRbServerNotFound error if there is no current server. - # See #current_server. - # - # source://drb//lib/drb/drb.rb#1852 - def to_obj(ref); end - - # Get the URI defining the local dRuby space. - # - # This is the URI of the current server. See #current_server. - # - # source://drb//lib/drb/drb.rb#1810 - def uri; end - - class << self - # Get the configuration of the current server. - # - # If there is no current server, this returns the default configuration. - # See #current_server and DRbServer::make_config. - # - # source://drb//lib/drb/drb.rb#1832 - def config; end - - # Get the 'current' server. - # - # In the context of execution taking place within the main - # thread of a dRuby server (typically, as a result of a remote - # call on the server or one of its objects), the current - # server is that server. Otherwise, the current server is - # the primary server. - # - # If the above rule fails to find a server, a DRbServerNotFound - # error is raised. - # - # @raise [DRbServerNotFound] - # - # source://drb//lib/drb/drb.rb#1789 - def current_server; end - - # Retrieves the server with the given +uri+. - # - # See also regist_server and remove_server. - # - # source://drb//lib/drb/drb.rb#1934 - def fetch_server(uri); end - - # Get the front object of the current server. - # - # This raises a DRbServerNotFound error if there is no current server. - # See #current_server. - # - # source://drb//lib/drb/drb.rb#1843 - def front; end - - # Is +uri+ the URI for the current local server? - # - # @return [Boolean] - # - # source://drb//lib/drb/drb.rb#1822 - def here?(uri); end - - # Set the default ACL to +acl+. - # - # See DRb::DRbServer.default_acl. - # - # source://drb//lib/drb/drb.rb#1888 - def install_acl(acl); end - - # Set the default id conversion object. - # - # This is expected to be an instance such as DRb::DRbIdConv that responds to - # #to_id and #to_obj that can convert objects to and from DRb references. - # - # See DRbServer#default_id_conv. - # - # source://drb//lib/drb/drb.rb#1880 - def install_id_conv(idconv); end - - # source://drb//lib/drb/drb.rb#1894 - def mutex; end - - # The primary local dRuby server. - # - # This is the server created by the #start_service call. - # - # source://drb//lib/drb/drb.rb#1776 - def primary_server; end - - # The primary local dRuby server. - # - # This is the server created by the #start_service call. - # - # source://drb//lib/drb/drb.rb#1776 - def primary_server=(_arg0); end - - # Registers +server+ with DRb. - # - # This is called when a new DRb::DRbServer is created. - # - # If there is no primary server then +server+ becomes the primary server. - # - # Example: - # - # require 'drb' - # - # s = DRb::DRbServer.new # automatically calls regist_server - # DRb.fetch_server s.uri #=> # - # - # source://drb//lib/drb/drb.rb#1912 - def regist_server(server); end - - # Removes +server+ from the list of registered servers. - # - # source://drb//lib/drb/drb.rb#1921 - def remove_server(server); end - - # Start a dRuby server locally. - # - # The new dRuby server will become the primary server, even - # if another server is currently the primary server. - # - # +uri+ is the URI for the server to bind to. If nil, - # the server will bind to random port on the default local host - # name and use the default dRuby protocol. - # - # +front+ is the server's front object. This may be nil. - # - # +config+ is the configuration for the new server. This may - # be nil. - # - # See DRbServer::new. - # - # source://drb//lib/drb/drb.rb#1768 - def start_service(uri = T.unsafe(nil), front = T.unsafe(nil), config = T.unsafe(nil)); end - - # Stop the local dRuby server. - # - # This operates on the primary server. If there is no primary - # server currently running, it is a noop. - # - # source://drb//lib/drb/drb.rb#1801 - def stop_service; end - - # Get the thread of the primary server. - # - # This returns nil if there is no primary server. See #primary_server. - # - # source://drb//lib/drb/drb.rb#1869 - def thread; end - - # Get a reference id for an object using the current server. - # - # This raises a DRbServerNotFound error if there is no current server. - # See #current_server. - # - # source://drb//lib/drb/drb.rb#1860 - def to_id(obj); end - - # Convert a reference into an object using the current server. - # - # This raises a DRbServerNotFound error if there is no current server. - # See #current_server. - # - # source://drb//lib/drb/drb.rb#1852 - def to_obj(ref); end - - # Get the URI defining the local dRuby space. - # - # This is the URI of the current server. See #current_server. - # - # source://drb//lib/drb/drb.rb#1810 - def uri; end - end -end - -# An Array wrapper that can be sent to another server via DRb. -# -# All entries in the array will be dumped or be references that point to -# the local server. -# -# source://drb//lib/drb/drb.rb#518 -class DRb::DRbArray - # Creates a new DRbArray that either dumps or wraps all the items in the - # Array +ary+ so they can be loaded by a remote DRb server. - # - # @return [DRbArray] a new instance of DRbArray - # - # source://drb//lib/drb/drb.rb#523 - def initialize(ary); end - - # source://drb//lib/drb/drb.rb#542 - def _dump(lv); end - - class << self - # source://drb//lib/drb/drb.rb#538 - def _load(s); end - end -end - -# Class handling the connection between a DRbObject and the -# server the real object lives on. -# -# This class maintains a pool of connections, to reduce the -# overhead of starting and closing down connections for each -# method call. -# -# This class is used internally by DRbObject. The user does -# not normally need to deal with it directly. -# -# source://drb//lib/drb/drb.rb#1256 -class DRb::DRbConn - # @return [DRbConn] a new instance of DRbConn - # - # source://drb//lib/drb/drb.rb#1317 - def initialize(remote_uri); end - - # @return [Boolean] - # - # source://drb//lib/drb/drb.rb#1333 - def alive?; end - - # source://drb//lib/drb/drb.rb#1328 - def close; end - - # source://drb//lib/drb/drb.rb#1323 - def send_message(ref, msg_id, arg, block); end - - # source://drb//lib/drb/drb.rb#1321 - def uri; end - - class << self - # source://drb//lib/drb/drb.rb#1259 - def make_pool; end - - # source://drb//lib/drb/drb.rb#1297 - def open(remote_uri); end - - # source://drb//lib/drb/drb.rb#1292 - def stop_pool; end - end -end - -# Class responsible for converting between an object and its id. -# -# This, the default implementation, uses an object's local ObjectSpace -# __id__ as its id. This means that an object's identification over -# drb remains valid only while that object instance remains alive -# within the server runtime. -# -# For alternative mechanisms, see DRb::TimerIdConv in drb/timeridconv.rb -# and DRbNameIdConv in sample/name.rb in the full drb distribution. -# -# source://drb//lib/drb/drb.rb#360 -class DRb::DRbIdConv - # Convert an object into a reference id. - # - # This implementation returns the object's __id__ in the local - # object space. - # - # source://drb//lib/drb/drb.rb#374 - def to_id(obj); end - - # Convert an object reference id to an object. - # - # This implementation looks up the reference id in the local object - # space and returns the object it refers to. - # - # source://drb//lib/drb/drb.rb#366 - def to_obj(ref); end -end - -# Handler for sending and receiving drb messages. -# -# This takes care of the low-level marshalling and unmarshalling -# of drb requests and responses sent over the wire between server -# and client. This relieves the implementor of a new drb -# protocol layer with having to deal with these details. -# -# The user does not have to directly deal with this object in -# normal use. -# -# source://drb//lib/drb/drb.rb#556 -class DRb::DRbMessage - # @return [DRbMessage] a new instance of DRbMessage - # - # source://drb//lib/drb/drb.rb#557 - def initialize(config); end - - # source://drb//lib/drb/drb.rb#562 - def dump(obj, error = T.unsafe(nil)); end - - # @raise [DRbConnError] - # - # source://drb//lib/drb/drb.rb#579 - def load(soc); end - - # source://drb//lib/drb/drb.rb#639 - def recv_reply(stream); end - - # @raise [DRbConnError] - # - # source://drb//lib/drb/drb.rb#619 - def recv_request(stream); end - - # source://drb//lib/drb/drb.rb#633 - def send_reply(stream, succ, result); end - - # source://drb//lib/drb/drb.rb#605 - def send_request(stream, ref, msg_id, arg, b); end - - private - - # source://drb//lib/drb/drb.rb#646 - def make_proxy(obj, error = T.unsafe(nil)); end -end - -# source://drb//lib/drb/eq.rb#3 -class DRb::DRbObject - # Create a new remote object stub. - # - # +obj+ is the (local) object we want to create a stub for. Normally - # this is +nil+. +uri+ is the URI of the remote object that this - # will be a stub for. - # - # @return [DRbObject] a new instance of DRbObject - # - # source://drb//lib/drb/drb.rb#1089 - def initialize(obj, uri = T.unsafe(nil)); end - - # source://drb//lib/drb/eq.rb#4 - def ==(other); end - - # Get the reference of the object, if local. - # - # source://drb//lib/drb/drb.rb#1115 - def __drbref; end - - # Get the URI of the remote object. - # - # source://drb//lib/drb/drb.rb#1110 - def __drburi; end - - # Marshall this object. - # - # The URI and ref of the object are marshalled. - # - # source://drb//lib/drb/drb.rb#1080 - def _dump(lv); end - - # source://drb//lib/drb/eq.rb#4 - def eql?(other); end - - # source://drb//lib/drb/eq.rb#9 - def hash; end - - # source://drb//lib/drb/drb.rb#1135 - def method_missing(msg_id, *a, **_arg2, &b); end - - # source://drb//lib/drb/drb.rb#1187 - def pretty_print(q); end - - # source://drb//lib/drb/drb.rb#1191 - def pretty_print_cycle(q); end - - # Routes respond_to? to the referenced remote object. - # - # @return [Boolean] - # - # source://drb//lib/drb/drb.rb#1123 - def respond_to?(msg_id, priv = T.unsafe(nil)); end - - class << self - # Unmarshall a marshalled DRbObject. - # - # If the referenced object is located within the local server, then - # the object itself is returned. Otherwise, a new DRbObject is - # created to act as a stub for the remote referenced object. - # - # source://drb//lib/drb/drb.rb#1051 - def _load(s); end - - # Creates a DRb::DRbObject given the reference information to the remote - # host +uri+ and object +ref+. - # - # source://drb//lib/drb/drb.rb#1065 - def new_with(uri, ref); end - - # Create a new DRbObject from a URI alone. - # - # source://drb//lib/drb/drb.rb#1073 - def new_with_uri(uri); end - - # Returns a modified backtrace from +result+ with the +uri+ where each call - # in the backtrace came from. - # - # source://drb//lib/drb/drb.rb#1173 - def prepare_backtrace(uri, result); end - - # Given the +uri+ of another host executes the block provided. - # - # source://drb//lib/drb/drb.rb#1160 - def with_friend(uri); end - end -end - -# Module managing the underlying network protocol(s) used by drb. -# -# By default, drb uses the DRbTCPSocket protocol. Other protocols -# can be defined. A protocol must define the following class methods: -# -# [open(uri, config)] Open a client connection to the server at +uri+, -# using configuration +config+. Return a protocol -# instance for this connection. -# [open_server(uri, config)] Open a server listening at +uri+, -# using configuration +config+. Return a -# protocol instance for this listener. -# [uri_option(uri, config)] Take a URI, possibly containing an option -# component (e.g. a trailing '?param=val'), -# and return a [uri, option] tuple. -# -# All of these methods should raise a DRbBadScheme error if the URI -# does not identify the protocol they support (e.g. "druby:" for -# the standard Ruby protocol). This is how the DRbProtocol module, -# given a URI, determines which protocol implementation serves that -# protocol. -# -# The protocol instance returned by #open_server must have the -# following methods: -# -# [accept] Accept a new connection to the server. Returns a protocol -# instance capable of communicating with the client. -# [close] Close the server connection. -# [uri] Get the URI for this server. -# -# The protocol instance returned by #open must have the following methods: -# -# [send_request (ref, msg_id, arg, b)] -# Send a request to +ref+ with the given message id and arguments. -# This is most easily implemented by calling DRbMessage.send_request, -# providing a stream that sits on top of the current protocol. -# [recv_reply] -# Receive a reply from the server and return it as a [success-boolean, -# reply-value] pair. This is most easily implemented by calling -# DRb.recv_reply, providing a stream that sits on top of the -# current protocol. -# [alive?] -# Is this connection still alive? -# [close] -# Close this connection. -# -# The protocol instance returned by #open_server().accept() must have -# the following methods: -# -# [recv_request] -# Receive a request from the client and return a [object, message, -# args, block] tuple. This is most easily implemented by calling -# DRbMessage.recv_request, providing a stream that sits on top of -# the current protocol. -# [send_reply(succ, result)] -# Send a reply to the client. This is most easily implemented -# by calling DRbMessage.send_reply, providing a stream that sits -# on top of the current protocol. -# [close] -# Close this connection. -# -# A new protocol is registered with the DRbProtocol module using -# the add_protocol method. -# -# For examples of other protocols, see DRbUNIXSocket in drb/unix.rb, -# and HTTP0 in sample/http0.rb and sample/http0serv.rb in the full -# drb distribution. -# -# source://drb//lib/drb/drb.rb#721 -module DRb::DRbProtocol - private - - # Add a new protocol to the DRbProtocol module. - # - # source://drb//lib/drb/drb.rb#724 - def add_protocol(prot); end - - # source://drb//lib/drb/drb.rb#802 - def auto_load(uri); end - - # Open a client connection to +uri+ with the configuration +config+. - # - # The DRbProtocol module asks each registered protocol in turn to - # try to open the URI. Each protocol signals that it does not handle that - # URI by raising a DRbBadScheme error. If no protocol recognises the - # URI, then a DRbBadURI error is raised. If a protocol accepts the - # URI, but an error occurs in opening it, a DRbConnError is raised. - # - # @raise [DRbBadURI] - # - # source://drb//lib/drb/drb.rb#736 - def open(uri, config, first = T.unsafe(nil)); end - - # Open a server listening for connections at +uri+ with - # configuration +config+. - # - # The DRbProtocol module asks each registered protocol in turn to - # try to open a server at the URI. Each protocol signals that it does - # not handle that URI by raising a DRbBadScheme error. If no protocol - # recognises the URI, then a DRbBadURI error is raised. If a protocol - # accepts the URI, but an error occurs in opening it, the underlying - # error is passed on to the caller. - # - # @raise [DRbBadURI] - # - # source://drb//lib/drb/drb.rb#764 - def open_server(uri, config, first = T.unsafe(nil)); end - - # Parse +uri+ into a [uri, option] pair. - # - # The DRbProtocol module asks each registered protocol in turn to - # try to parse the URI. Each protocol signals that it does not handle that - # URI by raising a DRbBadScheme error. If no protocol recognises the - # URI, then a DRbBadURI error is raised. - # - # @raise [DRbBadURI] - # - # source://drb//lib/drb/drb.rb#785 - def uri_option(uri, config, first = T.unsafe(nil)); end - - class << self - # Add a new protocol to the DRbProtocol module. - # - # source://drb//lib/drb/drb.rb#724 - def add_protocol(prot); end - - # source://drb//lib/drb/drb.rb#802 - def auto_load(uri); end - - # Open a client connection to +uri+ with the configuration +config+. - # - # The DRbProtocol module asks each registered protocol in turn to - # try to open the URI. Each protocol signals that it does not handle that - # URI by raising a DRbBadScheme error. If no protocol recognises the - # URI, then a DRbBadURI error is raised. If a protocol accepts the - # URI, but an error occurs in opening it, a DRbConnError is raised. - # - # @raise [DRbBadURI] - # - # source://drb//lib/drb/drb.rb#736 - def open(uri, config, first = T.unsafe(nil)); end - - # Open a server listening for connections at +uri+ with - # configuration +config+. - # - # The DRbProtocol module asks each registered protocol in turn to - # try to open a server at the URI. Each protocol signals that it does - # not handle that URI by raising a DRbBadScheme error. If no protocol - # recognises the URI, then a DRbBadURI error is raised. If a protocol - # accepts the URI, but an error occurs in opening it, the underlying - # error is passed on to the caller. - # - # @raise [DRbBadURI] - # - # source://drb//lib/drb/drb.rb#764 - def open_server(uri, config, first = T.unsafe(nil)); end - - # Parse +uri+ into a [uri, option] pair. - # - # The DRbProtocol module asks each registered protocol in turn to - # try to parse the URI. Each protocol signals that it does not handle that - # URI by raising a DRbBadScheme error. If no protocol recognises the - # URI, then a DRbBadURI error is raised. - # - # @raise [DRbBadURI] - # - # source://drb//lib/drb/drb.rb#785 - def uri_option(uri, config, first = T.unsafe(nil)); end - end -end - -# An exception wrapping an error object -# -# source://drb//lib/drb/drb.rb#431 -class DRb::DRbRemoteError < ::DRb::DRbError - # Creates a new remote error that wraps the Exception +error+ - # - # @return [DRbRemoteError] a new instance of DRbRemoteError - # - # source://drb//lib/drb/drb.rb#434 - def initialize(error); end - - # the class of the error, as a string. - # - # source://drb//lib/drb/drb.rb#441 - def reason; end -end - -# source://drb//lib/drb/drb.rb#1350 -class DRb::DRbServer - # Create a new DRbServer instance. - # - # +uri+ is the URI to bind to. This is normally of the form - # 'druby://:' where is a hostname of - # the local machine. If nil, then the system's default hostname - # will be bound to, on a port selected by the system; these value - # can be retrieved from the +uri+ attribute. 'druby:' specifies - # the default dRuby transport protocol: another protocol, such - # as 'drbunix:', can be specified instead. - # - # +front+ is the front object for the server, that is, the object - # to which remote method calls on the server will be passed. If - # nil, then the server will not accept remote method calls. - # - # If +config_or_acl+ is a hash, it is the configuration to - # use for this server. The following options are recognised: - # - # :idconv :: an id-to-object conversion object. This defaults - # to an instance of the class DRb::DRbIdConv. - # :verbose :: if true, all unsuccessful remote calls on objects - # in the server will be logged to $stdout. false - # by default. - # :tcp_acl :: the access control list for this server. See - # the ACL class from the main dRuby distribution. - # :load_limit :: the maximum message size in bytes accepted by - # the server. Defaults to 25 MB (26214400). - # :argc_limit :: the maximum number of arguments to a remote - # method accepted by the server. Defaults to - # 256. - # The default values of these options can be modified on - # a class-wide basis by the class methods #default_argc_limit, - # #default_load_limit, #default_acl, #default_id_conv, - # and #verbose= - # - # If +config_or_acl+ is not a hash, but is not nil, it is - # assumed to be the access control list for this server. - # See the :tcp_acl option for more details. - # - # If no other server is currently set as the primary server, - # this will become the primary server. - # - # The server will immediately start running in its own thread. - # - # @return [DRbServer] a new instance of DRbServer - # - # source://drb//lib/drb/drb.rb#1451 - def initialize(uri = T.unsafe(nil), front = T.unsafe(nil), config_or_acl = T.unsafe(nil)); end - - # Is this server alive? - # - # @return [Boolean] - # - # source://drb//lib/drb/drb.rb#1506 - def alive?; end - - # Check that a method is callable via dRuby. - # - # +obj+ is the object we want to invoke the method on. +msg_id+ is the - # method name, as a Symbol. - # - # If the method is an insecure method (see #insecure_method?) a - # SecurityError is thrown. If the method is private or undefined, - # a NameError is thrown. - # - # @raise [ArgumentError] - # - # source://drb//lib/drb/drb.rb#1594 - def check_insecure_method(obj, msg_id); end - - # The configuration of this DRbServer - # - # source://drb//lib/drb/drb.rb#1493 - def config; end - - # The front object of the DRbServer. - # - # This object receives remote method calls made on the server's - # URI alone, with an object id. - # - # source://drb//lib/drb/drb.rb#1490 - def front; end - - # Is +uri+ the URI for this server? - # - # @return [Boolean] - # - # source://drb//lib/drb/drb.rb#1511 - def here?(uri); end - - # Stop this server. - # - # source://drb//lib/drb/drb.rb#1516 - def stop_service; end - - # The main thread of this DRbServer. - # - # This is the thread that listens for and accepts connections - # from clients, not that handles each client's request-response - # session. - # - # source://drb//lib/drb/drb.rb#1484 - def thread; end - - # Convert a local object to a dRuby reference. - # - # source://drb//lib/drb/drb.rb#1533 - def to_id(obj); end - - # Convert a dRuby reference to the local object it refers to. - # - # source://drb//lib/drb/drb.rb#1526 - def to_obj(ref); end - - # The URI of this DRbServer. - # - # source://drb//lib/drb/drb.rb#1477 - def uri; end - - # Get whether the server is in verbose mode. - # - # In verbose mode, failed calls are logged to stdout. - # - # source://drb//lib/drb/drb.rb#1503 - def verbose; end - - # Set whether to operate in verbose mode. - # - # In verbose mode, failed calls are logged to stdout. - # - # source://drb//lib/drb/drb.rb#1498 - def verbose=(v); end - - private - - # Coerce an object to a string, providing our own representation if - # to_s is not defined for the object. - # - # source://drb//lib/drb/drb.rb#1580 - def any_to_s(obj); end - - # source://drb//lib/drb/drb.rb#1696 - def error_print(exception); end - - # Has a method been included in the list of insecure methods? - # - # @return [Boolean] - # - # source://drb//lib/drb/drb.rb#1574 - def insecure_method?(msg_id); end - - # The main loop performed by a DRbServer's internal thread. - # - # Accepts a connection from a client, and starts up its own - # thread to handle it. This thread loops, receiving requests - # from the client, invoking them on a local object, and - # returning responses, until the client closes the connection - # or a local method call fails. - # - # source://drb//lib/drb/drb.rb#1714 - def main_loop; end - - # Starts the DRb main loop in a new thread. - # - # source://drb//lib/drb/drb.rb#1555 - def run; end - - # source://drb//lib/drb/drb.rb#1540 - def shutdown; end - - class << self - # Set the default access control list to +acl+. The default ACL is +nil+. - # - # See also DRb::ACL and #new() - # - # source://drb//lib/drb/drb.rb#1375 - def default_acl(acl); end - - # Set the default value for the :argc_limit option. - # - # See #new(). The initial default value is 256. - # - # source://drb//lib/drb/drb.rb#1361 - def default_argc_limit(argc); end - - # Set the default value for the :id_conv option. - # - # See #new(). The initial default value is a DRbIdConv instance. - # - # source://drb//lib/drb/drb.rb#1382 - def default_id_conv(idconv); end - - # Set the default value for the :load_limit option. - # - # See #new(). The initial default value is 25 MB. - # - # source://drb//lib/drb/drb.rb#1368 - def default_load_limit(sz); end - - # source://drb//lib/drb/drb.rb#1398 - def make_config(hash = T.unsafe(nil)); end - - # Get the default value of the :verbose option. - # - # source://drb//lib/drb/drb.rb#1394 - def verbose; end - - # Set the default value of the :verbose option. - # - # See #new(). The initial default value is false. - # - # source://drb//lib/drb/drb.rb#1389 - def verbose=(on); end - end -end - -# source://drb//lib/drb/drb.rb#1624 -class DRb::DRbServer::InvokeMethod - include ::DRb::DRbServer::InvokeMethod18Mixin - - # @return [InvokeMethod] a new instance of InvokeMethod - # - # source://drb//lib/drb/drb.rb#1625 - def initialize(drb_server, client); end - - # source://drb//lib/drb/drb.rb#1630 - def perform; end - - private - - # source://drb//lib/drb/drb.rb#1667 - def check_insecure_method; end - - # source://drb//lib/drb/drb.rb#1659 - def init_with_client; end - - # source://drb//lib/drb/drb.rb#1676 - def perform_without_block; end - - # source://drb//lib/drb/drb.rb#1671 - def setup_message; end -end - -# source://drb//lib/drb/invokemethod.rb#6 -module DRb::DRbServer::InvokeMethod18Mixin - # source://drb//lib/drb/invokemethod.rb#7 - def block_yield(x); end - - # source://drb//lib/drb/invokemethod.rb#14 - def perform_with_block; end -end - -# The default drb protocol which communicates over a TCP socket. -# -# The DRb TCP protocol URI looks like: -# druby://:?. The option is optional. -# -# source://drb//lib/drb/drb.rb#815 -class DRb::DRbTCPSocket - # Create a new DRbTCPSocket instance. - # - # +uri+ is the URI we are connected to. - # +soc+ is the tcp socket we are bound to. +config+ is our - # configuration. - # - # @return [DRbTCPSocket] a new instance of DRbTCPSocket - # - # source://drb//lib/drb/drb.rb#903 - def initialize(uri, soc, config = T.unsafe(nil)); end - - # On the server side, for an instance returned by #open_server, - # accept a client connection and return a new instance to handle - # the server's side of this client-server session. - # - # source://drb//lib/drb/drb.rb#971 - def accept; end - - # Check to see if this connection is alive. - # - # @return [Boolean] - # - # source://drb//lib/drb/drb.rb#1001 - def alive?; end - - # Close the connection. - # - # If this is an instance returned by #open_server, then this stops - # listening for new connections altogether. If this is an instance - # returned by #open or by #accept, then it closes this particular - # client-server session. - # - # source://drb//lib/drb/drb.rb#953 - def close; end - - # Get the address of our TCP peer (the other end of the socket - # we are bound to. - # - # source://drb//lib/drb/drb.rb#918 - def peeraddr; end - - # On the client side, receive a reply from the server. - # - # source://drb//lib/drb/drb.rb#941 - def recv_reply; end - - # On the server side, receive a request from the client. - # - # source://drb//lib/drb/drb.rb#931 - def recv_request; end - - # On the server side, send a reply to the client. - # - # source://drb//lib/drb/drb.rb#936 - def send_reply(succ, result); end - - # On the client side, send a request to the server. - # - # source://drb//lib/drb/drb.rb#926 - def send_request(ref, msg_id, arg, b); end - - # source://drb//lib/drb/drb.rb#1010 - def set_sockopt(soc); end - - # Graceful shutdown - # - # source://drb//lib/drb/drb.rb#996 - def shutdown; end - - # Get the socket. - # - # source://drb//lib/drb/drb.rb#923 - def stream; end - - # Get the URI that we are connected to. - # - # source://drb//lib/drb/drb.rb#914 - def uri; end - - private - - # source://drb//lib/drb/drb.rb#986 - def accept_or_shutdown; end - - # source://drb//lib/drb/drb.rb#962 - def close_shutdown_pipe; end - - class << self - # Returns the hostname of this server - # - # source://drb//lib/drb/drb.rb#845 - def getservername; end - - # Open a client connection to +uri+ (DRb URI string) using configuration - # +config+. - # - # This can raise DRb::DRbBadScheme or DRb::DRbBadURI if +uri+ is not for a - # recognized protocol. See DRb::DRbServer.new for information on built-in - # URI protocols. - # - # source://drb//lib/drb/drb.rb#838 - def open(uri, config); end - - # Open a server listening for connections at +uri+ using - # configuration +config+. - # - # source://drb//lib/drb/drb.rb#876 - def open_server(uri, config); end - - # For the families available for +host+, returns a TCPServer on +port+. - # If +port+ is 0 the first available port is used. IPv4 servers are - # preferred over IPv6 servers. - # - # source://drb//lib/drb/drb.rb#861 - def open_server_inaddr_any(host, port); end - - # source://drb//lib/drb/drb.rb#818 - def parse_uri(uri); end - - # Parse +uri+ into a [uri, option] pair. - # - # source://drb//lib/drb/drb.rb#893 - def uri_option(uri, config); end - end -end - -# source://drb//lib/drb/drb.rb#1021 -class DRb::DRbURIOption - # @return [DRbURIOption] a new instance of DRbURIOption - # - # source://drb//lib/drb/drb.rb#1022 - def initialize(option); end - - # source://drb//lib/drb/drb.rb#1028 - def ==(other); end - - # source://drb//lib/drb/drb.rb#1028 - def eql?(other); end - - # source://drb//lib/drb/drb.rb#1033 - def hash; end - - # Returns the value of attribute option. - # - # source://drb//lib/drb/drb.rb#1025 - def option; end - - # source://drb//lib/drb/drb.rb#1026 - def to_s; end -end - -# Mixin module making an object undumpable or unmarshallable. -# -# If an object which includes this module is returned by method -# called over drb, then the object remains in the server space -# and a reference to the object is returned, rather than the -# object being marshalled and moved into the client space. -# -# source://drb//lib/drb/drb.rb#390 -module DRb::DRbUndumped - # @raise [TypeError] - # - # source://drb//lib/drb/drb.rb#391 - def _dump(dummy); end -end - -# Class wrapping a marshalled object whose type is unknown locally. -# -# If an object is returned by a method invoked over drb, but the -# class of the object is unknown in the client namespace, or -# the object is a constant unknown in the client namespace, then -# the still-marshalled object is returned wrapped in a DRbUnknown instance. -# -# If this object is passed as an argument to a method invoked over -# drb, then the wrapped object is passed instead. -# -# The class or constant name of the object can be read from the -# +name+ attribute. The marshalled object is held in the +buf+ -# attribute. -# -# source://drb//lib/drb/drb.rb#457 -class DRb::DRbUnknown - # Create a new DRbUnknown object. - # - # +buf+ is a string containing a marshalled object that could not - # be unmarshalled. +err+ is the error message that was raised - # when the unmarshalling failed. It is used to determine the - # name of the unmarshalled object. - # - # @return [DRbUnknown] a new instance of DRbUnknown - # - # source://drb//lib/drb/drb.rb#465 - def initialize(err, buf); end - - # source://drb//lib/drb/drb.rb#494 - def _dump(lv); end - - # Buffer contained the marshalled, unknown object. - # - # source://drb//lib/drb/drb.rb#484 - def buf; end - - # Create a DRbUnknownError exception containing this object. - # - # source://drb//lib/drb/drb.rb#508 - def exception; end - - # The name of the unknown thing. - # - # Class name for unknown objects; variable name for unknown - # constants. - # - # source://drb//lib/drb/drb.rb#481 - def name; end - - # Attempt to load the wrapped marshalled object again. - # - # If the class of the object is now known locally, the object - # will be unmarshalled and returned. Otherwise, a new - # but identical DRbUnknown object will be returned. - # - # source://drb//lib/drb/drb.rb#503 - def reload; end - - class << self - # source://drb//lib/drb/drb.rb#486 - def _load(s); end - end -end - -# An exception wrapping a DRb::DRbUnknown object -# -# source://drb//lib/drb/drb.rb#410 -class DRb::DRbUnknownError < ::DRb::DRbError - # Create a new DRbUnknownError for the DRb::DRbUnknown object +unknown+ - # - # @return [DRbUnknownError] a new instance of DRbUnknownError - # - # source://drb//lib/drb/drb.rb#413 - def initialize(unknown); end - - # source://drb//lib/drb/drb.rb#425 - def _dump(lv); end - - # Get the wrapped DRb::DRbUnknown object. - # - # source://drb//lib/drb/drb.rb#419 - def unknown; end - - class << self - # source://drb//lib/drb/drb.rb#421 - def _load(s); end - end -end - -# source://drb//lib/drb/drb.rb#1199 -class DRb::ThreadObject - include ::MonitorMixin - - # @return [ThreadObject] a new instance of ThreadObject - # - # source://drb//lib/drb/drb.rb#1202 - def initialize(&blk); end - - # source://drb//lib/drb/drb.rb#1237 - def _execute; end - - # @return [Boolean] - # - # source://drb//lib/drb/drb.rb#1213 - def alive?; end - - # source://drb//lib/drb/drb.rb#1217 - def kill; end - - # source://drb//lib/drb/drb.rb#1222 - def method_missing(msg, *arg, &blk); end -end - -# source://drb//lib/drb/version.rb#2 -DRb::VERSION = T.let(T.unsafe(nil), String) - -# source://drb//lib/drb/drb.rb#1943 -DRbIdConv = DRb::DRbIdConv - -# :stopdoc: -# -# source://drb//lib/drb/drb.rb#1941 -DRbObject = DRb::DRbObject - -# source://drb//lib/drb/drb.rb#1942 -DRbUndumped = DRb::DRbUndumped diff --git a/sorbet/rbi/gems/i18n.rbi b/sorbet/rbi/gems/i18n.rbi deleted file mode 100644 index 39c764a..0000000 --- a/sorbet/rbi/gems/i18n.rbi +++ /dev/null @@ -1,322 +0,0 @@ -# This file is autogenerated. Do not edit it by hand. Regenerate it with: -# srb rbi gems - -# typed: true -# -# If you would like to make changes to this file, great! Please create the gem's shim here: -# -# https://github.com/sorbet/sorbet-typed/new/master?filename=lib/i18n/all/i18n.rbi -# -# i18n-1.14.5 - -module I18n - def self.cache_key_digest; end - def self.cache_key_digest=(key_digest); end - def self.cache_namespace; end - def self.cache_namespace=(namespace); end - def self.cache_store; end - def self.cache_store=(store); end - def self.fallbacks; end - def self.fallbacks=(fallbacks); end - def self.interpolate(string, values); end - def self.interpolate_hash(string, values); end - def self.new_double_nested_cache; end - def self.perform_caching?; end - def self.reserve_key(key); end - def self.reserved_keys_pattern; end - extend I18n::Base -end -module I18n::Utils - def self.deep_merge!(hash, other_hash, &block); end - def self.deep_merge(hash, other_hash, &block); end - def self.deep_symbolize_keys(hash); end - def self.deep_symbolize_keys_in_object(value); end - def self.except(hash, *keys); end -end -class I18n::ExceptionHandler - def call(exception, _locale, _key, _options); end -end -class I18n::ArgumentError < ArgumentError -end -class I18n::Disabled < I18n::ArgumentError - def initialize(method); end -end -class I18n::InvalidLocale < I18n::ArgumentError - def initialize(locale); end - def locale; end -end -class I18n::InvalidLocaleData < I18n::ArgumentError - def filename; end - def initialize(filename, exception_message); end -end -class I18n::MissingTranslation < I18n::ArgumentError - include I18n::MissingTranslation::Base -end -module I18n::MissingTranslation::Base - def initialize(locale, key, options = nil); end - def key; end - def keys; end - def locale; end - def message; end - def normalized_option(key); end - def options; end - def to_exception; end - def to_s; end -end -class I18n::MissingTranslationData < I18n::ArgumentError - include I18n::MissingTranslation::Base -end -class I18n::InvalidPluralizationData < I18n::ArgumentError - def count; end - def entry; end - def initialize(entry, count, key); end - def key; end -end -class I18n::MissingInterpolationArgument < I18n::ArgumentError - def initialize(key, values, string); end - def key; end - def string; end - def values; end -end -class I18n::ReservedInterpolationKey < I18n::ArgumentError - def initialize(key, string); end - def key; end - def string; end -end -class I18n::UnknownFileType < I18n::ArgumentError - def filename; end - def initialize(type, filename); end - def type; end -end -class I18n::UnsupportedMethod < I18n::ArgumentError - def backend_klass; end - def initialize(method, backend_klass, msg); end - def method; end - def msg; end -end -class I18n::InvalidFilenames < I18n::ArgumentError - def initialize(file_errors); end -end -module I18n::Base - def available_locales; end - def available_locales=(value); end - def available_locales_initialized?; end - def backend; end - def backend=(value); end - def config; end - def config=(value); end - def default_locale; end - def default_locale=(value); end - def default_separator; end - def default_separator=(value); end - def eager_load!; end - def enforce_available_locales!(locale); end - def enforce_available_locales; end - def enforce_available_locales=(value); end - def exception_handler; end - def exception_handler=(value); end - def exists?(key, _locale = nil, locale: nil, **options); end - def handle_exception(handling, exception, locale, key, options); end - def interpolation_keys(key, **options); end - def interpolation_keys_from_translation(translation); end - def l(object, locale: nil, format: nil, **options); end - def load_path; end - def load_path=(value); end - def locale; end - def locale=(value); end - def locale_available?(locale); end - def localize(object, locale: nil, format: nil, **options); end - def normalize_key(key, separator); end - def normalize_keys(locale, key, scope, separator = nil); end - def reload!; end - def t!(key, **options); end - def t(key = nil, throw: nil, raise: nil, locale: nil, **options); end - def translate!(key, **options); end - def translate(key = nil, throw: nil, raise: nil, locale: nil, **options); end - def translate_key(key, throw, raise, locale, backend, options); end - def transliterate(key, throw: nil, raise: nil, locale: nil, replacement: nil, **options); end - def with_locale(tmp_locale = nil); end -end -module I18n::Backend -end -module I18n::Backend::Fallbacks - def exists?(locale, key, options = nil); end - def extract_non_symbol_default!(options); end - def on_fallback(_original_locale, _fallback_locale, _key, _options); end - def resolve_entry(locale, object, subject, options = nil); end - def translate(locale, key, options = nil); end -end -class I18n::Config - def available_locales; end - def available_locales=(locales); end - def available_locales_initialized?; end - def available_locales_set; end - def backend; end - def backend=(backend); end - def clear_available_locales_set; end - def default_locale; end - def default_locale=(locale); end - def default_separator; end - def default_separator=(separator); end - def enforce_available_locales; end - def enforce_available_locales=(enforce_available_locales); end - def exception_handler; end - def exception_handler=(exception_handler); end - def interpolation_patterns; end - def interpolation_patterns=(interpolation_patterns); end - def load_path; end - def load_path=(load_path); end - def locale; end - def locale=(locale); end - def missing_interpolation_argument_handler; end - def missing_interpolation_argument_handler=(exception_handler); end -end -module I18n::Locale -end -class I18n::Locale::Fallbacks < Hash - def [](locale); end - def compute(tags, include_defaults = nil, exclude = nil); end - def defaults; end - def defaults=(defaults); end - def empty?; end - def initialize(*mappings); end - def inspect; end - def map(*args, &block); end -end -module I18n::Locale::Tag - def self.implementation; end - def self.implementation=(implementation); end - def self.tag(tag); end -end -module I18n::Locale::Tag::Parents - def parent; end - def parents; end - def self_and_parents; end -end -class I18n::Locale::Tag::Simple - def initialize(*tag); end - def self.tag(tag); end - def subtags; end - def tag; end - def to_a; end - def to_s; end - def to_sym; end - include I18n::Locale::Tag::Parents -end -module I18n::Backend::Transliterator - def self.get(rule = nil); end - def transliterate(locale, string, replacement = nil); end -end -class I18n::Backend::Transliterator::ProcTransliterator - def initialize(rule); end - def transliterate(string, replacement = nil); end -end -class I18n::Backend::Transliterator::HashTransliterator - def add(hash); end - def add_default_approximations; end - def approximations; end - def initialize(rule = nil); end - def transliterate(string, replacement = nil); end -end -module I18n::Backend::Base - def available_locales; end - def deep_interpolate(locale, data, values = nil); end - def default(locale, object, subject, options = nil); end - def eager_load!; end - def eager_loaded?; end - def exists?(locale, key, options = nil); end - def interpolate(locale, subject, values = nil); end - def load_file(filename); end - def load_json(filename); end - def load_rb(filename); end - def load_translations(*filenames); end - def load_yaml(filename); end - def load_yml(filename); end - def localize(locale, object, format = nil, options = nil); end - def lookup(locale, key, scope = nil, options = nil); end - def pluralization_key(entry, count); end - def pluralize(locale, entry, count); end - def reload!; end - def resolve(locale, object, subject, options = nil); end - def resolve_entry(locale, object, subject, options = nil); end - def store_translations(locale, data, options = nil); end - def subtrees?; end - def translate(locale, key, options = nil); end - def translate_localization_format(locale, object, format, options); end - include I18n::Backend::Transliterator -end -module I18n::Backend::InterpolationCompiler - def compile_all_strings_in(data); end - def interpolate(locale, string, values); end - def store_translations(locale, data, options = nil); end -end -module I18n::Backend::InterpolationCompiler::Compiler - def compile_if_an_interpolation(string); end - def compile_interpolation_token(key); end - def compiled_interpolation_body(str); end - def direct_key(key); end - def escape_key_sym(key); end - def escape_plain_str(str); end - def handle_interpolation_token(token); end - def interpolate_key(key); end - def interpolate_or_raise_missing(key); end - def interpolated_str?(str); end - def missing_key(key); end - def nil_key(key); end - def reserved_key(key); end - def tokenize(str); end - extend I18n::Backend::InterpolationCompiler::Compiler -end -module I18n::Backend::Cache - def _fetch(cache_key, &block); end - def cache_key(locale, key, options); end - def digest_item(key); end - def fetch(cache_key, &block); end - def translate(locale, key, options = nil); end -end -module I18n::Backend::CacheFile - def load_file(filename); end - def normalized_path(file); end - def path_roots; end - def path_roots=(arg0); end -end -module I18n::Backend::Cascade - def lookup(locale, key, scope = nil, options = nil); end -end -class I18n::Backend::Chain - include I18n::Backend::Chain::Implementation -end -module I18n::Backend::Chain::Implementation - def _deep_merge(hash, other_hash); end - def available_locales; end - def backends; end - def backends=(arg0); end - def eager_load!; end - def exists?(locale, key, options = nil); end - def init_translations; end - def initialize(*backends); end - def initialized?; end - def localize(locale, object, format = nil, options = nil); end - def namespace_lookup?(result, options); end - def reload!; end - def store_translations(locale, data, options = nil); end - def translate(locale, key, default_options = nil); end - def translations; end - include I18n::Backend::Base -end -module I18n::Backend::Flatten - def escape_default_separator(key); end - def find_link(locale, key); end - def flatten_keys(hash, escape, prev_key = nil, &block); end - def flatten_translations(locale, data, escape, subtree); end - def links; end - def normalize_flat_keys(locale, key, scope, separator); end - def resolve_link(locale, key); end - def self.escape_default_separator(key); end - def self.normalize_flat_keys(locale, key, scope, separator); end - def store_link(locale, key, link); end -end -module I18n::Gettext - def self.extract_scope(msgid, separator); end - def self.plural_keys(*args); end -end diff --git a/sorbet/rbi/gems/i18n@1.14.6.rbi b/sorbet/rbi/gems/i18n@1.14.6.rbi deleted file mode 100644 index 013b065..0000000 --- a/sorbet/rbi/gems/i18n@1.14.6.rbi +++ /dev/null @@ -1,2275 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `i18n` gem. -# Please instead update this file by running `bin/tapioca gem i18n`. - - -# Simple Locale tag implementation that computes subtags by simply splitting -# the locale tag at '-' occurrences. -# -# source://i18n//lib/i18n/version.rb#3 -module I18n - extend ::I18n::Base - - class << self - # source://i18n//lib/i18n/backend/cache.rb#64 - def cache_key_digest; end - - # source://i18n//lib/i18n/backend/cache.rb#68 - def cache_key_digest=(key_digest); end - - # source://i18n//lib/i18n/backend/cache.rb#56 - def cache_namespace; end - - # source://i18n//lib/i18n/backend/cache.rb#60 - def cache_namespace=(namespace); end - - # source://i18n//lib/i18n/backend/cache.rb#48 - def cache_store; end - - # source://i18n//lib/i18n/backend/cache.rb#52 - def cache_store=(store); end - - # Returns the current fallbacks implementation. Defaults to +I18n::Locale::Fallbacks+. - # - # source://i18n//lib/i18n/backend/fallbacks.rb#17 - def fallbacks; end - - # Sets the current fallbacks implementation. Use this to set a different fallbacks implementation. - # - # source://i18n//lib/i18n/backend/fallbacks.rb#23 - def fallbacks=(fallbacks); end - - # Return String or raises MissingInterpolationArgument exception. - # Missing argument's logic is handled by I18n.config.missing_interpolation_argument_handler. - # - # @raise [ReservedInterpolationKey] - # - # source://i18n//lib/i18n/interpolate/ruby.rb#23 - def interpolate(string, values); end - - # source://i18n//lib/i18n/interpolate/ruby.rb#29 - def interpolate_hash(string, values); end - - # source://i18n//lib/i18n.rb#38 - def new_double_nested_cache; end - - # @return [Boolean] - # - # source://i18n//lib/i18n/backend/cache.rb#72 - def perform_caching?; end - - # Marks a key as reserved. Reserved keys are used internally, - # and can't also be used for interpolation. If you are using any - # extra keys as I18n options, you should call I18n.reserve_key - # before any I18n.translate (etc) calls are made. - # - # source://i18n//lib/i18n.rb#46 - def reserve_key(key); end - - # source://i18n//lib/i18n.rb#51 - def reserved_keys_pattern; end - end -end - -# source://i18n//lib/i18n/exceptions.rb#16 -class I18n::ArgumentError < ::ArgumentError; end - -# source://i18n//lib/i18n/backend.rb#4 -module I18n::Backend; end - -# source://i18n//lib/i18n/backend/base.rb#8 -module I18n::Backend::Base - include ::I18n::Backend::Transliterator - - # Returns an array of locales for which translations are available - # ignoring the reserved translation meta data key :i18n. - # - # @raise [NotImplementedError] - # - # source://i18n//lib/i18n/backend/base.rb#97 - def available_locales; end - - # source://i18n//lib/i18n/backend/base.rb#105 - def eager_load!; end - - # @return [Boolean] - # - # source://i18n//lib/i18n/backend/base.rb#71 - def exists?(locale, key, options = T.unsafe(nil)); end - - # Accepts a list of paths to translation files. Loads translations from - # plain Ruby (*.rb), YAML files (*.yml), or JSON files (*.json). See #load_rb, #load_yml, and #load_json - # for details. - # - # source://i18n//lib/i18n/backend/base.rb#14 - def load_translations(*filenames); end - - # Acts the same as +strftime+, but uses a localized version of the - # format string. Takes a key from the date/time formats translations as - # a format argument (e.g., :short in :'date.formats'). - # - # @raise [ArgumentError] - # - # source://i18n//lib/i18n/backend/base.rb#78 - def localize(locale, object, format = T.unsafe(nil), options = T.unsafe(nil)); end - - # source://i18n//lib/i18n/backend/base.rb#101 - def reload!; end - - # This method receives a locale, a data hash and options for storing translations. - # Should be implemented - # - # @raise [NotImplementedError] - # - # source://i18n//lib/i18n/backend/base.rb#24 - def store_translations(locale, data, options = T.unsafe(nil)); end - - # @raise [I18n::ArgumentError] - # - # source://i18n//lib/i18n/backend/base.rb#28 - def translate(locale, key, options = T.unsafe(nil)); end - - protected - - # Deep interpolation - # - # deep_interpolate { people: { ann: "Ann is %{ann}", john: "John is %{john}" } }, - # ann: 'good', john: 'big' - # #=> { people: { ann: "Ann is good", john: "John is big" } } - # - # source://i18n//lib/i18n/backend/base.rb#217 - def deep_interpolate(locale, data, values = T.unsafe(nil)); end - - # Evaluates defaults. - # If given subject is an Array, it walks the array and returns the - # first translation that can be resolved. Otherwise it tries to resolve - # the translation directly. - # - # source://i18n//lib/i18n/backend/base.rb#128 - def default(locale, object, subject, options = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://i18n//lib/i18n/backend/base.rb#111 - def eager_loaded?; end - - # Interpolates values into a given subject. - # - # if the given subject is a string then: - # method interpolates "file %{file} opened by %%{user}", :file => 'test.txt', :user => 'Mr. X' - # # => "file test.txt opened by %{user}" - # - # if the given subject is an array then: - # each element of the array is recursively interpolated (until it finds a string) - # method interpolates ["yes, %{user}", ["maybe no, %{user}", "no, %{user}"]], :user => "bartuz" - # # => ["yes, bartuz", ["maybe no, bartuz", "no, bartuz"]] - # - # source://i18n//lib/i18n/backend/base.rb#201 - def interpolate(locale, subject, values = T.unsafe(nil)); end - - # Loads a single translations file by delegating to #load_rb or - # #load_yml depending on the file extension and directly merges the - # data to the existing translations. Raises I18n::UnknownFileType - # for all other file extensions. - # - # @raise [UnknownFileType] - # - # source://i18n//lib/i18n/backend/base.rb#240 - def load_file(filename); end - - # Loads a JSON translations file. The data must have locales as - # toplevel keys. - # - # source://i18n//lib/i18n/backend/base.rb#276 - def load_json(filename); end - - # Loads a plain Ruby translations file. eval'ing the file must yield - # a Hash containing translation data with locales as toplevel keys. - # - # source://i18n//lib/i18n/backend/base.rb#254 - def load_rb(filename); end - - # Loads a YAML translations file. The data must have locales as - # toplevel keys. - # - # source://i18n//lib/i18n/backend/base.rb#261 - def load_yaml(filename); end - - # Loads a YAML translations file. The data must have locales as - # toplevel keys. - # - # source://i18n//lib/i18n/backend/base.rb#261 - def load_yml(filename); end - - # The method which actually looks up for the translation in the store. - # - # @raise [NotImplementedError] - # - # source://i18n//lib/i18n/backend/base.rb#116 - def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end - - # source://i18n//lib/i18n/backend/base.rb#308 - def pluralization_key(entry, count); end - - # Picks a translation from a pluralized mnemonic subkey according to English - # pluralization rules : - # - It will pick the :one subkey if count is equal to 1. - # - It will pick the :other subkey otherwise. - # - It will pick the :zero subkey in the special case where count is - # equal to 0 and there is a :zero subkey present. This behaviour is - # not standard with regards to the CLDR pluralization rules. - # Other backends can implement more flexible or complex pluralization rules. - # - # @raise [InvalidPluralizationData] - # - # source://i18n//lib/i18n/backend/base.rb#182 - def pluralize(locale, entry, count); end - - # Resolves a translation. - # If the given subject is a Symbol, it will be translated with the - # given options. If it is a Proc then it will be evaluated. All other - # subjects will be returned directly. - # - # source://i18n//lib/i18n/backend/base.rb#150 - def resolve(locale, object, subject, options = T.unsafe(nil)); end - - # Resolves a translation. - # If the given subject is a Symbol, it will be translated with the - # given options. If it is a Proc then it will be evaluated. All other - # subjects will be returned directly. - # - # source://i18n//lib/i18n/backend/base.rb#150 - def resolve_entry(locale, object, subject, options = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://i18n//lib/i18n/backend/base.rb#120 - def subtrees?; end - - # source://i18n//lib/i18n/backend/base.rb#289 - def translate_localization_format(locale, object, format, options); end -end - -# TODO Should the cache be cleared if new translations are stored? -# -# source://i18n//lib/i18n/backend/cache.rb#79 -module I18n::Backend::Cache - # source://i18n//lib/i18n/backend/cache.rb#80 - def translate(locale, key, options = T.unsafe(nil)); end - - protected - - # source://i18n//lib/i18n/backend/cache.rb#93 - def _fetch(cache_key, &block); end - - # source://i18n//lib/i18n/backend/cache.rb#101 - def cache_key(locale, key, options); end - - # source://i18n//lib/i18n/backend/cache.rb#86 - def fetch(cache_key, &block); end - - private - - # source://i18n//lib/i18n/backend/cache.rb#108 - def digest_item(key); end -end - -# Overwrites the Base load_file method to cache loaded file contents. -# -# source://i18n//lib/i18n/backend/cache_file.rb#8 -module I18n::Backend::CacheFile - # Optionally provide path_roots array to normalize filename paths, - # to make the cached i18n data portable across environments. - # - # source://i18n//lib/i18n/backend/cache_file.rb#11 - def path_roots; end - - # Optionally provide path_roots array to normalize filename paths, - # to make the cached i18n data portable across environments. - # - # source://i18n//lib/i18n/backend/cache_file.rb#11 - def path_roots=(_arg0); end - - protected - - # Track loaded translation files in the `i18n.load_file` scope, - # and skip loading the file if its contents are still up-to-date. - # - # source://i18n//lib/i18n/backend/cache_file.rb#17 - def load_file(filename); end - - # Translate absolute filename to relative path for i18n key. - # - # source://i18n//lib/i18n/backend/cache_file.rb#28 - def normalized_path(file); end -end - -# source://i18n//lib/i18n/backend/cascade.rb#35 -module I18n::Backend::Cascade - # source://i18n//lib/i18n/backend/cascade.rb#36 - def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end -end - -# Backend that chains multiple other backends and checks each of them when -# a translation needs to be looked up. This is useful when you want to use -# standard translations with a Simple backend but store custom application -# translations in a database or other backends. -# -# To use the Chain backend instantiate it and set it to the I18n module. -# You can add chained backends through the initializer or backends -# accessor: -# -# # preserves the existing Simple backend set to I18n.backend -# I18n.backend = I18n::Backend::Chain.new(I18n::Backend::ActiveRecord.new, I18n.backend) -# -# The implementation assumes that all backends added to the Chain implement -# a lookup method with the same API as Simple backend does. -# -# Fallback translations using the :default option are only used by the last backend of a chain. -# -# source://i18n//lib/i18n/backend/chain.rb#21 -class I18n::Backend::Chain - include ::I18n::Backend::Transliterator - include ::I18n::Backend::Base - include ::I18n::Backend::Chain::Implementation -end - -# source://i18n//lib/i18n/backend/chain.rb#22 -module I18n::Backend::Chain::Implementation - include ::I18n::Backend::Transliterator - include ::I18n::Backend::Base - - # source://i18n//lib/i18n/backend/chain.rb#27 - def initialize(*backends); end - - # source://i18n//lib/i18n/backend/chain.rb#52 - def available_locales; end - - # Returns the value of attribute backends. - # - # source://i18n//lib/i18n/backend/chain.rb#25 - def backends; end - - # Sets the attribute backends - # - # @param value the value to set the attribute backends to. - # - # source://i18n//lib/i18n/backend/chain.rb#25 - def backends=(_arg0); end - - # source://i18n//lib/i18n/backend/chain.rb#44 - def eager_load!; end - - # @return [Boolean] - # - # source://i18n//lib/i18n/backend/chain.rb#76 - def exists?(locale, key, options = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://i18n//lib/i18n/backend/chain.rb#31 - def initialized?; end - - # source://i18n//lib/i18n/backend/chain.rb#82 - def localize(locale, object, format = T.unsafe(nil), options = T.unsafe(nil)); end - - # source://i18n//lib/i18n/backend/chain.rb#40 - def reload!; end - - # source://i18n//lib/i18n/backend/chain.rb#48 - def store_translations(locale, data, options = T.unsafe(nil)); end - - # source://i18n//lib/i18n/backend/chain.rb#56 - def translate(locale, key, default_options = T.unsafe(nil)); end - - protected - - # source://i18n//lib/i18n/backend/chain.rb#92 - def init_translations; end - - # @return [Boolean] - # - # source://i18n//lib/i18n/backend/chain.rb#108 - def namespace_lookup?(result, options); end - - # source://i18n//lib/i18n/backend/chain.rb#98 - def translations; end - - private - - # This is approximately what gets used in ActiveSupport. - # However since we are not guaranteed to run in an ActiveSupport context - # it is wise to have our own copy. We underscore it - # to not pollute the namespace of the including class. - # - # source://i18n//lib/i18n/backend/chain.rb#117 - def _deep_merge(hash, other_hash); end -end - -# source://i18n//lib/i18n/backend/fallbacks.rb#30 -module I18n::Backend::Fallbacks - # @return [Boolean] - # - # source://i18n//lib/i18n/backend/fallbacks.rb#98 - def exists?(locale, key, options = T.unsafe(nil)); end - - # source://i18n//lib/i18n/backend/fallbacks.rb#89 - def extract_non_symbol_default!(options); end - - # source://i18n//lib/i18n/backend/fallbacks.rb#67 - def resolve_entry(locale, object, subject, options = T.unsafe(nil)); end - - # Overwrites the Base backend translate method so that it will try each - # locale given by I18n.fallbacks for the given locale. E.g. for the - # locale :"de-DE" it might try the locales :"de-DE", :de and :en - # (depends on the fallbacks implementation) until it finds a result with - # the given options. If it does not find any result for any of the - # locales it will then throw MissingTranslation as usual. - # - # The default option takes precedence over fallback locales only when - # it's a Symbol. When the default contains a String, Proc or Hash - # it is evaluated last after all the fallback locales have been tried. - # - # source://i18n//lib/i18n/backend/fallbacks.rb#41 - def translate(locale, key, options = T.unsafe(nil)); end - - private - - # Overwrite on_fallback to add specified logic when the fallback succeeds. - # - # source://i18n//lib/i18n/backend/fallbacks.rb#114 - def on_fallback(_original_locale, _fallback_locale, _key, _options); end -end - -# This module contains several helpers to assist flattening translations. -# You may want to flatten translations for: -# -# 1) speed up lookups, as in the Memoize backend; -# 2) In case you want to store translations in a data store, as in ActiveRecord backend; -# -# You can check both backends above for some examples. -# This module also keeps all links in a hash so they can be properly resolved when flattened. -# -# source://i18n//lib/i18n/backend/flatten.rb#13 -module I18n::Backend::Flatten - # Flatten keys for nested Hashes by chaining up keys: - # - # >> { "a" => { "b" => { "c" => "d", "e" => "f" }, "g" => "h" }, "i" => "j"}.wind - # => { "a.b.c" => "d", "a.b.e" => "f", "a.g" => "h", "i" => "j" } - # - # source://i18n//lib/i18n/backend/flatten.rb#59 - def flatten_keys(hash, escape, prev_key = T.unsafe(nil), &block); end - - # Receives a hash of translations (where the key is a locale and - # the value is another hash) and return a hash with all - # translations flattened. - # - # Nested hashes are included in the flattened hash just if subtree - # is true and Symbols are automatically stored as links. - # - # source://i18n//lib/i18n/backend/flatten.rb#74 - def flatten_translations(locale, data, escape, subtree); end - - # Store flattened links. - # - # source://i18n//lib/i18n/backend/flatten.rb#50 - def links; end - - # Shortcut to I18n::Backend::Flatten.normalize_flat_keys - # and then resolve_links. - # - # source://i18n//lib/i18n/backend/flatten.rb#44 - def normalize_flat_keys(locale, key, scope, separator); end - - protected - - # source://i18n//lib/i18n/backend/flatten.rb#112 - def escape_default_separator(key); end - - # source://i18n//lib/i18n/backend/flatten.rb#106 - def find_link(locale, key); end - - # source://i18n//lib/i18n/backend/flatten.rb#93 - def resolve_link(locale, key); end - - # source://i18n//lib/i18n/backend/flatten.rb#89 - def store_link(locale, key, link); end - - class << self - # Receives a string and escape the default separator. - # - # source://i18n//lib/i18n/backend/flatten.rb#38 - def escape_default_separator(key); end - - # normalize_keys the flatten way. This method is significantly faster - # and creates way less objects than the one at I18n.normalize_keys. - # It also handles escaping the translation keys. - # - # source://i18n//lib/i18n/backend/flatten.rb#20 - def normalize_flat_keys(locale, key, scope, separator); end - end -end - -# source://i18n//lib/i18n/backend/flatten.rb#15 -I18n::Backend::Flatten::FLATTEN_SEPARATOR = T.let(T.unsafe(nil), String) - -# source://i18n//lib/i18n/backend/flatten.rb#14 -I18n::Backend::Flatten::SEPARATOR_ESCAPE_CHAR = T.let(T.unsafe(nil), String) - -# source://i18n//lib/i18n/backend/interpolation_compiler.rb#20 -module I18n::Backend::InterpolationCompiler - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#97 - def interpolate(locale, string, values); end - - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#107 - def store_translations(locale, data, options = T.unsafe(nil)); end - - protected - - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#113 - def compile_all_strings_in(data); end -end - -# source://i18n//lib/i18n/backend/interpolation_compiler.rb#21 -module I18n::Backend::InterpolationCompiler::Compiler - extend ::I18n::Backend::InterpolationCompiler::Compiler - - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#26 - def compile_if_an_interpolation(string); end - - # @return [Boolean] - # - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#38 - def interpolated_str?(str); end - - protected - - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#58 - def compile_interpolation_token(key); end - - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#48 - def compiled_interpolation_body(str); end - - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#71 - def direct_key(key); end - - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#91 - def escape_key_sym(key); end - - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#87 - def escape_plain_str(str); end - - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#54 - def handle_interpolation_token(token); end - - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#67 - def interpolate_key(key); end - - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#62 - def interpolate_or_raise_missing(key); end - - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#79 - def missing_key(key); end - - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#75 - def nil_key(key); end - - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#83 - def reserved_key(key); end - - # tokenize("foo %{bar} baz %%{buz}") # => ["foo ", "%{bar}", " baz ", "%%{buz}"] - # - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#44 - def tokenize(str); end -end - -# source://i18n//lib/i18n/backend/interpolation_compiler.rb#24 -I18n::Backend::InterpolationCompiler::Compiler::TOKENIZER = T.let(T.unsafe(nil), Regexp) - -# This is a basic backend for key value stores. It receives on -# initialization the store, which should respond to three methods: -# -# * store#[](key) - Used to get a value -# * store#[]=(key, value) - Used to set a value -# * store#keys - Used to get all keys -# -# Since these stores only supports string, all values are converted -# to JSON before being stored, allowing it to also store booleans, -# hashes and arrays. However, this store does not support Procs. -# -# As the ActiveRecord backend, Symbols are just supported when loading -# translations from the filesystem or through explicit store translations. -# -# Also, avoid calling I18n.available_locales since it's a somehow -# expensive operation in most stores. -# -# == Example -# -# To setup I18n to use TokyoCabinet in memory is quite straightforward: -# -# require 'rufus/tokyo/cabinet' # gem install rufus-tokyo -# I18n.backend = I18n::Backend::KeyValue.new(Rufus::Tokyo::Cabinet.new('*')) -# -# == Performance -# -# You may make this backend even faster by including the Memoize module. -# However, notice that you should properly clear the cache if you change -# values directly in the key-store. -# -# == Subtrees -# -# In most backends, you are allowed to retrieve part of a translation tree: -# -# I18n.backend.store_translations :en, :foo => { :bar => :baz } -# I18n.t "foo" #=> { :bar => :baz } -# -# This backend supports this feature by default, but it slows down the storage -# of new data considerably and makes hard to delete entries. That said, you are -# allowed to disable the storage of subtrees on initialization: -# -# I18n::Backend::KeyValue.new(@store, false) -# -# This is useful if you are using a KeyValue backend chained to a Simple backend. -# -# source://i18n//lib/i18n/backend/key_value.rb#69 -class I18n::Backend::KeyValue - include ::I18n::Backend::Flatten - include ::I18n::Backend::Transliterator - include ::I18n::Backend::Base - include ::I18n::Backend::KeyValue::Implementation -end - -# source://i18n//lib/i18n/backend/key_value.rb#70 -module I18n::Backend::KeyValue::Implementation - include ::I18n::Backend::Flatten - include ::I18n::Backend::Transliterator - include ::I18n::Backend::Base - - # source://i18n//lib/i18n/backend/key_value.rb#75 - def initialize(store, subtrees = T.unsafe(nil)); end - - # source://i18n//lib/i18n/backend/key_value.rb#102 - def available_locales; end - - # @return [Boolean] - # - # source://i18n//lib/i18n/backend/key_value.rb#79 - def initialized?; end - - # Returns the value of attribute store. - # - # source://i18n//lib/i18n/backend/key_value.rb#71 - def store; end - - # Sets the attribute store - # - # @param value the value to set the attribute store to. - # - # source://i18n//lib/i18n/backend/key_value.rb#71 - def store=(_arg0); end - - # source://i18n//lib/i18n/backend/key_value.rb#83 - def store_translations(locale, data, options = T.unsafe(nil)); end - - protected - - # source://i18n//lib/i18n/backend/key_value.rb#124 - def init_translations; end - - # source://i18n//lib/i18n/backend/key_value.rb#136 - def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end - - # source://i18n//lib/i18n/backend/key_value.rb#150 - def pluralize(locale, entry, count); end - - # @return [Boolean] - # - # source://i18n//lib/i18n/backend/key_value.rb#132 - def subtrees?; end - - # Queries the translations from the key-value store and converts - # them into a hash such as the one returned from loading the - # haml files - # - # source://i18n//lib/i18n/backend/key_value.rb#115 - def translations; end -end - -# source://i18n//lib/i18n/backend/key_value.rb#161 -class I18n::Backend::KeyValue::SubtreeProxy - # @return [SubtreeProxy] a new instance of SubtreeProxy - # - # source://i18n//lib/i18n/backend/key_value.rb#162 - def initialize(master_key, store); end - - # source://i18n//lib/i18n/backend/key_value.rb#172 - def [](key); end - - # @return [Boolean] - # - # source://i18n//lib/i18n/backend/key_value.rb#168 - def has_key?(key); end - - # source://i18n//lib/i18n/backend/key_value.rb#196 - def inspect; end - - # @return [Boolean] - # - # source://i18n//lib/i18n/backend/key_value.rb#188 - def instance_of?(klass); end - - # @return [Boolean] - # - # source://i18n//lib/i18n/backend/key_value.rb#183 - def is_a?(klass); end - - # @return [Boolean] - # - # source://i18n//lib/i18n/backend/key_value.rb#183 - def kind_of?(klass); end - - # @return [Boolean] - # - # source://i18n//lib/i18n/backend/key_value.rb#192 - def nil?; end -end - -# source://i18n//lib/i18n/backend/lazy_loadable.rb#65 -class I18n::Backend::LazyLoadable < ::I18n::Backend::Simple - # @return [LazyLoadable] a new instance of LazyLoadable - # - # source://i18n//lib/i18n/backend/lazy_loadable.rb#66 - def initialize(lazy_load: T.unsafe(nil)); end - - # Parse the load path and extract all locales. - # - # source://i18n//lib/i18n/backend/lazy_loadable.rb#99 - def available_locales; end - - # Eager loading is not supported in the lazy context. - # - # source://i18n//lib/i18n/backend/lazy_loadable.rb#90 - def eager_load!; end - - # Returns whether the current locale is initialized. - # - # @return [Boolean] - # - # source://i18n//lib/i18n/backend/lazy_loadable.rb#71 - def initialized?; end - - # source://i18n//lib/i18n/backend/lazy_loadable.rb#107 - def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end - - # Clean up translations and uninitialize all locales. - # - # source://i18n//lib/i18n/backend/lazy_loadable.rb#80 - def reload!; end - - protected - - # Load translations from files that belong to the current locale. - # - # @raise [InvalidFilenames] - # - # source://i18n//lib/i18n/backend/lazy_loadable.rb#121 - def init_translations; end - - # source://i18n//lib/i18n/backend/lazy_loadable.rb#133 - def initialized_locales; end - - private - - # Checks if a filename is named in correspondence to the translations it loaded. - # The locale extracted from the path must be the single locale loaded in the translations. - # - # @raise [FilenameIncorrect] - # - # source://i18n//lib/i18n/backend/lazy_loadable.rb#175 - def assert_file_named_correctly!(file, translations); end - - # Select all files from I18n load path that belong to current locale. - # These files must start with the locale identifier (ie. "en", "pt-BR"), - # followed by an "_" demarcation to separate proceeding text. - # - # source://i18n//lib/i18n/backend/lazy_loadable.rb#167 - def filenames_for_current_locale; end - - # @return [Boolean] - # - # source://i18n//lib/i18n/backend/lazy_loadable.rb#139 - def lazy_load?; end - - # Loads each file supplied and asserts that the file only loads - # translations as expected by the name. The method returns a list of - # errors corresponding to offending files. - # - # source://i18n//lib/i18n/backend/lazy_loadable.rb#152 - def load_translations_and_collect_file_errors(files); end -end - -# source://i18n//lib/i18n/backend/lazy_loadable.rb#143 -class I18n::Backend::LazyLoadable::FilenameIncorrect < ::StandardError - # @return [FilenameIncorrect] a new instance of FilenameIncorrect - # - # source://i18n//lib/i18n/backend/lazy_loadable.rb#144 - def initialize(file, expected_locale, unexpected_locales); end -end - -# Backend that lazy loads translations based on the current locale. This -# implementation avoids loading all translations up front. Instead, it only -# loads the translations that belong to the current locale. This offers a -# performance incentive in local development and test environments for -# applications with many translations for many different locales. It's -# particularly useful when the application only refers to a single locales' -# translations at a time (ex. A Rails workload). The implementation -# identifies which translation files from the load path belong to the -# current locale by pattern matching against their path name. -# -# Specifically, a translation file is considered to belong to a locale if: -# a) the filename is in the I18n load path -# b) the filename ends in a supported extension (ie. .yml, .json, .po, .rb) -# c) the filename starts with the locale identifier -# d) the locale identifier and optional proceeding text is separated by an underscore, ie. "_". -# -# Examples: -# Valid files that will be selected by this backend: -# -# "files/locales/en_translation.yml" (Selected for locale "en") -# "files/locales/fr.po" (Selected for locale "fr") -# -# Invalid files that won't be selected by this backend: -# -# "files/locales/translation-file" -# "files/locales/en-translation.unsupported" -# "files/locales/french/translation.yml" -# "files/locales/fr/translation.yml" -# -# The implementation uses this assumption to defer the loading of -# translation files until the current locale actually requires them. -# -# The backend has two working modes: lazy_load and eager_load. -# -# Note: This backend should only be enabled in test environments! -# When the mode is set to false, the backend behaves exactly like the -# Simple backend, with an additional check that the paths being loaded -# abide by the format. If paths can't be matched to the format, an error is raised. -# -# You can configure lazy loaded backends through the initializer or backends -# accessor: -# -# # In test environments -# -# I18n.backend = I18n::Backend::LazyLoadable.new(lazy_load: true) -# -# # In other environments, such as production and CI -# -# I18n.backend = I18n::Backend::LazyLoadable.new(lazy_load: false) # default -# -# source://i18n//lib/i18n/backend/lazy_loadable.rb#55 -class I18n::Backend::LocaleExtractor - class << self - # source://i18n//lib/i18n/backend/lazy_loadable.rb#57 - def locale_from_path(path); end - end -end - -# source://i18n//lib/i18n/backend/memoize.rb#14 -module I18n::Backend::Memoize - # source://i18n//lib/i18n/backend/memoize.rb#15 - def available_locales; end - - # source://i18n//lib/i18n/backend/memoize.rb#29 - def eager_load!; end - - # source://i18n//lib/i18n/backend/memoize.rb#24 - def reload!; end - - # source://i18n//lib/i18n/backend/memoize.rb#19 - def store_translations(locale, data, options = T.unsafe(nil)); end - - protected - - # source://i18n//lib/i18n/backend/memoize.rb#37 - def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end - - # source://i18n//lib/i18n/backend/memoize.rb#44 - def memoized_lookup; end - - # source://i18n//lib/i18n/backend/memoize.rb#48 - def reset_memoizations!(locale = T.unsafe(nil)); end -end - -# source://i18n//lib/i18n/backend/metadata.rb#21 -module I18n::Backend::Metadata - # source://i18n//lib/i18n/backend/metadata.rb#52 - def interpolate(locale, entry, values = T.unsafe(nil)); end - - # source://i18n//lib/i18n/backend/metadata.rb#57 - def pluralize(locale, entry, count); end - - # source://i18n//lib/i18n/backend/metadata.rb#40 - def translate(locale, key, options = T.unsafe(nil)); end - - protected - - # source://i18n//lib/i18n/backend/metadata.rb#63 - def with_metadata(metadata, &block); end - - class << self - # @private - # - # source://i18n//lib/i18n/backend/metadata.rb#23 - def included(base); end - end -end - -# source://i18n//lib/i18n/backend/pluralization.rb#16 -module I18n::Backend::Pluralization - # Overwrites the Base backend translate method so that it will check the - # translation meta data space (:i18n) for a locale specific pluralization - # rule and use it to pluralize the given entry. I.e., the library expects - # pluralization rules to be stored at I18n.t(:'i18n.plural.rule') - # - # Pluralization rules are expected to respond to #call(count) and - # return a pluralization key. Valid keys depend on the pluralization - # rules for the locale, as defined in the CLDR. - # As of v41, 6 locale-specific plural categories are defined: - # :few, :many, :one, :other, :two, :zero - # - # n.b., The :one plural category does not imply the number 1. - # Instead, :one is a category for any number that behaves like 1 in - # that locale. For example, in some locales, :one is used for numbers - # that end in "1" (like 1, 21, 151) but that don't end in - # 11 (like 11, 111, 10311). - # Similar notes apply to the :two, and :zero plural categories. - # - # If you want to have different strings for the categories of count == 0 - # (e.g. "I don't have any cars") or count == 1 (e.g. "I have a single car") - # use the explicit `"0"` and `"1"` keys. - # https://unicode-org.github.io/cldr/ldml/tr35-numbers.html#Explicit_0_1_rules - # - # source://i18n//lib/i18n/backend/pluralization.rb#39 - def pluralize(locale, entry, count); end - - protected - - # source://i18n//lib/i18n/backend/pluralization.rb#81 - def pluralizer(locale); end - - # source://i18n//lib/i18n/backend/pluralization.rb#77 - def pluralizers; end - - private - - # Normalizes categories of 0.0 and 1.0 - # and returns the symbolic version - # - # source://i18n//lib/i18n/backend/pluralization.rb#89 - def symbolic_count(count); end -end - -# A simple backend that reads translations from YAML files and stores them in -# an in-memory hash. Relies on the Base backend. -# -# The implementation is provided by a Implementation module allowing to easily -# extend Simple backend's behavior by including modules. E.g.: -# -# module I18n::Backend::Pluralization -# def pluralize(*args) -# # extended pluralization logic -# super -# end -# end -# -# I18n::Backend::Simple.include(I18n::Backend::Pluralization) -# -# source://i18n//lib/i18n/backend/simple.rb#21 -class I18n::Backend::Simple - include ::I18n::Backend::Transliterator - include ::I18n::Backend::Base - include ::I18n::Backend::Simple::Implementation -end - -# source://i18n//lib/i18n/backend/simple.rb#22 -module I18n::Backend::Simple::Implementation - include ::I18n::Backend::Transliterator - include ::I18n::Backend::Base - - # Get available locales from the translations hash - # - # source://i18n//lib/i18n/backend/simple.rb#49 - def available_locales; end - - # source://i18n//lib/i18n/backend/simple.rb#64 - def eager_load!; end - - # @return [Boolean] - # - # source://i18n//lib/i18n/backend/simple.rb#28 - def initialized?; end - - # Clean up translations hash and set initialized to false on reload! - # - # source://i18n//lib/i18n/backend/simple.rb#58 - def reload!; end - - # Stores translations for the given locale in memory. - # This uses a deep merge for the translations hash, so existing - # translations will be overwritten by new ones only at the deepest - # level of the hash. - # - # source://i18n//lib/i18n/backend/simple.rb#36 - def store_translations(locale, data, options = T.unsafe(nil)); end - - # source://i18n//lib/i18n/backend/simple.rb#69 - def translations(do_init: T.unsafe(nil)); end - - protected - - # source://i18n//lib/i18n/backend/simple.rb#83 - def init_translations; end - - # Looks up a translation from the translations hash. Returns nil if - # either key is nil, or locale, scope or key do not exist as a key in the - # nested translations hash. Splits keys or scopes containing dots - # into multiple keys, i.e. currency.format is regarded the same as - # %w(currency format). - # - # source://i18n//lib/i18n/backend/simple.rb#93 - def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end -end - -# Mutex to ensure that concurrent translations loading will be thread-safe -# -# source://i18n//lib/i18n/backend/simple.rb#26 -I18n::Backend::Simple::Implementation::MUTEX = T.let(T.unsafe(nil), Thread::Mutex) - -# source://i18n//lib/i18n/backend/transliterator.rb#6 -module I18n::Backend::Transliterator - # Given a locale and a UTF-8 string, return the locale's ASCII - # approximation for the string. - # - # source://i18n//lib/i18n/backend/transliterator.rb#11 - def transliterate(locale, string, replacement = T.unsafe(nil)); end - - class << self - # Get a transliterator instance. - # - # source://i18n//lib/i18n/backend/transliterator.rb#19 - def get(rule = T.unsafe(nil)); end - end -end - -# source://i18n//lib/i18n/backend/transliterator.rb#7 -I18n::Backend::Transliterator::DEFAULT_REPLACEMENT_CHAR = T.let(T.unsafe(nil), String) - -# A transliterator which accepts a Hash of characters as its translation -# rule. -# -# source://i18n//lib/i18n/backend/transliterator.rb#42 -class I18n::Backend::Transliterator::HashTransliterator - # @return [HashTransliterator] a new instance of HashTransliterator - # - # source://i18n//lib/i18n/backend/transliterator.rb#74 - def initialize(rule = T.unsafe(nil)); end - - # source://i18n//lib/i18n/backend/transliterator.rb#80 - def transliterate(string, replacement = T.unsafe(nil)); end - - private - - # Add transliteration rules to the approximations hash. - # - # source://i18n//lib/i18n/backend/transliterator.rb#100 - def add(hash); end - - # source://i18n//lib/i18n/backend/transliterator.rb#93 - def add_default_approximations; end - - # source://i18n//lib/i18n/backend/transliterator.rb#89 - def approximations; end -end - -# source://i18n//lib/i18n/backend/transliterator.rb#43 -I18n::Backend::Transliterator::HashTransliterator::DEFAULT_APPROXIMATIONS = T.let(T.unsafe(nil), Hash) - -# A transliterator which accepts a Proc as its transliteration rule. -# -# source://i18n//lib/i18n/backend/transliterator.rb#30 -class I18n::Backend::Transliterator::ProcTransliterator - # @return [ProcTransliterator] a new instance of ProcTransliterator - # - # source://i18n//lib/i18n/backend/transliterator.rb#31 - def initialize(rule); end - - # source://i18n//lib/i18n/backend/transliterator.rb#35 - def transliterate(string, replacement = T.unsafe(nil)); end -end - -# source://i18n//lib/i18n.rb#55 -module I18n::Base - # source://i18n//lib/i18n.rb#70 - def available_locales; end - - # source://i18n//lib/i18n.rb#74 - def available_locales=(value); end - - # @return [Boolean] - # - # source://i18n//lib/i18n.rb#386 - def available_locales_initialized?; end - - # source://i18n//lib/i18n.rb#70 - def backend; end - - # source://i18n//lib/i18n.rb#74 - def backend=(value); end - - # Gets I18n configuration object. - # - # source://i18n//lib/i18n.rb#57 - def config; end - - # Sets I18n configuration object. - # - # source://i18n//lib/i18n.rb#62 - def config=(value); end - - # source://i18n//lib/i18n.rb#70 - def default_locale; end - - # source://i18n//lib/i18n.rb#74 - def default_locale=(value); end - - # source://i18n//lib/i18n.rb#70 - def default_separator; end - - # source://i18n//lib/i18n.rb#74 - def default_separator=(value); end - - # Tells the backend to load translations now. Used in situations like the - # Rails production environment. Backends can implement whatever strategy - # is useful. - # - # source://i18n//lib/i18n.rb#91 - def eager_load!; end - - # source://i18n//lib/i18n.rb#70 - def enforce_available_locales; end - - # Raises an InvalidLocale exception when the passed locale is not available. - # - # source://i18n//lib/i18n.rb#380 - def enforce_available_locales!(locale); end - - # source://i18n//lib/i18n.rb#74 - def enforce_available_locales=(value); end - - # source://i18n//lib/i18n.rb#70 - def exception_handler; end - - # source://i18n//lib/i18n.rb#74 - def exception_handler=(value); end - - # Returns true if a translation exists for a given key, otherwise returns false. - # - # @raise [Disabled] - # @return [Boolean] - # - # source://i18n//lib/i18n.rb#265 - def exists?(key, _locale = T.unsafe(nil), locale: T.unsafe(nil), **options); end - - # Returns an array of interpolation keys for the given translation key - # - # *Examples* - # - # Suppose we have the following: - # I18n.t 'example.zero' == 'Zero interpolations' - # I18n.t 'example.one' == 'One interpolation %{foo}' - # I18n.t 'example.two' == 'Two interpolations %{foo} %{bar}' - # I18n.t 'example.three' == ['One %{foo}', 'Two %{bar}', 'Three %{baz}'] - # I18n.t 'example.one', locale: :other == 'One interpolation %{baz}' - # - # Then we can expect the following results: - # I18n.interpolation_keys('example.zero') #=> [] - # I18n.interpolation_keys('example.one') #=> ['foo'] - # I18n.interpolation_keys('example.two') #=> ['foo', 'bar'] - # I18n.interpolation_keys('example.three') #=> ['foo', 'bar', 'baz'] - # I18n.interpolation_keys('one', scope: 'example', locale: :other) #=> ['baz'] - # I18n.interpolation_keys('does-not-exist') #=> [] - # I18n.interpolation_keys('example') #=> [] - # - # @raise [I18n::ArgumentError] - # - # source://i18n//lib/i18n.rb#254 - def interpolation_keys(key, **options); end - - # Localizes certain objects, such as dates and numbers to local formatting. - # - # @raise [Disabled] - # - # source://i18n//lib/i18n.rb#335 - def l(object, locale: T.unsafe(nil), format: T.unsafe(nil), **options); end - - # source://i18n//lib/i18n.rb#70 - def load_path; end - - # source://i18n//lib/i18n.rb#74 - def load_path=(value); end - - # source://i18n//lib/i18n.rb#70 - def locale; end - - # source://i18n//lib/i18n.rb#74 - def locale=(value); end - - # Returns true when the passed locale, which can be either a String or a - # Symbol, is in the list of available locales. Returns false otherwise. - # - # @return [Boolean] - # - # source://i18n//lib/i18n.rb#375 - def locale_available?(locale); end - - # Localizes certain objects, such as dates and numbers to local formatting. - # - # @raise [Disabled] - # - # source://i18n//lib/i18n.rb#335 - def localize(object, locale: T.unsafe(nil), format: T.unsafe(nil), **options); end - - # Merges the given locale, key and scope into a single array of keys. - # Splits keys that contain dots into multiple keys. Makes sure all - # keys are Symbols. - # - # source://i18n//lib/i18n.rb#363 - def normalize_keys(locale, key, scope, separator = T.unsafe(nil)); end - - # Tells the backend to reload translations. Used in situations like the - # Rails development environment. Backends can implement whatever strategy - # is useful. - # - # source://i18n//lib/i18n.rb#83 - def reload!; end - - # Translates, pluralizes and interpolates a given key using a given locale, - # scope, and default, as well as interpolation values. - # - # *LOOKUP* - # - # Translation data is organized as a nested hash using the upper-level keys - # as namespaces. E.g., ActionView ships with the translation: - # :date => {:formats => {:short => "%b %d"}}. - # - # Translations can be looked up at any level of this hash using the key argument - # and the scope option. E.g., in this example I18n.t :date - # returns the whole translations hash {:formats => {:short => "%b %d"}}. - # - # Key can be either a single key or a dot-separated key (both Strings and Symbols - # work). E.g., the short format can be looked up using both: - # I18n.t 'date.formats.short' - # I18n.t :'date.formats.short' - # - # Scope can be either a single key, a dot-separated key or an array of keys - # or dot-separated keys. Keys and scopes can be combined freely. So these - # examples will all look up the same short date format: - # I18n.t 'date.formats.short' - # I18n.t 'formats.short', :scope => 'date' - # I18n.t 'short', :scope => 'date.formats' - # I18n.t 'short', :scope => %w(date formats) - # - # *INTERPOLATION* - # - # Translations can contain interpolation variables which will be replaced by - # values passed to #translate as part of the options hash, with the keys matching - # the interpolation variable names. - # - # E.g., with a translation :foo => "foo %{bar}" the option - # value for the key +bar+ will be interpolated into the translation: - # I18n.t :foo, :bar => 'baz' # => 'foo baz' - # - # *PLURALIZATION* - # - # Translation data can contain pluralized translations. Pluralized translations - # are arrays of singular/plural versions of translations like ['Foo', 'Foos']. - # - # Note that I18n::Backend::Simple only supports an algorithm for English - # pluralization rules. Other algorithms can be supported by custom backends. - # - # This returns the singular version of a pluralized translation: - # I18n.t :foo, :count => 1 # => 'Foo' - # - # These both return the plural version of a pluralized translation: - # I18n.t :foo, :count => 0 # => 'Foos' - # I18n.t :foo, :count => 2 # => 'Foos' - # - # The :count option can be used both for pluralization and interpolation. - # E.g., with the translation - # :foo => ['%{count} foo', '%{count} foos'], count will - # be interpolated to the pluralized translation: - # I18n.t :foo, :count => 1 # => '1 foo' - # - # *DEFAULTS* - # - # This returns the translation for :foo or default if no translation was found: - # I18n.t :foo, :default => 'default' - # - # This returns the translation for :foo or the translation for :bar if no - # translation for :foo was found: - # I18n.t :foo, :default => :bar - # - # Returns the translation for :foo or the translation for :bar - # or default if no translations for :foo and :bar were found. - # I18n.t :foo, :default => [:bar, 'default'] - # - # BULK LOOKUP - # - # This returns an array with the translations for :foo and :bar. - # I18n.t [:foo, :bar] - # - # Can be used with dot-separated nested keys: - # I18n.t [:'baz.foo', :'baz.bar'] - # - # Which is the same as using a scope option: - # I18n.t [:foo, :bar], :scope => :baz - # - # *LAMBDAS* - # - # Both translations and defaults can be given as Ruby lambdas. Lambdas will be - # called and passed the key and options. - # - # E.g. assuming the key :salutation resolves to: - # lambda { |key, options| options[:gender] == 'm' ? "Mr. #{options[:name]}" : "Mrs. #{options[:name]}" } - # - # Then I18n.t(:salutation, :gender => 'w', :name => 'Smith') will result in "Mrs. Smith". - # - # Note that the string returned by lambda will go through string interpolation too, - # so the following lambda would give the same result: - # lambda { |key, options| options[:gender] == 'm' ? "Mr. %{name}" : "Mrs. %{name}" } - # - # It is recommended to use/implement lambdas in an "idempotent" way. E.g. when - # a cache layer is put in front of I18n.translate it will generate a cache key - # from the argument values passed to #translate. Therefore your lambdas should - # always return the same translations/values per unique combination of argument - # values. - # - # Ruby 2.7+ keyword arguments warning - # - # This method uses keyword arguments. - # There is a breaking change in ruby that produces warning with ruby 2.7 and won't work as expected with ruby 3.0 - # The "hash" parameter must be passed as keyword argument. - # - # Good: - # I18n.t(:salutation, :gender => 'w', :name => 'Smith') - # I18n.t(:salutation, **{ :gender => 'w', :name => 'Smith' }) - # I18n.t(:salutation, **any_hash) - # - # Bad: - # I18n.t(:salutation, { :gender => 'w', :name => 'Smith' }) - # I18n.t(:salutation, any_hash) - # - # @raise [Disabled] - # - # source://i18n//lib/i18n.rb#211 - def t(key = T.unsafe(nil), throw: T.unsafe(nil), raise: T.unsafe(nil), locale: T.unsafe(nil), **options); end - - # Wrapper for translate that adds :raise => true. With - # this option, if no translation is found, it will raise I18n::MissingTranslationData - # - # source://i18n//lib/i18n.rb#230 - def t!(key, **options); end - - # Translates, pluralizes and interpolates a given key using a given locale, - # scope, and default, as well as interpolation values. - # - # *LOOKUP* - # - # Translation data is organized as a nested hash using the upper-level keys - # as namespaces. E.g., ActionView ships with the translation: - # :date => {:formats => {:short => "%b %d"}}. - # - # Translations can be looked up at any level of this hash using the key argument - # and the scope option. E.g., in this example I18n.t :date - # returns the whole translations hash {:formats => {:short => "%b %d"}}. - # - # Key can be either a single key or a dot-separated key (both Strings and Symbols - # work). E.g., the short format can be looked up using both: - # I18n.t 'date.formats.short' - # I18n.t :'date.formats.short' - # - # Scope can be either a single key, a dot-separated key or an array of keys - # or dot-separated keys. Keys and scopes can be combined freely. So these - # examples will all look up the same short date format: - # I18n.t 'date.formats.short' - # I18n.t 'formats.short', :scope => 'date' - # I18n.t 'short', :scope => 'date.formats' - # I18n.t 'short', :scope => %w(date formats) - # - # *INTERPOLATION* - # - # Translations can contain interpolation variables which will be replaced by - # values passed to #translate as part of the options hash, with the keys matching - # the interpolation variable names. - # - # E.g., with a translation :foo => "foo %{bar}" the option - # value for the key +bar+ will be interpolated into the translation: - # I18n.t :foo, :bar => 'baz' # => 'foo baz' - # - # *PLURALIZATION* - # - # Translation data can contain pluralized translations. Pluralized translations - # are arrays of singular/plural versions of translations like ['Foo', 'Foos']. - # - # Note that I18n::Backend::Simple only supports an algorithm for English - # pluralization rules. Other algorithms can be supported by custom backends. - # - # This returns the singular version of a pluralized translation: - # I18n.t :foo, :count => 1 # => 'Foo' - # - # These both return the plural version of a pluralized translation: - # I18n.t :foo, :count => 0 # => 'Foos' - # I18n.t :foo, :count => 2 # => 'Foos' - # - # The :count option can be used both for pluralization and interpolation. - # E.g., with the translation - # :foo => ['%{count} foo', '%{count} foos'], count will - # be interpolated to the pluralized translation: - # I18n.t :foo, :count => 1 # => '1 foo' - # - # *DEFAULTS* - # - # This returns the translation for :foo or default if no translation was found: - # I18n.t :foo, :default => 'default' - # - # This returns the translation for :foo or the translation for :bar if no - # translation for :foo was found: - # I18n.t :foo, :default => :bar - # - # Returns the translation for :foo or the translation for :bar - # or default if no translations for :foo and :bar were found. - # I18n.t :foo, :default => [:bar, 'default'] - # - # BULK LOOKUP - # - # This returns an array with the translations for :foo and :bar. - # I18n.t [:foo, :bar] - # - # Can be used with dot-separated nested keys: - # I18n.t [:'baz.foo', :'baz.bar'] - # - # Which is the same as using a scope option: - # I18n.t [:foo, :bar], :scope => :baz - # - # *LAMBDAS* - # - # Both translations and defaults can be given as Ruby lambdas. Lambdas will be - # called and passed the key and options. - # - # E.g. assuming the key :salutation resolves to: - # lambda { |key, options| options[:gender] == 'm' ? "Mr. #{options[:name]}" : "Mrs. #{options[:name]}" } - # - # Then I18n.t(:salutation, :gender => 'w', :name => 'Smith') will result in "Mrs. Smith". - # - # Note that the string returned by lambda will go through string interpolation too, - # so the following lambda would give the same result: - # lambda { |key, options| options[:gender] == 'm' ? "Mr. %{name}" : "Mrs. %{name}" } - # - # It is recommended to use/implement lambdas in an "idempotent" way. E.g. when - # a cache layer is put in front of I18n.translate it will generate a cache key - # from the argument values passed to #translate. Therefore your lambdas should - # always return the same translations/values per unique combination of argument - # values. - # - # Ruby 2.7+ keyword arguments warning - # - # This method uses keyword arguments. - # There is a breaking change in ruby that produces warning with ruby 2.7 and won't work as expected with ruby 3.0 - # The "hash" parameter must be passed as keyword argument. - # - # Good: - # I18n.t(:salutation, :gender => 'w', :name => 'Smith') - # I18n.t(:salutation, **{ :gender => 'w', :name => 'Smith' }) - # I18n.t(:salutation, **any_hash) - # - # Bad: - # I18n.t(:salutation, { :gender => 'w', :name => 'Smith' }) - # I18n.t(:salutation, any_hash) - # - # @raise [Disabled] - # - # source://i18n//lib/i18n.rb#211 - def translate(key = T.unsafe(nil), throw: T.unsafe(nil), raise: T.unsafe(nil), locale: T.unsafe(nil), **options); end - - # Wrapper for translate that adds :raise => true. With - # this option, if no translation is found, it will raise I18n::MissingTranslationData - # - # source://i18n//lib/i18n.rb#230 - def translate!(key, **options); end - - # Transliterates UTF-8 characters to ASCII. By default this method will - # transliterate only Latin strings to an ASCII approximation: - # - # I18n.transliterate("Ærøskøbing") - # # => "AEroskobing" - # - # I18n.transliterate("日本語") - # # => "???" - # - # It's also possible to add support for per-locale transliterations. I18n - # expects transliteration rules to be stored at - # i18n.transliterate.rule. - # - # Transliteration rules can either be a Hash or a Proc. Procs must accept a - # single string argument. Hash rules inherit the default transliteration - # rules, while Procs do not. - # - # *Examples* - # - # Setting a Hash in .yml: - # - # i18n: - # transliterate: - # rule: - # ü: "ue" - # ö: "oe" - # - # Setting a Hash using Ruby: - # - # store_translations(:de, i18n: { - # transliterate: { - # rule: { - # 'ü' => 'ue', - # 'ö' => 'oe' - # } - # } - # }) - # - # Setting a Proc: - # - # translit = lambda {|string| MyTransliterator.transliterate(string) } - # store_translations(:xx, :i18n => {:transliterate => {:rule => translit}) - # - # Transliterating strings: - # - # I18n.locale = :en - # I18n.transliterate("Jürgen") # => "Jurgen" - # I18n.locale = :de - # I18n.transliterate("Jürgen") # => "Juergen" - # I18n.transliterate("Jürgen", :locale => :en) # => "Jurgen" - # I18n.transliterate("Jürgen", :locale => :de) # => "Juergen" - # - # source://i18n//lib/i18n.rb#324 - def transliterate(key, throw: T.unsafe(nil), raise: T.unsafe(nil), locale: T.unsafe(nil), replacement: T.unsafe(nil), **options); end - - # Executes block with given I18n.locale set. - # - # source://i18n//lib/i18n.rb#346 - def with_locale(tmp_locale = T.unsafe(nil)); end - - private - - # Any exceptions thrown in translate will be sent to the @@exception_handler - # which can be a Symbol, a Proc or any other Object unless they're forced to - # be raised or thrown (MissingTranslation). - # - # If exception_handler is a Symbol then it will simply be sent to I18n as - # a method call. A Proc will simply be called. In any other case the - # method #call will be called on the exception_handler object. - # - # Examples: - # - # I18n.exception_handler = :custom_exception_handler # this is the default - # I18n.custom_exception_handler(exception, locale, key, options) # will be called like this - # - # I18n.exception_handler = lambda { |*args| ... } # a lambda - # I18n.exception_handler.call(exception, locale, key, options) # will be called like this - # - # I18n.exception_handler = I18nExceptionHandler.new # an object - # I18n.exception_handler.call(exception, locale, key, options) # will be called like this - # - # source://i18n//lib/i18n.rb#422 - def handle_exception(handling, exception, locale, key, options); end - - # source://i18n//lib/i18n.rb#464 - def interpolation_keys_from_translation(translation); end - - # source://i18n//lib/i18n.rb#440 - def normalize_key(key, separator); end - - # source://i18n//lib/i18n.rb#392 - def translate_key(key, throw, raise, locale, backend, options); end -end - -# source://i18n//lib/i18n/config.rb#6 -class I18n::Config - # Returns an array of locales for which translations are available. - # Unless you explicitly set these through I18n.available_locales= - # the call will be delegated to the backend. - # - # source://i18n//lib/i18n/config.rb#43 - def available_locales; end - - # Sets the available locales. - # - # source://i18n//lib/i18n/config.rb#57 - def available_locales=(locales); end - - # Returns true if the available_locales have been initialized - # - # @return [Boolean] - # - # source://i18n//lib/i18n/config.rb#64 - def available_locales_initialized?; end - - # Caches the available locales list as both strings and symbols in a Set, so - # that we can have faster lookups to do the available locales enforce check. - # - # source://i18n//lib/i18n/config.rb#50 - def available_locales_set; end - - # Returns the current backend. Defaults to +Backend::Simple+. - # - # source://i18n//lib/i18n/config.rb#20 - def backend; end - - # Sets the current backend. Used to set a custom backend. - # - # source://i18n//lib/i18n/config.rb#25 - def backend=(backend); end - - # Clears the available locales set so it can be recomputed again after I18n - # gets reloaded. - # - # source://i18n//lib/i18n/config.rb#70 - def clear_available_locales_set; end - - # Returns the current default locale. Defaults to :'en' - # - # source://i18n//lib/i18n/config.rb#30 - def default_locale; end - - # Sets the current default locale. Used to set a custom default locale. - # - # source://i18n//lib/i18n/config.rb#35 - def default_locale=(locale); end - - # Returns the current default scope separator. Defaults to '.' - # - # source://i18n//lib/i18n/config.rb#75 - def default_separator; end - - # Sets the current default scope separator. - # - # source://i18n//lib/i18n/config.rb#80 - def default_separator=(separator); end - - # source://i18n//lib/i18n/config.rb#141 - def enforce_available_locales; end - - # source://i18n//lib/i18n/config.rb#145 - def enforce_available_locales=(enforce_available_locales); end - - # Returns the current exception handler. Defaults to an instance of - # I18n::ExceptionHandler. - # - # source://i18n//lib/i18n/config.rb#86 - def exception_handler; end - - # Sets the exception handler. - # - # source://i18n//lib/i18n/config.rb#91 - def exception_handler=(exception_handler); end - - # Returns the current interpolation patterns. Defaults to - # I18n::DEFAULT_INTERPOLATION_PATTERNS. - # - # source://i18n//lib/i18n/config.rb#151 - def interpolation_patterns; end - - # Sets the current interpolation patterns. Used to set a interpolation - # patterns. - # - # E.g. using {{}} as a placeholder like "{{hello}}, world!": - # - # I18n.config.interpolation_patterns << /\{\{(\w+)\}\}/ - # - # source://i18n//lib/i18n/config.rb#161 - def interpolation_patterns=(interpolation_patterns); end - - # Allow clients to register paths providing translation data sources. The - # backend defines acceptable sources. - # - # E.g. the provided SimpleBackend accepts a list of paths to translation - # files which are either named *.rb and contain plain Ruby Hashes or are - # named *.yml and contain YAML data. So for the SimpleBackend clients may - # register translation files like this: - # I18n.load_path << 'path/to/locale/en.yml' - # - # source://i18n//lib/i18n/config.rb#126 - def load_path; end - - # Sets the load path instance. Custom implementations are expected to - # behave like a Ruby Array. - # - # source://i18n//lib/i18n/config.rb#132 - def load_path=(load_path); end - - # The only configuration value that is not global and scoped to thread is :locale. - # It defaults to the default_locale. - # - # source://i18n//lib/i18n/config.rb#9 - def locale; end - - # Sets the current locale pseudo-globally, i.e. in the Thread.current hash. - # - # source://i18n//lib/i18n/config.rb#14 - def locale=(locale); end - - # Returns the current handler for situations when interpolation argument - # is missing. MissingInterpolationArgument will be raised by default. - # - # source://i18n//lib/i18n/config.rb#97 - def missing_interpolation_argument_handler; end - - # Sets the missing interpolation argument handler. It can be any - # object that responds to #call. The arguments that will be passed to #call - # are the same as for MissingInterpolationArgument initializer. Use +Proc.new+ - # if you don't care about arity. - # - # == Example: - # You can suppress raising an exception and return string instead: - # - # I18n.config.missing_interpolation_argument_handler = Proc.new do |key| - # "#{key} is missing" - # end - # - # source://i18n//lib/i18n/config.rb#114 - def missing_interpolation_argument_handler=(exception_handler); end -end - -# source://i18n//lib/i18n/interpolate/ruby.rb#7 -I18n::DEFAULT_INTERPOLATION_PATTERNS = T.let(T.unsafe(nil), Array) - -# source://i18n//lib/i18n/exceptions.rb#18 -class I18n::Disabled < ::I18n::ArgumentError - # @return [Disabled] a new instance of Disabled - # - # source://i18n//lib/i18n/exceptions.rb#19 - def initialize(method); end -end - -# source://i18n//lib/i18n.rb#36 -I18n::EMPTY_HASH = T.let(T.unsafe(nil), Hash) - -# source://i18n//lib/i18n/exceptions.rb#6 -class I18n::ExceptionHandler - # source://i18n//lib/i18n/exceptions.rb#7 - def call(exception, _locale, _key, _options); end -end - -# source://i18n//lib/i18n/gettext.rb#4 -module I18n::Gettext - class << self - # source://i18n//lib/i18n/gettext.rb#21 - def extract_scope(msgid, separator); end - - # returns an array of plural keys for the given locale or the whole hash - # of locale mappings to plural keys so that we can convert from gettext's - # integer-index based style - # TODO move this information to the pluralization module - # - # source://i18n//lib/i18n/gettext.rb#17 - def plural_keys(*args); end - end -end - -# source://i18n//lib/i18n/gettext.rb#6 -I18n::Gettext::CONTEXT_SEPARATOR = T.let(T.unsafe(nil), String) - -# Implements classical Gettext style accessors. To use this include the -# module to the global namespace or wherever you want to use it. -# -# include I18n::Gettext::Helpers -# -# source://i18n//lib/i18n/gettext/helpers.rb#11 -module I18n::Gettext::Helpers - # Makes dynamic translation messages readable for the gettext parser. - # _(fruit) cannot be understood by the gettext parser. To help the parser find all your translations, - # you can add fruit = N_("Apple") which does not translate, but tells the parser: "Apple" needs translation. - # * msgid: the message id. - # * Returns: msgid. - # - # source://i18n//lib/i18n/gettext/helpers.rb#17 - def N_(msgsid); end - - # source://i18n//lib/i18n/gettext/helpers.rb#21 - def _(msgid, options = T.unsafe(nil)); end - - # source://i18n//lib/i18n/gettext/helpers.rb#21 - def gettext(msgid, options = T.unsafe(nil)); end - - # source://i18n//lib/i18n/gettext/helpers.rb#38 - def n_(msgid, msgid_plural, n = T.unsafe(nil)); end - - # source://i18n//lib/i18n/gettext/helpers.rb#38 - def ngettext(msgid, msgid_plural, n = T.unsafe(nil)); end - - # Method signatures: - # npgettext('Fruits', 'apple', 'apples', 2) - # npgettext('Fruits', ['apple', 'apples'], 2) - # - # source://i18n//lib/i18n/gettext/helpers.rb#61 - def np_(msgctxt, msgid, msgid_plural, n = T.unsafe(nil)); end - - # Method signatures: - # npgettext('Fruits', 'apple', 'apples', 2) - # npgettext('Fruits', ['apple', 'apples'], 2) - # - # source://i18n//lib/i18n/gettext/helpers.rb#61 - def npgettext(msgctxt, msgid, msgid_plural, n = T.unsafe(nil)); end - - # Method signatures: - # nsgettext('Fruits|apple', 'apples', 2) - # nsgettext(['Fruits|apple', 'apples'], 2) - # - # source://i18n//lib/i18n/gettext/helpers.rb#46 - def ns_(msgid, msgid_plural, n = T.unsafe(nil), separator = T.unsafe(nil)); end - - # Method signatures: - # nsgettext('Fruits|apple', 'apples', 2) - # nsgettext(['Fruits|apple', 'apples'], 2) - # - # source://i18n//lib/i18n/gettext/helpers.rb#46 - def nsgettext(msgid, msgid_plural, n = T.unsafe(nil), separator = T.unsafe(nil)); end - - # source://i18n//lib/i18n/gettext/helpers.rb#32 - def p_(msgctxt, msgid); end - - # source://i18n//lib/i18n/gettext/helpers.rb#32 - def pgettext(msgctxt, msgid); end - - # source://i18n//lib/i18n/gettext/helpers.rb#26 - def s_(msgid, separator = T.unsafe(nil)); end - - # source://i18n//lib/i18n/gettext/helpers.rb#26 - def sgettext(msgid, separator = T.unsafe(nil)); end -end - -# source://i18n//lib/i18n/gettext.rb#5 -I18n::Gettext::PLURAL_SEPARATOR = T.let(T.unsafe(nil), String) - -# source://i18n//lib/i18n/interpolate/ruby.rb#12 -I18n::INTERPOLATION_PATTERN = T.let(T.unsafe(nil), Regexp) - -# source://i18n//lib/i18n/interpolate/ruby.rb#15 -I18n::INTERPOLATION_PATTERNS_CACHE = T.let(T.unsafe(nil), Hash) - -# source://i18n//lib/i18n/exceptions.rb#134 -class I18n::InvalidFilenames < ::I18n::ArgumentError - # @return [InvalidFilenames] a new instance of InvalidFilenames - # - # source://i18n//lib/i18n/exceptions.rb#136 - def initialize(file_errors); end -end - -# source://i18n//lib/i18n/exceptions.rb#135 -I18n::InvalidFilenames::NUMBER_OF_ERRORS_SHOWN = T.let(T.unsafe(nil), Integer) - -# source://i18n//lib/i18n/exceptions.rb#32 -class I18n::InvalidLocale < ::I18n::ArgumentError - # @return [InvalidLocale] a new instance of InvalidLocale - # - # source://i18n//lib/i18n/exceptions.rb#34 - def initialize(locale); end - - # Returns the value of attribute locale. - # - # source://i18n//lib/i18n/exceptions.rb#33 - def locale; end -end - -# source://i18n//lib/i18n/exceptions.rb#40 -class I18n::InvalidLocaleData < ::I18n::ArgumentError - # @return [InvalidLocaleData] a new instance of InvalidLocaleData - # - # source://i18n//lib/i18n/exceptions.rb#42 - def initialize(filename, exception_message); end - - # Returns the value of attribute filename. - # - # source://i18n//lib/i18n/exceptions.rb#41 - def filename; end -end - -# source://i18n//lib/i18n/exceptions.rb#92 -class I18n::InvalidPluralizationData < ::I18n::ArgumentError - # @return [InvalidPluralizationData] a new instance of InvalidPluralizationData - # - # source://i18n//lib/i18n/exceptions.rb#94 - def initialize(entry, count, key); end - - # Returns the value of attribute count. - # - # source://i18n//lib/i18n/exceptions.rb#93 - def count; end - - # Returns the value of attribute entry. - # - # source://i18n//lib/i18n/exceptions.rb#93 - def entry; end - - # Returns the value of attribute key. - # - # source://i18n//lib/i18n/exceptions.rb#93 - def key; end -end - -# source://i18n//lib/i18n/backend/key_value.rb#21 -I18n::JSON = ActiveSupport::JSON - -# source://i18n//lib/i18n/locale.rb#4 -module I18n::Locale; end - -# source://i18n//lib/i18n/locale/fallbacks.rb#48 -class I18n::Locale::Fallbacks < ::Hash - # @return [Fallbacks] a new instance of Fallbacks - # - # source://i18n//lib/i18n/locale/fallbacks.rb#49 - def initialize(*mappings); end - - # @raise [InvalidLocale] - # - # source://i18n//lib/i18n/locale/fallbacks.rb#60 - def [](locale); end - - # Returns the value of attribute defaults. - # - # source://i18n//lib/i18n/locale/fallbacks.rb#58 - def defaults; end - - # source://i18n//lib/i18n/locale/fallbacks.rb#55 - def defaults=(defaults); end - - # @return [Boolean] - # - # source://i18n//lib/i18n/locale/fallbacks.rb#82 - def empty?; end - - # source://i18n//lib/i18n/locale/fallbacks.rb#86 - def inspect; end - - # source://i18n//lib/i18n/locale/fallbacks.rb#67 - def map(*args, &block); end - - protected - - # source://i18n//lib/i18n/locale/fallbacks.rb#92 - def compute(tags, include_defaults = T.unsafe(nil), exclude = T.unsafe(nil)); end -end - -# source://i18n//lib/i18n/locale/tag.rb#5 -module I18n::Locale::Tag - class << self - # Returns the current locale tag implementation. Defaults to +I18n::Locale::Tag::Simple+. - # - # source://i18n//lib/i18n/locale/tag.rb#12 - def implementation; end - - # Sets the current locale tag implementation. Use this to set a different locale tag implementation. - # - # source://i18n//lib/i18n/locale/tag.rb#17 - def implementation=(implementation); end - - # Factory method for locale tags. Delegates to the current locale tag implementation. - # - # source://i18n//lib/i18n/locale/tag.rb#22 - def tag(tag); end - end -end - -# source://i18n//lib/i18n/locale/tag/parents.rb#4 -module I18n::Locale::Tag::Parents - # source://i18n//lib/i18n/locale/tag/parents.rb#5 - def parent; end - - # source://i18n//lib/i18n/locale/tag/parents.rb#18 - def parents; end - - # source://i18n//lib/i18n/locale/tag/parents.rb#14 - def self_and_parents; end -end - -# source://i18n//lib/i18n/locale/tag/rfc4646.rb#12 -I18n::Locale::Tag::RFC4646_FORMATS = T.let(T.unsafe(nil), Hash) - -# source://i18n//lib/i18n/locale/tag/rfc4646.rb#11 -I18n::Locale::Tag::RFC4646_SUBTAGS = T.let(T.unsafe(nil), Array) - -# source://i18n//lib/i18n/locale/tag/rfc4646.rb#14 -class I18n::Locale::Tag::Rfc4646 < ::Struct - include ::I18n::Locale::Tag::Parents - - # source://i18n//lib/i18n/locale/tag/rfc4646.rb#35 - def language; end - - # source://i18n//lib/i18n/locale/tag/rfc4646.rb#35 - def region; end - - # source://i18n//lib/i18n/locale/tag/rfc4646.rb#35 - def script; end - - # source://i18n//lib/i18n/locale/tag/rfc4646.rb#46 - def to_a; end - - # source://i18n//lib/i18n/locale/tag/rfc4646.rb#42 - def to_s; end - - # source://i18n//lib/i18n/locale/tag/rfc4646.rb#38 - def to_sym; end - - # source://i18n//lib/i18n/locale/tag/rfc4646.rb#35 - def variant; end - - class << self - # source://i18n//lib/i18n/locale/tag/rfc4646.rb#23 - def parser; end - - # source://i18n//lib/i18n/locale/tag/rfc4646.rb#27 - def parser=(parser); end - - # Parses the given tag and returns a Tag instance if it is valid. - # Returns false if the given tag is not valid according to RFC 4646. - # - # source://i18n//lib/i18n/locale/tag/rfc4646.rb#18 - def tag(tag); end - end -end - -# source://i18n//lib/i18n/locale/tag/rfc4646.rb#50 -module I18n::Locale::Tag::Rfc4646::Parser - class << self - # source://i18n//lib/i18n/locale/tag/rfc4646.rb#63 - def match(tag); end - end -end - -# source://i18n//lib/i18n/locale/tag/rfc4646.rb#51 -I18n::Locale::Tag::Rfc4646::Parser::PATTERN = T.let(T.unsafe(nil), Regexp) - -# source://i18n//lib/i18n/locale/tag/simple.rb#6 -class I18n::Locale::Tag::Simple - include ::I18n::Locale::Tag::Parents - - # @return [Simple] a new instance of Simple - # - # source://i18n//lib/i18n/locale/tag/simple.rb#17 - def initialize(*tag); end - - # source://i18n//lib/i18n/locale/tag/simple.rb#21 - def subtags; end - - # Returns the value of attribute tag. - # - # source://i18n//lib/i18n/locale/tag/simple.rb#15 - def tag; end - - # source://i18n//lib/i18n/locale/tag/simple.rb#33 - def to_a; end - - # source://i18n//lib/i18n/locale/tag/simple.rb#29 - def to_s; end - - # source://i18n//lib/i18n/locale/tag/simple.rb#25 - def to_sym; end - - class << self - # source://i18n//lib/i18n/locale/tag/simple.rb#8 - def tag(tag); end - end -end - -# source://i18n//lib/i18n/middleware.rb#4 -class I18n::Middleware - # @return [Middleware] a new instance of Middleware - # - # source://i18n//lib/i18n/middleware.rb#6 - def initialize(app); end - - # source://i18n//lib/i18n/middleware.rb#10 - def call(env); end -end - -# source://i18n//lib/i18n/exceptions.rb#100 -class I18n::MissingInterpolationArgument < ::I18n::ArgumentError - # @return [MissingInterpolationArgument] a new instance of MissingInterpolationArgument - # - # source://i18n//lib/i18n/exceptions.rb#102 - def initialize(key, values, string); end - - # Returns the value of attribute key. - # - # source://i18n//lib/i18n/exceptions.rb#101 - def key; end - - # Returns the value of attribute string. - # - # source://i18n//lib/i18n/exceptions.rb#101 - def string; end - - # Returns the value of attribute values. - # - # source://i18n//lib/i18n/exceptions.rb#101 - def values; end -end - -# source://i18n//lib/i18n/exceptions.rb#48 -class I18n::MissingTranslation < ::I18n::ArgumentError - include ::I18n::MissingTranslation::Base -end - -# source://i18n//lib/i18n/exceptions.rb#49 -module I18n::MissingTranslation::Base - # source://i18n//lib/i18n/exceptions.rb#54 - def initialize(locale, key, options = T.unsafe(nil)); end - - # Returns the value of attribute key. - # - # source://i18n//lib/i18n/exceptions.rb#52 - def key; end - - # source://i18n//lib/i18n/exceptions.rb#59 - def keys; end - - # Returns the value of attribute locale. - # - # source://i18n//lib/i18n/exceptions.rb#52 - def locale; end - - # source://i18n//lib/i18n/exceptions.rb#65 - def message; end - - # source://i18n//lib/i18n/exceptions.rb#74 - def normalized_option(key); end - - # Returns the value of attribute options. - # - # source://i18n//lib/i18n/exceptions.rb#52 - def options; end - - # source://i18n//lib/i18n/exceptions.rb#80 - def to_exception; end - - # source://i18n//lib/i18n/exceptions.rb#65 - def to_s; end -end - -# source://i18n//lib/i18n/exceptions.rb#50 -I18n::MissingTranslation::Base::PERMITTED_KEYS = T.let(T.unsafe(nil), Array) - -# source://i18n//lib/i18n/exceptions.rb#88 -class I18n::MissingTranslationData < ::I18n::ArgumentError - include ::I18n::MissingTranslation::Base -end - -# source://i18n//lib/i18n.rb#19 -I18n::RESERVED_KEYS = T.let(T.unsafe(nil), Array) - -# source://i18n//lib/i18n/exceptions.rb#108 -class I18n::ReservedInterpolationKey < ::I18n::ArgumentError - # @return [ReservedInterpolationKey] a new instance of ReservedInterpolationKey - # - # source://i18n//lib/i18n/exceptions.rb#110 - def initialize(key, string); end - - # Returns the value of attribute key. - # - # source://i18n//lib/i18n/exceptions.rb#109 - def key; end - - # Returns the value of attribute string. - # - # source://i18n//lib/i18n/exceptions.rb#109 - def string; end -end - -# source://i18n//lib/i18n/tests.rb#4 -module I18n::Tests; end - -# source://i18n//lib/i18n/tests/localization.rb#3 -module I18n::Tests::Localization - class << self - # @private - # - # source://i18n//lib/i18n/tests/localization.rb#9 - def included(base); end - end -end - -# source://i18n//lib/i18n/exceptions.rb#116 -class I18n::UnknownFileType < ::I18n::ArgumentError - # @return [UnknownFileType] a new instance of UnknownFileType - # - # source://i18n//lib/i18n/exceptions.rb#118 - def initialize(type, filename); end - - # Returns the value of attribute filename. - # - # source://i18n//lib/i18n/exceptions.rb#117 - def filename; end - - # Returns the value of attribute type. - # - # source://i18n//lib/i18n/exceptions.rb#117 - def type; end -end - -# source://i18n//lib/i18n/exceptions.rb#124 -class I18n::UnsupportedMethod < ::I18n::ArgumentError - # @return [UnsupportedMethod] a new instance of UnsupportedMethod - # - # source://i18n//lib/i18n/exceptions.rb#126 - def initialize(method, backend_klass, msg); end - - # Returns the value of attribute backend_klass. - # - # source://i18n//lib/i18n/exceptions.rb#125 - def backend_klass; end - - # Returns the value of attribute method. - # - # source://i18n//lib/i18n/exceptions.rb#125 - def method; end - - # Returns the value of attribute msg. - # - # source://i18n//lib/i18n/exceptions.rb#125 - def msg; end -end - -# source://i18n//lib/i18n/utils.rb#4 -module I18n::Utils - class << self - # source://i18n//lib/i18n/utils.rb#18 - def deep_merge(hash, other_hash, &block); end - - # source://i18n//lib/i18n/utils.rb#22 - def deep_merge!(hash, other_hash, &block); end - - # source://i18n//lib/i18n/utils.rb#34 - def deep_symbolize_keys(hash); end - - # source://i18n//lib/i18n/utils.rb#7 - def except(hash, *keys); end - - private - - # source://i18n//lib/i18n/utils.rb#43 - def deep_symbolize_keys_in_object(value); end - end -end - -# source://i18n//lib/i18n/version.rb#4 -I18n::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/logger@1.6.1.rbi b/sorbet/rbi/gems/logger@1.6.1.rbi deleted file mode 100644 index 4e9ceac..0000000 --- a/sorbet/rbi/gems/logger@1.6.1.rbi +++ /dev/null @@ -1,920 +0,0 @@ -# typed: false - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `logger` gem. -# Please instead update this file by running `bin/tapioca gem logger`. - - -# \Class \Logger provides a simple but sophisticated logging utility that -# you can use to create one or more -# {event logs}[https://en.wikipedia.org/wiki/Logging_(software)#Event_logs] -# for your program. -# Each such log contains a chronological sequence of entries -# that provides a record of the program's activities. -# -# == About the Examples -# -# All examples on this page assume that \Logger has been required: -# -# require 'logger' -# -# == Synopsis -# -# Create a log with Logger.new: -# -# # Single log file. -# logger = Logger.new('t.log') -# # Size-based rotated logging: 3 10-megabyte files. -# logger = Logger.new('t.log', 3, 10485760) -# # Period-based rotated logging: daily (also allowed: 'weekly', 'monthly'). -# logger = Logger.new('t.log', 'daily') -# # Log to an IO stream. -# logger = Logger.new($stdout) -# -# Add entries (level, message) with Logger#add: -# -# logger.add(Logger::DEBUG, 'Maximal debugging info') -# logger.add(Logger::INFO, 'Non-error information') -# logger.add(Logger::WARN, 'Non-error warning') -# logger.add(Logger::ERROR, 'Non-fatal error') -# logger.add(Logger::FATAL, 'Fatal error') -# logger.add(Logger::UNKNOWN, 'Most severe') -# -# Close the log with Logger#close: -# -# logger.close -# -# == Entries -# -# You can add entries with method Logger#add: -# -# logger.add(Logger::DEBUG, 'Maximal debugging info') -# logger.add(Logger::INFO, 'Non-error information') -# logger.add(Logger::WARN, 'Non-error warning') -# logger.add(Logger::ERROR, 'Non-fatal error') -# logger.add(Logger::FATAL, 'Fatal error') -# logger.add(Logger::UNKNOWN, 'Most severe') -# -# These shorthand methods also add entries: -# -# logger.debug('Maximal debugging info') -# logger.info('Non-error information') -# logger.warn('Non-error warning') -# logger.error('Non-fatal error') -# logger.fatal('Fatal error') -# logger.unknown('Most severe') -# -# When you call any of these methods, -# the entry may or may not be written to the log, -# depending on the entry's severity and on the log level; -# see {Log Level}[rdoc-ref:Logger@Log+Level] -# -# An entry always has: -# -# - A severity (the required argument to #add). -# - An automatically created timestamp. -# -# And may also have: -# -# - A message. -# - A program name. -# -# Example: -# -# logger = Logger.new($stdout) -# logger.add(Logger::INFO, 'My message.', 'mung') -# # => I, [2022-05-07T17:21:46.536234 #20536] INFO -- mung: My message. -# -# The default format for an entry is: -# -# "%s, [%s #%d] %5s -- %s: %s\n" -# -# where the values to be formatted are: -# -# - \Severity (one letter). -# - Timestamp. -# - Process id. -# - \Severity (word). -# - Program name. -# - Message. -# -# You can use a different entry format by: -# -# - Setting a custom format proc (affects following entries); -# see {formatter=}[Logger.html#attribute-i-formatter]. -# - Calling any of the methods above with a block -# (affects only the one entry). -# Doing so can have two benefits: -# -# - Context: the block can evaluate the entire program context -# and create a context-dependent message. -# - Performance: the block is not evaluated unless the log level -# permits the entry actually to be written: -# -# logger.error { my_slow_message_generator } -# -# Contrast this with the string form, where the string is -# always evaluated, regardless of the log level: -# -# logger.error("#{my_slow_message_generator}") -# -# === \Severity -# -# The severity of a log entry has two effects: -# -# - Determines whether the entry is selected for inclusion in the log; -# see {Log Level}[rdoc-ref:Logger@Log+Level]. -# - Indicates to any log reader (whether a person or a program) -# the relative importance of the entry. -# -# === Timestamp -# -# The timestamp for a log entry is generated automatically -# when the entry is created. -# -# The logged timestamp is formatted by method -# {Time#strftime}[https://docs.ruby-lang.org/en/master/Time.html#method-i-strftime] -# using this format string: -# -# '%Y-%m-%dT%H:%M:%S.%6N' -# -# Example: -# -# logger = Logger.new($stdout) -# logger.add(Logger::INFO) -# # => I, [2022-05-07T17:04:32.318331 #20536] INFO -- : nil -# -# You can set a different format using method #datetime_format=. -# -# === Message -# -# The message is an optional argument to an entry method: -# -# logger = Logger.new($stdout) -# logger.add(Logger::INFO, 'My message') -# # => I, [2022-05-07T18:15:37.647581 #20536] INFO -- : My message -# -# For the default entry formatter, Logger::Formatter, -# the message object may be: -# -# - A string: used as-is. -# - An Exception: message.message is used. -# - Anything else: message.inspect is used. -# -# *Note*: Logger::Formatter does not escape or sanitize -# the message passed to it. -# Developers should be aware that malicious data (user input) -# may be in the message, and should explicitly escape untrusted data. -# -# You can use a custom formatter to escape message data; -# see the example at {formatter=}[Logger.html#attribute-i-formatter]. -# -# === Program Name -# -# The program name is an optional argument to an entry method: -# -# logger = Logger.new($stdout) -# logger.add(Logger::INFO, 'My message', 'mung') -# # => I, [2022-05-07T18:17:38.084716 #20536] INFO -- mung: My message -# -# The default program name for a new logger may be set in the call to -# Logger.new via optional keyword argument +progname+: -# -# logger = Logger.new('t.log', progname: 'mung') -# -# The default program name for an existing logger may be set -# by a call to method #progname=: -# -# logger.progname = 'mung' -# -# The current program name may be retrieved with method -# {progname}[Logger.html#attribute-i-progname]: -# -# logger.progname # => "mung" -# -# == Log Level -# -# The log level setting determines whether an entry is actually -# written to the log, based on the entry's severity. -# -# These are the defined severities (least severe to most severe): -# -# logger = Logger.new($stdout) -# logger.add(Logger::DEBUG, 'Maximal debugging info') -# # => D, [2022-05-07T17:57:41.776220 #20536] DEBUG -- : Maximal debugging info -# logger.add(Logger::INFO, 'Non-error information') -# # => I, [2022-05-07T17:59:14.349167 #20536] INFO -- : Non-error information -# logger.add(Logger::WARN, 'Non-error warning') -# # => W, [2022-05-07T18:00:45.337538 #20536] WARN -- : Non-error warning -# logger.add(Logger::ERROR, 'Non-fatal error') -# # => E, [2022-05-07T18:02:41.592912 #20536] ERROR -- : Non-fatal error -# logger.add(Logger::FATAL, 'Fatal error') -# # => F, [2022-05-07T18:05:24.703931 #20536] FATAL -- : Fatal error -# logger.add(Logger::UNKNOWN, 'Most severe') -# # => A, [2022-05-07T18:07:54.657491 #20536] ANY -- : Most severe -# -# The default initial level setting is Logger::DEBUG, the lowest level, -# which means that all entries are to be written, regardless of severity: -# -# logger = Logger.new($stdout) -# logger.level # => 0 -# logger.add(0, "My message") -# # => D, [2022-05-11T15:10:59.773668 #20536] DEBUG -- : My message -# -# You can specify a different setting in a new logger -# using keyword argument +level+ with an appropriate value: -# -# logger = Logger.new($stdout, level: Logger::ERROR) -# logger = Logger.new($stdout, level: 'error') -# logger = Logger.new($stdout, level: :error) -# logger.level # => 3 -# -# With this level, entries with severity Logger::ERROR and higher -# are written, while those with lower severities are not written: -# -# logger = Logger.new($stdout, level: Logger::ERROR) -# logger.add(3) -# # => E, [2022-05-11T15:17:20.933362 #20536] ERROR -- : nil -# logger.add(2) # Silent. -# -# You can set the log level for an existing logger -# with method #level=: -# -# logger.level = Logger::ERROR -# -# These shorthand methods also set the level: -# -# logger.debug! # => 0 -# logger.info! # => 1 -# logger.warn! # => 2 -# logger.error! # => 3 -# logger.fatal! # => 4 -# -# You can retrieve the log level with method #level. -# -# logger.level = Logger::ERROR -# logger.level # => 3 -# -# These methods return whether a given -# level is to be written: -# -# logger.level = Logger::ERROR -# logger.debug? # => false -# logger.info? # => false -# logger.warn? # => false -# logger.error? # => true -# logger.fatal? # => true -# -# == Log File Rotation -# -# By default, a log file is a single file that grows indefinitely -# (until explicitly closed); there is no file rotation. -# -# To keep log files to a manageable size, -# you can use _log_ _file_ _rotation_, which uses multiple log files: -# -# - Each log file has entries for a non-overlapping -# time interval. -# - Only the most recent log file is open and active; -# the others are closed and inactive. -# -# === Size-Based Rotation -# -# For size-based log file rotation, call Logger.new with: -# -# - Argument +logdev+ as a file path. -# - Argument +shift_age+ with a positive integer: -# the number of log files to be in the rotation. -# - Argument +shift_size+ as a positive integer: -# the maximum size (in bytes) of each log file; -# defaults to 1048576 (1 megabyte). -# -# Examples: -# -# logger = Logger.new('t.log', 3) # Three 1-megabyte files. -# logger = Logger.new('t.log', 5, 10485760) # Five 10-megabyte files. -# -# For these examples, suppose: -# -# logger = Logger.new('t.log', 3) -# -# Logging begins in the new log file, +t.log+; -# the log file is "full" and ready for rotation -# when a new entry would cause its size to exceed +shift_size+. -# -# The first time +t.log+ is full: -# -# - +t.log+ is closed and renamed to +t.log.0+. -# - A new file +t.log+ is opened. -# -# The second time +t.log+ is full: -# -# - +t.log.0 is renamed as +t.log.1+. -# - +t.log+ is closed and renamed to +t.log.0+. -# - A new file +t.log+ is opened. -# -# Each subsequent time that +t.log+ is full, -# the log files are rotated: -# -# - +t.log.1+ is removed. -# - +t.log.0 is renamed as +t.log.1+. -# - +t.log+ is closed and renamed to +t.log.0+. -# - A new file +t.log+ is opened. -# -# === Periodic Rotation -# -# For periodic rotation, call Logger.new with: -# -# - Argument +logdev+ as a file path. -# - Argument +shift_age+ as a string period indicator. -# -# Examples: -# -# logger = Logger.new('t.log', 'daily') # Rotate log files daily. -# logger = Logger.new('t.log', 'weekly') # Rotate log files weekly. -# logger = Logger.new('t.log', 'monthly') # Rotate log files monthly. -# -# Example: -# -# logger = Logger.new('t.log', 'daily') -# -# When the given period expires: -# -# - The base log file, +t.log+ is closed and renamed -# with a date-based suffix such as +t.log.20220509+. -# - A new log file +t.log+ is opened. -# - Nothing is removed. -# -# The default format for the suffix is '%Y%m%d', -# which produces a suffix similar to the one above. -# You can set a different format using create-time option -# +shift_period_suffix+; -# see details and suggestions at -# {Time#strftime}[https://docs.ruby-lang.org/en/master/Time.html#method-i-strftime]. -# -# source://logger//lib/logger/version.rb#3 -class Logger - include ::Logger::Severity - - # :call-seq: - # Logger.new(logdev, shift_age = 0, shift_size = 1048576, **options) - # - # With the single argument +logdev+, - # returns a new logger with all default options: - # - # Logger.new('t.log') # => # - # - # Argument +logdev+ must be one of: - # - # - A string filepath: entries are to be written - # to the file at that path; if the file at that path exists, - # new entries are appended. - # - An IO stream (typically +$stdout+, +$stderr+. or an open file): - # entries are to be written to the given stream. - # - +nil+ or +File::NULL+: no entries are to be written. - # - # Examples: - # - # Logger.new('t.log') - # Logger.new($stdout) - # - # The keyword options are: - # - # - +level+: sets the log level; default value is Logger::DEBUG. - # See {Log Level}[rdoc-ref:Logger@Log+Level]: - # - # Logger.new('t.log', level: Logger::ERROR) - # - # - +progname+: sets the default program name; default is +nil+. - # See {Program Name}[rdoc-ref:Logger@Program+Name]: - # - # Logger.new('t.log', progname: 'mung') - # - # - +formatter+: sets the entry formatter; default is +nil+. - # See {formatter=}[Logger.html#attribute-i-formatter]. - # - +datetime_format+: sets the format for entry timestamp; - # default is +nil+. - # See #datetime_format=. - # - +binmode+: sets whether the logger writes in binary mode; - # default is +false+. - # - +shift_period_suffix+: sets the format for the filename suffix - # for periodic log file rotation; default is '%Y%m%d'. - # See {Periodic Rotation}[rdoc-ref:Logger@Periodic+Rotation]. - # - +reraise_write_errors+: An array of exception classes, which will - # be reraised if there is an error when writing to the log device. - # The default is to swallow all exceptions raised. - # - # @return [Logger] a new instance of Logger - # - # source://logger//lib/logger.rb#581 - def initialize(logdev, shift_age = T.unsafe(nil), shift_size = T.unsafe(nil), level: T.unsafe(nil), progname: T.unsafe(nil), formatter: T.unsafe(nil), datetime_format: T.unsafe(nil), binmode: T.unsafe(nil), shift_period_suffix: T.unsafe(nil), reraise_write_errors: T.unsafe(nil)); end - - # Writes the given +msg+ to the log with no formatting; - # returns the number of characters written, - # or +nil+ if no log device exists: - # - # logger = Logger.new($stdout) - # logger << 'My message.' # => 10 - # - # Output: - # - # My message. - # - # source://logger//lib/logger.rb#689 - def <<(msg); end - - # Creates a log entry, which may or may not be written to the log, - # depending on the entry's severity and on the log level. - # See {Log Level}[rdoc-ref:Logger@Log+Level] - # and {Entries}[rdoc-ref:Logger@Entries] for details. - # - # Examples: - # - # logger = Logger.new($stdout, progname: 'mung') - # logger.add(Logger::INFO) - # logger.add(Logger::ERROR, 'No good') - # logger.add(Logger::ERROR, 'No good', 'gnum') - # - # Output: - # - # I, [2022-05-12T16:25:31.469726 #36328] INFO -- mung: mung - # E, [2022-05-12T16:25:55.349414 #36328] ERROR -- mung: No good - # E, [2022-05-12T16:26:35.841134 #36328] ERROR -- gnum: No good - # - # These convenience methods have implicit severity: - # - # - #debug. - # - #info. - # - #warn. - # - #error. - # - #fatal. - # - #unknown. - # - # source://logger//lib/logger.rb#656 - def add(severity, message = T.unsafe(nil), progname = T.unsafe(nil)); end - - # Closes the logger; returns +nil+: - # - # logger = Logger.new('t.log') - # logger.close # => nil - # logger.info('foo') # Prints "log writing failed. closed stream" - # - # Related: Logger#reopen. - # - # source://logger//lib/logger.rb#736 - def close; end - - # Returns the date-time format; see #datetime_format=. - # - # source://logger//lib/logger.rb#438 - def datetime_format; end - - # Sets the date-time format. - # - # Argument +datetime_format+ should be either of these: - # - # - A string suitable for use as a format for method - # {Time#strftime}[https://docs.ruby-lang.org/en/master/Time.html#method-i-strftime]. - # - +nil+: the logger uses '%Y-%m-%dT%H:%M:%S.%6N'. - # - # source://logger//lib/logger.rb#432 - def datetime_format=(datetime_format); end - - # Equivalent to calling #add with severity Logger::DEBUG. - # - # source://logger//lib/logger.rb#695 - def debug(progname = T.unsafe(nil), &block); end - - # Sets the log level to Logger::DEBUG. - # See {Log Level}[rdoc-ref:Logger@Log+Level]. - # - # source://logger//lib/logger.rb#487 - def debug!; end - - # Returns +true+ if the log level allows entries with severity - # Logger::DEBUG to be written, +false+ otherwise. - # See {Log Level}[rdoc-ref:Logger@Log+Level]. - # - # @return [Boolean] - # - # source://logger//lib/logger.rb#482 - def debug?; end - - # Equivalent to calling #add with severity Logger::ERROR. - # - # source://logger//lib/logger.rb#713 - def error(progname = T.unsafe(nil), &block); end - - # Sets the log level to Logger::ERROR. - # See {Log Level}[rdoc-ref:Logger@Log+Level]. - # - # source://logger//lib/logger.rb#520 - def error!; end - - # Returns +true+ if the log level allows entries with severity - # Logger::ERROR to be written, +false+ otherwise. - # See {Log Level}[rdoc-ref:Logger@Log+Level]. - # - # @return [Boolean] - # - # source://logger//lib/logger.rb#515 - def error?; end - - # Equivalent to calling #add with severity Logger::FATAL. - # - # source://logger//lib/logger.rb#719 - def fatal(progname = T.unsafe(nil), &block); end - - # Sets the log level to Logger::FATAL. - # See {Log Level}[rdoc-ref:Logger@Log+Level]. - # - # source://logger//lib/logger.rb#531 - def fatal!; end - - # Returns +true+ if the log level allows entries with severity - # Logger::FATAL to be written, +false+ otherwise. - # See {Log Level}[rdoc-ref:Logger@Log+Level]. - # - # @return [Boolean] - # - # source://logger//lib/logger.rb#526 - def fatal?; end - - # Sets or retrieves the logger entry formatter proc. - # - # When +formatter+ is +nil+, the logger uses Logger::Formatter. - # - # When +formatter+ is a proc, a new entry is formatted by the proc, - # which is called with four arguments: - # - # - +severity+: The severity of the entry. - # - +time+: A Time object representing the entry's timestamp. - # - +progname+: The program name for the entry. - # - +msg+: The message for the entry (string or string-convertible object). - # - # The proc should return a string containing the formatted entry. - # - # This custom formatter uses - # {String#dump}[https://docs.ruby-lang.org/en/master/String.html#method-i-dump] - # to escape the message string: - # - # logger = Logger.new($stdout, progname: 'mung') - # original_formatter = logger.formatter || Logger::Formatter.new - # logger.formatter = proc { |severity, time, progname, msg| - # original_formatter.call(severity, time, progname, msg.dump) - # } - # logger.add(Logger::INFO, "hello \n ''") - # logger.add(Logger::INFO, "\f\x00\xff\\\"") - # - # Output: - # - # I, [2022-05-13T13:16:29.637488 #8492] INFO -- mung: "hello \n ''" - # I, [2022-05-13T13:16:29.637610 #8492] INFO -- mung: "\f\x00\xFF\\\"" - # - # source://logger//lib/logger.rb#473 - def formatter; end - - # Sets or retrieves the logger entry formatter proc. - # - # When +formatter+ is +nil+, the logger uses Logger::Formatter. - # - # When +formatter+ is a proc, a new entry is formatted by the proc, - # which is called with four arguments: - # - # - +severity+: The severity of the entry. - # - +time+: A Time object representing the entry's timestamp. - # - +progname+: The program name for the entry. - # - +msg+: The message for the entry (string or string-convertible object). - # - # The proc should return a string containing the formatted entry. - # - # This custom formatter uses - # {String#dump}[https://docs.ruby-lang.org/en/master/String.html#method-i-dump] - # to escape the message string: - # - # logger = Logger.new($stdout, progname: 'mung') - # original_formatter = logger.formatter || Logger::Formatter.new - # logger.formatter = proc { |severity, time, progname, msg| - # original_formatter.call(severity, time, progname, msg.dump) - # } - # logger.add(Logger::INFO, "hello \n ''") - # logger.add(Logger::INFO, "\f\x00\xff\\\"") - # - # Output: - # - # I, [2022-05-13T13:16:29.637488 #8492] INFO -- mung: "hello \n ''" - # I, [2022-05-13T13:16:29.637610 #8492] INFO -- mung: "\f\x00\xFF\\\"" - # - # source://logger//lib/logger.rb#473 - def formatter=(_arg0); end - - # Equivalent to calling #add with severity Logger::INFO. - # - # source://logger//lib/logger.rb#701 - def info(progname = T.unsafe(nil), &block); end - - # Sets the log level to Logger::INFO. - # See {Log Level}[rdoc-ref:Logger@Log+Level]. - # - # source://logger//lib/logger.rb#498 - def info!; end - - # Returns +true+ if the log level allows entries with severity - # Logger::INFO to be written, +false+ otherwise. - # See {Log Level}[rdoc-ref:Logger@Log+Level]. - # - # @return [Boolean] - # - # source://logger//lib/logger.rb#493 - def info?; end - - # Logging severity threshold (e.g. Logger::INFO). - # - # source://logger//lib/logger.rb#383 - def level; end - - # Sets the log level; returns +severity+. - # See {Log Level}[rdoc-ref:Logger@Log+Level]. - # - # Argument +severity+ may be an integer, a string, or a symbol: - # - # logger.level = Logger::ERROR # => 3 - # logger.level = 3 # => 3 - # logger.level = 'error' # => "error" - # logger.level = :error # => :error - # - # Logger#sev_threshold= is an alias for Logger#level=. - # - # source://logger//lib/logger.rb#399 - def level=(severity); end - - # Creates a log entry, which may or may not be written to the log, - # depending on the entry's severity and on the log level. - # See {Log Level}[rdoc-ref:Logger@Log+Level] - # and {Entries}[rdoc-ref:Logger@Entries] for details. - # - # Examples: - # - # logger = Logger.new($stdout, progname: 'mung') - # logger.add(Logger::INFO) - # logger.add(Logger::ERROR, 'No good') - # logger.add(Logger::ERROR, 'No good', 'gnum') - # - # Output: - # - # I, [2022-05-12T16:25:31.469726 #36328] INFO -- mung: mung - # E, [2022-05-12T16:25:55.349414 #36328] ERROR -- mung: No good - # E, [2022-05-12T16:26:35.841134 #36328] ERROR -- gnum: No good - # - # These convenience methods have implicit severity: - # - # - #debug. - # - #info. - # - #warn. - # - #error. - # - #fatal. - # - #unknown. - # - # source://logger//lib/logger.rb#656 - def log(severity, message = T.unsafe(nil), progname = T.unsafe(nil)); end - - # Program name to include in log messages. - # - # source://logger//lib/logger.rb#422 - def progname; end - - # Program name to include in log messages. - # - # source://logger//lib/logger.rb#422 - def progname=(_arg0); end - - # Sets the logger's output stream: - # - # - If +logdev+ is +nil+, reopens the current output stream. - # - If +logdev+ is a filepath, opens the indicated file for append. - # - If +logdev+ is an IO stream - # (usually $stdout, $stderr, or an open File object), - # opens the stream for append. - # - # Example: - # - # logger = Logger.new('t.log') - # logger.add(Logger::ERROR, 'one') - # logger.close - # logger.add(Logger::ERROR, 'two') # Prints 'log writing failed. closed stream' - # logger.reopen - # logger.add(Logger::ERROR, 'three') - # logger.close - # File.readlines('t.log') - # # => - # # ["# Logfile created on 2022-05-12 14:21:19 -0500 by logger.rb/v1.5.0\n", - # # "E, [2022-05-12T14:21:27.596726 #22428] ERROR -- : one\n", - # # "E, [2022-05-12T14:23:05.847241 #22428] ERROR -- : three\n"] - # - # source://logger//lib/logger.rb#624 - def reopen(logdev = T.unsafe(nil)); end - - # Logging severity threshold (e.g. Logger::INFO). - # - # source://logger//lib/logger.rb#383 - def sev_threshold; end - - # Sets the log level; returns +severity+. - # See {Log Level}[rdoc-ref:Logger@Log+Level]. - # - # Argument +severity+ may be an integer, a string, or a symbol: - # - # logger.level = Logger::ERROR # => 3 - # logger.level = 3 # => 3 - # logger.level = 'error' # => "error" - # logger.level = :error # => :error - # - # Logger#sev_threshold= is an alias for Logger#level=. - # - # source://logger//lib/logger.rb#399 - def sev_threshold=(severity); end - - # Equivalent to calling #add with severity Logger::UNKNOWN. - # - # source://logger//lib/logger.rb#725 - def unknown(progname = T.unsafe(nil), &block); end - - # Equivalent to calling #add with severity Logger::WARN. - # - # source://logger//lib/logger.rb#707 - def warn(progname = T.unsafe(nil), &block); end - - # Sets the log level to Logger::WARN. - # See {Log Level}[rdoc-ref:Logger@Log+Level]. - # - # source://logger//lib/logger.rb#509 - def warn!; end - - # Returns +true+ if the log level allows entries with severity - # Logger::WARN to be written, +false+ otherwise. - # See {Log Level}[rdoc-ref:Logger@Log+Level]. - # - # @return [Boolean] - # - # source://logger//lib/logger.rb#504 - def warn?; end - - # Adjust the log level during the block execution for the current Fiber only - # - # logger.with_level(:debug) do - # logger.debug { "Hello" } - # end - # - # source://logger//lib/logger.rb#408 - def with_level(severity); end - - private - - # source://logger//lib/logger.rb#754 - def format_message(severity, datetime, progname, msg); end - - # source://logger//lib/logger.rb#745 - def format_severity(severity); end - - # Guarantee the existence of this ivar even when subclasses don't call the superclass constructor. - # - # source://logger//lib/logger.rb#750 - def level_override; end -end - -# Default formatter for log messages. -# -# source://logger//lib/logger/formatter.rb#5 -class Logger::Formatter - # @return [Formatter] a new instance of Formatter - # - # source://logger//lib/logger/formatter.rb#11 - def initialize; end - - # source://logger//lib/logger/formatter.rb#15 - def call(severity, time, progname, msg); end - - # Returns the value of attribute datetime_format. - # - # source://logger//lib/logger/formatter.rb#9 - def datetime_format; end - - # Sets the attribute datetime_format - # - # @param value the value to set the attribute datetime_format to. - # - # source://logger//lib/logger/formatter.rb#9 - def datetime_format=(_arg0); end - - private - - # source://logger//lib/logger/formatter.rb#21 - def format_datetime(time); end - - # source://logger//lib/logger/formatter.rb#25 - def msg2str(msg); end -end - -# source://logger//lib/logger/formatter.rb#7 -Logger::Formatter::DatetimeFormat = T.let(T.unsafe(nil), String) - -# source://logger//lib/logger/formatter.rb#6 -Logger::Formatter::Format = T.let(T.unsafe(nil), String) - -# Device used for logging messages. -# -# source://logger//lib/logger/log_device.rb#7 -class Logger::LogDevice - include ::Logger::Period - include ::MonitorMixin - - # @return [LogDevice] a new instance of LogDevice - # - # source://logger//lib/logger/log_device.rb#14 - def initialize(log = T.unsafe(nil), shift_age: T.unsafe(nil), shift_size: T.unsafe(nil), shift_period_suffix: T.unsafe(nil), binmode: T.unsafe(nil), reraise_write_errors: T.unsafe(nil)); end - - # source://logger//lib/logger/log_device.rb#59 - def close; end - - # Returns the value of attribute dev. - # - # source://logger//lib/logger/log_device.rb#10 - def dev; end - - # Returns the value of attribute filename. - # - # source://logger//lib/logger/log_device.rb#11 - def filename; end - - # source://logger//lib/logger/log_device.rb#69 - def reopen(log = T.unsafe(nil)); end - - # source://logger//lib/logger/log_device.rb#32 - def write(message); end - - private - - # source://logger//lib/logger/log_device.rb#126 - def add_log_header(file); end - - # source://logger//lib/logger/log_device.rb#132 - def check_shift_log; end - - # source://logger//lib/logger/log_device.rb#110 - def create_logfile(filename); end - - # source://logger//lib/logger/log_device.rb#152 - def lock_shift_log; end - - # source://logger//lib/logger/log_device.rb#102 - def open_logfile(filename); end - - # source://logger//lib/logger/log_device.rb#86 - def set_dev(log); end - - # source://logger//lib/logger/log_device.rb#183 - def shift_log_age; end - - # source://logger//lib/logger/log_device.rb#195 - def shift_log_period(period_end); end -end - -# source://logger//lib/logger/period.rb#4 -module Logger::Period - private - - # source://logger//lib/logger/period.rb#9 - def next_rotate_time(now, shift_age); end - - # source://logger//lib/logger/period.rb#31 - def previous_period_end(now, shift_age); end - - class << self - # source://logger//lib/logger/period.rb#9 - def next_rotate_time(now, shift_age); end - - # source://logger//lib/logger/period.rb#31 - def previous_period_end(now, shift_age); end - end -end - -# source://logger//lib/logger/period.rb#7 -Logger::Period::SiD = T.let(T.unsafe(nil), Integer) - -# \Severity label for logging (max 5 chars). -# -# source://logger//lib/logger.rb#743 -Logger::SEV_LABEL = T.let(T.unsafe(nil), Array) - -# Logging severity. -# -# source://logger//lib/logger/severity.rb#5 -module Logger::Severity - class << self - # source://logger//lib/logger/severity.rb#29 - def coerce(severity); end - end -end - -# source://logger//lib/logger/severity.rb#19 -Logger::Severity::LEVELS = T.let(T.unsafe(nil), Hash) diff --git a/sorbet/rbi/gems/minitest.rbi b/sorbet/rbi/gems/minitest.rbi deleted file mode 100644 index a375928..0000000 --- a/sorbet/rbi/gems/minitest.rbi +++ /dev/null @@ -1,440 +0,0 @@ -# This file is autogenerated. Do not edit it by hand. Regenerate it with: -# srb rbi gems - -# typed: true -# -# If you would like to make changes to this file, great! Please create the gem's shim here: -# -# https://github.com/sorbet/sorbet-typed/new/master?filename=lib/minitest/all/minitest.rbi -# -# minitest-5.25.1 - -module Minitest - def self.__run(reporter, options); end - def self.after_run(&block); end - def self.allow_fork; end - def self.allow_fork=(arg0); end - def self.autorun; end - def self.backtrace_filter; end - def self.backtrace_filter=(arg0); end - def self.cattr_accessor(name); end - def self.clock_time; end - def self.empty_run!(options); end - def self.extensions; end - def self.extensions=(arg0); end - def self.filter_backtrace(bt); end - def self.info_signal; end - def self.info_signal=(arg0); end - def self.init_plugins(options); end - def self.load_plugins; end - def self.parallel_executor; end - def self.parallel_executor=(arg0); end - def self.process_args(args = nil); end - def self.register_plugin(name_or_mod); end - def self.reporter; end - def self.reporter=(arg0); end - def self.run(args = nil); end - def self.run_one_method(klass, method_name); end - def self.seed; end - def self.seed=(arg0); end -end -module Minitest::Parallel -end -class Minitest::Parallel::Executor - def <<(work); end - def initialize(size); end - def shutdown; end - def size; end - def start; end -end -module Minitest::Parallel::Test - def _synchronize; end -end -module Minitest::Parallel::Test::ClassMethods - def run_one_method(klass, method_name, reporter); end - def test_order; end -end -module Minitest::Compress - def compress(orig); end -end -module Minitest::Assertions - def _synchronize; end - def _where; end - def assert(test, msg = nil); end - def assert_empty(obj, msg = nil); end - def assert_equal(exp, act, msg = nil); end - def assert_in_delta(exp, act, delta = nil, msg = nil); end - def assert_in_epsilon(exp, act, epsilon = nil, msg = nil); end - def assert_includes(collection, obj, msg = nil); end - def assert_instance_of(cls, obj, msg = nil); end - def assert_kind_of(cls, obj, msg = nil); end - def assert_match(matcher, obj, msg = nil); end - def assert_mock(mock); end - def assert_nil(obj, msg = nil); end - def assert_operator(o1, op, o2 = nil, msg = nil); end - def assert_output(stdout = nil, stderr = nil); end - def assert_path_exists(path, msg = nil); end - def assert_pattern; end - def assert_predicate(o1, op, msg = nil); end - def assert_raises(*exp); end - def assert_respond_to(obj, meth, msg = nil, include_all: nil); end - def assert_same(exp, act, msg = nil); end - def assert_send(send_ary, m = nil); end - def assert_silent; end - def assert_throws(sym, msg = nil); end - def capture_io; end - def capture_subprocess_io; end - def diff(exp, act); end - def exception_details(e, msg); end - def fail_after(y, m, d, msg); end - def flunk(msg = nil); end - def message(msg = nil, ending = nil, &default); end - def mu_pp(obj); end - def mu_pp_for_diff(obj); end - def pass(_msg = nil); end - def refute(test, msg = nil); end - def refute_empty(obj, msg = nil); end - def refute_equal(exp, act, msg = nil); end - def refute_in_delta(exp, act, delta = nil, msg = nil); end - def refute_in_epsilon(a, b, epsilon = nil, msg = nil); end - def refute_includes(collection, obj, msg = nil); end - def refute_instance_of(cls, obj, msg = nil); end - def refute_kind_of(cls, obj, msg = nil); end - def refute_match(matcher, obj, msg = nil); end - def refute_nil(obj, msg = nil); end - def refute_operator(o1, op, o2 = nil, msg = nil); end - def refute_path_exists(path, msg = nil); end - def refute_pattern; end - def refute_predicate(o1, op, msg = nil); end - def refute_respond_to(obj, meth, msg = nil, include_all: nil); end - def refute_same(exp, act, msg = nil); end - def self.diff; end - def self.diff=(o); end - def skip(msg = nil, _ignored = nil); end - def skip_until(y, m, d, msg); end - def skipped?; end - def things_to_diff(exp, act); end -end -class Minitest::Test < Minitest::Runnable - def capture_exceptions; end - def class_name; end - def neuter_exception(e); end - def new_exception(klass, msg, bt, kill = nil); end - def run; end - def sanitize_exception(e); end - def self.i_suck_and_my_tests_are_order_dependent!; end - def self.io_lock; end - def self.io_lock=(arg0); end - def self.make_my_diffs_pretty!; end - def self.parallelize_me!; end - def self.runnable_methods; end - extend Minitest::Guard - include Minitest::Assertions - include Minitest::Guard - include Minitest::Reportable - include Minitest::Test::LifecycleHooks -end -module Minitest::Test::LifecycleHooks - def after_setup; end - def after_teardown; end - def before_setup; end - def before_teardown; end - def setup; end - def teardown; end -end -class Minitest::Runnable - def assertions; end - def assertions=(arg0); end - def failure; end - def failures; end - def failures=(arg0); end - def initialize(name); end - def marshal_dump; end - def marshal_load(ary); end - def metadata; end - def metadata=(arg0); end - def metadata?; end - def name; end - def name=(o); end - def passed?; end - def result_code; end - def run; end - def self.inherited(klass); end - def self.methods_matching(re); end - def self.on_signal(name, action); end - def self.reset; end - def self.run(reporter, options = nil); end - def self.run_one_method(klass, method_name, reporter); end - def self.runnable_methods; end - def self.runnables; end - def self.test_order; end - def self.with_info_handler(reporter, &block); end - def skipped?; end - def time; end - def time=(arg0); end - def time_it; end -end -module Minitest::Reportable - def class_name; end - def error?; end - def location; end - def passed?; end - def result_code; end - def skipped?; end -end -class Minitest::Result < Minitest::Runnable - def class_name; end - def klass; end - def klass=(arg0); end - def self.from(runnable); end - def source_location; end - def source_location=(arg0); end - def to_s; end - include Minitest::Reportable -end -class Minitest::AbstractReporter - def initialize; end - def passed?; end - def prerecord(klass, name); end - def record(result); end - def report; end - def start; end - def synchronize(&block); end -end -class Minitest::Reporter < Minitest::AbstractReporter - def initialize(io = nil, options = nil); end - def io; end - def io=(arg0); end - def options; end - def options=(arg0); end -end -class Minitest::ProgressReporter < Minitest::Reporter - def prerecord(klass, name); end - def record(result); end -end -class Minitest::StatisticsReporter < Minitest::Reporter - def assertions; end - def assertions=(arg0); end - def count; end - def count=(arg0); end - def errors; end - def errors=(arg0); end - def failures; end - def failures=(arg0); end - def initialize(io = nil, options = nil); end - def passed?; end - def record(result); end - def report; end - def results; end - def results=(arg0); end - def skips; end - def skips=(arg0); end - def start; end - def start_time; end - def start_time=(arg0); end - def total_time; end - def total_time=(arg0); end - def warnings; end - def warnings=(arg0); end -end -class Minitest::SummaryReporter < Minitest::StatisticsReporter - def aggregated_results(io); end - def old_sync; end - def old_sync=(arg0); end - def report; end - def start; end - def statistics; end - def summary; end - def sync; end - def sync=(arg0); end - def to_s; end -end -class Minitest::CompositeReporter < Minitest::AbstractReporter - def <<(reporter); end - def initialize(*reporters); end - def io; end - def passed?; end - def prerecord(klass, name); end - def record(result); end - def report; end - def reporters; end - def reporters=(arg0); end - def start; end -end -class Minitest::Assertion < Exception - def error; end - def location; end - def result_code; end - def result_label; end -end -class Minitest::Skip < Minitest::Assertion - def result_label; end -end -class Minitest::UnexpectedError < Minitest::Assertion - def backtrace; end - def error; end - def error=(arg0); end - def initialize(error); end - def message; end - def result_label; end - include Minitest::Compress -end -class Minitest::UnexpectedWarning < Minitest::Assertion - def result_label; end -end -module Minitest::Guard - def jruby?(platform = nil); end - def maglev?(platform = nil); end - def mri?(platform = nil); end - def osx?(platform = nil); end - def rubinius?(platform = nil); end - def windows?(platform = nil); end -end -class Minitest::BacktraceFilter - def filter(bt); end - def initialize(regexp = nil); end - def regexp; end - def regexp=(arg0); end -end -class MockExpectationError < StandardError -end -class Minitest::Mock - def ===(*args, **kwargs, &b); end - def __call(name, data); end - def __respond_to?(*arg0); end - def class(*args, **kwargs, &b); end - def expect(name, retval, args = nil, **kwargs, &blk); end - def initialize(delegator = nil); end - def inspect(*args, **kwargs, &b); end - def instance_eval(*args, **kwargs, &b); end - def instance_variables(*args, **kwargs, &b); end - def method_missing(sym, *args, **kwargs, &block); end - def object_id(*args, **kwargs, &b); end - def public_send(*args, **kwargs, &b); end - def respond_to?(sym, include_private = nil); end - def respond_to_missing?(*args, **kwargs, &b); end - def send(*args, **kwargs, &b); end - def to_s(*args, **kwargs, &b); end - def verify; end -end -class Object < BasicObject - def stub(name, val_or_callable, *block_args, **block_kwargs, &block); end - include Minitest::Expectations -end -module Minitest::Expectations - def must_be(*args, **); end - def must_be_close_to(*args, **); end - def must_be_empty(*args, **); end - def must_be_instance_of(*args, **); end - def must_be_kind_of(*args, **); end - def must_be_nil(*args, **); end - def must_be_same_as(*args, **); end - def must_be_silent(*args, **); end - def must_be_within_delta(*args, **); end - def must_be_within_epsilon(*args, **); end - def must_equal(*args, **); end - def must_include(*args, **); end - def must_match(*args, **); end - def must_output(*args, **); end - def must_pattern_match(*args, **); end - def must_raise(*args, **); end - def must_respond_to(*args, **); end - def must_throw(*args, **); end - def path_must_exist(*args, **); end - def path_wont_exist(*args, **); end - def wont_be(*args, **); end - def wont_be_close_to(*args, **); end - def wont_be_empty(*args, **); end - def wont_be_instance_of(*args, **); end - def wont_be_kind_of(*args, **); end - def wont_be_nil(*args, **); end - def wont_be_same_as(*args, **); end - def wont_be_within_delta(*args, **); end - def wont_be_within_epsilon(*args, **); end - def wont_equal(*args, **); end - def wont_include(*args, **); end - def wont_match(*args, **); end - def wont_pattern_match(*args, **); end - def wont_respond_to(*args, **); end -end -class Minitest::Expectation < Struct - def ctx; end - def ctx=(_); end - def must_be(*args, **); end - def must_be_close_to(*args, **); end - def must_be_empty(*args, **); end - def must_be_instance_of(*args, **); end - def must_be_kind_of(*args, **); end - def must_be_nil(*args, **); end - def must_be_same_as(*args, **); end - def must_be_silent(*args, **); end - def must_be_within_delta(*args, **); end - def must_be_within_epsilon(*args, **); end - def must_equal(*args, **); end - def must_include(*args, **); end - def must_match(*args, **); end - def must_output(*args, **); end - def must_pattern_match(*args, **); end - def must_raise(*args, **); end - def must_respond_to(*args, **); end - def must_throw(*args, **); end - def path_must_exist(*args, **); end - def path_wont_exist(*args, **); end - def self.[](*arg0); end - def self.inspect; end - def self.keyword_init?; end - def self.members; end - def self.new(*arg0); end - def target; end - def target=(_); end - def wont_be(*args, **); end - def wont_be_close_to(*args, **); end - def wont_be_empty(*args, **); end - def wont_be_instance_of(*args, **); end - def wont_be_kind_of(*args, **); end - def wont_be_nil(*args, **); end - def wont_be_same_as(*args, **); end - def wont_be_within_delta(*args, **); end - def wont_be_within_epsilon(*args, **); end - def wont_equal(*args, **); end - def wont_include(*args, **); end - def wont_match(*args, **); end - def wont_pattern_match(*args, **); end - def wont_respond_to(*args, **); end -end -class Module - def infect_an_assertion(meth, new_name, dont_flip = nil); end -end -module Kernel - def describe(desc, *additional_desc, &block); end -end -class Minitest::Spec < Minitest::Test - def initialize(name); end - def self.current; end - extend Minitest::Spec::DSL - include Minitest::Spec::DSL::InstanceMethods -end -module Minitest::Spec::DSL - def after(_type = nil, &block); end - def before(_type = nil, &block); end - def children; end - def create(name, desc); end - def desc; end - def describe_stack; end - def it(desc = nil, &block); end - def let(name, &block); end - def name; end - def nuke_test_methods!; end - def register_spec_type(*args, &block); end - def self.extended(obj); end - def spec_type(desc, *additional); end - def specify(desc = nil, &block); end - def subject(&block); end - def to_s; end -end -module Minitest::Spec::DSL::InstanceMethods - def _(value = nil, &block); end - def before_setup; end - def expect(value = nil, &block); end - def value(value = nil, &block); end -end diff --git a/sorbet/rbi/gems/minitest@5.25.1.rbi b/sorbet/rbi/gems/minitest@5.25.1.rbi deleted file mode 100644 index 2536e9b..0000000 --- a/sorbet/rbi/gems/minitest@5.25.1.rbi +++ /dev/null @@ -1,9 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `minitest` gem. -# Please instead update this file by running `bin/tapioca gem minitest`. - - -# THIS IS AN EMPTY RBI FILE. -# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/polyfill.rbi b/sorbet/rbi/gems/polyfill.rbi deleted file mode 100644 index f62fe96..0000000 --- a/sorbet/rbi/gems/polyfill.rbi +++ /dev/null @@ -1,335 +0,0 @@ -# This file is autogenerated. Do not edit it by hand. Regenerate it with: -# srb rbi gems - -# typed: strict -# -# If you would like to make changes to this file, great! Please create the gem's shim here: -# -# https://github.com/sorbet/sorbet-typed/new/master?filename=lib/polyfill/all/polyfill.rbi -# -# polyfill-1.9.0 - -module Polyfill - def get(module_name, methods, options = nil); end - def self.get(module_name, methods, options = nil); end -end -module Polyfill::InternalUtils - def create_module(*args); end - def current_ruby_version; end - def ignore_warnings; end - def keep_only_these_methods!(mod, whitelist); end - def methods_to_keep(modules, methods, lead_symbol, module_name); end - def modules_to_use(module_name, versions); end - def namify_arguments(*args); end - def polyfill_versions_to_use(desired_version = nil); end - def self.create_module(*args); end - def self.current_ruby_version; end - def self.ignore_warnings; end - def self.keep_only_these_methods!(mod, whitelist); end - def self.methods_to_keep(modules, methods, lead_symbol, module_name); end - def self.modules_to_use(module_name, versions); end - def self.namify_arguments(*args); end - def self.polyfill_versions_to_use(desired_version = nil); end - def self.to_f(obj); end - def self.to_hash(obj); end - def self.to_int(obj); end - def self.to_str(obj); end - def to_f(obj); end - def to_hash(obj); end - def to_int(obj); end - def to_str(obj); end -end -module Polyfill::V2_2 -end -module Polyfill::V2_2::Enumerable - def max(n = nil); end - def max_by(n = nil); end - def min(n = nil); end - def min_by(n = nil); end - def slice_after(pattern = nil); end - def slice_when; end -end -module Polyfill::V2_2::Kernel - def itself; end -end -module Polyfill::V2_2::Math -end -module Polyfill::V2_2::Math::ClassMethods - def log(*args); end -end -module Polyfill::V2_2::Prime -end -module Polyfill::V2_2::Prime::ClassMethods - def prime?(*args); end -end -module Polyfill::V2_2::Vector - def +@; end -end -module Polyfill::V2_3 -end -module Polyfill::V2_3::Array - def bsearch_index; end - def dig(head, *rest); end -end -module Polyfill::V2_3::Hash - def <(other); end - def <=(other); end - def >(other); end - def >=(other); end - def dig(head, *rest); end - def fetch_values(*keys); end - def to_proc; end -end -module Polyfill::V2_3::Enumerable - def chunk_while; end - def grep_v(pattern); end - def slice_before(*args); end -end -module Polyfill::V2_3::Enumerator -end -module Polyfill::V2_3::Enumerator::Lazy - def grep_v(pattern); end -end -module Polyfill::V2_3::Kernel - def loop; end -end -module Polyfill::V2_3::Numeric - def negative?; end - def positive?; end -end -module Polyfill::V2_3::String - def +@; end - def -@; end -end -module Polyfill::V2_3::String::ClassMethods - def new(*args); end -end -module Polyfill::V2_3::Struct - def dig(head, *rest); end -end -module Polyfill::V2_3::Prime -end -module Polyfill::V2_3::Prime::ClassMethods - def prime?(*args); end -end -module Polyfill::V2_4 -end -module Polyfill::V2_4::Numeric - def clone(freeze: nil); end - def dup; end - def finite?; end - def infinite?; end -end -module Polyfill::V2_4::Enumerable - def chunk(*); end - def sum(init = nil); end - def uniq; end -end -module Polyfill::Module::MezpOdW1lcmljPT5bIiNkdXAiXSwgOnZlcnNpb249PiIyLjQifQ__ -end -module Polyfill::V2_4::Array - def concat(*others); end - def sum(init = nil); end -end -module Polyfill::V2_4::Comparable - def clamp(min, max); end -end -module Polyfill::V2_4::Dir -end -module Polyfill::V2_4::Dir::ClassMethods - def empty?(path_name); end -end -module Polyfill::V2_4::Enumerator -end -module Polyfill::V2_4::Enumerator::Lazy - def chunk_while; end - def uniq; end -end -module Polyfill::Module::MezpFbnVtZXJhYmxlPT5bIiNjaHVua193aGlsZSJdLCA6dmVyc2lvbj0_1IjIuNCJ9 -end -module Polyfill::V2_4::File -end -module Polyfill::V2_4::File::ClassMethods - def empty?(file_name); end -end -module Polyfill::V2_4::Float - def ceil(ndigits = nil); end - def floor(ndigits = nil); end - def truncate(ndigits = nil); end -end -module Polyfill::V2_4::Hash - def compact!; end - def compact; end - def transform_values!; end - def transform_values; end -end -module Polyfill::V2_4::Integer - def ceil(ndigits = nil); end - def digits(base = nil); end - def floor(ndigits = nil); end - def round(ndigits = nil, half: nil); end - def truncate(ndigits = nil); end -end -module Polyfill::V2_4::IO - def each_line(*args); end - def gets(*args); end - def lines(*args); end - def readline(*args); end - def readlines(*args); end -end -module Polyfill::V2_4::IO::ClassMethods - def foreach(name, *args); end - def readlines(file_name, *args); end -end -module Polyfill::V2_4::MatchData - def named_captures; end - def values_at(*indexes); end -end -module Polyfill::V2_4::Object - def clone(freeze: nil); end -end -module Polyfill::V2_4::Regexp - def match?(string, position = nil); end -end -module Polyfill::V2_4::String - def casecmp?(other); end - def concat(*others); end - def each_line(*args); end - def lines(*args); end - def match?(pattern, position = nil); end - def prepend(*others); end - def unpack1(*args); end -end -module Polyfill::V2_4::String::ClassMethods - def new(*args); end -end -module Polyfill::V2_4::StringIO - def each_line(*args); end - def gets(*args); end - def lines(*args); end - def readline(*args); end - def readlines(*args); end -end -module Polyfill::V2_4::StringIO::ClassMethods - def foreach(name, *args); end - def readlines(file_name, *args); end -end -module Polyfill::V2_4::Symbol - def casecmp?(other); end - def match(*args); end - def match?(pattern, position = nil); end -end -module Polyfill::V2_4::IPAddr - def <=>(*); end - def ==(*); end -end -module Polyfill::V2_4::Pathname - def empty?; end -end -module Polyfill::V2_5 -end -module Polyfill::V2_5::Array - def append(*args); end - def prepend(*args); end -end -module Polyfill::V2_5::Dir -end -module Polyfill::V2_5::Dir::ClassMethods - def children(dirname, encoding: nil); end - def each_child(dirname, encoding: nil); end -end -module Polyfill::V2_5::Enumerable - def all?(*pattern); end - def any?(*pattern); end - def none?(*pattern); end - def one?(*pattern); end -end -module Polyfill::V2_5::Hash - def slice(*keys); end - def transform_keys; end -end -module Polyfill::V2_5::Integer - def allbits?(mask); end - def anybits?(mask); end - def ceil(*); end - def floor(*); end - def nobits?(mask); end - def round(*); end - def truncate(*); end -end -module Polyfill::Module::MezpJbnRlZ2VyPT5bIiNjZWlsIiwgIiNmbG9vciIsICIjcm91bmQiLCAiI3RydW5jYXRlIl0sIDp2ZXJzaW9uPT4iMi40In0_ -end -module Polyfill::V2_5::Integer::ClassMethods - def sqrt(n); end -end -module Polyfill::V2_5::Kernel - def yield_self; end -end -module Polyfill::V2_5::String - def casecmp(other_str); end - def casecmp?(other_str); end - def delete_prefix!(prefix); end - def delete_prefix(prefix); end - def delete_suffix!(suffix); end - def delete_suffix(suffix); end - def each_grapheme_cluster; end - def grapheme_clusters; end - def start_with?(*prefixes); end -end -module Polyfill::V2_5::Struct -end -module Polyfill::V2_5::Struct::ClassMethods - def new(*args, keyword_init: nil); end -end -module Polyfill::V2_5::Time -end -module Polyfill::V2_5::Time::ClassMethods - def at(*args); end -end -module Polyfill::V2_5::BigDecimal - def clone; end - def dup; end -end -module Polyfill::V2_5::Set - def ===(other); end - def to_s; end -end -module Polyfill::V2_6 -end -module Polyfill::V2_6::Array - def difference(*arrays); end - def to_h; end - def union(*arrays); end -end -module Polyfill::V2_6::Enumerable - def to_h; end -end -module Polyfill::V2_6::Hash - def merge!(*args); end - def merge(*args); end - def to_h; end - def update(*args); end -end -module Polyfill::V2_6::Kernel - def Complex(*args, exception: nil); end - def Float(arg, exception: nil); end - def Integer(arg, exception: nil); end - def Rational(*args, exception: nil); end - def then; end -end -module Polyfill::Module::MezpLZXJuZWw9PlsiI3lpZWxkX3NlbGYiXSwgOnZlcnNpb249PiIyLjUifQ__ -end -module Polyfill::V2_6::OpenStruct - def to_h; end -end -module Polyfill::V2_6::String - def split(*); end -end -module Polyfill::V2_6::Struct - def to_h; end -end -module Polyfill::Module -end -class Object < BasicObject - def Polyfill(options = nil); end -end diff --git a/sorbet/rbi/gems/rbi@0.1.13.rbi b/sorbet/rbi/gems/rbi@0.1.13.rbi index f307314..6f431af 100644 --- a/sorbet/rbi/gems/rbi@0.1.13.rbi +++ b/sorbet/rbi/gems/rbi@0.1.13.rbi @@ -1945,7 +1945,7 @@ class RBI::Rewriters::Merge::Conflict < ::T::Struct def to_s; end class << self - # source://sorbet-runtime/0.5.11531/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/lib/types/struct.rb#13 def inherited(s); end end end @@ -2162,7 +2162,7 @@ class RBI::Rewriters::RemoveKnownDefinitions::Operation < ::T::Struct def to_s; end class << self - # source://sorbet-runtime/0.5.11531/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/lib/types/struct.rb#13 def inherited(s); end end end diff --git a/sorbet/rbi/gems/rspec-core.rbi b/sorbet/rbi/gems/rspec-core.rbi deleted file mode 100644 index 2289abc..0000000 --- a/sorbet/rbi/gems/rspec-core.rbi +++ /dev/null @@ -1,1982 +0,0 @@ -# This file is autogenerated. Do not edit it by hand. Regenerate it with: -# srb rbi gems - -# typed: true -# -# If you would like to make changes to this file, great! Please create the gem's shim here: -# -# https://github.com/sorbet/sorbet-typed/new/master?filename=lib/rspec-core/all/rspec-core.rbi -# -# rspec-core-3.13.0 - -module RSpec - def self.clear_examples; end - def self.configuration; end - def self.configuration=(arg0); end - def self.configure; end - def self.const_missing(name); end - def self.context(*args, &example_group_block); end - def self.current_example; end - def self.current_example=(example); end - def self.current_scope; end - def self.current_scope=(scope); end - def self.describe(*args, &example_group_block); end - def self.example_group(*args, &example_group_block); end - def self.fcontext(*args, &example_group_block); end - def self.fdescribe(*args, &example_group_block); end - def self.reset; end - def self.shared_context(name, *args, &block); end - def self.shared_examples(name, *args, &block); end - def self.shared_examples_for(name, *args, &block); end - def self.world; end - def self.world=(arg0); end - def self.xcontext(*args, &example_group_block); end - def self.xdescribe(*args, &example_group_block); end - extend RSpec::Core::Warnings -end -module RSpec::Core - def self.path_to_executable; end -end -module RSpec::Core::Version -end -module RSpec::Core::Warnings - def deprecate(deprecated, data = nil); end - def warn_deprecation(message, opts = nil); end - def warn_with(message, options = nil); end -end -class RSpec::Core::Set - def <<(key); end - def clear; end - def delete(key); end - def each(&block); end - def empty?; end - def include?(key); end - def initialize(array = nil); end - def merge(values); end - include Enumerable -end -module RSpec::Core::FlatMap - def flat_map(array, &block); end - def self.flat_map(array, &block); end -end -class RSpec::Core::FilterManager - def add_ids(rerun_path, scoped_ids); end - def add_location(file_path, line_numbers); end - def add_path_to_arrays_filter(filter_key, path, values); end - def empty?; end - def exclude(*args); end - def exclude_only(*args); end - def exclude_with_low_priority(*args); end - def exclusions; end - def file_scoped_include?(ex_metadata, ids, locations); end - def include(*args); end - def include_only(*args); end - def include_with_low_priority(*args); end - def inclusions; end - def initialize; end - def prune(examples); end - def prune_conditionally_filtered_examples(examples); end -end -class RSpec::Core::FilterRules - def [](key); end - def add(updated); end - def add_with_low_priority(updated); end - def clear; end - def delete(key); end - def description; end - def each_pair(&block); end - def empty?; end - def fetch(*args, &block); end - def include_example?(example); end - def initialize(rules = nil); end - def opposite; end - def opposite=(arg0); end - def rules; end - def self.build; end - def use_only(updated); end -end -class RSpec::Core::InclusionRules < RSpec::Core::FilterRules - def add(*args); end - def add_with_low_priority(*args); end - def apply_standalone_filter(updated); end - def include_example?(example); end - def is_standalone_filter?(rules); end - def replace_filters(new_rules); end - def split_file_scoped_rules; end - def standalone?; end -end -module RSpec::Core::DSL - def self.change_global_dsl(&changes); end - def self.example_group_aliases; end - def self.expose_example_group_alias(name); end - def self.expose_example_group_alias_globally(method_name); end - def self.expose_globally!; end - def self.exposed_globally?; end - def self.remove_globally!; end - def self.top_level; end - def self.top_level=(arg0); end -end -module RSpec::Core::Formatters - def self.register(formatter_class, *notifications); end -end -module RSpec::Core::Formatters::ConsoleCodes - def config_colors_to_methods; end - def console_code_for(code_or_symbol); end - def self.config_colors_to_methods; end - def self.console_code_for(code_or_symbol); end - def self.wrap(text, code_or_symbol); end - def wrap(text, code_or_symbol); end -end -class RSpec::Core::Formatters::SnippetExtractor - def beginning_line_number; end - def expression_lines; end - def expression_node; end - def expression_outmost_node?(node); end - def initialize(source, beginning_line_number, max_line_count = nil); end - def line_range_of_expression; end - def line_range_of_location_nodes_in_expression; end - def location_nodes_at_beginning_line; end - def max_line_count; end - def self.extract_expression_lines_at(file_path, beginning_line_number, max_line_count = nil); end - def self.extract_line_at(file_path, line_number); end - def self.least_indentation_from(lines); end - def self.source_from_file(path); end - def source; end - def unclosed_tokens_in_line_range(line_range); end -end -class RSpec::Core::Formatters::SnippetExtractor::NoSuchFileError < StandardError -end -class RSpec::Core::Formatters::SnippetExtractor::NoSuchLineError < StandardError -end -class RSpec::Core::Formatters::SnippetExtractor::NoExpressionAtLineError < StandardError -end -class RSpec::Core::Formatters::SyntaxHighlighter - def color_enabled_implementation; end - def highlight(lines); end - def implementation; end - def initialize(configuration); end - def self.attempt_to_add_rspec_terms_to_coderay_keywords; end -end -module RSpec::Core::Formatters::SyntaxHighlighter::CodeRayImplementation - def self.highlight_syntax(lines); end -end -module RSpec::Core::Formatters::SyntaxHighlighter::NoSyntaxHighlightingImplementation - def self.highlight_syntax(lines); end -end -class RSpec::Core::Formatters::ExceptionPresenter - def add_shared_group_lines(lines, colorizer); end - def backtrace_formatter; end - def colorized_formatted_backtrace(colorizer = nil); end - def colorized_message_lines(colorizer = nil); end - def description; end - def detail_formatter; end - def encoded_description(description); end - def encoded_string(string); end - def encoding_of(string); end - def example; end - def exception; end - def exception_backtrace; end - def exception_class_name(exception = nil); end - def exception_lines; end - def exception_message_string(exception); end - def extra_detail_formatter; end - def extra_failure_lines; end - def failure_lines; end - def failure_slash_error_lines; end - def final_exception(exception, previous = nil); end - def find_failed_line; end - def formatted_backtrace(exception = nil); end - def formatted_cause(exception); end - def formatted_message_and_backtrace(colorizer); end - def fully_formatted(failure_number, colorizer = nil); end - def fully_formatted_lines(failure_number, colorizer); end - def indent_lines(lines, failure_number); end - def initialize(exception, example, options = nil); end - def message_color; end - def message_lines; end - def read_failed_lines; end -end -class RSpec::Core::Formatters::ExceptionPresenter::Factory - def build; end - def initialize(example); end - def multiple_exception_summarizer(exception, prior_detail_formatter, color); end - def multiple_exceptions_error?(exception); end - def options; end - def pending_options; end - def sub_failure_list_formatter(exception, message_color); end - def with_multiple_error_options_as_needed(exception, options); end -end -module RSpec::Core::Formatters::ExceptionPresenter::Factory::EmptyBacktraceFormatter - def self.format_backtrace(*); end -end -class RSpec::Core::Formatters::ExceptionPresenter::Factory::CommonBacktraceTruncater - def initialize(parent); end - def with_truncated_backtrace(child); end -end -class RSpec::Core::MultipleExceptionError < StandardError - def aggregation_block_label; end - def aggregation_metadata; end - def all_exceptions; end - def exception_count_description; end - def failures; end - def initialize(*exceptions); end - def message; end - def other_errors; end - def summary; end - include RSpec::Core::MultipleExceptionError::InterfaceTag -end -module RSpec::Core::MultipleExceptionError::InterfaceTag - def add(exception); end - def self.for(ex); end -end -module RSpec::Core::ShellEscape - def conditionally_quote(id); end - def escape(shell_command); end - def quote(argument); end - def self.conditionally_quote(id); end - def self.escape(shell_command); end - def self.quote(argument); end - def self.shell_allows_unquoted_ids?; end - def shell_allows_unquoted_ids?; end -end -module RSpec::Core::Formatters::Helpers - def self.format_duration(duration); end - def self.format_seconds(float, precision = nil); end - def self.organize_ids(ids); end - def self.pluralize(count, string); end - def self.strip_trailing_zeroes(string); end -end -module RSpec::Core::Notifications -end -module RSpec::Core::Notifications::NullColorizer - def self.wrap(line, _code_or_symbol); end - def wrap(line, _code_or_symbol); end -end -class RSpec::Core::Notifications::StartNotification < Struct - def count; end - def count=(_); end - def load_time; end - def load_time=(_); end - def self.[](*arg0); end - def self.inspect; end - def self.keyword_init?; end - def self.members; end - def self.new(*arg0); end -end -class RSpec::Core::Notifications::ExampleNotification < Struct - def example; end - def example=(_); end - def self.[](*arg0); end - def self.for(example); end - def self.inspect; end - def self.keyword_init?; end - def self.members; end - def self.new(*arg0); end -end -class RSpec::Core::Notifications::ExamplesNotification - def examples; end - def failed_examples; end - def failure_notifications; end - def format_examples(examples); end - def fully_formatted_failed_examples(colorizer = nil); end - def fully_formatted_pending_examples(colorizer = nil); end - def initialize(reporter); end - def notifications; end - def pending_examples; end - def pending_notifications; end -end -class RSpec::Core::Notifications::FailedExampleNotification < RSpec::Core::Notifications::ExampleNotification - def colorized_formatted_backtrace(colorizer = nil); end - def colorized_message_lines(colorizer = nil); end - def description; end - def exception; end - def formatted_backtrace; end - def fully_formatted(failure_number, colorizer = nil); end - def fully_formatted_lines(failure_number, colorizer = nil); end - def initialize(example, exception_presenter = nil); end - def message_lines; end - def self.new(*arg0); end -end -class RSpec::Core::Notifications::PendingExampleFixedNotification < RSpec::Core::Notifications::FailedExampleNotification -end -class RSpec::Core::Notifications::PendingExampleFailedAsExpectedNotification < RSpec::Core::Notifications::FailedExampleNotification -end -class RSpec::Core::Notifications::SkippedExampleNotification < RSpec::Core::Notifications::ExampleNotification - def fully_formatted(pending_number, colorizer = nil); end - def self.new(*arg0); end -end -class RSpec::Core::Notifications::GroupNotification < Struct - def group; end - def group=(_); end - def self.[](*arg0); end - def self.inspect; end - def self.keyword_init?; end - def self.members; end - def self.new(*arg0); end -end -class RSpec::Core::Notifications::MessageNotification < Struct - def message; end - def message=(_); end - def self.[](*arg0); end - def self.inspect; end - def self.keyword_init?; end - def self.members; end - def self.new(*arg0); end -end -class RSpec::Core::Notifications::SeedNotification < Struct - def fully_formatted; end - def seed; end - def seed=(_); end - def seed_used?; end - def self.[](*arg0); end - def self.inspect; end - def self.keyword_init?; end - def self.members; end - def self.new(*arg0); end - def used; end - def used=(_); end -end -class RSpec::Core::Notifications::SummaryNotification < Struct - def colorized_rerun_commands(colorizer = nil); end - def colorized_totals_line(colorizer = nil); end - def duplicate_rerun_locations; end - def duration; end - def duration=(_); end - def errors_outside_of_examples_count; end - def errors_outside_of_examples_count=(_); end - def example_count; end - def examples; end - def examples=(_); end - def failed_examples; end - def failed_examples=(_); end - def failure_count; end - def formatted_duration; end - def formatted_load_time; end - def fully_formatted(colorizer = nil); end - def load_time; end - def load_time=(_); end - def pending_count; end - def pending_examples; end - def pending_examples=(_); end - def rerun_argument_for(example); end - def self.[](*arg0); end - def self.inspect; end - def self.keyword_init?; end - def self.members; end - def self.new(*arg0); end - def totals_line; end - include RSpec::Core::ShellEscape -end -class RSpec::Core::Notifications::ProfileNotification - def calculate_slowest_groups; end - def duration; end - def examples; end - def initialize(duration, examples, number_of_examples, example_groups); end - def number_of_examples; end - def percentage; end - def slow_duration; end - def slowest_examples; end - def slowest_groups; end -end -class RSpec::Core::Notifications::DeprecationNotification < Struct - def call_site; end - def call_site=(_); end - def deprecated; end - def deprecated=(_); end - def message; end - def message=(_); end - def replacement; end - def replacement=(_); end - def self.[](*arg0); end - def self.from_hash(data); end - def self.inspect; end - def self.keyword_init?; end - def self.members; end - def self.new(*arg0); end -end -class RSpec::Core::Notifications::NullNotification -end -class RSpec::Core::Notifications::CustomNotification < Struct - def self.for(options = nil); end -end -class RSpec::Core::Reporter - def abort_with(msg, exit_status); end - def close; end - def close_after; end - def deprecation(hash); end - def ensure_listeners_ready; end - def example_failed(example); end - def example_finished(example); end - def example_group_finished(group); end - def example_group_started(group); end - def example_passed(example); end - def example_pending(example); end - def example_started(example); end - def examples; end - def exit_early(exit_code); end - def fail_fast_limit_met?; end - def failed_examples; end - def finish; end - def initialize(configuration); end - def message(message); end - def mute_profile_output?; end - def notify(event, notification); end - def notify_non_example_exception(exception, context_description); end - def pending_examples; end - def prepare_default(loader, output_stream, deprecation_stream); end - def publish(event, options = nil); end - def register_listener(listener, *notifications); end - def registered_listeners(notification); end - def report(expected_example_count); end - def seed_used?; end - def start(expected_example_count, time = nil); end - def stop; end -end -class RSpec::Core::NullReporter - def self.method_missing(*); end -end -module RSpec::Core::Hooks - def after(*args, &block); end - def append_after(*args, &block); end - def append_before(*args, &block); end - def around(*args, &block); end - def before(*args, &block); end - def hooks; end - def prepend_after(*args, &block); end - def prepend_before(*args, &block); end -end -class RSpec::Core::Hooks::Hook < Struct - def block; end - def block=(_); end - def options; end - def options=(_); end - def self.[](*arg0); end - def self.inspect; end - def self.keyword_init?; end - def self.members; end - def self.new(*arg0); end -end -class RSpec::Core::Hooks::BeforeHook < RSpec::Core::Hooks::Hook - def run(example); end -end -class RSpec::Core::Hooks::AfterHook < RSpec::Core::Hooks::Hook - def run(example); end -end -class RSpec::Core::Hooks::AfterContextHook < RSpec::Core::Hooks::Hook - def run(example); end -end -class RSpec::Core::Hooks::AroundHook < RSpec::Core::Hooks::Hook - def execute_with(example, procsy); end - def hook_description; end -end -class RSpec::Core::Hooks::HookCollections - def all_hooks_for(position, scope); end - def ensure_hooks_initialized_for(position, scope); end - def extract_scope_from(args); end - def hooks_for(position, scope); end - def initialize(owner, filterable_item_repo_class); end - def known_scope?(scope); end - def matching_hooks_for(position, scope, example_or_group); end - def normalized_scope_for(scope); end - def owner_parent_groups; end - def process(host, parent_groups, globals, position, scope); end - def processable_hooks_for(position, scope, host); end - def register(prepend_or_append, position, *args, &block); end - def register_global_singleton_context_hooks(example, globals); end - def register_globals(host, globals); end - def run(position, scope, example_or_group); end - def run_around_example_hooks_for(example); end - def run_example_hooks_for(example, position, each_method); end - def run_owned_hooks_for(position, scope, example_or_group); end - def scope_and_options_from(*args); end -end -module RSpec::Core::MemoizedHelpers - def __init_memoized; end - def __memoized; end - def enforce_value_expectation(matcher, method_name); end - def initialize(*); end - def is_expected; end - def matcher_supports_value_expectations?(matcher); end - def self.define_helpers_on(example_group); end - def self.get_constant_or_yield(example_group, name); end - def self.module_for(example_group); end - def should(matcher = nil, message = nil); end - def should_not(matcher = nil, message = nil); end - def subject; end -end -class RSpec::Core::MemoizedHelpers::ThreadsafeMemoized - def fetch_or_store(key); end - def initialize; end -end -class RSpec::Core::MemoizedHelpers::NonThreadSafeMemoized - def fetch_or_store(key); end - def initialize; end -end -class RSpec::Core::MemoizedHelpers::ContextHookMemoized - def self.fetch_or_store(key, &_block); end - def self.isolate_for_context_hook(example_group_instance); end -end -class RSpec::Core::MemoizedHelpers::ContextHookMemoized::Before < RSpec::Core::MemoizedHelpers::ContextHookMemoized - def self.article; end - def self.hook_expression; end - def self.hook_intention; end -end -class RSpec::Core::MemoizedHelpers::ContextHookMemoized::After < RSpec::Core::MemoizedHelpers::ContextHookMemoized - def self.article; end - def self.hook_expression; end - def self.hook_intention; end -end -module RSpec::Core::MemoizedHelpers::ClassMethods - def let!(name, &block); end - def let(name, &block); end - def subject!(name = nil, &block); end - def subject(name = nil, &block); end -end -module RSpec::Core::Metadata - def self.ascend(metadata); end - def self.ascending(metadata); end - def self.build_hash_from(args, warn_about_example_group_filtering = nil); end - def self.deep_hash_dup(object); end - def self.id_from(metadata); end - def self.location_tuple_from(metadata); end - def self.relative_path(line); end - def self.relative_path_regex; end -end -class RSpec::Core::Metadata::HashPopulator - def block; end - def build_description_from(parent_description = nil, my_description = nil); end - def build_scoped_id_for(file_path); end - def description_args; end - def description_separator(parent_part, child_part); end - def ensure_valid_user_keys; end - def file_path_and_line_number_from(backtrace); end - def initialize(metadata, user_metadata, index_provider, description_args, block); end - def metadata; end - def populate; end - def populate_location_attributes; end - def user_metadata; end -end -class RSpec::Core::Metadata::ExampleHash < RSpec::Core::Metadata::HashPopulator - def described_class; end - def full_description; end - def self.create(group_metadata, user_metadata, index_provider, description, block); end -end -class RSpec::Core::Metadata::ExampleGroupHash < RSpec::Core::Metadata::HashPopulator - def described_class; end - def full_description; end - def self.backwards_compatibility_default_proc(&example_group_selector); end - def self.create(parent_group_metadata, user_metadata, example_group_index, *args, &block); end - def self.hash_with_backwards_compatibility_default_proc; end -end -module RSpec::Core::HashImitatable - def <(*args, &block); end - def <=(*args, &block); end - def >(*args, &block); end - def >=(*args, &block); end - def [](key); end - def []=(key, value); end - def all?(*args, &block); end - def any?(*args, &block); end - def assert_valid_keys(*args, &block); end - def assoc(*args, &block); end - def chain(*args, &block); end - def chunk(*args, &block); end - def chunk_while(*args, &block); end - def clear(*args, &block); end - def collect(*args, &block); end - def collect_concat(*args, &block); end - def compact!(*args, &block); end - def compact(*args, &block); end - def compact_blank!(*args, &block); end - def compact_blank(*args, &block); end - def compare_by_identity(*args, &block); end - def compare_by_identity?(*args, &block); end - def count(*args, &block); end - def cycle(*args, &block); end - def deconstruct_keys(*args, &block); end - def deep_merge!(*args, &block); end - def deep_merge(*args, &block); end - def deep_merge?(*args, &block); end - def deep_stringify_keys!(*args, &block); end - def deep_stringify_keys(*args, &block); end - def deep_symbolize_keys!(*args, &block); end - def deep_symbolize_keys(*args, &block); end - def deep_transform_keys!(*args, &block); end - def deep_transform_keys(*args, &block); end - def default(*args, &block); end - def default=(*args, &block); end - def default_proc(*args, &block); end - def default_proc=(*args, &block); end - def delete(*args, &block); end - def delete_if(*args, &block); end - def detect(*args, &block); end - def dig(*args, &block); end - def directly_supports_attribute?(name); end - def drop(*args, &block); end - def drop_while(*args, &block); end - def each(*args, &block); end - def each_cons(*args, &block); end - def each_entry(*args, &block); end - def each_key(*args, &block); end - def each_pair(*args, &block); end - def each_slice(*args, &block); end - def each_value(*args, &block); end - def each_with_index(*args, &block); end - def each_with_object(*args, &block); end - def empty?(*args, &block); end - def entries(*args, &block); end - def except!(*args, &block); end - def except(*args, &block); end - def exclude?(*args, &block); end - def excluding(*args, &block); end - def extra_hash_attributes; end - def extract!(*args, &block); end - def extractable_options?(*args, &block); end - def fetch(*args, &block); end - def fetch_values(*args, &block); end - def filter!(*args, &block); end - def filter(*args, &block); end - def filter_map(*args, &block); end - def find(*args, &block); end - def find_all(*args, &block); end - def find_index(*args, &block); end - def first(*args, &block); end - def flat_map(*args, &block); end - def flatten(*args, &block); end - def get_value(name); end - def grep(*args, &block); end - def grep_v(*args, &block); end - def group_by(*args, &block); end - def has_key?(*args, &block); end - def has_value?(*args, &block); end - def hash_for_delegation; end - def in_order_of(*args, &block); end - def include?(*args, &block); end - def including(*args, &block); end - def index_by(*args, &block); end - def index_with(*args, &block); end - def inject(*args, &block); end - def invert(*args, &block); end - def issue_deprecation(_method_name, *_args); end - def keep_if(*args, &block); end - def key(*args, &block); end - def key?(*args, &block); end - def keys(*args, &block); end - def lazy(*args, &block); end - def length(*args, &block); end - def many?(*args, &block); end - def map(*args, &block); end - def max(*args, &block); end - def max_by(*args, &block); end - def maximum(*args, &block); end - def member?(*args, &block); end - def merge!(*args, &block); end - def merge(*args, &block); end - def min(*args, &block); end - def min_by(*args, &block); end - def minimum(*args, &block); end - def minmax(*args, &block); end - def minmax_by(*args, &block); end - def none?(*args, &block); end - def one?(*args, &block); end - def partition(*args, &block); end - def pick(*args, &block); end - def pluck(*args, &block); end - def rassoc(*args, &block); end - def reduce(*args, &block); end - def rehash(*args, &block); end - def reject!(*args, &block); end - def reject(*args, &block); end - def replace(*args, &block); end - def reverse_each(*args, &block); end - def select!(*args, &block); end - def select(*args, &block); end - def self.included(klass); end - def set_value(name, value); end - def shift(*args, &block); end - def size(*args, &block); end - def slice!(*args, &block); end - def slice(*args, &block); end - def slice_after(*args, &block); end - def slice_before(*args, &block); end - def slice_when(*args, &block); end - def sole(*args, &block); end - def sort(*args, &block); end - def sort_by(*args, &block); end - def store(*args, &block); end - def stringify_keys!(*args, &block); end - def stringify_keys(*args, &block); end - def sum(*args, &block); end - def symbolize_keys!(*args, &block); end - def symbolize_keys(*args, &block); end - def take(*args, &block); end - def take_while(*args, &block); end - def tally(*args, &block); end - def to_a(*args, &block); end - def to_h; end - def to_hash(*args, &block); end - def to_options!(*args, &block); end - def to_options(*args, &block); end - def to_proc(*args, &block); end - def to_set(*args, &block); end - def transform_keys!(*args, &block); end - def transform_keys(*args, &block); end - def transform_values!(*args, &block); end - def transform_values(*args, &block); end - def uniq(*args, &block); end - def update(*args, &block); end - def value?(*args, &block); end - def values(*args, &block); end - def values_at(*args, &block); end - def without(*args, &block); end - def zip(*args, &block); end -end -module RSpec::Core::HashImitatable::ClassMethods - def attr_accessor(*names); end - def hash_attribute_names; end -end -class RSpec::Core::LegacyExampleGroupHash - def directly_supports_attribute?(name); end - def get_value(name); end - def initialize(metadata); end - def set_value(name, value); end - def to_h; end - extend RSpec::Core::HashImitatable::ClassMethods - include RSpec::Core::HashImitatable -end -module RSpec::Core::MetadataFilter - def self.apply?(predicate, filters, metadata); end - def self.filter_applies?(key, filter_value, metadata); end - def self.filter_applies_to_any_value?(key, value, metadata); end - def self.filters_apply?(key, value, metadata); end - def self.id_filter_applies?(rerun_paths_to_scoped_ids, metadata); end - def self.location_filter_applies?(locations, metadata); end - def self.proc_filter_applies?(key, proc, metadata); end - def self.silence_metadata_example_group_deprecations; end -end -module RSpec::Core::FilterableItemRepository -end -class RSpec::Core::FilterableItemRepository::UpdateOptimized - def append(item, metadata); end - def delete(item, metadata); end - def initialize(applies_predicate); end - def items_and_filters; end - def items_for(request_meta); end - def prepend(item, metadata); end -end -class RSpec::Core::FilterableItemRepository::QueryOptimized < RSpec::Core::FilterableItemRepository::UpdateOptimized - def append(item, metadata); end - def applicable_metadata_from(metadata); end - def delete(item, metadata); end - def find_items_for(request_meta); end - def handle_mutation(metadata); end - def initialize(applies_predicate); end - def items_for(metadata); end - def prepend(item, metadata); end - def proc_keys_from(metadata); end - def reconstruct_caches; end -end -module RSpec::Core::Pending - def pending(message = nil); end - def self.mark_fixed!(example); end - def self.mark_pending!(example, message_or_bool); end - def self.mark_skipped!(example, message_or_bool); end - def skip(message = nil); end -end -class RSpec::Core::Pending::SkipDeclaredInExample < StandardError - def argument; end - def initialize(argument); end -end -class RSpec::Core::Pending::PendingExampleFixedError < StandardError -end -class RSpec::Core::Formatters::Loader - def add(formatter_to_use, *paths); end - def built_in_formatter(key); end - def custom_formatter(formatter_ref); end - def default_formatter; end - def default_formatter=(arg0); end - def duplicate_formatter_exists?(new_formatter); end - def existing_formatter_implements?(notification); end - def find_formatter(formatter_to_use); end - def formatters; end - def has_matching_output?(formatter, new_formatter); end - def initialize(reporter); end - def notifications_for(formatter_class); end - def open_stream(path_or_wrapper); end - def path_for(const_ref); end - def prepare_default(output_stream, deprecation_stream); end - def register(formatter, notifications); end - def reporter; end - def self.formatters; end - def setup_default(output_stream, deprecation_stream); end - def string_const?(str); end - def underscore(camel_cased_word); end - def underscore_with_fix_for_non_standard_rspec_naming(string); end -end -module RSpec::Core::Ordering -end -class RSpec::Core::Ordering::Identity - def order(items); end -end -class RSpec::Core::Ordering::Random - def initialize(configuration); end - def jenkins_hash_digest(string); end - def order(items); end - def used?; end -end -class RSpec::Core::Ordering::RecentlyModified - def order(list); end -end -class RSpec::Core::Ordering::Custom - def initialize(callable); end - def order(list); end -end -class RSpec::Core::Ordering::Delayed - def initialize(registry, name); end - def lookup_strategy; end - def order(list); end - def strategy; end -end -class RSpec::Core::Ordering::Registry - def fetch(name, &fallback); end - def has_strategy?(name); end - def initialize(configuration); end - def register(sym, strategy); end - def used_random_seed?; end -end -class RSpec::Core::Ordering::ConfigurationManager - def force(hash); end - def initialize; end - def order=(type); end - def ordering_registry; end - def register_ordering(name, strategy = nil); end - def seed; end - def seed=(seed); end - def seed_used?; end -end -class RSpec::Core::World - def all_example_groups; end - def all_examples; end - def announce_exclusion_filter(announcements); end - def announce_filters; end - def announce_inclusion_filter(announcements); end - def descending_declaration_line_numbers_by_file; end - def everything_filtered_message; end - def example_count(groups = nil); end - def example_group_counts_by_spec_file; end - def example_groups; end - def exclusion_filter; end - def fail_if_config_and_cli_options_invalid; end - def filter_manager; end - def filtered_examples; end - def inclusion_filter; end - def initialize(configuration = nil); end - def non_example_failure; end - def non_example_failure=(arg0); end - def num_example_groups_defined_in(file); end - def ordered_example_groups; end - def preceding_declaration_line(absolute_file_name, filter_line); end - def prepare_example_filtering; end - def record(example_group); end - def registered_example_group_files; end - def report_filter_message(message); end - def reporter; end - def reset; end - def rspec_is_quitting; end - def rspec_is_quitting=(arg0); end - def shared_example_group_registry; end - def source_from_file(path); end - def syntax_highlighter; end - def traverse_example_group_trees_until(&block); end - def wants_to_quit; end - def wants_to_quit=(arg0); end -end -module RSpec::Core::World::Null - def self.all_example_groups; end - def self.example_groups; end - def self.non_example_failure; end - def self.non_example_failure=(_); end - def self.registered_example_group_files; end - def self.traverse_example_group_trees_until; end -end -class RSpec::Core::BacktraceFormatter - def backtrace_line(line); end - def exclude?(line); end - def exclusion_patterns; end - def exclusion_patterns=(arg0); end - def filter_gem(gem_name); end - def format_backtrace(backtrace, options = nil); end - def full_backtrace=(arg0); end - def full_backtrace?; end - def inclusion_patterns; end - def inclusion_patterns=(arg0); end - def initialize; end - def matches?(patterns, line); end -end -module RSpec::Core::RubyProject - def add_dir_to_load_path(dir); end - def add_to_load_path(*dirs); end - def ascend_until; end - def determine_root; end - def find_first_parent_containing(dir); end - def root; end - def self.add_dir_to_load_path(dir); end - def self.add_to_load_path(*dirs); end - def self.ascend_until; end - def self.determine_root; end - def self.find_first_parent_containing(dir); end - def self.root; end -end -class RSpec::Core::Formatters::DeprecationFormatter - def count; end - def deprecation(notification); end - def deprecation_message_for(data); end - def deprecation_stream; end - def deprecation_summary(_notification); end - def initialize(deprecation_stream, summary_stream); end - def output; end - def printer; end - def summary_stream; end -end -class RSpec::Core::Formatters::DeprecationFormatter::SpecifiedDeprecationMessage < Struct - def deprecation_type_for(data); end - def initialize(data); end - def output_formatted(str); end - def self.[](*arg0); end - def self.inspect; end - def self.keyword_init?; end - def self.members; end - def self.new(*arg0); end - def to_s; end - def too_many_warnings_message; end - def type; end - def type=(_); end -end -class RSpec::Core::Formatters::DeprecationFormatter::GeneratedDeprecationMessage < Struct - def initialize(data); end - def self.[](*arg0); end - def self.inspect; end - def self.keyword_init?; end - def self.members; end - def self.new(*arg0); end - def to_s; end - def too_many_warnings_message; end - def type; end - def type=(_); end -end -class RSpec::Core::Formatters::DeprecationFormatter::ImmediatePrinter - def deprecation_formatter; end - def deprecation_stream; end - def deprecation_summary; end - def initialize(deprecation_stream, summary_stream, deprecation_formatter); end - def print_deprecation_message(data); end - def summary_stream; end -end -class RSpec::Core::Formatters::DeprecationFormatter::DelayedPrinter - def deprecation_formatter; end - def deprecation_stream; end - def deprecation_summary; end - def initialize(deprecation_stream, summary_stream, deprecation_formatter); end - def print_deferred_deprecation_warnings; end - def print_deprecation_message(data); end - def stash_deprecation_message(deprecation_message); end - def summary_stream; end -end -class RSpec::Core::Formatters::DeprecationFormatter::RaiseErrorStream - def puts(message); end - def summarize(summary_stream, deprecation_count); end -end -class RSpec::Core::Formatters::DeprecationFormatter::FileStream - def initialize(file); end - def puts(*args); end - def summarize(summary_stream, deprecation_count); end -end -class RSpec::Core::DeprecationError < StandardError -end -class RSpec::Core::OutputWrapper - def <<(*args, &block); end - def advise(*args, &block); end - def autoclose=(*args, &block); end - def autoclose?(*args, &block); end - def binmode(*args, &block); end - def binmode?(*args, &block); end - def close(*args, &block); end - def close_on_exec=(*args, &block); end - def close_on_exec?(*args, &block); end - def close_read(*args, &block); end - def close_write(*args, &block); end - def closed?(*args, &block); end - def each(*args, &block); end - def each_byte(*args, &block); end - def each_char(*args, &block); end - def each_codepoint(*args, &block); end - def each_line(*args, &block); end - def eof(*args, &block); end - def eof?(*args, &block); end - def external_encoding(*args, &block); end - def fcntl(*args, &block); end - def fdatasync(*args, &block); end - def fileno(*args, &block); end - def flush(*args, &block); end - def fsync(*args, &block); end - def getbyte(*args, &block); end - def getc(*args, &block); end - def gets(*args, &block); end - def initialize(output); end - def inspect(*args, &block); end - def internal_encoding(*args, &block); end - def ioctl(*args, &block); end - def isatty(*args, &block); end - def lineno(*args, &block); end - def lineno=(*args, &block); end - def method_missing(name, *args, &block); end - def nonblock(*args, &block); end - def nonblock=(*args, &block); end - def nonblock?(*args, &block); end - def nread(*args, &block); end - def output; end - def output=(arg0); end - def path(*args, &block); end - def pathconf(*args, &block); end - def pid(*args, &block); end - def pos(*args, &block); end - def pos=(*args, &block); end - def pread(*args, &block); end - def print(*args, &block); end - def printf(*args, &block); end - def putc(*args, &block); end - def puts(*args, &block); end - def pwrite(*args, &block); end - def read(*args, &block); end - def read_nonblock(*args, &block); end - def readbyte(*args, &block); end - def readchar(*args, &block); end - def readline(*args, &block); end - def readlines(*args, &block); end - def readpartial(*args, &block); end - def ready?(*args, &block); end - def reopen(*args, &block); end - def respond_to?(name, priv = nil); end - def rewind(*args, &block); end - def seek(*args, &block); end - def set_encoding(*args, &block); end - def set_encoding_by_bom(*args, &block); end - def stat(*args, &block); end - def sync(*args, &block); end - def sync=(*args, &block); end - def sysread(*args, &block); end - def sysseek(*args, &block); end - def syswrite(*args, &block); end - def tell(*args, &block); end - def timeout(*args, &block); end - def timeout=(*args, &block); end - def to_i(*args, &block); end - def to_io(*args, &block); end - def to_path(*args, &block); end - def tty?(*args, &block); end - def ungetbyte(*args, &block); end - def ungetc(*args, &block); end - def wait(*args, &block); end - def wait_priority(*args, &block); end - def wait_readable(*args, &block); end - def wait_writable(*args, &block); end - def write(*args, &block); end - def write_nonblock(*args, &block); end -end -class RSpec::Core::Configuration - def absolute_pattern?(pattern); end - def add_formatter(formatter, output = nil); end - def add_hook_to_existing_matching_groups(meta, scope, &block); end - def add_setting(name, opts = nil); end - def after(scope = nil, *meta, &block); end - def alias_example_group_to(new_name, *args); end - def alias_example_to(name, *args); end - def alias_it_behaves_like_to(new_name, report_label = nil); end - def alias_it_should_behave_like_to(new_name, report_label = nil); end - def append_after(scope = nil, *meta, &block); end - def append_before(scope = nil, *meta, &block); end - def apply_derived_metadata_to(metadata); end - def around(scope = nil, *meta, &block); end - def assert_no_example_groups_defined(config_option); end - def backtrace_exclusion_patterns; end - def backtrace_exclusion_patterns=(patterns); end - def backtrace_formatter; end - def backtrace_inclusion_patterns; end - def backtrace_inclusion_patterns=(patterns); end - def before(scope = nil, *meta, &block); end - def bisect_runner; end - def bisect_runner=(value); end - def bisect_runner_class; end - def clear_values_derived_from_example_status_persistence_file_path; end - def color; end - def color=(arg0); end - def color_enabled?(output = nil); end - def color_mode; end - def color_mode=(arg0); end - def command; end - def conditionally_disable_expectations_monkey_patching; end - def conditionally_disable_mocks_monkey_patching; end - def configure_example(example, example_hooks); end - def configure_expectation_framework; end - def configure_group(group); end - def configure_group_with(group, module_list, application_method); end - def configure_mock_framework; end - def default_color; end - def default_color=(arg0); end - def default_color?; end - def default_formatter; end - def default_formatter=(value); end - def default_path; end - def default_path=(path); end - def default_path?; end - def define_built_in_hooks; end - def define_derived_metadata(*filters, &block); end - def define_mixed_in_module(mod, filters, mod_list, config_method, &block); end - def deprecation_stream; end - def deprecation_stream=(value); end - def detail_color; end - def detail_color=(arg0); end - def detail_color?; end - def disable_monkey_patching!; end - def disable_monkey_patching; end - def disable_monkey_patching=(arg0); end - def drb; end - def drb=(arg0); end - def drb?; end - def drb_port; end - def drb_port=(arg0); end - def drb_port?; end - def dry_run; end - def dry_run=(arg0); end - def dry_run?; end - def error_exit_code; end - def error_exit_code=(arg0); end - def error_exit_code?; end - def error_stream; end - def error_stream=(arg0); end - def error_stream?; end - def example_status_persistence_file_path; end - def example_status_persistence_file_path=(value); end - def exclude_pattern; end - def exclude_pattern=(value); end - def exclusion_filter; end - def exclusion_filter=(filter); end - def expect_with(*frameworks); end - def expectation_framework=(framework); end - def expectation_frameworks; end - def expose_current_running_example_as(method_name); end - def expose_dsl_globally=(value); end - def expose_dsl_globally?; end - def extend(mod, *filters); end - def extract_location(path); end - def fail_fast; end - def fail_fast=(value); end - def fail_if_no_examples; end - def fail_if_no_examples=(arg0); end - def fail_if_no_examples?; end - def failure_color; end - def failure_color=(arg0); end - def failure_color?; end - def failure_exit_code; end - def failure_exit_code=(arg0); end - def failure_exit_code?; end - def file_glob_from(path, pattern); end - def files_or_directories_to_run=(*files); end - def files_to_run; end - def files_to_run=(arg0); end - def filter; end - def filter=(filter); end - def filter_gems_from_backtrace(*gem_names); end - def filter_manager; end - def filter_manager=(arg0); end - def filter_run(*args); end - def filter_run_excluding(*args); end - def filter_run_including(*args); end - def filter_run_when_matching(*args); end - def fixed_color; end - def fixed_color=(arg0); end - def fixed_color?; end - def force(hash); end - def format_docstrings(&block); end - def format_docstrings_block; end - def formatter=(formatter, output = nil); end - def formatter_loader; end - def formatters; end - def full_backtrace=(true_or_false); end - def full_backtrace?; end - def full_cause_backtrace; end - def full_cause_backtrace=(arg0); end - def full_cause_backtrace?; end - def full_description; end - def full_description=(description); end - def gather_directories(path); end - def get_files_to_run(paths); end - def get_matching_files(path, pattern); end - def handle_suite_hook(scope, meta); end - def hooks; end - def in_project_source_dir_regex; end - def include(mod, *filters); end - def include_context(shared_group_name, *filters); end - def inclusion_filter; end - def inclusion_filter=(filter); end - def initialize; end - def last_run_statuses; end - def libs; end - def libs=(libs); end - def load_file_handling_errors(method, file); end - def load_spec_files; end - def loaded_spec_files; end - def max_displayed_failure_line_count; end - def max_displayed_failure_line_count=(arg0); end - def max_displayed_failure_line_count?; end - def metadata_applies_to_group?(meta, group); end - def mock_framework; end - def mock_framework=(framework); end - def mock_with(framework); end - def on_example_group_definition(&block); end - def on_example_group_definition_callbacks; end - def on_existing_matching_groups(meta); end - def only_failures; end - def only_failures?; end - def only_failures_but_not_configured?; end - def order=(*args, &block); end - def ordering_manager; end - def ordering_registry(*args, &block); end - def output_stream; end - def output_stream=(value); end - def output_to_tty?(output = nil); end - def output_wrapper; end - def paths_to_check(paths); end - def pattern; end - def pattern=(value); end - def pattern_might_load_specs_from_vendored_dirs?; end - def pending_color; end - def pending_color=(arg0); end - def pending_color?; end - def pending_failure_output; end - def pending_failure_output=(mode); end - def pending_failure_output?; end - def prepend(mod, *filters); end - def prepend_after(scope = nil, *meta, &block); end - def prepend_before(scope = nil, *meta, &block); end - def profile_examples; end - def profile_examples=(arg0); end - def profile_examples?; end - def project_source_dirs; end - def project_source_dirs=(arg0); end - def project_source_dirs?; end - def raise_errors_for_deprecations!; end - def raise_on_warning=(value); end - def register_ordering(*args, &block); end - def reporter; end - def requires; end - def requires=(paths); end - def reset; end - def reset_filters; end - def reset_reporter; end - def rspec_expectations_loaded?; end - def rspec_mocks_loaded?; end - def run_all_when_everything_filtered; end - def run_all_when_everything_filtered=(arg0); end - def run_all_when_everything_filtered?; end - def run_suite_hooks(hook_description, hooks); end - def safe_extend(mod, host); end - def safe_include(mod, host); end - def safe_prepend(mod, host); end - def seed(*args, &block); end - def seed=(*args, &block); end - def seed_used?(*args, &block); end - def self.add_read_only_setting(name, opts = nil); end - def self.add_setting(name, opts = nil); end - def self.define_alias(name, alias_name); end - def self.define_predicate(name); end - def self.define_reader(name); end - def self.delegate_to_ordering_manager(*methods); end - def shared_context_metadata_behavior; end - def shared_context_metadata_behavior=(value); end - def silence_filter_announcements; end - def silence_filter_announcements=(arg0); end - def silence_filter_announcements?; end - def spec_files_with_failures; end - def start_time; end - def start_time=(arg0); end - def start_time?; end - def static_config_filter_manager; end - def static_config_filter_manager=(arg0); end - def success_color; end - def success_color=(arg0); end - def success_color?; end - def threadsafe; end - def threadsafe=(arg0); end - def threadsafe?; end - def treat_symbols_as_metadata_keys_with_true_values=(_value); end - def tty; end - def tty=(arg0); end - def tty?; end - def update_pattern_attr(name, value); end - def value_for(key); end - def warnings=(value); end - def warnings?; end - def when_first_matching_example_defined(*filters); end - def with_suite_hooks; end - def world; end - def world=(arg0); end - include RSpec::Core::Configuration::Readers - include RSpec::Core::Hooks -end -module RSpec::Core::Configuration::Readers - def default_color; end - def default_path; end - def deprecation_stream; end - def detail_color; end - def drb; end - def drb_port; end - def dry_run; end - def error_exit_code; end - def error_stream; end - def example_status_persistence_file_path; end - def exclude_pattern; end - def fail_fast; end - def fail_if_no_examples; end - def failure_color; end - def failure_exit_code; end - def fixed_color; end - def full_cause_backtrace; end - def libs; end - def max_displayed_failure_line_count; end - def only_failures; end - def output_stream; end - def pattern; end - def pending_color; end - def pending_failure_output; end - def project_source_dirs; end - def requires; end - def run_all_when_everything_filtered; end - def shared_context_metadata_behavior; end - def silence_filter_announcements; end - def start_time; end - def success_color; end - def threadsafe; end - def tty; end -end -class RSpec::Core::Configuration::MustBeConfiguredBeforeExampleGroupsError < StandardError -end -class RSpec::Core::Configuration::DeprecationReporterBuffer - def deprecation(*args); end - def initialize; end - def play_onto(reporter); end -end -module RSpec::Core::Configuration::ExposeCurrentExample -end -class RSpec::Core::Parser - def add_tag_filter(options, filter_type, tag_name, value = nil); end - def configure_only_failures(options); end - def initialize(original_args); end - def original_args; end - def parse(source = nil); end - def parser(options); end - def self.parse(args, source = nil); end - def set_fail_fast(options, value); end -end -class RSpec::Core::ConfigurationOptions - def args; end - def args_from_options_file(path); end - def command_line_options; end - def configure(config); end - def configure_filter_manager(filter_manager); end - def custom_options; end - def custom_options_file; end - def env_options; end - def file_options; end - def force?(key); end - def global_options; end - def global_options_file; end - def home_options_file_path; end - def initialize(args); end - def load_formatters_into(config); end - def local_options; end - def local_options_file; end - def options; end - def options_file_as_erb_string(path); end - def options_from(path); end - def order(keys); end - def organize_options; end - def parse_args_ignoring_files_or_dirs_to_run(args, source); end - def process_options_into(config); end - def project_options; end - def project_options_file; end - def resolve_xdg_config_home; end - def xdg_options_file_if_exists; end - def xdg_options_file_path; end -end -class RSpec::Core::Runner - def configuration; end - def configure(err, out); end - def exit_code(examples_passed = nil); end - def initialize(options, configuration = nil, world = nil); end - def options; end - def persist_example_statuses; end - def run(err, out); end - def run_specs(example_groups); end - def self.autorun; end - def self.autorun_disabled?; end - def self.disable_autorun!; end - def self.handle_interrupt; end - def self.installed_at_exit?; end - def self.invoke; end - def self.perform_at_exit; end - def self.run(args, err = nil, out = nil); end - def self.running_in_drb?; end - def self.trap_interrupt; end - def setup(err, out); end - def world; end -end -module RSpec::Core::Invocations -end -class RSpec::Core::Invocations::InitializeProject - def call(*_args); end -end -class RSpec::Core::Invocations::DRbWithFallback - def call(options, err, out); end -end -class RSpec::Core::Invocations::Bisect - def bisect_formatter_klass_for(argument); end - def call(options, err, out); end -end -class RSpec::Core::Invocations::PrintVersion - def call(_options, _err, out); end -end -class RSpec::Core::Invocations::PrintHelp < Struct - def call(_options, _err, out); end - def hidden_options; end - def hidden_options=(_); end - def parser; end - def parser=(_); end - def self.[](*arg0); end - def self.inspect; end - def self.keyword_init?; end - def self.members; end - def self.new(*arg0); end -end -class RSpec::Core::Example - def assign_generated_description; end - def clock; end - def clock=(arg0); end - def description; end - def display_exception; end - def display_exception=(ex); end - def duplicate_with(metadata_overrides = nil); end - def example_group; end - def example_group_instance; end - def exception; end - def execution_result; end - def fail_with_exception(reporter, exception); end - def file_path; end - def finish(reporter); end - def full_description; end - def generate_description; end - def hooks; end - def id; end - def initialize(example_group_class, description, user_metadata, example_block = nil); end - def inspect; end - def inspect_output; end - def instance_exec(*args, &block); end - def location; end - def location_description; end - def location_rerun_argument; end - def metadata; end - def mocks_need_verification?; end - def pending; end - def pending?; end - def record_finished(status, reporter); end - def reporter; end - def rerun_argument; end - def run(example_group_instance, reporter); end - def run_after_example; end - def run_before_example; end - def self.delegate_to_metadata(key); end - def self.parse_id(id); end - def set_aggregate_failures_exception(exception); end - def set_exception(exception); end - def skip; end - def skip_with_exception(reporter, exception); end - def skipped?; end - def start(reporter); end - def to_s; end - def update_inherited_metadata(updates); end - def verify_mocks; end - def with_around_and_singleton_context_hooks; end - def with_around_example_hooks; end -end -class RSpec::Core::Example::Procsy - def <<(*a, &b); end - def ==(*a, &b); end - def ===(*a, &b); end - def >>(*a, &b); end - def [](*a, &b); end - def arity(*a, &b); end - def binding(*a, &b); end - def call(*args, &block); end - def clock(*a, &b); end - def clock=(*a, &b); end - def clone(*a, &b); end - def curry(*a, &b); end - def description(*a, &b); end - def dup(*a, &b); end - def duplicate_with(*a, &b); end - def eql?(*a, &b); end - def example; end - def example_group(*a, &b); end - def example_group_instance(*a, &b); end - def exception(*a, &b); end - def executed?; end - def execution_result(*a, &b); end - def file_path(*a, &b); end - def full_description(*a, &b); end - def hash(*a, &b); end - def id(*a, &b); end - def initialize(example, &block); end - def inspect; end - def inspect_output(*a, &b); end - def lambda?(*a, &b); end - def location(*a, &b); end - def location_rerun_argument(*a, &b); end - def metadata(*a, &b); end - def parameters(*a, &b); end - def pending(*a, &b); end - def pending?(*a, &b); end - def reporter(*a, &b); end - def rerun_argument(*a, &b); end - def ruby2_keywords(*a, &b); end - def run(*args, &block); end - def skip(*a, &b); end - def skipped?(*a, &b); end - def source_location(*a, &b); end - def to_proc; end - def update_inherited_metadata(*a, &b); end - def wrap(&block); end - def yield(*a, &b); end -end -class RSpec::Core::Example::ExecutionResult - def calculate_run_time(finished_at); end - def ensure_timing_set(clock); end - def example_skipped?; end - def exception; end - def exception=(arg0); end - def finished_at; end - def finished_at=(arg0); end - def get_value(name); end - def hash_for_delegation; end - def issue_deprecation(_method_name, *_args); end - def pending_exception; end - def pending_exception=(arg0); end - def pending_fixed; end - def pending_fixed=(arg0); end - def pending_fixed?; end - def pending_message; end - def pending_message=(arg0); end - def record_finished(status, finished_at); end - def run_time; end - def run_time=(arg0); end - def set_value(name, value); end - def started_at; end - def started_at=(arg0); end - def status; end - def status=(arg0); end - extend RSpec::Core::HashImitatable::ClassMethods - include RSpec::Core::HashImitatable -end -class RSpec::Core::SuiteHookContext < RSpec::Core::Example - def initialize(hook_description, reporter); end - def set_exception(exception); end -end -class RSpec::Core::SharedExampleGroupModule < Module - def definition; end - def include_in(klass, inclusion_line, args, customization_block); end - def included(klass); end - def initialize(description, definition, metadata); end - def inspect; end - def to_s; end -end -module RSpec::Core::SharedExampleGroup - def shared_context(name, *args, &block); end - def shared_examples(name, *args, &block); end - def shared_examples_for(name, *args, &block); end -end -module RSpec::Core::SharedExampleGroup::TopLevelDSL - def self.definitions; end - def self.expose_globally!; end - def self.exposed_globally?; end - def self.remove_globally!; end -end -class RSpec::Core::SharedExampleGroup::Registry - def add(context, name, *metadata_args, &block); end - def ensure_block_has_source_location(_block); end - def find(lookup_contexts, name); end - def formatted_location(block); end - def legacy_add(context, name, *metadata_args, &block); end - def shared_example_groups; end - def valid_name?(candidate); end - def warn_if_key_taken(context, key, new_block); end -end -class RSpec::Core::ExampleGroup - def described_class; end - def initialize(inspect_output = nil); end - def inspect; end - def method_missing(name, *args, **); end - def self.add_example(example); end - def self.before_context_ivars; end - def self.children; end - def self.context(*args, &example_group_block); end - def self.currently_executing_a_context_hook?; end - def self.declaration_locations; end - def self.define_example_group_method(name, metadata = nil); end - def self.define_example_method(name, extra_options = nil); end - def self.define_nested_shared_group_method(new_name, report_label = nil); end - def self.delegate_to_metadata(*names); end - def self.descendant_filtered_examples; end - def self.descendants; end - def self.describe(*args, &example_group_block); end - def self.described_class; end - def self.description; end - def self.each_instance_variable_for_example(group); end - def self.ensure_example_groups_are_configured; end - def self.example(*all_args, &block); end - def self.example_group(*args, &example_group_block); end - def self.examples; end - def self.fcontext(*args, &example_group_block); end - def self.fdescribe(*args, &example_group_block); end - def self.fexample(*all_args, &block); end - def self.file_path; end - def self.filtered_examples; end - def self.find_and_eval_shared(label, name, inclusion_location, *args, &customization_block); end - def self.fit(*all_args, &block); end - def self.focus(*all_args, &block); end - def self.for_filtered_examples(reporter, &block); end - def self.fspecify(*all_args, &block); end - def self.id; end - def self.idempotently_define_singleton_method(name, &definition); end - def self.include_context(name, *args, &block); end - def self.include_examples(name, *args, &block); end - def self.it(*all_args, &block); end - def self.it_behaves_like(name, *args, &customization_block); end - def self.it_should_behave_like(name, *args, &customization_block); end - def self.location; end - def self.metadata; end - def self.method_missing(name, *args); end - def self.next_runnable_index_for(file); end - def self.ordering_strategy; end - def self.parent_groups; end - def self.pending(*all_args, &block); end - def self.remove_example(example); end - def self.reset_memoized; end - def self.run(reporter = nil); end - def self.run_after_context_hooks(example_group_instance); end - def self.run_before_context_hooks(example_group_instance); end - def self.run_examples(reporter); end - def self.set_it_up(description, args, registration_collection, &example_group_block); end - def self.set_ivars(instance, ivars); end - def self.skip(*all_args, &block); end - def self.specify(*all_args, &block); end - def self.store_before_context_ivars(example_group_instance); end - def self.subclass(parent, description, args, registration_collection, &example_group_block); end - def self.superclass_before_context_ivars; end - def self.superclass_metadata; end - def self.top_level?; end - def self.top_level_description; end - def self.traverse_tree_until(&block); end - def self.update_inherited_metadata(updates); end - def self.with_replaced_metadata(meta); end - def self.xcontext(*args, &example_group_block); end - def self.xdescribe(*args, &example_group_block); end - def self.xexample(*all_args, &block); end - def self.xit(*all_args, &block); end - def self.xspecify(*all_args, &block); end - extend RSpec::Core::Hooks - extend RSpec::Core::MemoizedHelpers::ClassMethods - extend RSpec::Core::SharedExampleGroup - include RSpec::Core::MemoizedHelpers - include RSpec::Core::Pending -end -class RSpec::Core::ExampleGroup::WrongScopeError < NoMethodError -end -class RSpec::Core::AnonymousExampleGroup < RSpec::Core::ExampleGroup - def self.metadata; end -end -class RSpec::Core::SharedExampleGroupInclusionStackFrame - def description; end - def formatted_inclusion_location; end - def inclusion_location; end - def initialize(shared_group_name, inclusion_location); end - def self.current_backtrace; end - def self.shared_example_group_inclusions; end - def self.with_frame(name, location); end - def shared_group_name; end -end -module RSpec::ExampleGroups - def self.assign_const(group); end - def self.base_name_for(group); end - def self.constant_scope_for(group); end - def self.disambiguate(name, const_scope); end - def self.remove_all_constants; end - extend RSpec::Support::RecursiveConstMethods -end -module RSpec::Support - def self.require_rspec_core(f); end -end -class RSpec::Core::Time - def self.now(in: nil); end -end -class Module - def context(*a, &b); end - def describe(*a, &b); end - def example_group(*a, &b); end - def fcontext(*a, &b); end - def fdescribe(*a, &b); end - def shared_context(name, *args, &block); end - def shared_examples(name, *args, &block); end - def shared_examples_for(name, *args, &block); end - def xcontext(*a, &b); end - def xdescribe(*a, &b); end -end -module RSpec::Core::SharedContext - def __shared_context_recordings; end - def after(*args, &block); end - def append_after(*args, &block); end - def append_before(*args, &block); end - def around(*args, &block); end - def before(*args, &block); end - def context(*args, &block); end - def describe(*args, &block); end - def hooks(*args, &block); end - def included(group); end - def let!(*args, &block); end - def let(*args, &block); end - def prepend_after(*args, &block); end - def prepend_before(*args, &block); end - def self.record(methods); end - def subject!(*args, &block); end - def subject(*args, &block); end -end -class RSpec::Core::SharedContext::Recording < Struct - def args; end - def args=(_); end - def block; end - def block=(_); end - def method_name; end - def method_name=(_); end - def playback_onto(group); end - def self.[](*arg0); end - def self.inspect; end - def self.keyword_init?; end - def self.members; end - def self.new(*arg0); end -end -class RSpec::Core::ExampleStatusPersister - def dump_statuses(unparsed_previous_runs); end - def initialize(examples, file_name); end - def persist; end - def self.load_from(file_name); end - def self.persist(examples, file_name); end - def statuses_from_this_run; end -end -class RSpec::Core::ExampleStatusMerger - def delete_previous_examples_that_no_longer_exist; end - def example_must_no_longer_exist?(ex_id); end - def hash_from(example_list); end - def initialize(this_run, from_previous_runs); end - def loaded_spec_files; end - def merge; end - def self.merge(this_run, from_previous_runs); end - def sort_value_from(example); end - def spec_file_from(ex_id); end -end -class RSpec::Core::ExampleStatusDumper - def column_widths; end - def dump; end - def formatted_header_rows; end - def formatted_row_from(row_values); end - def formatted_value_rows; end - def headers; end - def initialize(examples); end - def rows; end - def self.dump(examples); end -end -class RSpec::Core::ExampleStatusParser - def headers; end - def initialize(string); end - def parse; end - def parse_row(line); end - def self.parse(string); end - def split_line(line); end -end -class RSpec::Core::Profiler - def example_group_finished(notification); end - def example_group_started(notification); end - def example_groups; end - def example_started(notification); end - def initialize; end -end -class RSpec::Core::DidYouMean - def call; end - def formats(probables); end - def initialize(relative_file_name); end - def red_font(mytext); end - def relative_file_name; end - def top_and_tail(rspec_format); end -end -class RSpec::Core::Formatters::BaseFormatter - def close(_notification); end - def example_group; end - def example_group=(arg0); end - def example_group_started(notification); end - def initialize(output); end - def output; end - def output_supports_sync; end - def restore_sync_output; end - def start(notification); end - def start_sync_output; end -end -class RSpec::Core::Formatters::BaseTextFormatter < RSpec::Core::Formatters::BaseFormatter - def close(_notification); end - def dump_failures(notification); end - def dump_pending(notification); end - def dump_summary(summary); end - def message(notification); end - def seed(notification); end -end -class RSpec::Core::Formatters::DocumentationFormatter < RSpec::Core::Formatters::BaseTextFormatter - def current_indentation(offset = nil); end - def example_failed(failure); end - def example_group_finished(_notification); end - def example_group_started(notification); end - def example_passed(passed); end - def example_pending(pending); end - def example_started(_notification); end - def failure_output(example); end - def flush_messages; end - def initialize(output); end - def message(notification); end - def next_failure_index; end - def passed_output(example); end - def pending_output(example, message); end -end -class RSpec::Core::Formatters::HtmlPrinter - def flush; end - def indentation_style(number_of_parents); end - def initialize(output); end - def make_example_group_header_red(group_id); end - def make_example_group_header_yellow(group_id); end - def make_header_red; end - def make_header_yellow; end - def move_progress(percent_done); end - def print_example_failed(pending_fixed, description, run_time, failure_id, exception, extra_content); end - def print_example_group_end; end - def print_example_group_start(group_id, description, number_of_parents); end - def print_example_passed(description, run_time); end - def print_example_pending(description, pending_message); end - def print_html_start; end - def print_summary(duration, example_count, failure_count, pending_count); end - include ERB::Util -end -class RSpec::Core::Formatters::HtmlFormatter < RSpec::Core::Formatters::BaseFormatter - def dump_summary(summary); end - def example_failed(failure); end - def example_group_number; end - def example_group_started(notification); end - def example_number; end - def example_passed(passed); end - def example_pending(pending); end - def example_started(_notification); end - def extra_failure_content(failure); end - def initialize(output); end - def percent_done; end - def start(notification); end - def start_dump(_notification); end -end -class RSpec::Core::Formatters::FallbackMessageFormatter - def initialize(output); end - def message(notification); end - def output; end -end -class RSpec::Core::Formatters::ProgressFormatter < RSpec::Core::Formatters::BaseTextFormatter - def example_failed(_notification); end - def example_passed(_notification); end - def example_pending(_notification); end - def start_dump(_notification); end -end -class RSpec::Core::Formatters::ProfileFormatter - def bold(text); end - def dump_profile(profile); end - def dump_profile_slowest_example_groups(profile); end - def dump_profile_slowest_examples(profile); end - def format_caller(caller_info); end - def initialize(output); end - def output; end -end -class RSpec::Core::Formatters::JsonFormatter < RSpec::Core::Formatters::BaseFormatter - def close(_notification); end - def dump_profile(profile); end - def dump_profile_slowest_example_groups(profile); end - def dump_profile_slowest_examples(profile); end - def dump_summary(summary); end - def format_example(example); end - def initialize(output); end - def message(notification); end - def output_hash; end - def seed(notification); end - def stop(group_notification); end -end -module RSpec::Core::Bisect -end -class RSpec::Core::Bisect::ExampleSetDescriptor < Struct - def all_example_ids; end - def all_example_ids=(_); end - def failed_example_ids; end - def failed_example_ids=(_); end - def self.[](*arg0); end - def self.inspect; end - def self.keyword_init?; end - def self.members; end - def self.new(*arg0); end -end -class RSpec::Core::Bisect::BisectFailedError < StandardError - def self.for_failed_spec_run(spec_output); end -end -class RSpec::Core::Bisect::Notifier - def initialize(formatter); end - def publish(event, *args); end -end -class RSpec::Core::Bisect::Channel - def close; end - def initialize; end - def receive; end - def send(message); end -end -class RSpec::Core::Formatters::BaseBisectFormatter - def example_failed(notification); end - def example_finished(notification); end - def initialize(expected_failures); end - def self.inherited(formatter); end - def start_dump(_notification); end -end -class RSpec::Core::Formatters::BisectDRbFormatter < RSpec::Core::Formatters::BaseBisectFormatter - def initialize(_output); end - def notify_results(results); end -end -class RSpec::Core::Formatters::FailureListFormatter < RSpec::Core::Formatters::BaseFormatter - def dump_profile(_profile); end - def example_failed(failure); end - def message(_message); end -end -module RSpec::Core::MockingAdapters -end -module RSpec::Core::MockingAdapters::RSpec - def self.configuration; end - def self.framework_name; end - def setup_mocks_for_rspec; end - def teardown_mocks_for_rspec; end - def verify_mocks_for_rspec; end - include RSpec::Mocks::ExampleMethods - include RSpec::Mocks::ExampleMethods::ExpectHost -end diff --git a/sorbet/rbi/gems/rspec-core@3.13.0.rbi b/sorbet/rbi/gems/rspec-core@3.13.0.rbi index 69f9e69..4603f8a 100644 --- a/sorbet/rbi/gems/rspec-core@3.13.0.rbi +++ b/sorbet/rbi/gems/rspec-core@3.13.0.rbi @@ -6644,11 +6644,11 @@ module RSpec::Core::Hooks # invoked but before any `after` context hooks. # # @api public - # @note The `:example` and `:context` scopes are also available as - # `:each` and `:all`, respectively. Use whichever you prefer. # @note The `:suite` scope is only supported for hooks registered on # `RSpec.configuration` since they exist independently of any # example or example group. + # @note The `:example` and `:context` scopes are also available as + # `:each` and `:all`, respectively. Use whichever you prefer. # @overload after # @overload after # @overload after @@ -6873,6 +6873,7 @@ module RSpec::Core::Hooks # They are not a synonym for `before`/`after`. # # @api public + # @note `:example`/`:each` is the only supported scope. # @note the syntax of `around` is similar to that of `before` and `after` # but the semantics are quite different. `before` and `after` hooks are # run in the context of the examples with which they are associated, @@ -6880,7 +6881,6 @@ module RSpec::Core::Hooks # examples. Consequently, `around` hooks do not have direct access to # resources that are made available within the examples and their # associated `before` and `after` hooks. - # @note `:example`/`:each` is the only supported scope. # @overload around # @overload around # @overload around @@ -7106,11 +7106,11 @@ module RSpec::Core::Hooks # invoked but before any `after` context hooks. # # @api public - # @note The `:example` and `:context` scopes are also available as - # `:each` and `:all`, respectively. Use whichever you prefer. # @note The `:suite` scope is only supported for hooks registered on # `RSpec.configuration` since they exist independently of any # example or example group. + # @note The `:example` and `:context` scopes are also available as + # `:each` and `:all`, respectively. Use whichever you prefer. # @overload after # @overload after # @overload after diff --git a/sorbet/rbi/gems/rspec-expectations.rbi b/sorbet/rbi/gems/rspec-expectations.rbi deleted file mode 100644 index 48f6a4e..0000000 --- a/sorbet/rbi/gems/rspec-expectations.rbi +++ /dev/null @@ -1,1193 +0,0 @@ -# This file is autogenerated. Do not edit it by hand. Regenerate it with: -# srb rbi gems - -# typed: true -# -# If you would like to make changes to this file, great! Please create the gem's shim here: -# -# https://github.com/sorbet/sorbet-typed/new/master?filename=lib/rspec-expectations/all/rspec-expectations.rbi -# -# rspec-expectations-3.13.1 - -module RSpec -end -module RSpec::Matchers - def a_block_changing(*args, **, &block); end - def a_block_outputting(*args, **, &block); end - def a_block_raising(*args, **, &block); end - def a_block_throwing(*args, **, &block); end - def a_block_yielding_control(*args, **, &block); end - def a_block_yielding_successive_args(*args, **, &block); end - def a_block_yielding_with_args(*args, **, &block); end - def a_block_yielding_with_no_args(*args, **, &block); end - def a_collection_containing_exactly(*args, **, &block); end - def a_collection_ending_with(*args, **, &block); end - def a_collection_including(*args, **, &block); end - def a_collection_starting_with(*args, **, &block); end - def a_falsey_value(*args, **, &block); end - def a_falsy_value(*args, **, &block); end - def a_hash_including(*args, **, &block); end - def a_kind_of(*args, **, &block); end - def a_nil_value(*args, **, &block); end - def a_range_covering(*args, **, &block); end - def a_string_ending_with(*args, **, &block); end - def a_string_including(*args, **, &block); end - def a_string_matching(*args, **, &block); end - def a_string_starting_with(*args, **, &block); end - def a_truthy_value(*args, **, &block); end - def a_value(*args, **, &block); end - def a_value_between(*args, **, &block); end - def a_value_within(*args, **, &block); end - def aggregate_failures(label = nil, metadata = nil, &block); end - def all(expected); end - def an_array_matching(*args, **, &block); end - def an_instance_of(*args, **, &block); end - def an_object_eq_to(*args, **, &block); end - def an_object_eql_to(*args, **, &block); end - def an_object_equal_to(*args, **, &block); end - def an_object_existing(*args, **, &block); end - def an_object_having_attributes(*args, **, &block); end - def an_object_matching(*args, **, &block); end - def an_object_responding_to(*args, **, &block); end - def an_object_satisfying(*args, **, &block); end - def be(*args); end - def be_a(klass); end - def be_a_kind_of(expected); end - def be_an(klass); end - def be_an_instance_of(expected); end - def be_between(min, max); end - def be_falsey; end - def be_falsy(*args, **, &block); end - def be_instance_of(expected); end - def be_kind_of(expected); end - def be_nil; end - def be_truthy; end - def be_within(delta); end - def change(receiver = nil, message = nil, &block); end - def changing(*args, **, &block); end - def contain_exactly(*items); end - def containing_exactly(*args, **, &block); end - def cover(*values); end - def covering(*args, **, &block); end - def end_with(*expected); end - def ending_with(*args, **, &block); end - def eq(expected); end - def eq_to(*args, **, &block); end - def eql(expected); end - def eql_to(*args, **, &block); end - def equal(expected); end - def equal_to(*args, **, &block); end - def exist(*args); end - def existing(*args, **, &block); end - def expect(value = nil, &block); end - def have_attributes(expected); end - def having_attributes(*args, **, &block); end - def include(*expected); end - def including(*args, **, &block); end - def match(expected); end - def match_array(items); end - def match_regex(*args, **, &block); end - def matching(*args, **, &block); end - def method_missing(method, *args, **, &block); end - def output(expected = nil); end - def raise_error(error = nil, message = nil, &block); end - def raise_exception(error = nil, message = nil, &block); end - def raising(*args, **, &block); end - def respond_to(*names); end - def respond_to_missing?(method, *); end - def responding_to(*args, **, &block); end - def satisfy(description = nil, &block); end - def satisfying(*args, **, &block); end - def self.alias_matcher(*args, &block); end - def self.clear_generated_description; end - def self.configuration; end - def self.generated_description; end - def self.is_a_describable_matcher?(obj); end - def self.is_a_matcher?(obj); end - def self.last_description; end - def self.last_expectation_handler; end - def self.last_expectation_handler=(arg0); end - def self.last_matcher; end - def self.last_matcher=(arg0); end - def start_with(*expected); end - def starting_with(*args, **, &block); end - def throw_symbol(expected_symbol = nil, expected_arg = nil); end - def throwing(*args, **, &block); end - def within(*args, **, &block); end - def yield_control; end - def yield_successive_args(*args); end - def yield_with_args(*args); end - def yield_with_no_args; end - def yielding_control(*args, **, &block); end - def yielding_successive_args(*args, **, &block); end - def yielding_with_args(*args, **, &block); end - def yielding_with_no_args(*args, **, &block); end - extend RSpec::Matchers::DSL -end -module RSpec::Matchers::EnglishPhrasing - def self.list(obj); end - def self.split_words(sym); end -end -module RSpec::Matchers::Composable - def &(matcher); end - def ===(value); end - def and(matcher); end - def description_of(object); end - def or(matcher); end - def self.should_enumerate?(item); end - def self.surface_descriptions_in(item); end - def self.unreadable_io?(object); end - def should_enumerate?(item); end - def surface_descriptions_in(item); end - def unreadable_io?(object); end - def values_match?(expected, actual); end - def with_matchers_cloned(object); end - def |(matcher); end -end -class RSpec::Matchers::Composable::DescribableItem < Struct - def inspect; end - def item; end - def item=(_); end - def pretty_print(pp); end - def self.[](*arg0); end - def self.inspect; end - def self.keyword_init?; end - def self.members; end - def self.new(*arg0); end -end -module RSpec::Matchers::BuiltIn -end -class RSpec::Matchers::BuiltIn::BaseMatcher - def actual; end - def actual_formatted; end - def assert_ivars(*expected_ivars); end - def description; end - def diffable?; end - def expected; end - def expected_formatted; end - def expects_call_stack_jump?; end - def initialize(expected = nil); end - def match_unless_raises(*exceptions); end - def matcher_name; end - def matcher_name=(arg0); end - def matches?(actual); end - def present_ivars; end - def rescued_exception; end - def self.matcher_name; end - def self.underscore(camel_cased_word); end - def supports_block_expectations?; end - def supports_value_expectations?; end - include RSpec::Matchers::BuiltIn::BaseMatcher::DefaultFailureMessages - include RSpec::Matchers::BuiltIn::BaseMatcher::HashFormatting - include RSpec::Matchers::BuiltIn::BaseMatcher::StringEncodingFormatting - include RSpec::Matchers::Composable -end -module RSpec::Matchers::BuiltIn::BaseMatcher::HashFormatting - def improve_hash_formatting(inspect_string); end - def self.improve_hash_formatting(inspect_string); end -end -module RSpec::Matchers::BuiltIn::BaseMatcher::StringEncodingFormatting - def format_encoding(value); end - def self.format_encoding(value); end - def self.string_encoding_differs?; end - def string_encoding_differs?; end -end -module RSpec::Matchers::BuiltIn::BaseMatcher::DefaultFailureMessages - def failure_message; end - def failure_message_when_negated; end - def self.has_default_failure_messages?(matcher); end -end -module RSpec::Matchers::DSL - def alias_matcher(new_name, old_name, options = nil, &description_override); end - def define(name, &declarations); end - def define_negated_matcher(negated_name, base_name, &description_override); end - def matcher(name, &declarations); end - def warn_about_block_args(name, declarations); end -end -module RSpec::Matchers::DSL::Macros - def assign_attributes(attr_names); end - def chain(method_name, *attr_names, &definition); end - def define_user_override(method_name, user_def, &our_def); end - def description(&definition); end - def diffable; end - def failure_message(&definition); end - def failure_message_when_negated(&definition); end - def match(options = nil, &match_block); end - def match_unless_raises(expected_exception = nil, &match_block); end - def match_when_negated(options = nil, &match_block); end - def supports_block_expectations; end -end -module RSpec::Matchers::DSL::Macros::Deprecated - def failure_message_for_should(&definition); end - def failure_message_for_should_not(&definition); end - def match_for_should(&definition); end - def match_for_should_not(&definition); end -end -module RSpec::Matchers::DSL::DefaultImplementations - def chained_method_clause_sentences; end - def description; end - def diffable?; end - def expects_call_stack_jump?; end - def supports_block_expectations?; end - def supports_value_expectations?; end - include RSpec::Matchers::BuiltIn::BaseMatcher::DefaultFailureMessages -end -class RSpec::Matchers::DSL::Matcher - def actual; end - def actual_arg_for(block); end - def block_arg; end - def expected; end - def expected_as_array; end - def initialize(name, declarations, matcher_execution_context, *expected, &block_arg); end - def inspect; end - def method_missing(method, *args, **, &block); end - def name; end - def rescued_exception; end - def respond_to_missing?(method, include_private = nil); end - extend RSpec::Matchers::DSL::Macros - extend RSpec::Matchers::DSL::Macros::Deprecated - include RSpec::Matchers - include RSpec::Matchers::Composable - include RSpec::Matchers::DSL::DefaultImplementations -end -class RSpec::Matchers::BaseDelegator -end -class RSpec::Matchers::MatcherDelegator < RSpec::Matchers::BaseDelegator - def base_matcher; end - def initialize(base_matcher); end - def initialize_copy(other); end - def method_missing(*args, &block); end - def respond_to_missing?(name, include_all = nil); end - include RSpec::Matchers::Composable -end -class RSpec::Matchers::AliasedMatcher < RSpec::Matchers::MatcherDelegator - def description; end - def failure_message; end - def failure_message_when_negated; end - def initialize(base_matcher, description_block); end - def method_missing(*); end -end -class RSpec::Matchers::AliasedMatcherWithOperatorSupport < RSpec::Matchers::AliasedMatcher -end -class RSpec::Matchers::AliasedNegatedMatcher < RSpec::Matchers::AliasedMatcher - def does_not_match?(*args, &block); end - def failure_message; end - def failure_message_when_negated; end - def matches?(*args, &block); end - def optimal_failure_message(same, inverted); end -end -class RSpec::Matchers::MultiMatcherDiff - def diffs(differ); end - def initialize(expected_list); end - def message_with_diff(message, differ); end - def self.diff_label_for(matcher); end - def self.for_many_matchers(matchers); end - def self.from(expected, actual); end - def self.truncated(description); end -end -module RSpec::Support - def self.require_rspec_expectations(f); end - def self.require_rspec_matchers(f); end -end -module RSpec::Expectations - def self.configuration; end - def self.differ; end - def self.fail_with(message, expected = nil, actual = nil); end -end -class RSpec::Expectations::ExpectationTarget - def initialize(value); end - def self.for(value, block); end - def target; end - include RSpec::Expectations::ExpectationTarget::InstanceMethods -end -module RSpec::Expectations::ExpectationTarget::UndefinedValue -end -module RSpec::Expectations::ExpectationTarget::InstanceMethods - def not_to(matcher = nil, message = nil, &block); end - def prevent_operator_matchers(verb); end - def to(matcher = nil, message = nil, &block); end - def to_not(matcher = nil, message = nil, &block); end -end -class RSpec::Expectations::ValueExpectationTarget < RSpec::Expectations::ExpectationTarget - def enforce_value_expectation(matcher); end - def not_to(matcher = nil, message = nil, &block); end - def supports_value_expectations?(matcher); end - def to(matcher = nil, message = nil, &block); end -end -class RSpec::Expectations::BlockExpectationTarget < RSpec::Expectations::ExpectationTarget - def enforce_block_expectation(matcher); end - def not_to(matcher, message = nil, &block); end - def supports_block_expectations?(matcher); end - def to(matcher, message = nil, &block); end - def to_not(matcher, message = nil, &block); end -end -module RSpec::Expectations::Syntax - def default_should_host; end - def disable_expect(syntax_host = nil); end - def disable_should(syntax_host = nil); end - def enable_expect(syntax_host = nil); end - def enable_should(syntax_host = nil); end - def expect_enabled?(syntax_host = nil); end - def self.default_should_host; end - def self.disable_expect(syntax_host = nil); end - def self.disable_should(syntax_host = nil); end - def self.enable_expect(syntax_host = nil); end - def self.enable_should(syntax_host = nil); end - def self.expect_enabled?(syntax_host = nil); end - def self.should_enabled?(syntax_host = nil); end - def self.warn_about_should!; end - def self.warn_about_should_unless_configured(method_name); end - def should_enabled?(syntax_host = nil); end - def warn_about_should!; end - def warn_about_should_unless_configured(method_name); end -end -class BasicObject - def should(matcher = nil, message = nil, &block); end - def should_not(matcher = nil, message = nil, &block); end -end -class RSpec::Expectations::Configuration - def add_should_and_should_not_to(*modules); end - def backtrace_formatter; end - def backtrace_formatter=(arg0); end - def color?; end - def false_positives_handler; end - def include_chain_clauses_in_custom_matcher_descriptions=(arg0); end - def include_chain_clauses_in_custom_matcher_descriptions?; end - def initialize; end - def max_formatted_output_length=(length); end - def on_potential_false_positives; end - def on_potential_false_positives=(behavior); end - def reset_syntaxes_to_default; end - def strict_predicate_matchers; end - def strict_predicate_matchers=(flag); end - def strict_predicate_matchers?; end - def syntax; end - def syntax=(values); end - def warn_about_potential_false_positives=(boolean); end - def warn_about_potential_false_positives?; end -end -module RSpec::Expectations::Configuration::NullBacktraceFormatter - def self.format_backtrace(backtrace); end -end -class InvalidName___Class_0x00___Differ_1 -end -module RSpec::Expectations::ExpectationHelper - def self.check_message(msg); end - def self.handle_failure(matcher, message, failure_message_method); end - def self.modern_matcher_from(matcher); end - def self.with_matcher(handler, matcher, message); end -end -class RSpec::Expectations::PositiveExpectationHandler - def self.handle_matcher(actual, initial_matcher, custom_message = nil, &block); end - def self.opposite_should_method; end - def self.should_method; end - def self.verb; end -end -class RSpec::Expectations::NegativeExpectationHandler - def self.does_not_match?(matcher, actual, &block); end - def self.handle_matcher(actual, initial_matcher, custom_message = nil, &block); end - def self.opposite_should_method; end - def self.should_method; end - def self.verb; end -end -class RSpec::Expectations::LegacyMatcherAdapter < RSpec::Matchers::MatcherDelegator - def initialize(matcher); end - def self.wrap(matcher); end -end -class RSpec::Expectations::LegacyMatcherAdapter::RSpec2 < RSpec::Expectations::LegacyMatcherAdapter - def failure_message; end - def failure_message_when_negated; end - def self.interface_matches?(matcher); end -end -class RSpec::Expectations::LegacyMatcherAdapter::RSpec1 < RSpec::Expectations::LegacyMatcherAdapter - def failure_message; end - def failure_message_when_negated; end - def self.interface_matches?(matcher); end -end -module RSpec::Expectations::Version -end -class RSpec::Expectations::ExpectationNotMetError < Exception -end -class RSpec::Expectations::MultipleExpectationsNotMetError < RSpec::Expectations::ExpectationNotMetError - def aggregation_block_label; end - def aggregation_metadata; end - def all_exceptions; end - def backtrace_line(line); end - def block_description; end - def enumerated(exceptions, index_offset); end - def enumerated_errors; end - def enumerated_failures; end - def exception_count_description; end - def exclusion_patterns; end - def failures; end - def format_backtrace(backtrace); end - def indentation; end - def indented(failure_message, index); end - def index_label(index); end - def initialize(failure_aggregator); end - def longest_index_label_width; end - def message; end - def other_errors; end - def pluralize(noun, count); end - def summary; end - def width_of_label(index); end -end -class RSpec::Expectations::BlockSnippetExtractor - def beginning_line_number; end - def block_token_extractor; end - def body_content_lines; end - def file_path; end - def initialize(proc, method_name); end - def method_name; end - def proc; end - def raw_body_lines; end - def raw_body_snippet; end - def self.try_extracting_single_line_body_of(proc, method_name); end - def source; end - def source_location; end -end -class RSpec::Expectations::BlockSnippetExtractor::Error < StandardError -end -class RSpec::Expectations::BlockSnippetExtractor::TargetNotFoundError < RSpec::Expectations::BlockSnippetExtractor::Error -end -class RSpec::Expectations::BlockSnippetExtractor::AmbiguousTargetError < RSpec::Expectations::BlockSnippetExtractor::Error -end -class RSpec::Expectations::BlockSnippetExtractor::BlockTokenExtractor < Struct - def after_beginning_of_args_state(token); end - def after_beginning_of_body_state(token); end - def after_method_call_state(token); end - def after_opener_state(token); end - def beginning_line_number; end - def beginning_line_number=(_); end - def block_locator; end - def body_tokens; end - def correct_block?(body_tokens); end - def finalize_pending_tokens!; end - def finish!; end - def finish_or_find_next_block_if_incorrect!; end - def handle_closer_token(token); end - def handle_opener_token(token); end - def initial_state(token); end - def initialize(*); end - def invoke_state_handler(token); end - def method_name; end - def method_name=(_); end - def opener_token?(token); end - def opener_token_stack; end - def parse!; end - def pending_tokens; end - def pipe_token?(token); end - def self.[](*arg0); end - def self.inspect; end - def self.keyword_init?; end - def self.members; end - def self.new(*arg0); end - def source; end - def source=(_); end - def state; end -end -class RSpec::Expectations::BlockSnippetExtractor::BlockLocator < Struct - def beginning_line_number; end - def beginning_line_number=(_); end - def block_body_node; end - def block_wrapper_node; end - def body_content_locations; end - def candidate_block_wrapper_nodes; end - def candidate_method_ident_nodes; end - def method_call_location; end - def method_ident_node; end - def method_ident_node?(node); end - def method_name; end - def method_name=(_); end - def self.[](*arg0); end - def self.inspect; end - def self.keyword_init?; end - def self.members; end - def self.new(*arg0); end - def source; end - def source=(_); end -end -class RSpec::Expectations::FailureAggregator - def aggregate; end - def assign_backtrace(failure); end - def block_label; end - def call(failure, options); end - def failures; end - def initialize(block_label, metadata); end - def metadata; end - def notify_aggregated_failures; end - def other_errors; end -end -class RSpec::Expectations::FailureAggregator::AggregatedFailure - def inspect; end -end -class RSpec::Matchers::BuiltIn::BeAKindOf < RSpec::Matchers::BuiltIn::BaseMatcher - def match(expected, actual); end -end -class RSpec::Matchers::BuiltIn::BeAnInstanceOf < RSpec::Matchers::BuiltIn::BaseMatcher - def description; end - def match(expected, actual); end -end -class RSpec::Matchers::BuiltIn::BeBetween < RSpec::Matchers::BuiltIn::BaseMatcher - def comparable?; end - def compare; end - def description; end - def exclusive; end - def failure_message; end - def inclusive; end - def initialize(min, max); end - def matches?(actual); end - def not_comparable_clause; end -end -class RSpec::Matchers::BuiltIn::BeTruthy < RSpec::Matchers::BuiltIn::BaseMatcher - def failure_message; end - def failure_message_when_negated; end - def match(_, actual); end -end -class RSpec::Matchers::BuiltIn::BeFalsey < RSpec::Matchers::BuiltIn::BaseMatcher - def failure_message; end - def failure_message_when_negated; end - def match(_, actual); end -end -class RSpec::Matchers::BuiltIn::BeNil < RSpec::Matchers::BuiltIn::BaseMatcher - def failure_message; end - def failure_message_when_negated; end - def match(_, actual); end -end -module RSpec::Matchers::BuiltIn::BeHelpers - def args_to_s; end - def args_to_sentence; end - def expected_to_sentence; end - def inspected_args; end - def parenthesize(string); end -end -class RSpec::Matchers::BuiltIn::Be < RSpec::Matchers::BuiltIn::BaseMatcher - def <(operand); end - def <=(operand); end - def ==(operand); end - def ===(operand); end - def =~(operand); end - def >(operand); end - def >=(operand); end - def failure_message; end - def failure_message_when_negated; end - def initialize(*args); end - def match(_, actual); end - include RSpec::Matchers::BuiltIn::BeHelpers -end -class RSpec::Matchers::BuiltIn::BeComparedTo < RSpec::Matchers::BuiltIn::BaseMatcher - def description; end - def does_not_match?(actual); end - def failure_message; end - def failure_message_when_negated; end - def initialize(operand, operator); end - def matches?(actual); end - def perform_match(actual); end - include RSpec::Matchers::BuiltIn::BeHelpers -end -class RSpec::Matchers::BuiltIn::DynamicPredicate < RSpec::Matchers::BuiltIn::BaseMatcher - def description; end - def does_not_match?(actual, &block); end - def expectation_of(value); end - def failure_message; end - def failure_message_expecting(value); end - def failure_message_when_negated; end - def failure_to_respond_explanation; end - def initialize(method_name, *args, **, &block); end - def matches?(actual, &block); end - def method_description; end - def predicate_accessible?; end - def predicate_matches?(value = nil); end - def predicate_method_name; end - def predicate_result; end - def private_predicate?; end - def root; end - def validity_message; end - include RSpec::Matchers::BuiltIn::BeHelpers -end -class RSpec::Matchers::BuiltIn::Has < RSpec::Matchers::BuiltIn::DynamicPredicate - def predicate; end -end -class RSpec::Matchers::BuiltIn::BePredicate < RSpec::Matchers::BuiltIn::DynamicPredicate - def failure_to_respond_explanation; end - def predicate; end - def predicate_accessible?; end - def predicate_method_name; end - def present_tense_predicate; end -end -class RSpec::Matchers::BuiltIn::BeWithin < RSpec::Matchers::BuiltIn::BaseMatcher - def description; end - def failure_message; end - def failure_message_when_negated; end - def initialize(delta); end - def matches?(actual); end - def needs_expected; end - def not_numeric_clause; end - def numeric?; end - def of(expected); end - def percent_of(expected); end -end -class RSpec::Matchers::BuiltIn::Change < RSpec::Matchers::BuiltIn::BaseMatcher - def by(expected_delta); end - def by_at_least(minimum); end - def by_at_most(maximum); end - def change_details; end - def description; end - def does_not_match?(event_proc); end - def failure_message; end - def failure_message_when_negated; end - def from(value); end - def initialize(receiver = nil, message = nil, &block); end - def matches?(event_proc); end - def negative_failure_reason; end - def perform_change(event_proc); end - def positive_failure_reason; end - def raise_block_syntax_error; end - def supports_block_expectations?; end - def supports_value_expectations?; end - def to(value); end -end -class RSpec::Matchers::BuiltIn::ChangeRelatively < RSpec::Matchers::BuiltIn::BaseMatcher - def description; end - def does_not_match?(_event_proc); end - def failure_message; end - def failure_reason; end - def initialize(change_details, expected_delta, relativity, &comparer); end - def matches?(event_proc); end - def supports_block_expectations?; end - def supports_value_expectations?; end -end -class RSpec::Matchers::BuiltIn::SpecificValuesChange < RSpec::Matchers::BuiltIn::BaseMatcher - def after_value_failure; end - def before_value_failure; end - def description; end - def did_change_failure; end - def did_not_change_failure; end - def failure_message; end - def initialize(change_details, from, to); end - def matches?(event_proc); end - def matches_after?; end - def not_given_a_block_failure; end - def perform_change(event_proc); end - def supports_block_expectations?; end - def supports_value_expectations?; end -end -class RSpec::Matchers::BuiltIn::ChangeFromValue < RSpec::Matchers::BuiltIn::SpecificValuesChange - def change_description; end - def does_not_match?(event_proc); end - def failure_message_when_negated; end - def initialize(change_details, expected_before); end - def to(value); end -end -class RSpec::Matchers::BuiltIn::ChangeToValue < RSpec::Matchers::BuiltIn::SpecificValuesChange - def change_description; end - def does_not_match?(_event_proc); end - def from(value); end - def initialize(change_details, expected_after); end -end -class RSpec::Matchers::BuiltIn::ChangeDetails - def actual_after; end - def actual_delta; end - def changed?; end - def evaluate_value_proc; end - def extract_value_block_snippet; end - def initialize(matcher_name, receiver = nil, message = nil, &block); end - def message_notation(receiver, message); end - def perform_change(event_proc); end - def value_representation; end -end -module RSpec::Matchers::BuiltIn::ChangeDetails::UNDEFINED -end -class RSpec::Matchers::BuiltIn::Compound < RSpec::Matchers::BuiltIn::BaseMatcher - def compound_failure_message; end - def description; end - def diffable?; end - def diffable_matcher_list; end - def diffable_matcher_list_for(matcher); end - def does_not_match?(_actual); end - def evaluator; end - def expected; end - def expects_call_stack_jump?; end - def indent_multiline_message(message); end - def initialize(matcher_1, matcher_2); end - def initialize_copy(other); end - def match(_expected, actual); end - def matcher_1; end - def matcher_1_matches?; end - def matcher_2; end - def matcher_2_matches?; end - def matcher_is_diffable?(matcher); end - def matcher_supports_block_expectations?(matcher); end - def matcher_supports_value_expectations?(matcher); end - def supports_block_expectations?; end - def supports_value_expectations?; end -end -class RSpec::Matchers::BuiltIn::Compound::SequentialEvaluator - def initialize(actual, *); end - def matcher_matches?(matcher); end -end -class RSpec::Matchers::BuiltIn::Compound::NestedEvaluator - def initialize(actual, matcher_1, matcher_2); end - def inner_matcher_block(outer_args); end - def matcher_matches?(matcher); end - def order_block_matchers; end - def self.matcher_expects_call_stack_jump?(matcher); end -end -class RSpec::Matchers::BuiltIn::Compound::And < RSpec::Matchers::BuiltIn::Compound - def conjunction; end - def failure_message; end - def match(*); end -end -class RSpec::Matchers::BuiltIn::Compound::Or < RSpec::Matchers::BuiltIn::Compound - def conjunction; end - def failure_message; end - def match(*); end -end -class RSpec::Matchers::BuiltIn::ContainExactly < RSpec::Matchers::BuiltIn::BaseMatcher - def actual_collection_line; end - def best_solution; end - def convert_actual_to_an_array; end - def describe_collection(collection, surface_descriptions = nil); end - def description; end - def expected_collection_line; end - def extra_elements_line; end - def extra_items; end - def failure_message; end - def failure_message_when_negated; end - def generate_failure_message; end - def match(_expected, _actual); end - def match_when_sorted?; end - def matches?(actual); end - def message_line(prefix, collection, surface_descriptions = nil); end - def missing_elements_line; end - def missing_items; end - def pairings_maximizer; end - def safe_sort(array); end - def to_a_disallowed?(object); end -end -class RSpec::Matchers::BuiltIn::ContainExactly::PairingsMaximizer - def actual_to_expected_matched_indexes; end - def apply_pairing_to(indeterminates, original_matches, other_list_index); end - def best_solution_for_pairing(expected_index, actual_index); end - def categorize_indexes(indexes_to_categorize, other_indexes); end - def expected_to_actual_matched_indexes; end - def find_best_solution; end - def initialize(expected_to_actual_matched_indexes, actual_to_expected_matched_indexes); end - def reciprocal_single_match?(matches, index, other_list); end - def solution; end -end -class RSpec::Matchers::BuiltIn::ContainExactly::PairingsMaximizer::Solution < Struct - def +(derived_candidate_solution); end - def candidate?; end - def ideal?; end - def indeterminate_actual_indexes; end - def indeterminate_actual_indexes=(_); end - def indeterminate_expected_indexes; end - def indeterminate_expected_indexes=(_); end - def self.[](*arg0); end - def self.inspect; end - def self.keyword_init?; end - def self.members; end - def self.new(*arg0); end - def unmatched_actual_indexes; end - def unmatched_actual_indexes=(_); end - def unmatched_expected_indexes; end - def unmatched_expected_indexes=(_); end - def unmatched_item_count; end - def worse_than?(other); end -end -class RSpec::Matchers::BuiltIn::ContainExactly::PairingsMaximizer::NullSolution - def self.worse_than?(_other); end -end -class RSpec::Matchers::BuiltIn::Cover < RSpec::Matchers::BuiltIn::BaseMatcher - def does_not_match?(range); end - def initialize(*expected); end - def matches?(range); end -end -class RSpec::Matchers::BuiltIn::StartOrEndWith < RSpec::Matchers::BuiltIn::BaseMatcher - def description; end - def failure_message; end - def initialize(*expected); end - def match(_expected, actual); end - def subsets_comparable?; end -end -class RSpec::Matchers::BuiltIn::StartWith < RSpec::Matchers::BuiltIn::StartOrEndWith - def element_matches?; end - def subset_matches?; end -end -class RSpec::Matchers::BuiltIn::EndWith < RSpec::Matchers::BuiltIn::StartOrEndWith - def element_matches?; end - def subset_matches?; end -end -class RSpec::Matchers::BuiltIn::Eq < RSpec::Matchers::BuiltIn::BaseMatcher - def description; end - def diffable?; end - def failure_message; end - def failure_message_when_negated; end - def match(expected, actual); end -end -class RSpec::Matchers::BuiltIn::Eql < RSpec::Matchers::BuiltIn::BaseMatcher - def diffable?; end - def failure_message; end - def failure_message_when_negated; end - def match(expected, actual); end -end -class RSpec::Matchers::BuiltIn::Equal < RSpec::Matchers::BuiltIn::BaseMatcher - def actual_inspected; end - def detailed_failure_message; end - def diffable?; end - def expected_is_a_literal_singleton?; end - def failure_message; end - def failure_message_when_negated; end - def inspect_object(o); end - def match(expected, actual); end - def simple_failure_message; end -end -class RSpec::Matchers::BuiltIn::Exist < RSpec::Matchers::BuiltIn::BaseMatcher - def does_not_match?(actual); end - def failure_message; end - def failure_message_when_negated; end - def initialize(*expected); end - def matches?(actual); end -end -class Anonymous_Struct_2 < Struct - def actual; end - def actual=(_); end - def expected; end - def expected=(_); end - def self.[](*arg0); end - def self.inspect; end - def self.keyword_init?; end - def self.members; end - def self.new(*arg0); end -end -class RSpec::Matchers::BuiltIn::Exist::ExistenceTest < Anonymous_Struct_2 - def actual_exists?; end - def deprecated(predicate, actual); end - def existence_values; end - def predicates; end - def uniq_truthy_values; end - def valid_test?; end - def validity_message; end -end -class RSpec::Matchers::BuiltIn::HaveAttributes < RSpec::Matchers::BuiltIn::BaseMatcher - def actual; end - def actual_has_attribute?(attribute_key, attribute_value); end - def cache_all_values; end - def description; end - def diffable?; end - def does_not_match?(actual); end - def failure_message; end - def failure_message_when_negated; end - def formatted_values; end - def initialize(expected); end - def matches?(actual); end - def perform_match(predicate); end - def respond_to_attributes?; end - def respond_to_failed; end - def respond_to_failure_message_or; end - def respond_to_matcher; end -end -module RSpec::Matchers::BuiltIn::CountExpectation - def at_least(number); end - def at_most(number); end - def count_constraint_to_number(n); end - def count_expectation_description; end - def count_expectation_type; end - def count_failure_reason(action); end - def cover?(count, number); end - def exactly(number); end - def expected_count; end - def expected_count_matches?(actual_count); end - def has_expected_count?; end - def human_readable_count(count); end - def human_readable_expectation_type; end - def once; end - def raise_impossible_count_expectation(count); end - def raise_unsupported_count_expectation; end - def set_expected_count(relativity, n); end - def thrice; end - def times; end - def twice; end - def unsupported_count_expectation?(relativity); end -end -class RSpec::Matchers::BuiltIn::Include < RSpec::Matchers::BuiltIn::BaseMatcher - def actual_collection_includes?(expected_item); end - def actual_hash_has_key?(expected_key); end - def actual_hash_includes?(expected_key, expected_value); end - def check_actual?(actual); end - def check_expected_count?; end - def comparing_hash_keys?(expected_item); end - def comparing_hash_to_a_subset?(expected_item); end - def convert_to_hash?(obj); end - def count_enumerable(expected_item); end - def count_inclusions; end - def description; end - def diff_would_wrongly_highlight_matched_item?; end - def diffable?; end - def does_not_match?(actual); end - def excluded_from_actual; end - def expected; end - def expecteds; end - def failure_message; end - def failure_message_when_negated; end - def format_failure_message(preposition); end - def initialize(*expecteds); end - def matches?(actual); end - def perform_match(&block); end - def readable_list_of(items); end - include RSpec::Matchers::BuiltIn::CountExpectation -end -class RSpec::Matchers::BuiltIn::All < RSpec::Matchers::BuiltIn::BaseMatcher - def add_new_line_if_needed(message); end - def description; end - def does_not_match?(_actual); end - def failed_objects; end - def failure_message; end - def failure_message_for_item(index, failure_message); end - def indent_multiline_message(message); end - def index_failed_objects; end - def initialize(matcher); end - def initialize_copy(other); end - def iterable?; end - def match(_expected, _actual); end - def matcher; end -end -class RSpec::Matchers::BuiltIn::Match < RSpec::Matchers::BuiltIn::BaseMatcher - def can_safely_call_match?(expected, actual); end - def description; end - def diffable?; end - def initialize(expected); end - def match(expected, actual); end - def match_captures(expected, actual); end - def with_captures(*captures); end -end -class RSpec::Matchers::BuiltIn::ReliableMatchData - def captures; end - def initialize(match_data); end - def match_data; end - def names; end -end -class RSpec::Matchers::BuiltIn::OperatorMatcher - def !=(_expected); end - def !~(_expected); end - def <(expected); end - def <=(expected); end - def ==(expected); end - def ===(expected); end - def =~(expected); end - def >(expected); end - def >=(expected); end - def description; end - def eval_match(actual, operator, expected); end - def fail_with_message(message); end - def has_non_generic_implementation_of?(op); end - def initialize(actual); end - def self.get(klass, operator); end - def self.register(klass, operator, matcher); end - def self.registry; end - def self.unregister(klass, operator); end - def self.use_custom_matcher_or_delegate(operator); end -end -class RSpec::Matchers::BuiltIn::PositiveOperatorMatcher < RSpec::Matchers::BuiltIn::OperatorMatcher - def __delegate_operator(actual, operator, expected); end -end -class RSpec::Matchers::BuiltIn::NegativeOperatorMatcher < RSpec::Matchers::BuiltIn::OperatorMatcher - def __delegate_operator(actual, operator, expected); end -end -class RSpec::Matchers::BuiltIn::Output < RSpec::Matchers::BuiltIn::BaseMatcher - def actual_output_description; end - def captured?; end - def description; end - def diffable?; end - def does_not_match?(block); end - def failure_message; end - def failure_message_when_negated; end - def initialize(expected); end - def matches?(block); end - def negative_failure_reason; end - def positive_failure_reason; end - def supports_block_expectations?; end - def supports_value_expectations?; end - def to_stderr; end - def to_stderr_from_any_process; end - def to_stdout; end - def to_stdout_from_any_process; end -end -module RSpec::Matchers::BuiltIn::NullCapture - def self.capture(_block); end - def self.name; end -end -module RSpec::Matchers::BuiltIn::CaptureStdout - def self.capture(block); end - def self.name; end -end -module RSpec::Matchers::BuiltIn::CaptureStderr - def self.capture(block); end - def self.name; end -end -class Anonymous_Struct_3 < Struct - def name; end - def name=(_); end - def self.[](*arg0); end - def self.inspect; end - def self.keyword_init?; end - def self.members; end - def self.new(*arg0); end - def stream; end - def stream=(_); end -end -class RSpec::Matchers::BuiltIn::CaptureStreamToTempfile < Anonymous_Struct_3 - def capture(block); end -end -class RSpec::Matchers::BuiltIn::RaiseError - def actual_error_message; end - def block_matches?; end - def description; end - def does_not_match?(given_proc); end - def error_and_message_match?; end - def eval_block; end - def expectation_matched?; end - def expected_error; end - def expecting_specific_exception?; end - def expects_call_stack_jump?; end - def failure_message; end - def failure_message_when_negated; end - def format_backtrace(backtrace); end - def given_error; end - def handle_warning(message); end - def initialize(expected_error_or_message, expected_message, &block); end - def matches?(given_proc, negative_expectation = nil, &block); end - def raise_message_already_set; end - def ready_to_eval_block?; end - def supports_block_expectations?; end - def supports_value_expectations?; end - def verify_message; end - def warn_about_bare_error!; end - def warn_about_bare_error?; end - def warn_about_negative_false_positive!(expression); end - def warn_about_nil_error!; end - def warn_about_nil_error?; end - def warn_for_negative_false_positives!; end - def warning; end - def with_message(expected_message); end - include RSpec::Matchers::Composable -end -class RSpec::Matchers::BuiltIn::RespondTo < RSpec::Matchers::BuiltIn::BaseMatcher - def and_any_keywords; end - def and_keywords(*keywords); end - def and_unlimited_arguments; end - def argument; end - def arguments; end - def description; end - def does_not_match?(actual); end - def failure_message; end - def failure_message_when_negated; end - def find_failing_method_names(actual, filter_method); end - def ignoring_method_signature_failure!; end - def initialize(*names); end - def matches?(actual); end - def matches_arity?(actual, name); end - def pp_names; end - def with(n); end - def with_any_keywords; end - def with_arity; end - def with_arity_string; end - def with_keywords(*keywords); end - def with_keywords_string; end - def with_unlimited_arguments; end -end -class RSpec::Matchers::BuiltIn::RespondTo::ArityCheck - def initialize(expected_arity, expected_keywords, arbitrary_keywords, unlimited_arguments); end - def matches?(actual, name); end - def method_signature_for(actual, name); end - def verifier_for(actual, name); end -end -class RSpec::Matchers::BuiltIn::Satisfy < RSpec::Matchers::BuiltIn::BaseMatcher - def block_representation; end - def description; end - def extract_block_snippet; end - def failure_message; end - def failure_message_when_negated; end - def initialize(description = nil, &block); end - def matches?(actual, &block); end -end -class RSpec::Matchers::BuiltIn::ThrowSymbol - def actual_result; end - def caught; end - def description; end - def does_not_match?(given_proc); end - def expected(symbol_desc = nil); end - def expects_call_stack_jump?; end - def failure_message; end - def failure_message_when_negated; end - def initialize(expected_symbol = nil, expected_arg = nil); end - def matches?(given_proc); end - def supports_block_expectations?; end - def supports_value_expectations?; end - def throw_description(symbol, arg); end - include RSpec::Matchers::Composable -end -class RSpec::Matchers::BuiltIn::YieldProbe - def assert_used!; end - def assert_valid_expect_block!; end - def has_block?; end - def initialize(block, &callback); end - def num_yields; end - def num_yields=(arg0); end - def probe; end - def self.probe(block, &callback); end - def single_yield_args; end - def to_proc; end - def yielded_args; end - def yielded_args=(arg0); end - def yielded_once?(matcher_name); end -end -class RSpec::Matchers::BuiltIn::YieldControl < RSpec::Matchers::BuiltIn::BaseMatcher - def does_not_match?(block); end - def failure_message; end - def failure_message_when_negated; end - def failure_reason; end - def matches?(block); end - def supports_block_expectations?; end - def supports_value_expectations?; end - include RSpec::Matchers::BuiltIn::CountExpectation -end -class RSpec::Matchers::BuiltIn::YieldWithNoArgs < RSpec::Matchers::BuiltIn::BaseMatcher - def does_not_match?(block); end - def failure_message; end - def failure_message_when_negated; end - def matches?(block); end - def negative_failure_reason; end - def positive_failure_reason; end - def supports_block_expectations?; end - def supports_value_expectations?; end -end -class RSpec::Matchers::BuiltIn::YieldWithArgs < RSpec::Matchers::BuiltIn::BaseMatcher - def all_args_match?; end - def args_currently_match?; end - def description; end - def does_not_match?(block); end - def expected_arg_description; end - def failure_message; end - def failure_message_when_negated; end - def initialize(*args); end - def matches?(block); end - def negative_failure_reason; end - def positive_failure_reason; end - def supports_block_expectations?; end - def supports_value_expectations?; end -end -class RSpec::Matchers::BuiltIn::YieldSuccessiveArgs < RSpec::Matchers::BuiltIn::BaseMatcher - def description; end - def does_not_match?(block); end - def expected_arg_description; end - def failure_message; end - def failure_message_when_negated; end - def initialize(*args); end - def matches?(block); end - def negative_failure_reason; end - def positive_failure_reason; end - def supports_block_expectations?; end - def supports_value_expectations?; end -end diff --git a/sorbet/rbi/gems/rspec-expectations@3.13.1.rbi b/sorbet/rbi/gems/rspec-expectations@3.13.1.rbi new file mode 100644 index 0000000..2a514d2 --- /dev/null +++ b/sorbet/rbi/gems/rspec-expectations@3.13.1.rbi @@ -0,0 +1,8167 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rspec-expectations` gem. +# Please instead update this file by running `bin/tapioca gem rspec-expectations`. + + +# RSpec's top level namespace. All of rspec-expectations is contained +# in the `RSpec::Expectations` and `RSpec::Matchers` namespaces. +# +# source://rspec-expectations//lib/rspec/matchers/english_phrasing.rb#1 +module RSpec + class << self + # source://rspec-core/3.13.0/lib/rspec/core.rb#70 + def clear_examples; end + + # source://rspec-core/3.13.0/lib/rspec/core.rb#85 + def configuration; end + + # source://rspec-core/3.13.0/lib/rspec/core.rb#49 + def configuration=(_arg0); end + + # source://rspec-core/3.13.0/lib/rspec/core.rb#97 + def configure; end + + # source://rspec-core/3.13.0/lib/rspec/core.rb#194 + def const_missing(name); end + + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 + def context(*args, &example_group_block); end + + # source://rspec-core/3.13.0/lib/rspec/core.rb#122 + def current_example; end + + # source://rspec-core/3.13.0/lib/rspec/core.rb#128 + def current_example=(example); end + + # source://rspec-core/3.13.0/lib/rspec/core.rb#154 + def current_scope; end + + # source://rspec-core/3.13.0/lib/rspec/core.rb#134 + def current_scope=(scope); end + + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 + def describe(*args, &example_group_block); end + + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 + def example_group(*args, &example_group_block); end + + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 + def fcontext(*args, &example_group_block); end + + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 + def fdescribe(*args, &example_group_block); end + + # source://rspec-core/3.13.0/lib/rspec/core.rb#58 + def reset; end + + # source://rspec-core/3.13.0/lib/rspec/core/shared_example_group.rb#110 + def shared_context(name, *args, &block); end + + # source://rspec-core/3.13.0/lib/rspec/core/shared_example_group.rb#110 + def shared_examples(name, *args, &block); end + + # source://rspec-core/3.13.0/lib/rspec/core/shared_example_group.rb#110 + def shared_examples_for(name, *args, &block); end + + # source://rspec-core/3.13.0/lib/rspec/core.rb#160 + def world; end + + # source://rspec-core/3.13.0/lib/rspec/core.rb#49 + def world=(_arg0); end + + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 + def xcontext(*args, &example_group_block); end + + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 + def xdescribe(*args, &example_group_block); end + end +end + +# RSpec::Expectations provides a simple, readable API to express +# the expected outcomes in a code example. To express an expected +# outcome, wrap an object or block in `expect`, call `to` or `to_not` +# (aliased as `not_to`) and pass it a matcher object: +# +# expect(order.total).to eq(Money.new(5.55, :USD)) +# expect(list).to include(user) +# expect(message).not_to match(/foo/) +# expect { do_something }.to raise_error +# +# The last form (the block form) is needed to match against ruby constructs +# that are not objects, but can only be observed when executing a block +# of code. This includes raising errors, throwing symbols, yielding, +# and changing values. +# +# When `expect(...).to` is invoked with a matcher, it turns around +# and calls `matcher.matches?()`. For example, +# in the expression: +# +# expect(order.total).to eq(Money.new(5.55, :USD)) +# +# ...`eq(Money.new(5.55, :USD))` returns a matcher object, and it results +# in the equivalent of `eq.matches?(order.total)`. If `matches?` returns +# `true`, the expectation is met and execution continues. If `false`, then +# the spec fails with the message returned by `eq.failure_message`. +# +# Given the expression: +# +# expect(order.entries).not_to include(entry) +# +# ...the `not_to` method (also available as `to_not`) invokes the equivalent of +# `include.matches?(order.entries)`, but it interprets `false` as success, and +# `true` as a failure, using the message generated by +# `include.failure_message_when_negated`. +# +# rspec-expectations ships with a standard set of useful matchers, and writing +# your own matchers is quite simple. +# +# See [RSpec::Matchers](../RSpec/Matchers) for more information about the +# built-in matchers that ship with rspec-expectations, and how to write your +# own custom matchers. +# +# source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#2 +module RSpec::Expectations + class << self + # The configuration object. + # + # @return [RSpec::Expectations::Configuration] the configuration object + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#223 + def configuration; end + + # @private + # + # source://rspec-expectations//lib/rspec/expectations/fail_with.rb#13 + def differ; end + + # Raises an RSpec::Expectations::ExpectationNotMetError with message. + # Adds a diff to the failure message when `expected` and `actual` are + # both present. + # + # @param message [String] + # @param expected [Object] + # @param actual [Object] + # + # source://rspec-expectations//lib/rspec/expectations/fail_with.rb#27 + def fail_with(message, expected = T.unsafe(nil), actual = T.unsafe(nil)); end + end +end + +# Validates the provided matcher to ensure it supports block +# expectations, in order to avoid user confusion when they +# use a block thinking the expectation will be on the return +# value of the block rather than the block itself. +# +# @private +# +# source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#136 +class RSpec::Expectations::BlockExpectationTarget < ::RSpec::Expectations::ExpectationTarget + # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#142 + def not_to(matcher, message = T.unsafe(nil), &block); end + + # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#137 + def to(matcher, message = T.unsafe(nil), &block); end + + # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#142 + def to_not(matcher, message = T.unsafe(nil), &block); end + + private + + # @raise [ExpectationNotMetError] + # + # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#150 + def enforce_block_expectation(matcher); end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#158 + def supports_block_expectations?(matcher); end +end + +# @private +# +# source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#4 +class RSpec::Expectations::BlockSnippetExtractor + # @return [BlockSnippetExtractor] a new instance of BlockSnippetExtractor + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#17 + def initialize(proc, method_name); end + + # Ideally we should properly handle indentations of multiline snippet, + # but it's not implemented yet since because we use result of this method only when it's a + # single line and implementing the logic introduces additional complexity. + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#25 + def body_content_lines; end + + # rubocop should properly handle `Struct.new {}` as an inner class definition. + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#7 + def method_name; end + + # rubocop should properly handle `Struct.new {}` as an inner class definition. + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#7 + def proc; end + + private + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#60 + def beginning_line_number; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#39 + def block_token_extractor; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#56 + def file_path; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#31 + def raw_body_lines; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#35 + def raw_body_snippet; end + + # @raise [TargetNotFoundError] + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#44 + def source; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#64 + def source_location; end + + class << self + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#9 + def try_extracting_single_line_body_of(proc, method_name); end + end +end + +# source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#70 +class RSpec::Expectations::BlockSnippetExtractor::AmbiguousTargetError < ::RSpec::Expectations::BlockSnippetExtractor::Error; end + +# Locates target block with node information (semantics), which tokens don't have. +# +# @private +# +# source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#198 +class RSpec::Expectations::BlockSnippetExtractor::BlockLocator < ::Struct + # Returns the value of attribute beginning_line_number + # + # @return [Object] the current value of beginning_line_number + def beginning_line_number; end + + # Sets the attribute beginning_line_number + # + # @param value [Object] the value to set the attribute beginning_line_number to. + # @return [Object] the newly set value + def beginning_line_number=(_); end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#203 + def body_content_locations; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#199 + def method_call_location; end + + # Returns the value of attribute method_name + # + # @return [Object] the current value of method_name + def method_name; end + + # Sets the attribute method_name + # + # @param value [Object] the value to set the attribute method_name to. + # @return [Object] the newly set value + def method_name=(_); end + + # Returns the value of attribute source + # + # @return [Object] the current value of source + def source; end + + # Sets the attribute source + # + # @param value [Object] the value to set the attribute source to. + # @return [Object] the newly set value + def source=(_); end + + private + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#216 + def block_body_node; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#221 + def block_wrapper_node; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#232 + def candidate_block_wrapper_nodes; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#241 + def candidate_method_ident_nodes; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#209 + def method_ident_node; end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#247 + def method_ident_node?(node); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# Performs extraction of block body snippet using tokens, +# which cannot be done with node information. +# +# @private +# +# source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#75 +class RSpec::Expectations::BlockSnippetExtractor::BlockTokenExtractor < ::Struct + # @return [BlockTokenExtractor] a new instance of BlockTokenExtractor + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#78 + def initialize(*_arg0); end + + # Returns the value of attribute beginning_line_number + # + # @return [Object] the current value of beginning_line_number + def beginning_line_number; end + + # Sets the attribute beginning_line_number + # + # @param value [Object] the value to set the attribute beginning_line_number to. + # @return [Object] the newly set value + def beginning_line_number=(_); end + + # Returns the value of attribute body_tokens. + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#76 + def body_tokens; end + + # Returns the value of attribute method_name + # + # @return [Object] the current value of method_name + def method_name; end + + # Sets the attribute method_name + # + # @param value [Object] the value to set the attribute method_name to. + # @return [Object] the newly set value + def method_name=(_); end + + # Returns the value of attribute source + # + # @return [Object] the current value of source + def source; end + + # Sets the attribute source + # + # @param value [Object] the value to set the attribute source to. + # @return [Object] the newly set value + def source=(_); end + + # Returns the value of attribute state. + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#76 + def state; end + + private + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#124 + def after_beginning_of_args_state(token); end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#128 + def after_beginning_of_body_state(token); end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#107 + def after_method_call_state(token); end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#111 + def after_opener_state(token); end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#191 + def block_locator; end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#185 + def correct_block?(body_tokens); end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#141 + def finalize_pending_tokens!; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#95 + def finish!; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#147 + def finish_or_find_next_block_if_incorrect!; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#168 + def handle_closer_token(token); end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#158 + def handle_opener_token(token); end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#103 + def initial_state(token); end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#99 + def invoke_state_handler(token); end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#164 + def opener_token?(token); end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#177 + def opener_token_stack; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#85 + def parse!; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#137 + def pending_tokens; end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#181 + def pipe_token?(token); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#68 +class RSpec::Expectations::BlockSnippetExtractor::Error < ::StandardError; end + +# source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#69 +class RSpec::Expectations::BlockSnippetExtractor::TargetNotFoundError < ::RSpec::Expectations::BlockSnippetExtractor::Error; end + +# Provides configuration options for rspec-expectations. +# If you are using rspec-core, you can access this via a +# block passed to `RSpec::Core::Configuration#expect_with`. +# Otherwise, you can access it via RSpec::Expectations.configuration. +# +# @example +# RSpec.configure do |rspec| +# rspec.expect_with :rspec do |c| +# # c is the config object +# end +# end +# +# # or +# +# RSpec::Expectations.configuration +# +# source://rspec-expectations//lib/rspec/expectations/configuration.rb#20 +class RSpec::Expectations::Configuration + # @return [Configuration] a new instance of Configuration + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#29 + def initialize; end + + # Adds `should` and `should_not` to the given classes + # or modules. This can be used to ensure `should` works + # properly on things like proxy objects (particular + # `Delegator`-subclassed objects on 1.8). + # + # @param modules [Array] the list of classes or modules + # to add `should` and `should_not` to. + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#112 + def add_should_and_should_not_to(*modules); end + + # Sets or gets the backtrace formatter. The backtrace formatter should + # implement `#format_backtrace(Array)`. This is used + # to format backtraces of errors handled by the `raise_error` + # matcher. + # + # If you are using rspec-core, rspec-core's backtrace formatting + # will be used (including respecting the presence or absence of + # the `--backtrace` option). + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#129 + def backtrace_formatter; end + + # Sets or gets the backtrace formatter. The backtrace formatter should + # implement `#format_backtrace(Array)`. This is used + # to format backtraces of errors handled by the `raise_error` + # matcher. + # + # If you are using rspec-core, rspec-core's backtrace formatting + # will be used (including respecting the presence or absence of + # the `--backtrace` option). + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#128 + def backtrace_formatter=(_arg0); end + + # Indicates whether or not diffs should be colored. + # Delegates to rspec-core's color option if rspec-core + # is loaded; otherwise you can set it here. + # + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#88 + def color?; end + + # @private + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#216 + def false_positives_handler; end + + # Sets if custom matcher descriptions and failure messages + # should include clauses from methods defined using `chain`. + # + # @param value [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#140 + def include_chain_clauses_in_custom_matcher_descriptions=(_arg0); end + + # Indicates whether or not custom matcher descriptions and failure messages + # should include clauses from methods defined using `chain`. It is + # false by default for backwards compatibility. + # + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#145 + def include_chain_clauses_in_custom_matcher_descriptions?; end + + # Configures the maximum character length that RSpec will print while + # formatting an object. You can set length to nil to prevent RSpec from + # doing truncation. + # + # @example + # RSpec.configure do |rspec| + # rspec.expect_with :rspec do |c| + # c.max_formatted_output_length = 200 + # end + # end + # @param length [Fixnum] the number of characters to limit the formatted output to. + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#70 + def max_formatted_output_length=(length); end + + # Indicates what RSpec will do about matcher use which will + # potentially cause false positives in tests, generally you want to + # avoid such scenarios so this defaults to `true`. + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#206 + def on_potential_false_positives; end + + # Configures what RSpec will do about matcher use which will + # potentially cause false positives in tests. + # + # @param behavior [Symbol] can be set to :warn, :raise or :nothing + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#182 + def on_potential_false_positives=(behavior); end + + # @private + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#150 + def reset_syntaxes_to_default; end + + # Returns the value of attribute strict_predicate_matchers. + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#197 + def strict_predicate_matchers; end + + # Configures RSpec to check predicate matchers to `be(true)` / `be(false)` (strict), + # or `be_truthy` / `be_falsey` (not strict). + # Historically, the default was `false`, but `true` is recommended. + # + # @raise [ArgumentError] + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#192 + def strict_predicate_matchers=(flag); end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#199 + def strict_predicate_matchers?; end + + # The list of configured syntaxes. + # + # @example + # unless RSpec::Matchers.configuration.syntax.include?(:expect) + # raise "this RSpec extension gem requires the rspec-expectations `:expect` syntax" + # end + # @return [Array] the list of configured syntaxes. + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#80 + def syntax; end + + # Configures the supported syntax. + # + # @example + # RSpec.configure do |rspec| + # rspec.expect_with :rspec do |c| + # c.syntax = :should + # # or + # c.syntax = :expect + # # or + # c.syntax = [:should, :expect] + # end + # end + # @param values [Array, Symbol] the syntaxes to enable + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#46 + def syntax=(values); end + + # Configures whether RSpec will warn about matcher use which will + # potentially cause false positives in tests. + # + # @param boolean [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#168 + def warn_about_potential_false_positives=(boolean); end + + # Indicates whether RSpec will warn about matcher use which will + # potentially cause false positives in tests, generally you want to + # avoid such scenarios so this defaults to `true`. + # + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#211 + def warn_about_potential_false_positives?; end +end + +# @private +# +# source://rspec-expectations//lib/rspec/expectations/configuration.rb#22 +RSpec::Expectations::Configuration::FALSE_POSITIVE_BEHAVIOURS = T.let(T.unsafe(nil), Hash) + +# Null implementation of a backtrace formatter used by default +# when rspec-core is not loaded. Does no filtering. +# +# @api private +# +# source://rspec-expectations//lib/rspec/expectations/configuration.rb#158 +module RSpec::Expectations::Configuration::NullBacktraceFormatter + class << self + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#159 + def format_backtrace(backtrace); end + end +end + +# @private +# +# source://rspec-expectations//lib/rspec/expectations/handler.rb#4 +module RSpec::Expectations::ExpectationHelper + class << self + # source://rspec-expectations//lib/rspec/expectations/handler.rb#5 + def check_message(msg); end + + # source://rspec-expectations//lib/rspec/expectations/handler.rb#33 + def handle_failure(matcher, message, failure_message_method); end + + # Returns an RSpec-3+ compatible matcher, wrapping a legacy one + # in an adapter if necessary. + # + # @private + # + # source://rspec-expectations//lib/rspec/expectations/handler.rb#19 + def modern_matcher_from(matcher); end + + # source://rspec-expectations//lib/rspec/expectations/handler.rb#24 + def with_matcher(handler, matcher, message); end + end +end + +# Exception raised when an expectation fails. +# +# the user sets an expectation, it can't be caught in their +# code by a bare `rescue`. +# +# @api public +# @note We subclass Exception so that in a stub implementation if +# +# source://rspec-expectations//lib/rspec/expectations.rb#67 +class RSpec::Expectations::ExpectationNotMetError < ::Exception; end + +# Wraps the target of an expectation. +# +# @example +# expect(something) # => ExpectationTarget wrapping something +# expect { do_something } # => ExpectationTarget wrapping the block +# +# # used with `to` +# expect(actual).to eq(3) +# +# # with `not_to` +# expect(actual).not_to eq(3) +# @note `ExpectationTarget` is not intended to be instantiated +# directly by users. Use `expect` instead. +# +# source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#17 +class RSpec::Expectations::ExpectationTarget + include ::RSpec::Expectations::ExpectationTarget::InstanceMethods + + # @api private + # @return [ExpectationTarget] a new instance of ExpectationTarget + # + # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#31 + def initialize(value); end + + # @note this name aligns with `Minitest::Expectation` so that our + # {InstanceMethods} module can be included in that class when + # used in a Minitest context. + # @return [Object] the target of the expectation + # + # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#28 + def target; end + + class << self + # @private + # + # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#36 + def for(value, block); end + end +end + +# Defines instance {ExpectationTarget} instance methods. These are defined +# in a module so we can include it in `Minitest::Expectation` when +# `rspec/expectations/minitest_integration` is loaded in order to +# support usage with Minitest. +# +# source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#53 +module RSpec::Expectations::ExpectationTarget::InstanceMethods + # Runs the given expectation, passing if `matcher` returns false. + # + # @example + # expect(value).not_to eq(5) + # @param matcher [Matcher] + # @param message [String, Proc] optional message to display when the expectation fails + # @return [Boolean] false if the negative expectation succeeds (else raises) + # @see RSpec::Matchers + # + # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#76 + def not_to(matcher = T.unsafe(nil), message = T.unsafe(nil), &block); end + + # Runs the given expectation, passing if `matcher` returns true. + # + # @example + # expect(value).to eq(5) + # expect { perform }.to raise_error + # @param matcher [Matcher] + # @param message [String, Proc] optional message to display when the expectation fails + # @return [Boolean] true if the expectation succeeds (else raises) + # @see RSpec::Matchers + # + # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#63 + def to(matcher = T.unsafe(nil), message = T.unsafe(nil), &block); end + + # Runs the given expectation, passing if `matcher` returns false. + # + # @example + # expect(value).not_to eq(5) + # @param matcher [Matcher] + # @param message [String, Proc] optional message to display when the expectation fails + # @return [Boolean] false if the negative expectation succeeds (else raises) + # @see RSpec::Matchers + # + # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#76 + def to_not(matcher = T.unsafe(nil), message = T.unsafe(nil), &block); end + + private + + # @raise [ArgumentError] + # + # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#84 + def prevent_operator_matchers(verb); end +end + +# Used as a sentinel value to be able to tell when the user +# did not pass an argument. We can't use `nil` for that because +# `nil` is a valid value to pass. +# +# @private +# +# source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#22 +module RSpec::Expectations::ExpectationTarget::UndefinedValue; end + +# @private +# +# source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#4 +class RSpec::Expectations::FailureAggregator + # @return [FailureAggregator] a new instance of FailureAggregator + # + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#90 + def initialize(block_label, metadata); end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#22 + def aggregate; end + + # Returns the value of attribute block_label. + # + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#5 + def block_label; end + + # This method is defined to satisfy the callable interface + # expected by `RSpec::Support.with_failure_notifier`. + # + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#59 + def call(failure, options); end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#49 + def failures; end + + # Returns the value of attribute metadata. + # + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#5 + def metadata; end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#53 + def other_errors; end + + private + + # Using `caller` performs better (and is simpler) than `raise` on most Rubies. + # + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#85 + def assign_backtrace(failure); end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#96 + def notify_aggregated_failures; end +end + +# source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#20 +RSpec::Expectations::FailureAggregator::AGGREGATED_FAILURE = T.let(T.unsafe(nil), RSpec::Expectations::FailureAggregator::AggregatedFailure) + +# @private +# +# source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#8 +class RSpec::Expectations::FailureAggregator::AggregatedFailure + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#15 + def inspect; end +end + +# @private +# +# source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#10 +RSpec::Expectations::FailureAggregator::AggregatedFailure::MESSAGE = T.let(T.unsafe(nil), String) + +# RSpec 3.0 was released with the class name misspelled. For SemVer compatibility, +# we will provide this misspelled alias until 4.0. +# +# @deprecated Use LegacyMatcherAdapter instead. +# @private +# +# source://rspec-expectations//lib/rspec/expectations/handler.rb#180 +RSpec::Expectations::LegacyMacherAdapter = RSpec::Expectations::LegacyMatcherAdapter + +# Wraps a matcher written against one of the legacy protocols in +# order to present the current protocol. +# +# @private +# +# source://rspec-expectations//lib/rspec/expectations/handler.rb#113 +class RSpec::Expectations::LegacyMatcherAdapter < ::RSpec::Matchers::MatcherDelegator + # @return [LegacyMatcherAdapter] a new instance of LegacyMatcherAdapter + # + # source://rspec-expectations//lib/rspec/expectations/handler.rb#114 + def initialize(matcher); end + + class << self + # source://rspec-expectations//lib/rspec/expectations/handler.rb#124 + def wrap(matcher); end + end +end + +# Before RSpec 1.2, the failure message protocol was: +# * `failure_message` +# * `negative_failure_message` +# +# @private +# +# source://rspec-expectations//lib/rspec/expectations/handler.rb#157 +class RSpec::Expectations::LegacyMatcherAdapter::RSpec1 < ::RSpec::Expectations::LegacyMatcherAdapter + # source://rspec-expectations//lib/rspec/expectations/handler.rb#158 + def failure_message; end + + # source://rspec-expectations//lib/rspec/expectations/handler.rb#162 + def failure_message_when_negated; end + + class << self + # Note: `failure_message` is part of the RSpec 3 protocol + # (paired with `failure_message_when_negated`), so we don't check + # for `failure_message` here. + # + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/handler.rb#169 + def interface_matches?(matcher); end + end +end + +# Starting in RSpec 1.2 (and continuing through all 2.x releases), +# the failure message protocol was: +# * `failure_message_for_should` +# * `failure_message_for_should_not` +# +# @private +# +# source://rspec-expectations//lib/rspec/expectations/handler.rb#133 +class RSpec::Expectations::LegacyMatcherAdapter::RSpec2 < ::RSpec::Expectations::LegacyMatcherAdapter + # source://rspec-expectations//lib/rspec/expectations/handler.rb#134 + def failure_message; end + + # source://rspec-expectations//lib/rspec/expectations/handler.rb#138 + def failure_message_when_negated; end + + class << self + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/handler.rb#142 + def interface_matches?(matcher); end + end +end + +# Exception raised from `aggregate_failures` when multiple expectations fail. +# +# @note The constant is defined here but the extensive logic of this class +# is lazily defined when `FailureAggregator` is autoloaded, since we do +# not need to waste time defining that functionality unless +# `aggregate_failures` is used. +# +# source://rspec-expectations//lib/rspec/expectations.rb#76 +class RSpec::Expectations::MultipleExpectationsNotMetError < ::RSpec::Expectations::ExpectationNotMetError + # @return [MultipleExpectationsNotMetError] a new instance of MultipleExpectationsNotMetError + # + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#153 + def initialize(failure_aggregator); end + + # @return [String] The user-assigned label for the aggregation block. + # + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#128 + def aggregation_block_label; end + + # @return [Hash] The metadata hash passed to `aggregate_failures`. + # + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#133 + def aggregation_metadata; end + + # @return [Array] The list of expectation failures and other exceptions, combined. + # + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#125 + def all_exceptions; end + + # return [String] A description of the failure/error counts. + # + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#144 + def exception_count_description; end + + # @return [Array] The list of expectation failures. + # + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#115 + def failures; end + + # @return [String] The fully formatted exception message. + # + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#110 + def message; end + + # @return [Array] The list of other exceptions. + # + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#120 + def other_errors; end + + # @return [String] A summary of the failure, including the block label and a count of failures. + # + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#138 + def summary; end + + private + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#185 + def backtrace_line(line); end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#158 + def block_description; end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#167 + def enumerated(exceptions, index_offset); end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#197 + def enumerated_errors; end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#193 + def enumerated_failures; end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#175 + def exclusion_patterns; end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#181 + def format_backtrace(backtrace); end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#212 + def indentation; end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#203 + def indented(failure_message, index); end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#224 + def index_label(index); end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#216 + def longest_index_label_width; end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#163 + def pluralize(noun, count); end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#220 + def width_of_label(index); end +end + +# @private +# +# source://rspec-expectations//lib/rspec/expectations/handler.rb#74 +class RSpec::Expectations::NegativeExpectationHandler + class << self + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/handler.rb#88 + def does_not_match?(matcher, actual, &block); end + + # source://rspec-expectations//lib/rspec/expectations/handler.rb#75 + def handle_matcher(actual, initial_matcher, custom_message = T.unsafe(nil), &block); end + + # source://rspec-expectations//lib/rspec/expectations/handler.rb#104 + def opposite_should_method; end + + # source://rspec-expectations//lib/rspec/expectations/handler.rb#100 + def should_method; end + + # source://rspec-expectations//lib/rspec/expectations/handler.rb#96 + def verb; end + end +end + +# @private +# +# source://rspec-expectations//lib/rspec/expectations/handler.rb#46 +class RSpec::Expectations::PositiveExpectationHandler + class << self + # source://rspec-expectations//lib/rspec/expectations/handler.rb#47 + def handle_matcher(actual, initial_matcher, custom_message = T.unsafe(nil), &block); end + + # source://rspec-expectations//lib/rspec/expectations/handler.rb#68 + def opposite_should_method; end + + # source://rspec-expectations//lib/rspec/expectations/handler.rb#64 + def should_method; end + + # source://rspec-expectations//lib/rspec/expectations/handler.rb#60 + def verb; end + end +end + +# Provides methods for enabling and disabling the available +# syntaxes provided by rspec-expectations. +# +# @api private +# +# source://rspec-expectations//lib/rspec/expectations/syntax.rb#6 +module RSpec::Expectations::Syntax + private + + # Determines where we add `should` and `should_not`. + # + # @api private + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#11 + def default_should_host; end + + # Disables the `expect` syntax. + # + # @api private + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#80 + def disable_expect(syntax_host = T.unsafe(nil)); end + + # Disables the `should` syntax. + # + # @api private + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#57 + def disable_should(syntax_host = T.unsafe(nil)); end + + # Enables the `expect` syntax. + # + # @api private + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#68 + def enable_expect(syntax_host = T.unsafe(nil)); end + + # Enables the `should` syntax. + # + # @api private + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#38 + def enable_should(syntax_host = T.unsafe(nil)); end + + # Indicates whether or not the `expect` syntax is enabled. + # + # @api private + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#96 + def expect_enabled?(syntax_host = T.unsafe(nil)); end + + # Indicates whether or not the `should` syntax is enabled. + # + # @api private + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#90 + def should_enabled?(syntax_host = T.unsafe(nil)); end + + # Instructs rspec-expectations to warn on first usage of `should` or `should_not`. + # Enabled by default. This is largely here to facilitate testing. + # + # @api private + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#18 + def warn_about_should!; end + + # Generates a deprecation warning for the given method if no warning + # has already been issued. + # + # @api private + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#25 + def warn_about_should_unless_configured(method_name); end + + class << self + # Determines where we add `should` and `should_not`. + # + # @api private + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#11 + def default_should_host; end + + # Disables the `expect` syntax. + # + # @api private + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#80 + def disable_expect(syntax_host = T.unsafe(nil)); end + + # Disables the `should` syntax. + # + # @api private + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#57 + def disable_should(syntax_host = T.unsafe(nil)); end + + # Enables the `expect` syntax. + # + # @api private + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#68 + def enable_expect(syntax_host = T.unsafe(nil)); end + + # Enables the `should` syntax. + # + # @api private + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#38 + def enable_should(syntax_host = T.unsafe(nil)); end + + # Indicates whether or not the `expect` syntax is enabled. + # + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#96 + def expect_enabled?(syntax_host = T.unsafe(nil)); end + + # Indicates whether or not the `should` syntax is enabled. + # + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#90 + def should_enabled?(syntax_host = T.unsafe(nil)); end + + # Instructs rspec-expectations to warn on first usage of `should` or `should_not`. + # Enabled by default. This is largely here to facilitate testing. + # + # @api private + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#18 + def warn_about_should!; end + + # Generates a deprecation warning for the given method if no warning + # has already been issued. + # + # @api private + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#25 + def warn_about_should_unless_configured(method_name); end + end +end + +# Validates the provided matcher to ensure it supports block +# expectations, in order to avoid user confusion when they +# use a block thinking the expectation will be on the return +# value of the block rather than the block itself. +# +# @private +# +# source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#98 +class RSpec::Expectations::ValueExpectationTarget < ::RSpec::Expectations::ExpectationTarget + # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#104 + def not_to(matcher = T.unsafe(nil), message = T.unsafe(nil), &block); end + + # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#99 + def to(matcher = T.unsafe(nil), message = T.unsafe(nil), &block); end + + private + + # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#111 + def enforce_value_expectation(matcher); end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#126 + def supports_value_expectations?(matcher); end +end + +# @private +# +# source://rspec-expectations//lib/rspec/expectations/version.rb#4 +module RSpec::Expectations::Version; end + +# source://rspec-expectations//lib/rspec/expectations/version.rb#5 +RSpec::Expectations::Version::STRING = T.let(T.unsafe(nil), String) + +# RSpec::Matchers provides a number of useful matchers we use to define +# expectations. Any object that implements the [matcher protocol](Matchers/MatcherProtocol) +# can be used as a matcher. +# +# ## Predicates +# +# In addition to matchers that are defined explicitly, RSpec will create +# custom matchers on the fly for any arbitrary predicate, giving your specs a +# much more natural language feel. +# +# A Ruby predicate is a method that ends with a "?" and returns true or false. +# Common examples are `empty?`, `nil?`, and `instance_of?`. +# +# All you need to do is write `expect(..).to be_` followed by the predicate +# without the question mark, and RSpec will figure it out from there. +# For example: +# +# expect([]).to be_empty # => [].empty?() | passes +# expect([]).not_to be_empty # => [].empty?() | fails +# +# In addition to prefixing the predicate matchers with "be_", you can also use "be_a_" +# and "be_an_", making your specs read much more naturally: +# +# expect("a string").to be_an_instance_of(String) # =>"a string".instance_of?(String) # passes +# +# expect(3).to be_a_kind_of(Integer) # => 3.kind_of?(Numeric) | passes +# expect(3).to be_a_kind_of(Numeric) # => 3.kind_of?(Numeric) | passes +# expect(3).to be_an_instance_of(Integer) # => 3.instance_of?(Integer) | passes +# expect(3).not_to be_an_instance_of(Numeric) # => 3.instance_of?(Numeric) | fails +# +# RSpec will also create custom matchers for predicates like `has_key?`. To +# use this feature, just state that the object should have_key(:key) and RSpec will +# call has_key?(:key) on the target. For example: +# +# expect(:a => "A").to have_key(:a) +# expect(:a => "A").to have_key(:b) # fails +# +# You can use this feature to invoke any predicate that begins with "has_", whether it is +# part of the Ruby libraries (like `Hash#has_key?`) or a method you wrote on your own class. +# +# Note that RSpec does not provide composable aliases for these dynamic predicate +# matchers. You can easily define your own aliases, though: +# +# RSpec::Matchers.alias_matcher :a_user_who_is_an_admin, :be_an_admin +# expect(user_list).to include(a_user_who_is_an_admin) +# +# ## Alias Matchers +# +# With {RSpec::Matchers.alias_matcher}, you can easily create an +# alternate name for a given matcher. +# +# The description will also change according to the new name: +# +# RSpec::Matchers.alias_matcher :a_list_that_sums_to, :sum_to +# sum_to(3).description # => "sum to 3" +# a_list_that_sums_to(3).description # => "a list that sums to 3" +# +# or you can specify a custom description like this: +# +# RSpec::Matchers.alias_matcher :a_list_sorted_by, :be_sorted_by do |description| +# description.sub("be sorted by", "a list sorted by") +# end +# +# be_sorted_by(:age).description # => "be sorted by age" +# a_list_sorted_by(:age).description # => "a list sorted by age" +# +# ## Custom Matchers +# +# When you find that none of the stock matchers provide a natural feeling +# expectation, you can very easily write your own using RSpec's matcher DSL +# or writing one from scratch. +# +# ### Matcher DSL +# +# Imagine that you are writing a game in which players can be in various +# zones on a virtual board. To specify that bob should be in zone 4, you +# could say: +# +# expect(bob.current_zone).to eql(Zone.new("4")) +# +# But you might find it more expressive to say: +# +# expect(bob).to be_in_zone("4") +# +# and/or +# +# expect(bob).not_to be_in_zone("3") +# +# You can create such a matcher like so: +# +# RSpec::Matchers.define :be_in_zone do |zone| +# match do |player| +# player.in_zone?(zone) +# end +# end +# +# This will generate a be_in_zone method that returns a matcher +# with logical default messages for failures. You can override the failure +# messages and the generated description as follows: +# +# RSpec::Matchers.define :be_in_zone do |zone| +# match do |player| +# player.in_zone?(zone) +# end +# +# failure_message do |player| +# # generate and return the appropriate string. +# end +# +# failure_message_when_negated do |player| +# # generate and return the appropriate string. +# end +# +# description do +# # generate and return the appropriate string. +# end +# end +# +# Each of the message-generation methods has access to the block arguments +# passed to the create method (in this case, zone). The +# failure message methods (failure_message and +# failure_message_when_negated) are passed the actual value (the +# receiver of expect(..) or expect(..).not_to). +# +# ### Custom Matcher from scratch +# +# You could also write a custom matcher from scratch, as follows: +# +# class BeInZone +# def initialize(expected) +# @expected = expected +# end +# +# def matches?(target) +# @target = target +# @target.current_zone.eql?(Zone.new(@expected)) +# end +# +# def failure_message +# "expected #{@target.inspect} to be in Zone #{@expected}" +# end +# +# def failure_message_when_negated +# "expected #{@target.inspect} not to be in Zone #{@expected}" +# end +# end +# +# ... and a method like this: +# +# def be_in_zone(expected) +# BeInZone.new(expected) +# end +# +# And then expose the method to your specs. This is normally done +# by including the method and the class in a module, which is then +# included in your spec: +# +# module CustomGameMatchers +# class BeInZone +# # ... +# end +# +# def be_in_zone(expected) +# # ... +# end +# end +# +# describe "Player behaviour" do +# include CustomGameMatchers +# # ... +# end +# +# or you can include in globally in a spec_helper.rb file required +# from your spec file(s): +# +# RSpec::configure do |config| +# config.include(CustomGameMatchers) +# end +# +# ### Making custom matchers composable +# +# RSpec's built-in matchers are designed to be composed, in expressions like: +# +# expect(["barn", 2.45]).to contain_exactly( +# a_value_within(0.1).of(2.5), +# a_string_starting_with("bar") +# ) +# +# Custom matchers can easily participate in composed matcher expressions like these. +# Include {RSpec::Matchers::Composable} in your custom matcher to make it support +# being composed (matchers defined using the DSL have this included automatically). +# Within your matcher's `matches?` method (or the `match` block, if using the DSL), +# use `values_match?(expected, actual)` rather than `expected == actual`. +# Under the covers, `values_match?` is able to match arbitrary +# nested data structures containing a mix of both matchers and non-matcher objects. +# It uses `===` and `==` to perform the matching, considering the values to +# match if either returns `true`. The `Composable` mixin also provides some helper +# methods for surfacing the matcher descriptions within your matcher's description +# or failure messages. +# +# RSpec's built-in matchers each have a number of aliases that rephrase the matcher +# from a verb phrase (such as `be_within`) to a noun phrase (such as `a_value_within`), +# which reads better when the matcher is passed as an argument in a composed matcher +# expressions, and also uses the noun-phrase wording in the matcher's `description`, +# for readable failure messages. You can alias your custom matchers in similar fashion +# using {RSpec::Matchers.alias_matcher}. +# +# ## Negated Matchers +# +# Sometimes if you want to test for the opposite using a more descriptive name +# instead of using `not_to`, you can use {RSpec::Matchers.define_negated_matcher}: +# +# RSpec::Matchers.define_negated_matcher :exclude, :include +# include(1, 2).description # => "include 1 and 2" +# exclude(1, 2).description # => "exclude 1 and 2" +# +# While the most obvious negated form may be to add a `not_` prefix, +# the failure messages you get with that form can be confusing (e.g. +# "expected [actual] to not [verb], but did not"). We've found it works +# best to find a more positive name for the negated form, such as +# `avoid_changing` rather than `not_change`. +# +# source://rspec-expectations//lib/rspec/matchers/english_phrasing.rb#2 +module RSpec::Matchers + extend ::RSpec::Matchers::DSL + + # Applied to a proc, specifies that its execution will cause some value to + # change. + # + # You can either pass receiver and message, or a block, + # but not both. + # + # When passing a block, it must use the `{ ... }` format, not + # do/end, as `{ ... }` binds to the `change` method, whereas do/end + # would errantly bind to the `expect(..).to` or `expect(...).not_to` method. + # + # You can chain any of the following off of the end to specify details + # about the change: + # + # * `from` + # * `to` + # + # or any one of: + # + # * `by` + # * `by_at_least` + # * `by_at_most` + # + # == Notes + # + # Evaluates `receiver.message` or `block` before and after it + # evaluates the block passed to `expect`. If the value is the same + # object, its before/after `hash` value is used to see if it has changed. + # Therefore, your object needs to properly implement `hash` to work correctly + # with this matcher. + # + # `expect( ... ).not_to change` supports the form that specifies `from` + # (which specifies what you expect the starting, unchanged value to be) + # but does not support forms with subsequent calls to `by`, `by_at_least`, + # `by_at_most` or `to`. + # + # @example + # expect { + # team.add_player(player) + # }.to change(roster, :count) + # + # expect { + # team.add_player(player) + # }.to change(roster, :count).by(1) + # + # expect { + # team.add_player(player) + # }.to change(roster, :count).by_at_least(1) + # + # expect { + # team.add_player(player) + # }.to change(roster, :count).by_at_most(1) + # + # string = "string" + # expect { + # string.reverse! + # }.to change { string }.from("string").to("gnirts") + # + # string = "string" + # expect { + # string + # }.not_to change { string }.from("string") + # + # expect { + # person.happy_birthday + # }.to change(person, :birthday).from(32).to(33) + # + # expect { + # employee.develop_great_new_social_networking_app + # }.to change(employee, :title).from("Mail Clerk").to("CEO") + # + # expect { + # doctor.leave_office + # }.to change(doctor, :sign).from(/is in/).to(/is out/) + # + # user = User.new(:type => "admin") + # expect { + # user.symbolize_type + # }.to change(user, :type).from(String).to(Symbol) + # @param receiver [Object] + # @param message [Symbol] the message to send the receiver + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_block_changing(*args, **_arg1, &block); end + + # With no arg, passes if the block outputs `to_stdout` or `to_stderr`. + # With a string, passes if the block outputs that specific string `to_stdout` or `to_stderr`. + # With a regexp or matcher, passes if the block outputs a string `to_stdout` or `to_stderr` that matches. + # + # To capture output from any spawned subprocess as well, use `to_stdout_from_any_process` or + # `to_stderr_from_any_process`. Output from any process that inherits the main process's corresponding + # standard stream will be captured. + # + # @example + # expect { print 'foo' }.to output.to_stdout + # expect { print 'foo' }.to output('foo').to_stdout + # expect { print 'foo' }.to output(/foo/).to_stdout + # + # expect { do_something }.to_not output.to_stdout + # + # expect { warn('foo') }.to output.to_stderr + # expect { warn('foo') }.to output('foo').to_stderr + # expect { warn('foo') }.to output(/foo/).to_stderr + # + # expect { do_something }.to_not output.to_stderr + # + # expect { system('echo foo') }.to output("foo\n").to_stdout_from_any_process + # expect { system('echo foo', out: :err) }.to output("foo\n").to_stderr_from_any_process + # @note `to_stdout` and `to_stderr` work by temporarily replacing `$stdout` or `$stderr`, + # so they're not able to intercept stream output that explicitly uses `STDOUT`/`STDERR` + # or that uses a reference to `$stdout`/`$stderr` that was stored before the + # matcher was used. + # @note `to_stdout_from_any_process` and `to_stderr_from_any_process` use Tempfiles, and + # are thus significantly (~30x) slower than `to_stdout` and `to_stderr`. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_block_outputting(*args, **_arg1, &block); end + + # With no args, matches if any error is raised. + # With a named error, matches only if that specific error is raised. + # With a named error and message specified as a String, matches only if both match. + # With a named error and message specified as a Regexp, matches only if both match. + # Pass an optional block to perform extra verifications on the exception matched + # + # @example + # expect { do_something_risky }.to raise_error + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError) + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError) { |error| expect(error.data).to eq 42 } + # expect { do_something_risky }.to raise_error { |error| expect(error.data).to eq 42 } + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError, "that was too risky") + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError, /oo ri/) + # expect { do_something_risky }.to raise_error("that was too risky") + # + # expect { do_something_risky }.not_to raise_error + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_block_raising(*args, **_arg1, &block); end + + # Given no argument, matches if a proc throws any Symbol. + # + # Given a Symbol, matches if the given proc throws the specified Symbol. + # + # Given a Symbol and an arg, matches if the given proc throws the + # specified Symbol with the specified arg. + # + # @example + # expect { do_something_risky }.to throw_symbol + # expect { do_something_risky }.to throw_symbol(:that_was_risky) + # expect { do_something_risky }.to throw_symbol(:that_was_risky, 'culprit') + # + # expect { do_something_risky }.not_to throw_symbol + # expect { do_something_risky }.not_to throw_symbol(:that_was_risky) + # expect { do_something_risky }.not_to throw_symbol(:that_was_risky, 'culprit') + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_block_throwing(*args, **_arg1, &block); end + + # Passes if the method called in the expect block yields, regardless + # of whether or not arguments are yielded. + # + # @example + # expect { |b| 5.tap(&b) }.to yield_control + # expect { |b| "a".to_sym(&b) }.not_to yield_control + # @note Your expect block must accept a parameter and pass it on to + # the method-under-test as a block. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_block_yielding_control(*args, **_arg1, &block); end + + # Designed for use with methods that repeatedly yield (such as + # iterators). Passes if the method called in the expect block yields + # multiple times with arguments matching those given. + # + # Argument matching is done using `===` (the case match operator) + # and `==`. If the expected and actual arguments match with either + # operator, the matcher will pass. + # + # @example + # expect { |b| [1, 2, 3].each(&b) }.to yield_successive_args(1, 2, 3) + # expect { |b| { :a => 1, :b => 2 }.each(&b) }.to yield_successive_args([:a, 1], [:b, 2]) + # expect { |b| [1, 2, 3].each(&b) }.not_to yield_successive_args(1, 2) + # @note Your expect block must accept a parameter and pass it on to + # the method-under-test as a block. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_block_yielding_successive_args(*args, **_arg1, &block); end + + # Given no arguments, matches if the method called in the expect + # block yields with arguments (regardless of what they are or how + # many there are). + # + # Given arguments, matches if the method called in the expect block + # yields with arguments that match the given arguments. + # + # Argument matching is done using `===` (the case match operator) + # and `==`. If the expected and actual arguments match with either + # operator, the matcher will pass. + # + # @example + # expect { |b| 5.tap(&b) }.to yield_with_args # because #tap yields an arg + # expect { |b| 5.tap(&b) }.to yield_with_args(5) # because 5 == 5 + # expect { |b| 5.tap(&b) }.to yield_with_args(Integer) # because Integer === 5 + # expect { |b| File.open("f.txt", &b) }.to yield_with_args(/txt/) # because /txt/ === "f.txt" + # + # expect { |b| User.transaction(&b) }.not_to yield_with_args # because it yields no args + # expect { |b| 5.tap(&b) }.not_to yield_with_args(1, 2, 3) + # @note Your expect block must accept a parameter and pass it on to + # the method-under-test as a block. + # @note This matcher is not designed for use with methods that yield + # multiple times. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_block_yielding_with_args(*args, **_arg1, &block); end + + # Passes if the method called in the expect block yields with + # no arguments. Fails if it does not yield, or yields with arguments. + # + # @example + # expect { |b| User.transaction(&b) }.to yield_with_no_args + # expect { |b| 5.tap(&b) }.not_to yield_with_no_args # because it yields with `5` + # expect { |b| "a".to_sym(&b) }.not_to yield_with_no_args # because it does not yield + # @note Your expect block must accept a parameter and pass it on to + # the method-under-test as a block. + # @note This matcher is not designed for use with methods that yield + # multiple times. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_block_yielding_with_no_args(*args, **_arg1, &block); end + + # Passes if actual contains all of the expected regardless of order. + # This works for collections. Pass in multiple args and it will only + # pass if all args are found in collection. + # + # @example + # expect([1, 2, 3]).to contain_exactly(1, 2, 3) + # expect([1, 2, 3]).to contain_exactly(1, 3, 2) + # @note This is also available using the `=~` operator with `should`, + # but `=~` is not supported with `expect`. + # @see #match_array + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_collection_containing_exactly(*args, **_arg1, &block); end + + # Matches if the actual value ends with the expected value(s). In the case + # of a string, matches against the last `expected.length` characters of the + # actual string. In the case of an array, matches against the last + # `expected.length` elements of the actual array. + # + # @example + # expect("this string").to end_with "string" + # expect([0, 1, 2, 3, 4]).to end_with 4 + # expect([0, 2, 3, 4, 4]).to end_with 3, 4 + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_collection_ending_with(*args, **_arg1, &block); end + + # Passes if actual includes expected. This works for + # collections and Strings. You can also pass in multiple args + # and it will only pass if all args are found in collection. + # + # @example + # expect([1,2,3]).to include(3) + # expect([1,2,3]).to include(2,3) + # expect([1,2,3]).to include(2,3,4) # fails + # expect([1,2,3]).not_to include(4) + # expect("spread").to include("read") + # expect("spread").not_to include("red") + # expect(:a => 1, :b => 2).to include(:a) + # expect(:a => 1, :b => 2).to include(:a, :b) + # expect(:a => 1, :b => 2).to include(:a => 1) + # expect(:a => 1, :b => 2).to include(:b => 2, :a => 1) + # expect(:a => 1, :b => 2).to include(:c) # fails + # expect(:a => 1, :b => 2).not_to include(:a => 2) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_collection_including(*args, **_arg1, &block); end + + # Matches if the actual value starts with the expected value(s). In the + # case of a string, matches against the first `expected.length` characters + # of the actual string. In the case of an array, matches against the first + # `expected.length` elements of the actual array. + # + # @example + # expect("this string").to start_with "this s" + # expect([0, 1, 2, 3, 4]).to start_with 0 + # expect([0, 2, 3, 4, 4]).to start_with 0, 1 + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_collection_starting_with(*args, **_arg1, &block); end + + # Passes if actual is falsey (false or nil) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_falsey_value(*args, **_arg1, &block); end + + # Passes if actual is falsey (false or nil) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_falsy_value(*args, **_arg1, &block); end + + # Passes if actual includes expected. This works for + # collections and Strings. You can also pass in multiple args + # and it will only pass if all args are found in collection. + # + # @example + # expect([1,2,3]).to include(3) + # expect([1,2,3]).to include(2,3) + # expect([1,2,3]).to include(2,3,4) # fails + # expect([1,2,3]).not_to include(4) + # expect("spread").to include("read") + # expect("spread").not_to include("red") + # expect(:a => 1, :b => 2).to include(:a) + # expect(:a => 1, :b => 2).to include(:a, :b) + # expect(:a => 1, :b => 2).to include(:a => 1) + # expect(:a => 1, :b => 2).to include(:b => 2, :a => 1) + # expect(:a => 1, :b => 2).to include(:c) # fails + # expect(:a => 1, :b => 2).not_to include(:a => 2) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_hash_including(*args, **_arg1, &block); end + + # Passes if actual.kind_of?(expected) + # + # @example + # expect(5).to be_a_kind_of(Integer) + # expect(5).to be_a_kind_of(Numeric) + # expect(5).not_to be_a_kind_of(Float) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_kind_of(*args, **_arg1, &block); end + + # Passes if actual is nil + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_nil_value(*args, **_arg1, &block); end + + # Passes if actual covers expected. This works for + # Ranges. You can also pass in multiple args + # and it will only pass if all args are found in Range. + # + # ### Warning:: Ruby >= 1.9 only + # + # @example + # expect(1..10).to cover(5) + # expect(1..10).to cover(4, 6) + # expect(1..10).to cover(4, 6, 11) # fails + # expect(1..10).not_to cover(11) + # expect(1..10).not_to cover(5) # fails + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_range_covering(*args, **_arg1, &block); end + + # Matches if the actual value ends with the expected value(s). In the case + # of a string, matches against the last `expected.length` characters of the + # actual string. In the case of an array, matches against the last + # `expected.length` elements of the actual array. + # + # @example + # expect("this string").to end_with "string" + # expect([0, 1, 2, 3, 4]).to end_with 4 + # expect([0, 2, 3, 4, 4]).to end_with 3, 4 + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_string_ending_with(*args, **_arg1, &block); end + + # Passes if actual includes expected. This works for + # collections and Strings. You can also pass in multiple args + # and it will only pass if all args are found in collection. + # + # @example + # expect([1,2,3]).to include(3) + # expect([1,2,3]).to include(2,3) + # expect([1,2,3]).to include(2,3,4) # fails + # expect([1,2,3]).not_to include(4) + # expect("spread").to include("read") + # expect("spread").not_to include("red") + # expect(:a => 1, :b => 2).to include(:a) + # expect(:a => 1, :b => 2).to include(:a, :b) + # expect(:a => 1, :b => 2).to include(:a => 1) + # expect(:a => 1, :b => 2).to include(:b => 2, :a => 1) + # expect(:a => 1, :b => 2).to include(:c) # fails + # expect(:a => 1, :b => 2).not_to include(:a => 2) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_string_including(*args, **_arg1, &block); end + + # Given a `Regexp` or `String`, passes if `actual.match(pattern)` + # Given an arbitrary nested data structure (e.g. arrays and hashes), + # matches if `expected === actual` || `actual == expected` for each + # pair of elements. + # + # @example + # expect(email).to match(/^([^\s]+)((?:[-a-z0-9]+\.)+[a-z]{2,})$/i) + # expect(email).to match("@example.com") + # @example + # hash = { + # :a => { + # :b => ["foo", 5], + # :c => { :d => 2.05 } + # } + # } + # + # expect(hash).to match( + # :a => { + # :b => a_collection_containing_exactly( + # a_string_starting_with("f"), + # an_instance_of(Integer) + # ), + # :c => { :d => (a_value < 3) } + # } + # ) + # @note The `match_regex` alias is deprecated and is not recommended for use. + # It was added in 2.12.1 to facilitate its use from within custom + # matchers (due to how the custom matcher DSL was evaluated in 2.x, + # `match` could not be used there), but is no longer needed in 3.x. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_string_matching(*args, **_arg1, &block); end + + # Matches if the actual value starts with the expected value(s). In the + # case of a string, matches against the first `expected.length` characters + # of the actual string. In the case of an array, matches against the first + # `expected.length` elements of the actual array. + # + # @example + # expect("this string").to start_with "this s" + # expect([0, 1, 2, 3, 4]).to start_with 0 + # expect([0, 2, 3, 4, 4]).to start_with 0, 1 + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_string_starting_with(*args, **_arg1, &block); end + + # Passes if actual is truthy (anything but false or nil) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_truthy_value(*args, **_arg1, &block); end + + # Given true, false, or nil, will pass if actual value is true, false or + # nil (respectively). Given no args means the caller should satisfy an if + # condition (to be or not to be). + # + # Predicates are any Ruby method that ends in a "?" and returns true or + # false. Given be_ followed by arbitrary_predicate (without the "?"), + # RSpec will match convert that into a query against the target object. + # + # The arbitrary_predicate feature will handle any predicate prefixed with + # "be_an_" (e.g. be_an_instance_of), "be_a_" (e.g. be_a_kind_of) or "be_" + # (e.g. be_empty), letting you choose the prefix that best suits the + # predicate. + # + # @example + # expect(actual).to be_truthy + # expect(actual).to be_falsey + # expect(actual).to be_nil + # expect(actual).to be_[arbitrary_predicate](*args) + # expect(actual).not_to be_nil + # expect(actual).not_to be_[arbitrary_predicate](*args) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_value(*args, **_arg1, &block); end + + # Passes if actual.between?(min, max). Works with any Comparable object, + # including String, Symbol, Time, or Numeric (Fixnum, Bignum, Integer, + # Float, Complex, and Rational). + # + # By default, `be_between` is inclusive (i.e. passes when given either the max or min value), + # but you can make it `exclusive` by chaining that off the matcher. + # + # @example + # expect(5).to be_between(1, 10) + # expect(11).not_to be_between(1, 10) + # expect(10).not_to be_between(1, 10).exclusive + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_value_between(*args, **_arg1, &block); end + + # Passes if actual == expected +/- delta + # + # @example + # expect(result).to be_within(0.5).of(3.0) + # expect(result).not_to be_within(0.5).of(3.0) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_value_within(*args, **_arg1, &block); end + + # Allows multiple expectations in the provided block to fail, and then + # aggregates them into a single exception, rather than aborting on the + # first expectation failure like normal. This allows you to see all + # failures from an entire set of expectations without splitting each + # off into its own example (which may slow things down if the example + # setup is expensive). + # + # @example + # aggregate_failures("verifying response") do + # expect(response.status).to eq(200) + # expect(response.headers).to include("Content-Type" => "text/plain") + # expect(response.body).to include("Success") + # end + # @note The implementation of this feature uses a thread-local variable, + # which means that if you have an expectation failure in another thread, + # it'll abort like normal. + # @param label [String] label for this aggregation block, which will be + # included in the aggregated exception message. + # @param metadata [Hash] additional metadata about this failure aggregation + # block. If multiple expectations fail, it will be exposed from the + # {Expectations::MultipleExpectationsNotMetError} exception. Mostly + # intended for internal RSpec use but you can use it as well. + # @raise [Expectations::MultipleExpectationsNotMetError] raised when + # multiple expectations fail. + # @raise [Expectations::ExpectationNotMetError] raised when a single + # expectation fails. + # @raise [Exception] other sorts of exceptions will be raised as normal. + # @yield Block containing as many expectation as you want. The block is + # simply yielded to, so you can trust that anything that works outside + # the block should work within it. + # + # source://rspec-expectations//lib/rspec/matchers.rb#305 + def aggregate_failures(label = T.unsafe(nil), metadata = T.unsafe(nil), &block); end + + # Passes if the provided matcher passes when checked against all + # elements of the collection. + # + # @example + # expect([1, 3, 5]).to all be_odd + # expect([1, 3, 6]).to all be_odd # fails + # @example + # expect([1, 3, 5]).to all( be_odd.and be_an(Integer) ) + # @note The negative form `not_to all` is not supported. Instead + # use `not_to include` or pass a negative form of a matcher + # as the argument (e.g. `all exclude(:foo)`). + # @note You can also use this with compound matchers as well. + # + # source://rspec-expectations//lib/rspec/matchers.rb#662 + def all(expected); end + + # An alternate form of `contain_exactly` that accepts + # the expected contents as a single array arg rather + # than splatted out as individual items. + # + # @example + # expect(results).to contain_exactly(1, 2) + # # is identical to: + # expect(results).to match_array([1, 2]) + # @see #contain_exactly + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def an_array_matching(*args, **_arg1, &block); end + + # Passes if actual.instance_of?(expected) + # + # @example + # expect(5).to be_an_instance_of(Integer) + # expect(5).not_to be_an_instance_of(Numeric) + # expect(5).not_to be_an_instance_of(Float) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def an_instance_of(*args, **_arg1, &block); end + + # Passes if actual == expected. + # + # See http://www.ruby-doc.org/core/classes/Object.html#M001057 for more + # information about equality in Ruby. + # + # @example + # expect(5).to eq(5) + # expect(5).not_to eq(3) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def an_object_eq_to(*args, **_arg1, &block); end + + # Passes if `actual.eql?(expected)` + # + # See http://www.ruby-doc.org/core/classes/Object.html#M001057 for more + # information about equality in Ruby. + # + # @example + # expect(5).to eql(5) + # expect(5).not_to eql(3) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def an_object_eql_to(*args, **_arg1, &block); end + + # Passes if actual.equal?(expected) (object identity). + # + # See http://www.ruby-doc.org/core/classes/Object.html#M001057 for more + # information about equality in Ruby. + # + # @example + # expect(5).to equal(5) # Integers are equal + # expect("5").not_to equal("5") # Strings that look the same are not the same object + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def an_object_equal_to(*args, **_arg1, &block); end + + # Passes if `actual.exist?` or `actual.exists?` + # + # @example + # expect(File).to exist("path/to/file") + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def an_object_existing(*args, **_arg1, &block); end + + # Passes if actual's attribute values match the expected attributes hash. + # This works no matter how you define your attribute readers. + # + # @example + # Person = Struct.new(:name, :age) + # person = Person.new("Bob", 32) + # + # expect(person).to have_attributes(:name => "Bob", :age => 32) + # expect(person).to have_attributes(:name => a_string_starting_with("B"), :age => (a_value > 30) ) + # @example + # expect(person).to have_attributes(:color => "red") + # @note It will fail if actual doesn't respond to any of the expected attributes. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def an_object_having_attributes(*args, **_arg1, &block); end + + # Given a `Regexp` or `String`, passes if `actual.match(pattern)` + # Given an arbitrary nested data structure (e.g. arrays and hashes), + # matches if `expected === actual` || `actual == expected` for each + # pair of elements. + # + # @example + # expect(email).to match(/^([^\s]+)((?:[-a-z0-9]+\.)+[a-z]{2,})$/i) + # expect(email).to match("@example.com") + # @example + # hash = { + # :a => { + # :b => ["foo", 5], + # :c => { :d => 2.05 } + # } + # } + # + # expect(hash).to match( + # :a => { + # :b => a_collection_containing_exactly( + # a_string_starting_with("f"), + # an_instance_of(Integer) + # ), + # :c => { :d => (a_value < 3) } + # } + # ) + # @note The `match_regex` alias is deprecated and is not recommended for use. + # It was added in 2.12.1 to facilitate its use from within custom + # matchers (due to how the custom matcher DSL was evaluated in 2.x, + # `match` could not be used there), but is no longer needed in 3.x. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def an_object_matching(*args, **_arg1, &block); end + + # Matches if the target object responds to all of the names + # provided. Names can be Strings or Symbols. + # + # @example + # expect("string").to respond_to(:length) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def an_object_responding_to(*args, **_arg1, &block); end + + # Passes if the submitted block returns true. Yields target to the + # block. + # + # Generally speaking, this should be thought of as a last resort when + # you can't find any other way to specify the behaviour you wish to + # specify. + # + # If you do find yourself in such a situation, you could always write + # a custom matcher, which would likely make your specs more expressive. + # + # @example + # expect(5).to satisfy { |n| n > 3 } + # expect(5).to satisfy("be greater than 3") { |n| n > 3 } + # @param description [String] optional description to be used for this matcher. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def an_object_satisfying(*args, **_arg1, &block); end + + # Given true, false, or nil, will pass if actual value is true, false or + # nil (respectively). Given no args means the caller should satisfy an if + # condition (to be or not to be). + # + # Predicates are any Ruby method that ends in a "?" and returns true or + # false. Given be_ followed by arbitrary_predicate (without the "?"), + # RSpec will match convert that into a query against the target object. + # + # The arbitrary_predicate feature will handle any predicate prefixed with + # "be_an_" (e.g. be_an_instance_of), "be_a_" (e.g. be_a_kind_of) or "be_" + # (e.g. be_empty), letting you choose the prefix that best suits the + # predicate. + # + # @example + # expect(actual).to be_truthy + # expect(actual).to be_falsey + # expect(actual).to be_nil + # expect(actual).to be_[arbitrary_predicate](*args) + # expect(actual).not_to be_nil + # expect(actual).not_to be_[arbitrary_predicate](*args) + # + # source://rspec-expectations//lib/rspec/matchers.rb#349 + def be(*args); end + + # passes if target.kind_of?(klass) + # + # source://rspec-expectations//lib/rspec/matchers.rb#355 + def be_a(klass); end + + # Passes if actual.kind_of?(expected) + # + # @example + # expect(5).to be_a_kind_of(Integer) + # expect(5).to be_a_kind_of(Numeric) + # expect(5).not_to be_a_kind_of(Float) + # + # source://rspec-expectations//lib/rspec/matchers.rb#378 + def be_a_kind_of(expected); end + + # passes if target.kind_of?(klass) + # + # source://rspec-expectations//lib/rspec/matchers.rb#355 + def be_an(klass); end + + # Passes if actual.instance_of?(expected) + # + # @example + # expect(5).to be_an_instance_of(Integer) + # expect(5).not_to be_an_instance_of(Numeric) + # expect(5).not_to be_an_instance_of(Float) + # + # source://rspec-expectations//lib/rspec/matchers.rb#366 + def be_an_instance_of(expected); end + + # Passes if actual.between?(min, max). Works with any Comparable object, + # including String, Symbol, Time, or Numeric (Fixnum, Bignum, Integer, + # Float, Complex, and Rational). + # + # By default, `be_between` is inclusive (i.e. passes when given either the max or min value), + # but you can make it `exclusive` by chaining that off the matcher. + # + # @example + # expect(5).to be_between(1, 10) + # expect(11).not_to be_between(1, 10) + # expect(10).not_to be_between(1, 10).exclusive + # + # source://rspec-expectations//lib/rspec/matchers.rb#395 + def be_between(min, max); end + + # Passes if actual is falsey (false or nil) + # + # source://rspec-expectations//lib/rspec/matchers.rb#316 + def be_falsey; end + + # Passes if actual is falsey (false or nil) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def be_falsy(*args, **_arg1, &block); end + + # Passes if actual.instance_of?(expected) + # + # @example + # expect(5).to be_an_instance_of(Integer) + # expect(5).not_to be_an_instance_of(Numeric) + # expect(5).not_to be_an_instance_of(Float) + # + # source://rspec-expectations//lib/rspec/matchers.rb#366 + def be_instance_of(expected); end + + # Passes if actual.kind_of?(expected) + # + # @example + # expect(5).to be_a_kind_of(Integer) + # expect(5).to be_a_kind_of(Numeric) + # expect(5).not_to be_a_kind_of(Float) + # + # source://rspec-expectations//lib/rspec/matchers.rb#378 + def be_kind_of(expected); end + + # Passes if actual is nil + # + # source://rspec-expectations//lib/rspec/matchers.rb#324 + def be_nil; end + + # Passes if actual is truthy (anything but false or nil) + # + # source://rspec-expectations//lib/rspec/matchers.rb#310 + def be_truthy; end + + # Passes if actual == expected +/- delta + # + # @example + # expect(result).to be_within(0.5).of(3.0) + # expect(result).not_to be_within(0.5).of(3.0) + # + # source://rspec-expectations//lib/rspec/matchers.rb#405 + def be_within(delta); end + + # Applied to a proc, specifies that its execution will cause some value to + # change. + # + # You can either pass receiver and message, or a block, + # but not both. + # + # When passing a block, it must use the `{ ... }` format, not + # do/end, as `{ ... }` binds to the `change` method, whereas do/end + # would errantly bind to the `expect(..).to` or `expect(...).not_to` method. + # + # You can chain any of the following off of the end to specify details + # about the change: + # + # * `from` + # * `to` + # + # or any one of: + # + # * `by` + # * `by_at_least` + # * `by_at_most` + # + # == Notes + # + # Evaluates `receiver.message` or `block` before and after it + # evaluates the block passed to `expect`. If the value is the same + # object, its before/after `hash` value is used to see if it has changed. + # Therefore, your object needs to properly implement `hash` to work correctly + # with this matcher. + # + # `expect( ... ).not_to change` supports the form that specifies `from` + # (which specifies what you expect the starting, unchanged value to be) + # but does not support forms with subsequent calls to `by`, `by_at_least`, + # `by_at_most` or `to`. + # + # @example + # expect { + # team.add_player(player) + # }.to change(roster, :count) + # + # expect { + # team.add_player(player) + # }.to change(roster, :count).by(1) + # + # expect { + # team.add_player(player) + # }.to change(roster, :count).by_at_least(1) + # + # expect { + # team.add_player(player) + # }.to change(roster, :count).by_at_most(1) + # + # string = "string" + # expect { + # string.reverse! + # }.to change { string }.from("string").to("gnirts") + # + # string = "string" + # expect { + # string + # }.not_to change { string }.from("string") + # + # expect { + # person.happy_birthday + # }.to change(person, :birthday).from(32).to(33) + # + # expect { + # employee.develop_great_new_social_networking_app + # }.to change(employee, :title).from("Mail Clerk").to("CEO") + # + # expect { + # doctor.leave_office + # }.to change(doctor, :sign).from(/is in/).to(/is out/) + # + # user = User.new(:type => "admin") + # expect { + # user.symbolize_type + # }.to change(user, :type).from(String).to(Symbol) + # @param receiver [Object] + # @param message [Symbol] the message to send the receiver + # + # source://rspec-expectations//lib/rspec/matchers.rb#492 + def change(receiver = T.unsafe(nil), message = T.unsafe(nil), &block); end + + # Applied to a proc, specifies that its execution will cause some value to + # change. + # + # You can either pass receiver and message, or a block, + # but not both. + # + # When passing a block, it must use the `{ ... }` format, not + # do/end, as `{ ... }` binds to the `change` method, whereas do/end + # would errantly bind to the `expect(..).to` or `expect(...).not_to` method. + # + # You can chain any of the following off of the end to specify details + # about the change: + # + # * `from` + # * `to` + # + # or any one of: + # + # * `by` + # * `by_at_least` + # * `by_at_most` + # + # == Notes + # + # Evaluates `receiver.message` or `block` before and after it + # evaluates the block passed to `expect`. If the value is the same + # object, its before/after `hash` value is used to see if it has changed. + # Therefore, your object needs to properly implement `hash` to work correctly + # with this matcher. + # + # `expect( ... ).not_to change` supports the form that specifies `from` + # (which specifies what you expect the starting, unchanged value to be) + # but does not support forms with subsequent calls to `by`, `by_at_least`, + # `by_at_most` or `to`. + # + # @example + # expect { + # team.add_player(player) + # }.to change(roster, :count) + # + # expect { + # team.add_player(player) + # }.to change(roster, :count).by(1) + # + # expect { + # team.add_player(player) + # }.to change(roster, :count).by_at_least(1) + # + # expect { + # team.add_player(player) + # }.to change(roster, :count).by_at_most(1) + # + # string = "string" + # expect { + # string.reverse! + # }.to change { string }.from("string").to("gnirts") + # + # string = "string" + # expect { + # string + # }.not_to change { string }.from("string") + # + # expect { + # person.happy_birthday + # }.to change(person, :birthday).from(32).to(33) + # + # expect { + # employee.develop_great_new_social_networking_app + # }.to change(employee, :title).from("Mail Clerk").to("CEO") + # + # expect { + # doctor.leave_office + # }.to change(doctor, :sign).from(/is in/).to(/is out/) + # + # user = User.new(:type => "admin") + # expect { + # user.symbolize_type + # }.to change(user, :type).from(String).to(Symbol) + # @param receiver [Object] + # @param message [Symbol] the message to send the receiver + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def changing(*args, **_arg1, &block); end + + # Passes if actual contains all of the expected regardless of order. + # This works for collections. Pass in multiple args and it will only + # pass if all args are found in collection. + # + # @example + # expect([1, 2, 3]).to contain_exactly(1, 2, 3) + # expect([1, 2, 3]).to contain_exactly(1, 3, 2) + # @note This is also available using the `=~` operator with `should`, + # but `=~` is not supported with `expect`. + # @see #match_array + # + # source://rspec-expectations//lib/rspec/matchers.rb#510 + def contain_exactly(*items); end + + # Passes if actual contains all of the expected regardless of order. + # This works for collections. Pass in multiple args and it will only + # pass if all args are found in collection. + # + # @example + # expect([1, 2, 3]).to contain_exactly(1, 2, 3) + # expect([1, 2, 3]).to contain_exactly(1, 3, 2) + # @note This is also available using the `=~` operator with `should`, + # but `=~` is not supported with `expect`. + # @see #match_array + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def containing_exactly(*args, **_arg1, &block); end + + # Passes if actual covers expected. This works for + # Ranges. You can also pass in multiple args + # and it will only pass if all args are found in Range. + # + # ### Warning:: Ruby >= 1.9 only + # + # @example + # expect(1..10).to cover(5) + # expect(1..10).to cover(4, 6) + # expect(1..10).to cover(4, 6, 11) # fails + # expect(1..10).not_to cover(11) + # expect(1..10).not_to cover(5) # fails + # + # source://rspec-expectations//lib/rspec/matchers.rb#528 + def cover(*values); end + + # Passes if actual covers expected. This works for + # Ranges. You can also pass in multiple args + # and it will only pass if all args are found in Range. + # + # ### Warning:: Ruby >= 1.9 only + # + # @example + # expect(1..10).to cover(5) + # expect(1..10).to cover(4, 6) + # expect(1..10).to cover(4, 6, 11) # fails + # expect(1..10).not_to cover(11) + # expect(1..10).not_to cover(5) # fails + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def covering(*args, **_arg1, &block); end + + # Matches if the actual value ends with the expected value(s). In the case + # of a string, matches against the last `expected.length` characters of the + # actual string. In the case of an array, matches against the last + # `expected.length` elements of the actual array. + # + # @example + # expect("this string").to end_with "string" + # expect([0, 1, 2, 3, 4]).to end_with 4 + # expect([0, 2, 3, 4, 4]).to end_with 3, 4 + # + # source://rspec-expectations//lib/rspec/matchers.rb#543 + def end_with(*expected); end + + # Matches if the actual value ends with the expected value(s). In the case + # of a string, matches against the last `expected.length` characters of the + # actual string. In the case of an array, matches against the last + # `expected.length` elements of the actual array. + # + # @example + # expect("this string").to end_with "string" + # expect([0, 1, 2, 3, 4]).to end_with 4 + # expect([0, 2, 3, 4, 4]).to end_with 3, 4 + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def ending_with(*args, **_arg1, &block); end + + # Passes if actual == expected. + # + # See http://www.ruby-doc.org/core/classes/Object.html#M001057 for more + # information about equality in Ruby. + # + # @example + # expect(5).to eq(5) + # expect(5).not_to eq(3) + # + # source://rspec-expectations//lib/rspec/matchers.rb#558 + def eq(expected); end + + # Passes if actual == expected. + # + # See http://www.ruby-doc.org/core/classes/Object.html#M001057 for more + # information about equality in Ruby. + # + # @example + # expect(5).to eq(5) + # expect(5).not_to eq(3) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def eq_to(*args, **_arg1, &block); end + + # Passes if `actual.eql?(expected)` + # + # See http://www.ruby-doc.org/core/classes/Object.html#M001057 for more + # information about equality in Ruby. + # + # @example + # expect(5).to eql(5) + # expect(5).not_to eql(3) + # + # source://rspec-expectations//lib/rspec/matchers.rb#572 + def eql(expected); end + + # Passes if `actual.eql?(expected)` + # + # See http://www.ruby-doc.org/core/classes/Object.html#M001057 for more + # information about equality in Ruby. + # + # @example + # expect(5).to eql(5) + # expect(5).not_to eql(3) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def eql_to(*args, **_arg1, &block); end + + # Passes if actual.equal?(expected) (object identity). + # + # See http://www.ruby-doc.org/core/classes/Object.html#M001057 for more + # information about equality in Ruby. + # + # @example + # expect(5).to equal(5) # Integers are equal + # expect("5").not_to equal("5") # Strings that look the same are not the same object + # + # source://rspec-expectations//lib/rspec/matchers.rb#586 + def equal(expected); end + + # Passes if actual.equal?(expected) (object identity). + # + # See http://www.ruby-doc.org/core/classes/Object.html#M001057 for more + # information about equality in Ruby. + # + # @example + # expect(5).to equal(5) # Integers are equal + # expect("5").not_to equal("5") # Strings that look the same are not the same object + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def equal_to(*args, **_arg1, &block); end + + # Passes if `actual.exist?` or `actual.exists?` + # + # @example + # expect(File).to exist("path/to/file") + # + # source://rspec-expectations//lib/rspec/matchers.rb#596 + def exist(*args); end + + # Passes if `actual.exist?` or `actual.exists?` + # + # @example + # expect(File).to exist("path/to/file") + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def existing(*args, **_arg1, &block); end + + # Supports `expect(actual).to matcher` syntax by wrapping `actual` in an + # `ExpectationTarget`. + # + # @example + # expect(actual).to eq(expected) + # expect(actual).not_to eq(expected) + # @return [Expectations::ExpectationTarget] + # @see Expectations::ExpectationTarget#to + # @see Expectations::ExpectationTarget#not_to + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#72 + def expect(value = T.unsafe(nil), &block); end + + # Passes if actual's attribute values match the expected attributes hash. + # This works no matter how you define your attribute readers. + # + # @example + # Person = Struct.new(:name, :age) + # person = Person.new("Bob", 32) + # + # expect(person).to have_attributes(:name => "Bob", :age => 32) + # expect(person).to have_attributes(:name => a_string_starting_with("B"), :age => (a_value > 30) ) + # @example + # expect(person).to have_attributes(:color => "red") + # @note It will fail if actual doesn't respond to any of the expected attributes. + # + # source://rspec-expectations//lib/rspec/matchers.rb#616 + def have_attributes(expected); end + + # Passes if actual's attribute values match the expected attributes hash. + # This works no matter how you define your attribute readers. + # + # @example + # Person = Struct.new(:name, :age) + # person = Person.new("Bob", 32) + # + # expect(person).to have_attributes(:name => "Bob", :age => 32) + # expect(person).to have_attributes(:name => a_string_starting_with("B"), :age => (a_value > 30) ) + # @example + # expect(person).to have_attributes(:color => "red") + # @note It will fail if actual doesn't respond to any of the expected attributes. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def having_attributes(*args, **_arg1, &block); end + + # Passes if actual includes expected. This works for + # collections and Strings. You can also pass in multiple args + # and it will only pass if all args are found in collection. + # + # @example + # expect([1,2,3]).to include(3) + # expect([1,2,3]).to include(2,3) + # expect([1,2,3]).to include(2,3,4) # fails + # expect([1,2,3]).not_to include(4) + # expect("spread").to include("read") + # expect("spread").not_to include("red") + # expect(:a => 1, :b => 2).to include(:a) + # expect(:a => 1, :b => 2).to include(:a, :b) + # expect(:a => 1, :b => 2).to include(:a => 1) + # expect(:a => 1, :b => 2).to include(:b => 2, :a => 1) + # expect(:a => 1, :b => 2).to include(:c) # fails + # expect(:a => 1, :b => 2).not_to include(:a => 2) + # + # source://rspec-expectations//lib/rspec/matchers.rb#639 + def include(*expected); end + + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#75 + def include_json(*expected, &block_arg); end + + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#75 + def include_unordered_json(*expected, &block_arg); end + + # Passes if actual includes expected. This works for + # collections and Strings. You can also pass in multiple args + # and it will only pass if all args are found in collection. + # + # @example + # expect([1,2,3]).to include(3) + # expect([1,2,3]).to include(2,3) + # expect([1,2,3]).to include(2,3,4) # fails + # expect([1,2,3]).not_to include(4) + # expect("spread").to include("read") + # expect("spread").not_to include("red") + # expect(:a => 1, :b => 2).to include(:a) + # expect(:a => 1, :b => 2).to include(:a, :b) + # expect(:a => 1, :b => 2).to include(:a => 1) + # expect(:a => 1, :b => 2).to include(:b => 2, :a => 1) + # expect(:a => 1, :b => 2).to include(:c) # fails + # expect(:a => 1, :b => 2).not_to include(:a => 2) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def including(*args, **_arg1, &block); end + + # Given a `Regexp` or `String`, passes if `actual.match(pattern)` + # Given an arbitrary nested data structure (e.g. arrays and hashes), + # matches if `expected === actual` || `actual == expected` for each + # pair of elements. + # + # @example + # expect(email).to match(/^([^\s]+)((?:[-a-z0-9]+\.)+[a-z]{2,})$/i) + # expect(email).to match("@example.com") + # @example + # hash = { + # :a => { + # :b => ["foo", 5], + # :c => { :d => 2.05 } + # } + # } + # + # expect(hash).to match( + # :a => { + # :b => a_collection_containing_exactly( + # a_string_starting_with("f"), + # an_instance_of(Integer) + # ), + # :c => { :d => (a_value < 3) } + # } + # ) + # @note The `match_regex` alias is deprecated and is not recommended for use. + # It was added in 2.12.1 to facilitate its use from within custom + # matchers (due to how the custom matcher DSL was evaluated in 2.x, + # `match` could not be used there), but is no longer needed in 3.x. + # + # source://rspec-expectations//lib/rspec/matchers.rb#697 + def match(expected); end + + # An alternate form of `contain_exactly` that accepts + # the expected contents as a single array arg rather + # than splatted out as individual items. + # + # @example + # expect(results).to contain_exactly(1, 2) + # # is identical to: + # expect(results).to match_array([1, 2]) + # @see #contain_exactly + # + # source://rspec-expectations//lib/rspec/matchers.rb#715 + def match_array(items); end + + # Given a `Regexp` or `String`, passes if `actual.match(pattern)` + # Given an arbitrary nested data structure (e.g. arrays and hashes), + # matches if `expected === actual` || `actual == expected` for each + # pair of elements. + # + # @example + # expect(email).to match(/^([^\s]+)((?:[-a-z0-9]+\.)+[a-z]{2,})$/i) + # expect(email).to match("@example.com") + # @example + # hash = { + # :a => { + # :b => ["foo", 5], + # :c => { :d => 2.05 } + # } + # } + # + # expect(hash).to match( + # :a => { + # :b => a_collection_containing_exactly( + # a_string_starting_with("f"), + # an_instance_of(Integer) + # ), + # :c => { :d => (a_value < 3) } + # } + # ) + # @note The `match_regex` alias is deprecated and is not recommended for use. + # It was added in 2.12.1 to facilitate its use from within custom + # matchers (due to how the custom matcher DSL was evaluated in 2.x, + # `match` could not be used there), but is no longer needed in 3.x. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def match_regex(*args, **_arg1, &block); end + + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#75 + def match_unordered_json(*expected, &block_arg); end + + # Given a `Regexp` or `String`, passes if `actual.match(pattern)` + # Given an arbitrary nested data structure (e.g. arrays and hashes), + # matches if `expected === actual` || `actual == expected` for each + # pair of elements. + # + # @example + # expect(email).to match(/^([^\s]+)((?:[-a-z0-9]+\.)+[a-z]{2,})$/i) + # expect(email).to match("@example.com") + # @example + # hash = { + # :a => { + # :b => ["foo", 5], + # :c => { :d => 2.05 } + # } + # } + # + # expect(hash).to match( + # :a => { + # :b => a_collection_containing_exactly( + # a_string_starting_with("f"), + # an_instance_of(Integer) + # ), + # :c => { :d => (a_value < 3) } + # } + # ) + # @note The `match_regex` alias is deprecated and is not recommended for use. + # It was added in 2.12.1 to facilitate its use from within custom + # matchers (due to how the custom matcher DSL was evaluated in 2.x, + # `match` could not be used there), but is no longer needed in 3.x. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def matching(*args, **_arg1, &block); end + + # With no arg, passes if the block outputs `to_stdout` or `to_stderr`. + # With a string, passes if the block outputs that specific string `to_stdout` or `to_stderr`. + # With a regexp or matcher, passes if the block outputs a string `to_stdout` or `to_stderr` that matches. + # + # To capture output from any spawned subprocess as well, use `to_stdout_from_any_process` or + # `to_stderr_from_any_process`. Output from any process that inherits the main process's corresponding + # standard stream will be captured. + # + # @example + # expect { print 'foo' }.to output.to_stdout + # expect { print 'foo' }.to output('foo').to_stdout + # expect { print 'foo' }.to output(/foo/).to_stdout + # + # expect { do_something }.to_not output.to_stdout + # + # expect { warn('foo') }.to output.to_stderr + # expect { warn('foo') }.to output('foo').to_stderr + # expect { warn('foo') }.to output(/foo/).to_stderr + # + # expect { do_something }.to_not output.to_stderr + # + # expect { system('echo foo') }.to output("foo\n").to_stdout_from_any_process + # expect { system('echo foo', out: :err) }.to output("foo\n").to_stderr_from_any_process + # @note `to_stdout` and `to_stderr` work by temporarily replacing `$stdout` or `$stderr`, + # so they're not able to intercept stream output that explicitly uses `STDOUT`/`STDERR` + # or that uses a reference to `$stdout`/`$stderr` that was stored before the + # matcher was used. + # @note `to_stdout_from_any_process` and `to_stderr_from_any_process` use Tempfiles, and + # are thus significantly (~30x) slower than `to_stdout` and `to_stderr`. + # + # source://rspec-expectations//lib/rspec/matchers.rb#752 + def output(expected = T.unsafe(nil)); end + + # With no args, matches if any error is raised. + # With a named error, matches only if that specific error is raised. + # With a named error and message specified as a String, matches only if both match. + # With a named error and message specified as a Regexp, matches only if both match. + # Pass an optional block to perform extra verifications on the exception matched + # + # @example + # expect { do_something_risky }.to raise_error + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError) + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError) { |error| expect(error.data).to eq 42 } + # expect { do_something_risky }.to raise_error { |error| expect(error.data).to eq 42 } + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError, "that was too risky") + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError, /oo ri/) + # expect { do_something_risky }.to raise_error("that was too risky") + # + # expect { do_something_risky }.not_to raise_error + # + # source://rspec-expectations//lib/rspec/matchers.rb#773 + def raise_error(error = T.unsafe(nil), message = T.unsafe(nil), &block); end + + # With no args, matches if any error is raised. + # With a named error, matches only if that specific error is raised. + # With a named error and message specified as a String, matches only if both match. + # With a named error and message specified as a Regexp, matches only if both match. + # Pass an optional block to perform extra verifications on the exception matched + # + # @example + # expect { do_something_risky }.to raise_error + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError) + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError) { |error| expect(error.data).to eq 42 } + # expect { do_something_risky }.to raise_error { |error| expect(error.data).to eq 42 } + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError, "that was too risky") + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError, /oo ri/) + # expect { do_something_risky }.to raise_error("that was too risky") + # + # expect { do_something_risky }.not_to raise_error + # + # source://rspec-expectations//lib/rspec/matchers.rb#773 + def raise_exception(error = T.unsafe(nil), message = T.unsafe(nil), &block); end + + # With no args, matches if any error is raised. + # With a named error, matches only if that specific error is raised. + # With a named error and message specified as a String, matches only if both match. + # With a named error and message specified as a Regexp, matches only if both match. + # Pass an optional block to perform extra verifications on the exception matched + # + # @example + # expect { do_something_risky }.to raise_error + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError) + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError) { |error| expect(error.data).to eq 42 } + # expect { do_something_risky }.to raise_error { |error| expect(error.data).to eq 42 } + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError, "that was too risky") + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError, /oo ri/) + # expect { do_something_risky }.to raise_error("that was too risky") + # + # expect { do_something_risky }.not_to raise_error + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def raising(*args, **_arg1, &block); end + + # Matches if the target object responds to all of the names + # provided. Names can be Strings or Symbols. + # + # @example + # expect("string").to respond_to(:length) + # + # source://rspec-expectations//lib/rspec/matchers.rb#792 + def respond_to(*names); end + + # Matches if the target object responds to all of the names + # provided. Names can be Strings or Symbols. + # + # @example + # expect("string").to respond_to(:length) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def responding_to(*args, **_arg1, &block); end + + # Passes if the submitted block returns true. Yields target to the + # block. + # + # Generally speaking, this should be thought of as a last resort when + # you can't find any other way to specify the behaviour you wish to + # specify. + # + # If you do find yourself in such a situation, you could always write + # a custom matcher, which would likely make your specs more expressive. + # + # @example + # expect(5).to satisfy { |n| n > 3 } + # expect(5).to satisfy("be greater than 3") { |n| n > 3 } + # @param description [String] optional description to be used for this matcher. + # + # source://rspec-expectations//lib/rspec/matchers.rb#813 + def satisfy(description = T.unsafe(nil), &block); end + + # Passes if the submitted block returns true. Yields target to the + # block. + # + # Generally speaking, this should be thought of as a last resort when + # you can't find any other way to specify the behaviour you wish to + # specify. + # + # If you do find yourself in such a situation, you could always write + # a custom matcher, which would likely make your specs more expressive. + # + # @example + # expect(5).to satisfy { |n| n > 3 } + # expect(5).to satisfy("be greater than 3") { |n| n > 3 } + # @param description [String] optional description to be used for this matcher. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def satisfying(*args, **_arg1, &block); end + + # Matches if the actual value starts with the expected value(s). In the + # case of a string, matches against the first `expected.length` characters + # of the actual string. In the case of an array, matches against the first + # `expected.length` elements of the actual array. + # + # @example + # expect("this string").to start_with "this s" + # expect([0, 1, 2, 3, 4]).to start_with 0 + # expect([0, 2, 3, 4, 4]).to start_with 0, 1 + # + # source://rspec-expectations//lib/rspec/matchers.rb#828 + def start_with(*expected); end + + # Matches if the actual value starts with the expected value(s). In the + # case of a string, matches against the first `expected.length` characters + # of the actual string. In the case of an array, matches against the first + # `expected.length` elements of the actual array. + # + # @example + # expect("this string").to start_with "this s" + # expect([0, 1, 2, 3, 4]).to start_with 0 + # expect([0, 2, 3, 4, 4]).to start_with 0, 1 + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def starting_with(*args, **_arg1, &block); end + + # Given no argument, matches if a proc throws any Symbol. + # + # Given a Symbol, matches if the given proc throws the specified Symbol. + # + # Given a Symbol and an arg, matches if the given proc throws the + # specified Symbol with the specified arg. + # + # @example + # expect { do_something_risky }.to throw_symbol + # expect { do_something_risky }.to throw_symbol(:that_was_risky) + # expect { do_something_risky }.to throw_symbol(:that_was_risky, 'culprit') + # + # expect { do_something_risky }.not_to throw_symbol + # expect { do_something_risky }.not_to throw_symbol(:that_was_risky) + # expect { do_something_risky }.not_to throw_symbol(:that_was_risky, 'culprit') + # + # source://rspec-expectations//lib/rspec/matchers.rb#850 + def throw_symbol(expected_symbol = T.unsafe(nil), expected_arg = T.unsafe(nil)); end + + # Given no argument, matches if a proc throws any Symbol. + # + # Given a Symbol, matches if the given proc throws the specified Symbol. + # + # Given a Symbol and an arg, matches if the given proc throws the + # specified Symbol with the specified arg. + # + # @example + # expect { do_something_risky }.to throw_symbol + # expect { do_something_risky }.to throw_symbol(:that_was_risky) + # expect { do_something_risky }.to throw_symbol(:that_was_risky, 'culprit') + # + # expect { do_something_risky }.not_to throw_symbol + # expect { do_something_risky }.not_to throw_symbol(:that_was_risky) + # expect { do_something_risky }.not_to throw_symbol(:that_was_risky, 'culprit') + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def throwing(*args, **_arg1, &block); end + + # Passes if actual == expected +/- delta + # + # @example + # expect(result).to be_within(0.5).of(3.0) + # expect(result).not_to be_within(0.5).of(3.0) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def within(*args, **_arg1, &block); end + + # Passes if the method called in the expect block yields, regardless + # of whether or not arguments are yielded. + # + # @example + # expect { |b| 5.tap(&b) }.to yield_control + # expect { |b| "a".to_sym(&b) }.not_to yield_control + # @note Your expect block must accept a parameter and pass it on to + # the method-under-test as a block. + # + # source://rspec-expectations//lib/rspec/matchers.rb#871 + def yield_control; end + + # Designed for use with methods that repeatedly yield (such as + # iterators). Passes if the method called in the expect block yields + # multiple times with arguments matching those given. + # + # Argument matching is done using `===` (the case match operator) + # and `==`. If the expected and actual arguments match with either + # operator, the matcher will pass. + # + # @example + # expect { |b| [1, 2, 3].each(&b) }.to yield_successive_args(1, 2, 3) + # expect { |b| { :a => 1, :b => 2 }.each(&b) }.to yield_successive_args([:a, 1], [:b, 2]) + # expect { |b| [1, 2, 3].each(&b) }.not_to yield_successive_args(1, 2) + # @note Your expect block must accept a parameter and pass it on to + # the method-under-test as a block. + # + # source://rspec-expectations//lib/rspec/matchers.rb#940 + def yield_successive_args(*args); end + + # Given no arguments, matches if the method called in the expect + # block yields with arguments (regardless of what they are or how + # many there are). + # + # Given arguments, matches if the method called in the expect block + # yields with arguments that match the given arguments. + # + # Argument matching is done using `===` (the case match operator) + # and `==`. If the expected and actual arguments match with either + # operator, the matcher will pass. + # + # @example + # expect { |b| 5.tap(&b) }.to yield_with_args # because #tap yields an arg + # expect { |b| 5.tap(&b) }.to yield_with_args(5) # because 5 == 5 + # expect { |b| 5.tap(&b) }.to yield_with_args(Integer) # because Integer === 5 + # expect { |b| File.open("f.txt", &b) }.to yield_with_args(/txt/) # because /txt/ === "f.txt" + # + # expect { |b| User.transaction(&b) }.not_to yield_with_args # because it yields no args + # expect { |b| 5.tap(&b) }.not_to yield_with_args(1, 2, 3) + # @note Your expect block must accept a parameter and pass it on to + # the method-under-test as a block. + # @note This matcher is not designed for use with methods that yield + # multiple times. + # + # source://rspec-expectations//lib/rspec/matchers.rb#919 + def yield_with_args(*args); end + + # Passes if the method called in the expect block yields with + # no arguments. Fails if it does not yield, or yields with arguments. + # + # @example + # expect { |b| User.transaction(&b) }.to yield_with_no_args + # expect { |b| 5.tap(&b) }.not_to yield_with_no_args # because it yields with `5` + # expect { |b| "a".to_sym(&b) }.not_to yield_with_no_args # because it does not yield + # @note Your expect block must accept a parameter and pass it on to + # the method-under-test as a block. + # @note This matcher is not designed for use with methods that yield + # multiple times. + # + # source://rspec-expectations//lib/rspec/matchers.rb#889 + def yield_with_no_args; end + + # Passes if the method called in the expect block yields, regardless + # of whether or not arguments are yielded. + # + # @example + # expect { |b| 5.tap(&b) }.to yield_control + # expect { |b| "a".to_sym(&b) }.not_to yield_control + # @note Your expect block must accept a parameter and pass it on to + # the method-under-test as a block. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def yielding_control(*args, **_arg1, &block); end + + # Designed for use with methods that repeatedly yield (such as + # iterators). Passes if the method called in the expect block yields + # multiple times with arguments matching those given. + # + # Argument matching is done using `===` (the case match operator) + # and `==`. If the expected and actual arguments match with either + # operator, the matcher will pass. + # + # @example + # expect { |b| [1, 2, 3].each(&b) }.to yield_successive_args(1, 2, 3) + # expect { |b| { :a => 1, :b => 2 }.each(&b) }.to yield_successive_args([:a, 1], [:b, 2]) + # expect { |b| [1, 2, 3].each(&b) }.not_to yield_successive_args(1, 2) + # @note Your expect block must accept a parameter and pass it on to + # the method-under-test as a block. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def yielding_successive_args(*args, **_arg1, &block); end + + # Given no arguments, matches if the method called in the expect + # block yields with arguments (regardless of what they are or how + # many there are). + # + # Given arguments, matches if the method called in the expect block + # yields with arguments that match the given arguments. + # + # Argument matching is done using `===` (the case match operator) + # and `==`. If the expected and actual arguments match with either + # operator, the matcher will pass. + # + # @example + # expect { |b| 5.tap(&b) }.to yield_with_args # because #tap yields an arg + # expect { |b| 5.tap(&b) }.to yield_with_args(5) # because 5 == 5 + # expect { |b| 5.tap(&b) }.to yield_with_args(Integer) # because Integer === 5 + # expect { |b| File.open("f.txt", &b) }.to yield_with_args(/txt/) # because /txt/ === "f.txt" + # + # expect { |b| User.transaction(&b) }.not_to yield_with_args # because it yields no args + # expect { |b| 5.tap(&b) }.not_to yield_with_args(1, 2, 3) + # @note Your expect block must accept a parameter and pass it on to + # the method-under-test as a block. + # @note This matcher is not designed for use with methods that yield + # multiple times. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def yielding_with_args(*args, **_arg1, &block); end + + # Passes if the method called in the expect block yields with + # no arguments. Fails if it does not yield, or yields with arguments. + # + # @example + # expect { |b| User.transaction(&b) }.to yield_with_no_args + # expect { |b| 5.tap(&b) }.not_to yield_with_no_args # because it yields with `5` + # expect { |b| "a".to_sym(&b) }.not_to yield_with_no_args # because it does not yield + # @note Your expect block must accept a parameter and pass it on to + # the method-under-test as a block. + # @note This matcher is not designed for use with methods that yield + # multiple times. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def yielding_with_no_args(*args, **_arg1, &block); end + + private + + # source://rspec-expectations//lib/rspec/matchers.rb#961 + def method_missing(method, *args, **_arg2, &block); end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers.rb#974 + def respond_to_missing?(method, *_arg1); end + + class << self + # Extended from {RSpec::Matchers::DSL#alias_matcher}. + # + # source://rspec-expectations//lib/rspec/matchers.rb#250 + def alias_matcher(*args, &block); end + + # Used by rspec-core to clear the state used to generate + # descriptions after an example. + # + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/generated_descriptions.rb#11 + def clear_generated_description; end + + # Delegates to {RSpec::Expectations.configuration}. + # This is here because rspec-core's `expect_with` option + # looks for a `configuration` method on the mixin + # (`RSpec::Matchers`) to yield to a block. + # + # @return [RSpec::Expectations::Configuration] the configuration object + # + # source://rspec-expectations//lib/rspec/matchers.rb#951 + def configuration; end + + # Generates an an example description based on the last expectation. + # Used by rspec-core's one-liner syntax. + # + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/generated_descriptions.rb#19 + def generated_description; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers.rb#1008 + def is_a_describable_matcher?(obj); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers.rb#988 + def is_a_matcher?(obj); end + + # @private + # + # source://rspec-expectations//lib/rspec/matchers/generated_descriptions.rb#25 + def last_description; end + + # @private + # + # source://rspec-expectations//lib/rspec/matchers/generated_descriptions.rb#5 + def last_expectation_handler; end + + # @private + # + # source://rspec-expectations//lib/rspec/matchers/generated_descriptions.rb#5 + def last_expectation_handler=(_arg0); end + + # @private + # + # source://rspec-expectations//lib/rspec/matchers/generated_descriptions.rb#5 + def last_matcher; end + + # @private + # + # source://rspec-expectations//lib/rspec/matchers/generated_descriptions.rb#5 + def last_matcher=(_arg0); end + end +end + +# Decorator that wraps a matcher and overrides `description` +# using the provided block in order to support an alias +# of a matcher. This is intended for use when composing +# matchers, so that you can use an expression like +# `include( a_value_within(0.1).of(3) )` rather than +# `include( be_within(0.1).of(3) )`, and have the corresponding +# description read naturally. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#12 +class RSpec::Matchers::AliasedMatcher < ::RSpec::Matchers::MatcherDelegator + # @api private + # @return [AliasedMatcher] a new instance of AliasedMatcher + # + # source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#13 + def initialize(base_matcher, description_block); end + + # Provides the description of the aliased matcher. Aliased matchers + # are designed to behave identically to the original matcher except + # for the description and failure messages. The description is different + # to reflect the aliased name. + # + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#36 + def description; end + + # Provides the failure_message of the aliased matcher. Aliased matchers + # are designed to behave identically to the original matcher except + # for the description and failure messages. The failure_message is different + # to reflect the aliased name. + # + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#46 + def failure_message; end + + # Provides the failure_message_when_negated of the aliased matcher. Aliased matchers + # are designed to behave identically to the original matcher except + # for the description and failure messages. The failure_message_when_negated is different + # to reflect the aliased name. + # + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#56 + def failure_message_when_negated; end + + # Forward messages on to the wrapped matcher. + # Since many matchers provide a fluent interface + # (e.g. `a_value_within(0.1).of(3)`), we need to wrap + # the returned value if it responds to `description`, + # so that our override can be applied when it is eventually + # used. + # + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#24 + def method_missing(*_arg0); end +end + +# Decorator used for matchers that have special implementations of +# operators like `==` and `===`. +# +# @private +# +# source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#64 +class RSpec::Matchers::AliasedMatcherWithOperatorSupport < ::RSpec::Matchers::AliasedMatcher; end + +# @private +# +# source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#71 +class RSpec::Matchers::AliasedNegatedMatcher < ::RSpec::Matchers::AliasedMatcher + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#80 + def does_not_match?(*args, &block); end + + # source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#84 + def failure_message; end + + # source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#88 + def failure_message_when_negated; end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#72 + def matches?(*args, &block); end + + private + + # For a matcher that uses the default failure messages, we prefer to + # use the override provided by the `description_block`, because it + # includes the phrasing that the user has expressed a preference for + # by going through the effort of defining a negated matcher. + # + # However, if the override didn't actually change anything, then we + # should return the opposite failure message instead -- the overridden + # message is going to be confusing if we return it as-is, as it represents + # the non-negated failure message for a negated match (or vice versa). + # + # source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#105 + def optimal_failure_message(same, inverted); end +end + +# source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#94 +RSpec::Matchers::AliasedNegatedMatcher::DefaultFailureMessages = RSpec::Matchers::BuiltIn::BaseMatcher::DefaultFailureMessages + +# source://rspec-expectations//lib/rspec/matchers.rb#957 +RSpec::Matchers::BE_PREDICATE_REGEX = T.let(T.unsafe(nil), Regexp) + +# Provides a base class with as little methods as possible, so that +# most methods can be delegated via `method_missing`. +# +# On Ruby 2.0+ BasicObject could be used for this purpose, but it +# introduce some extra complexity with constant resolution, so the +# BlankSlate pattern was prefered. +# +# @private +# +# source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#10 +class RSpec::Matchers::BaseDelegator; end + +# Container module for all built-in matchers. The matcher classes are here +# (rather than directly under `RSpec::Matchers`) in order to prevent name +# collisions, since `RSpec::Matchers` gets included into the user's namespace. +# +# Autoloading is used to delay when the matcher classes get loaded, allowing +# rspec-matchers to boot faster, and avoiding loading matchers the user is +# not using. +# +# source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#3 +module RSpec::Matchers::BuiltIn; end + +# Provides the implementation for `all`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#7 +class RSpec::Matchers::BuiltIn::All < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [All] a new instance of All + # + # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#11 + def initialize(matcher); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#37 + def description; end + + # @api private + # @private + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#17 + def does_not_match?(_actual); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#9 + def failed_objects; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#23 + def failure_message; end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#9 + def matcher; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#63 + def add_new_line_if_needed(message); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#58 + def failure_message_for_item(index, failure_message); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#67 + def indent_multiline_message(message); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#50 + def index_failed_objects; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#74 + def initialize_copy(other); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#80 + def iterable?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#43 + def match(_expected, _actual); end +end + +# Used _internally_ as a base class for matchers that ship with +# rspec-expectations and rspec-rails. +# +# ### Warning: +# +# This class is for internal use, and subject to change without notice. +# We strongly recommend that you do not base your custom matchers on this +# class. If/when this changes, we will announce it and remove this warning. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#14 +class RSpec::Matchers::BuiltIn::BaseMatcher + include ::RSpec::Matchers::Composable + include ::RSpec::Matchers::BuiltIn::BaseMatcher::HashFormatting + include ::RSpec::Matchers::BuiltIn::BaseMatcher::StringEncodingFormatting + include ::RSpec::Matchers::BuiltIn::BaseMatcher::DefaultFailureMessages + + # @api private + # @return [BaseMatcher] a new instance of BaseMatcher + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#28 + def initialize(expected = T.unsafe(nil)); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#23 + def actual; end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#97 + def actual_formatted; end + + # Generates a description using {EnglishPhrasing}. + # + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#60 + def description; end + + # Matchers are not diffable by default. Override this to make your + # subclass diffable. + # + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#69 + def diffable?; end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#23 + def expected; end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#92 + def expected_formatted; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#87 + def expects_call_stack_jump?; end + + # Used to wrap a block of code that will indicate failure by + # raising one of the named exceptions. + # + # This is used by rspec-rails for some of its matchers that + # wrap rails' assertions. + # + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#47 + def match_unless_raises(*exceptions); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#107 + def matcher_name; end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#26 + def matcher_name=(_arg0); end + + # Indicates if the match is successful. Delegates to `match`, which + # should be defined on a subclass. Takes care of consistently + # initializing the `actual` attribute. + # + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#36 + def matches?(actual); end + + # :nocov: + # + # @api private + def present_ivars; end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#23 + def rescued_exception; end + + # Most matchers are value matchers (i.e. meant to work with `expect(value)`) + # rather than block matchers (i.e. meant to work with `expect { }`), so + # this defaults to false. Block matchers must override this to return true. + # + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#77 + def supports_block_expectations?; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#82 + def supports_value_expectations?; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#129 + def assert_ivars(*expected_ivars); end + + class << self + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#102 + def matcher_name; end + + private + + # Borrowed from ActiveSupport. + # + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#117 + def underscore(camel_cased_word); end + end +end + +# Provides default implementations of failure messages, based on the `description`. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#207 +module RSpec::Matchers::BuiltIn::BaseMatcher::DefaultFailureMessages + # Provides a good generic failure message. Based on `description`. + # When subclassing, if you are not satisfied with this failure message + # you often only need to override `description`. + # + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#213 + def failure_message; end + + # Provides a good generic negative failure message. Based on `description`. + # When subclassing, if you are not satisfied with this failure message + # you often only need to override `description`. + # + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#222 + def failure_message_when_negated; end + + class << self + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#227 + def has_default_failure_messages?(matcher); end + end +end + +# @api private +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#146 +module RSpec::Matchers::BuiltIn::BaseMatcher::HashFormatting + private + + # `{ :a => 5, :b => 2 }.inspect` produces: + # + # {:a=>5, :b=>2} + # + # ...but it looks much better as: + # + # {:a => 5, :b => 2} + # + # This is idempotent and safe to run on a string multiple times. + # + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#156 + def improve_hash_formatting(inspect_string); end + + class << self + # `{ :a => 5, :b => 2 }.inspect` produces: + # + # {:a=>5, :b=>2} + # + # ...but it looks much better as: + # + # {:a => 5, :b => 2} + # + # This is idempotent and safe to run on a string multiple times. + # + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#156 + def improve_hash_formatting(inspect_string); end + end +end + +# @api private +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#165 +module RSpec::Matchers::BuiltIn::BaseMatcher::StringEncodingFormatting + private + + # Formats a String's encoding as a human readable string + # + # @api private + # @param _value [String] + # @return [nil] nil as the curent Ruby version does not support String encoding + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#188 + def format_encoding(value); end + + # @api private + # @return [Boolean] False always as the curent Ruby version does not support String encoding + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#171 + def string_encoding_differs?; end + + class << self + # Formats a String's encoding as a human readable string + # + # @api private + # @param _value [String] + # @return [nil] nil as the curent Ruby version does not support String encoding + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#188 + def format_encoding(value); end + + # @api private + # @return [Boolean] False always as the curent Ruby version does not support String encoding + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#171 + def string_encoding_differs?; end + end +end + +# Used to detect when no arg is passed to `initialize`. +# `nil` cannot be used because it's a valid value to pass. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#20 +RSpec::Matchers::BuiltIn::BaseMatcher::UNDEFINED = T.let(T.unsafe(nil), Object) + +# Provides the implementation for `be`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#101 +class RSpec::Matchers::BuiltIn::Be < ::RSpec::Matchers::BuiltIn::BaseMatcher + include ::RSpec::Matchers::BuiltIn::BeHelpers + + # @api private + # @return [Be] a new instance of Be + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#104 + def initialize(*args); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#121 + def <(operand); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#121 + def <=(operand); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#121 + def ==(operand); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#121 + def ===(operand); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#121 + def =~(operand); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#121 + def >(operand); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#121 + def >=(operand); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#110 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#116 + def failure_message_when_negated; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#128 + def match(_, actual); end +end + +# Provides the implementation for `be_a_kind_of`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/be_kind_of.rb#7 +class RSpec::Matchers::BuiltIn::BeAKindOf < ::RSpec::Matchers::BuiltIn::BaseMatcher + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_kind_of.rb#10 + def match(expected, actual); end +end + +# Provides the implementation for `be_an_instance_of`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/be_instance_of.rb#7 +class RSpec::Matchers::BuiltIn::BeAnInstanceOf < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_instance_of.rb#10 + def description; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_instance_of.rb#16 + def match(expected, actual); end +end + +# Provides the implementation for `be_between`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/be_between.rb#7 +class RSpec::Matchers::BuiltIn::BeBetween < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [BeBetween] a new instance of BeBetween + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_between.rb#8 + def initialize(min, max); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_between.rb#57 + def description; end + + # Makes the between comparison exclusive. + # + # @api public + # @example + # expect(3).to be_between(2, 4).exclusive + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_between.rb#33 + def exclusive; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_between.rb#51 + def failure_message; end + + # Makes the between comparison inclusive. + # + # @api public + # @example + # expect(3).to be_between(2, 3).inclusive + # @note The matcher is inclusive by default; this simply provides + # a way to be more explicit about it. + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_between.rb#21 + def inclusive; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_between.rb#42 + def matches?(actual); end + + private + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_between.rb#63 + def comparable?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_between.rb#71 + def compare; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_between.rb#67 + def not_comparable_clause; end +end + +# Provides the implementation of `be value`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#136 +class RSpec::Matchers::BuiltIn::BeComparedTo < ::RSpec::Matchers::BuiltIn::BaseMatcher + include ::RSpec::Matchers::BuiltIn::BeHelpers + + # @api private + # @return [BeComparedTo] a new instance of BeComparedTo + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#139 + def initialize(operand, operator); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#178 + def description; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#151 + def does_not_match?(actual); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#159 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#166 + def failure_message_when_negated; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#145 + def matches?(actual); end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#184 + def perform_match(actual); end +end + +# Provides the implementation for `be_falsey`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#30 +class RSpec::Matchers::BuiltIn::BeFalsey < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#33 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#39 + def failure_message_when_negated; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#45 + def match(_, actual); end +end + +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#74 +module RSpec::Matchers::BuiltIn::BeHelpers + private + + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#77 + def args_to_s; end + + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#93 + def args_to_sentence; end + + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#89 + def expected_to_sentence; end + + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#85 + def inspected_args; end + + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#81 + def parenthesize(string); end +end + +# Provides the implementation for `be_nil`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#53 +class RSpec::Matchers::BuiltIn::BeNil < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#56 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#62 + def failure_message_when_negated; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#68 + def match(_, actual); end +end + +# Provides the implementation of `be_`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#137 +class RSpec::Matchers::BuiltIn::BePredicate < ::RSpec::Matchers::BuiltIn::DynamicPredicate + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#149 + def failure_to_respond_explanation; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#141 + def predicate; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#157 + def predicate_accessible?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#145 + def predicate_method_name; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#161 + def present_tense_predicate; end +end + +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#139 +RSpec::Matchers::BuiltIn::BePredicate::REGEX = T.let(T.unsafe(nil), Regexp) + +# Provides the implementation for `be_truthy`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#7 +class RSpec::Matchers::BuiltIn::BeTruthy < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#10 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#16 + def failure_message_when_negated; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#22 + def match(_, actual); end +end + +# Provides the implementation for `be_within`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/be_within.rb#7 +class RSpec::Matchers::BuiltIn::BeWithin < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [BeWithin] a new instance of BeWithin + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_within.rb#8 + def initialize(delta); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_within.rb#52 + def description; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_within.rb#40 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_within.rb#46 + def failure_message_when_negated; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_within.rb#32 + def matches?(actual); end + + # Sets the expected value. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_within.rb#14 + def of(expected); end + + # Sets the expected value, and makes the matcher do + # a percent comparison. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_within.rb#24 + def percent_of(expected); end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_within.rb#62 + def needs_expected; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_within.rb#66 + def not_numeric_clause; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_within.rb#58 + def numeric?; end +end + +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#159 +module RSpec::Matchers::BuiltIn::CaptureStderr + class << self + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#164 + def capture(block); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#160 + def name; end + end +end + +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#139 +module RSpec::Matchers::BuiltIn::CaptureStdout + class << self + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#144 + def capture(block); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#140 + def name; end + end +end + +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#179 +class RSpec::Matchers::BuiltIn::CaptureStreamToTempfile < ::Struct + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#180 + def capture(block); end +end + +# Provides the implementation for `change`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#7 +class RSpec::Matchers::BuiltIn::Change < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [Change] a new instance of Change + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#87 + def initialize(receiver = T.unsafe(nil), message = T.unsafe(nil), &block); end + + # Specifies the delta of the expected change. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#10 + def by(expected_delta); end + + # Specifies a minimum delta of the expected change. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#18 + def by_at_least(minimum); end + + # Specifies a maximum delta of the expected change. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#26 + def by_at_most(maximum); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#71 + def description; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#50 + def does_not_match?(event_proc); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#57 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#64 + def failure_message_when_negated; end + + # Specifies the original value. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#40 + def from(value); end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#45 + def matches?(event_proc); end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#76 + def supports_block_expectations?; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#81 + def supports_value_expectations?; end + + # Specifies the new value you expect. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#34 + def to(value); end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#93 + def change_details; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#119 + def negative_failure_reason; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#97 + def perform_change(event_proc); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#114 + def positive_failure_reason; end + + # @api private + # @raise [SyntaxError] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#109 + def raise_block_syntax_error; end +end + +# Encapsulates the details of the before/after values. +# +# Note that this class exposes the `actual_after` value, to allow the +# matchers above to derive failure messages, etc from the value on demand +# as needed, but it intentionally does _not_ expose the `actual_before` +# value. Some usages of the `change` matcher mutate a specific object +# returned by the value proc, which means that failure message snippets, +# etc, which are derived from the `before` value may not be accurate if +# they are lazily computed as needed. We must pre-compute them before +# applying the change in the `expect` block. To ensure that all `change` +# matchers do that properly, we do not expose the `actual_before` value. +# Instead, matchers must pass a block to `perform_change`, which yields +# the `actual_before` value before applying the change. +# +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#352 +class RSpec::Matchers::BuiltIn::ChangeDetails + # @return [ChangeDetails] a new instance of ChangeDetails + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#357 + def initialize(matcher_name, receiver = T.unsafe(nil), message = T.unsafe(nil), &block); end + + # Returns the value of attribute actual_after. + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#353 + def actual_after; end + + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#418 + def actual_delta; end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#402 + def changed?; end + + # @yield [@actual_before] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#389 + def perform_change(event_proc); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#378 + def value_representation; end + + private + + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#424 + def evaluate_value_proc; end + + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#438 + def extract_value_block_snippet; end + + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#428 + def message_notation(receiver, message); end +end + +# source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#355 +module RSpec::Matchers::BuiltIn::ChangeDetails::UNDEFINED; end + +# Used to specify a change from a specific value +# (and, optionally, to a specific value). +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#270 +class RSpec::Matchers::BuiltIn::ChangeFromValue < ::RSpec::Matchers::BuiltIn::SpecificValuesChange + # @api private + # @return [ChangeFromValue] a new instance of ChangeFromValue + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#271 + def initialize(change_details, expected_before); end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#285 + def does_not_match?(event_proc); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#295 + def failure_message_when_negated; end + + # Specifies the new value you expect. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#278 + def to(value); end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#303 + def change_description; end +end + +# Used to specify a relative change. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#128 +class RSpec::Matchers::BuiltIn::ChangeRelatively < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [ChangeRelatively] a new instance of ChangeRelatively + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#129 + def initialize(change_details, expected_delta, relativity, &comparer); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#156 + def description; end + + # @api private + # @private + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#150 + def does_not_match?(_event_proc); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#137 + def failure_message; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#144 + def matches?(event_proc); end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#162 + def supports_block_expectations?; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#167 + def supports_value_expectations?; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#173 + def failure_reason; end +end + +# Used to specify a change to a specific value +# (and, optionally, from a specific value). +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#311 +class RSpec::Matchers::BuiltIn::ChangeToValue < ::RSpec::Matchers::BuiltIn::SpecificValuesChange + # @api private + # @return [ChangeToValue] a new instance of ChangeToValue + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#312 + def initialize(change_details, expected_after); end + + # @api private + # @private + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#326 + def does_not_match?(_event_proc); end + + # Specifies the original value. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#319 + def from(value); end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#333 + def change_description; end +end + +# Base class for `and` and `or` compound matchers. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#6 +class RSpec::Matchers::BuiltIn::Compound < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [Compound] a new instance of Compound + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#10 + def initialize(matcher_1, matcher_2); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#25 + def description; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#49 + def diffable?; end + + # @api private + # @private + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#16 + def does_not_match?(_actual); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#8 + def evaluator; end + + # @api private + # @return [RSpec::Matchers::MultiMatcherDiff] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#55 + def expected; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#42 + def expects_call_stack_jump?; end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#8 + def matcher_1; end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#8 + def matcher_2; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#30 + def supports_block_expectations?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#36 + def supports_value_expectations?; end + + protected + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#62 + def diffable_matcher_list; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#93 + def compound_failure_message; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#125 + def diffable_matcher_list_for(matcher); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#87 + def indent_multiline_message(message); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#71 + def initialize_copy(other); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#77 + def match(_expected, actual); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#99 + def matcher_1_matches?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#103 + def matcher_2_matches?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#119 + def matcher_is_diffable?(matcher); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#107 + def matcher_supports_block_expectations?(matcher); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#113 + def matcher_supports_value_expectations?(matcher); end +end + +# Matcher used to represent a compound `and` expectation. +# +# @api public +# +# source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#242 +class RSpec::Matchers::BuiltIn::Compound::And < ::RSpec::Matchers::BuiltIn::Compound + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#245 + def failure_message; end + + private + + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#262 + def conjunction; end + + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#257 + def match(*_arg0); end +end + +# Normally, we evaluate the matching sequentially. For an expression like +# `expect(x).to foo.and bar`, this becomes: +# +# expect(x).to foo +# expect(x).to bar +# +# For block expectations, we need to nest them instead, so that +# `expect { x }.to foo.and bar` becomes: +# +# expect { +# expect { x }.to foo +# }.to bar +# +# This is necessary so that the `expect` block is only executed once. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#156 +class RSpec::Matchers::BuiltIn::Compound::NestedEvaluator + # @api private + # @return [NestedEvaluator] a new instance of NestedEvaluator + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#157 + def initialize(actual, matcher_1, matcher_2); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#170 + def matcher_matches?(matcher); end + + private + + # Some block matchers (such as `yield_xyz`) pass args to the `expect` block. + # When such a matcher is used as the outer matcher, we need to forward the + # the args on to the `expect` block. + # + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#184 + def inner_matcher_block(outer_args); end + + # For a matcher like `raise_error` or `throw_symbol`, where the block will jump + # up the call stack, we need to order things so that it is the inner matcher. + # For example, we need it to be this: + # + # expect { + # expect { + # x += 1 + # raise "boom" + # }.to raise_error("boom") + # }.to change { x }.by(1) + # + # ...rather than: + # + # expect { + # expect { + # x += 1 + # raise "boom" + # }.to change { x }.by(1) + # }.to raise_error("boom") + # + # In the latter case, the after-block logic in the `change` matcher would never + # get executed because the `raise "boom"` line would jump to the `rescue` in the + # `raise_error` logic, so only the former case will work properly. + # + # This method figures out which matcher should be the inner matcher and which + # should be the outer matcher. + # + # @api private + # @raise [ArgumentError] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#224 + def order_block_matchers; end + + class << self + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#233 + def matcher_expects_call_stack_jump?(matcher); end + end +end + +# Matcher used to represent a compound `or` expectation. +# +# @api public +# +# source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#269 +class RSpec::Matchers::BuiltIn::Compound::Or < ::RSpec::Matchers::BuiltIn::Compound + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#272 + def failure_message; end + + private + + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#283 + def conjunction; end + + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#278 + def match(*_arg0); end +end + +# For value expectations, we can evaluate the matchers sequentially. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#132 +class RSpec::Matchers::BuiltIn::Compound::SequentialEvaluator + # @api private + # @return [SequentialEvaluator] a new instance of SequentialEvaluator + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#133 + def initialize(actual, *_arg1); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#137 + def matcher_matches?(matcher); end +end + +# Provides the implementation for `contain_exactly` and `match_array`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#8 +class RSpec::Matchers::BuiltIn::ContainExactly < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#29 + def description; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#11 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#22 + def failure_message_when_negated; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#34 + def matches?(actual); end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#56 + def actual_collection_line; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#135 + def best_solution; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#94 + def convert_actual_to_an_array; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#68 + def describe_collection(collection, surface_descriptions = T.unsafe(nil)); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#52 + def expected_collection_line; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#64 + def extra_elements_line; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#129 + def extra_items; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#44 + def generate_failure_message; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#81 + def match(_expected, _actual); end + + # This cannot always work (e.g. when dealing with unsortable items, + # or matchers as expected items), but it's practically free compared to + # the slowness of the full matching algorithm, and in common cases this + # works, so it's worth a try. + # + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#90 + def match_when_sorted?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#76 + def message_line(prefix, collection, surface_descriptions = T.unsafe(nil)); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#60 + def missing_elements_line; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#123 + def missing_items; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#139 + def pairings_maximizer; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#104 + def safe_sort(array); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#118 + def to_a_disallowed?(object); end +end + +# Once we started supporting composing matchers, the algorithm for this matcher got +# much more complicated. Consider this expression: +# +# expect(["fool", "food"]).to contain_exactly(/foo/, /fool/) +# +# This should pass (because we can pair /fool/ with "fool" and /foo/ with "food"), but +# the original algorithm used by this matcher would pair the first elements it could +# (/foo/ with "fool"), which would leave /fool/ and "food" unmatched. When we have +# an expected element which is a matcher that matches a superset of actual items +# compared to another expected element matcher, we need to consider every possible pairing. +# +# This class is designed to maximize the number of actual/expected pairings -- or, +# conversely, to minimize the number of unpaired items. It's essentially a brute +# force solution, but with a few heuristics applied to reduce the size of the +# problem space: +# +# * Any items which match none of the items in the other list are immediately +# placed into the `unmatched_expected_indexes` or `unmatched_actual_indexes` array. +# The extra items and missing items in the matcher failure message are derived +# from these arrays. +# * Any items which reciprocally match only each other are paired up and not +# considered further. +# +# What's left is only the items which match multiple items from the other list +# (or vice versa). From here, it performs a brute-force depth-first search, +# looking for a solution which pairs all elements in both lists, or, barring that, +# that produces the fewest unmatched items. +# +# @api private +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#186 +class RSpec::Matchers::BuiltIn::ContainExactly::PairingsMaximizer + # @api private + # @return [PairingsMaximizer] a new instance of PairingsMaximizer + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#223 + def initialize(expected_to_actual_matched_indexes, actual_to_expected_matched_indexes); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#221 + def actual_to_expected_matched_indexes; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#221 + def expected_to_actual_matched_indexes; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#237 + def find_best_solution; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#221 + def solution; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#299 + def apply_pairing_to(indeterminates, original_matches, other_list_index); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#283 + def best_solution_for_pairing(expected_index, actual_index); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#263 + def categorize_indexes(indexes_to_categorize, other_indexes); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#278 + def reciprocal_single_match?(matches, index, other_list); end +end + +# Starting solution that is worse than any other real solution. +# +# @api private +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#257 +class RSpec::Matchers::BuiltIn::ContainExactly::PairingsMaximizer::NullSolution + class << self + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#258 + def worse_than?(_other); end + end +end + +# @api private +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#188 +class RSpec::Matchers::BuiltIn::ContainExactly::PairingsMaximizer::Solution < ::Struct + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#210 + def +(derived_candidate_solution); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#194 + def candidate?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#199 + def ideal?; end + + # Returns the value of attribute indeterminate_actual_indexes + # + # @return [Object] the current value of indeterminate_actual_indexes + def indeterminate_actual_indexes; end + + # Sets the attribute indeterminate_actual_indexes + # + # @param value [Object] the value to set the attribute indeterminate_actual_indexes to. + # @return [Object] the newly set value + def indeterminate_actual_indexes=(_); end + + # Returns the value of attribute indeterminate_expected_indexes + # + # @return [Object] the current value of indeterminate_expected_indexes + def indeterminate_expected_indexes; end + + # Sets the attribute indeterminate_expected_indexes + # + # @param value [Object] the value to set the attribute indeterminate_expected_indexes to. + # @return [Object] the newly set value + def indeterminate_expected_indexes=(_); end + + # Returns the value of attribute unmatched_actual_indexes + # + # @return [Object] the current value of unmatched_actual_indexes + def unmatched_actual_indexes; end + + # Sets the attribute unmatched_actual_indexes + # + # @param value [Object] the value to set the attribute unmatched_actual_indexes to. + # @return [Object] the newly set value + def unmatched_actual_indexes=(_); end + + # Returns the value of attribute unmatched_expected_indexes + # + # @return [Object] the current value of unmatched_expected_indexes + def unmatched_expected_indexes; end + + # Sets the attribute unmatched_expected_indexes + # + # @param value [Object] the value to set the attribute unmatched_expected_indexes to. + # @return [Object] the newly set value + def unmatched_expected_indexes=(_); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#206 + def unmatched_item_count; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#190 + def worse_than?(other); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# Abstract class to implement `once`, `at_least` and other +# count constraints. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#7 +module RSpec::Matchers::BuiltIn::CountExpectation + # Specifies the minimum number of times the method is expected to match + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#42 + def at_least(number); end + + # Specifies the maximum number of times the method is expected to match + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#35 + def at_most(number); end + + # Specifies that the method is expected to match the given number of times. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#28 + def exactly(number); end + + # Specifies that the method is expected to match once. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#10 + def once; end + + # Specifies that the method is expected to match thrice. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#22 + def thrice; end + + # No-op. Provides syntactic sugar. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#49 + def times; end + + # Specifies that the method is expected to match twice. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#16 + def twice; end + + protected + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#55 + def count_expectation_type; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#55 + def expected_count; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#120 + def count_constraint_to_number(n); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#139 + def count_expectation_description; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#143 + def count_failure_reason(action); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#60 + def cover?(count, number); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#69 + def expected_count_matches?(actual_count); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#77 + def has_expected_count?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#157 + def human_readable_count(count); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#148 + def human_readable_expectation_type; end + + # @api private + # @raise [ArgumentError] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#100 + def raise_impossible_count_expectation(count); end + + # @api private + # @raise [ArgumentError] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#109 + def raise_unsupported_count_expectation; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#81 + def set_expected_count(relativity, n); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#132 + def unsupported_count_expectation?(relativity); end +end + +# Provides the implementation for `cover`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/cover.rb#7 +class RSpec::Matchers::BuiltIn::Cover < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [Cover] a new instance of Cover + # + # source://rspec-expectations//lib/rspec/matchers/built_in/cover.rb#8 + def initialize(*expected); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/cover.rb#17 + def does_not_match?(range); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/cover.rb#12 + def matches?(range); end +end + +# Provides the implementation for dynamic predicate matchers. +# Not intended to be inherited directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#7 +class RSpec::Matchers::BuiltIn::DynamicPredicate < ::RSpec::Matchers::BuiltIn::BaseMatcher + include ::RSpec::Matchers::BuiltIn::BeHelpers + + # @api private + # @return [DynamicPredicate] a new instance of DynamicPredicate + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#10 + def initialize(method_name, *args, **_arg2, &block); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#43 + def description; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#23 + def does_not_match?(actual, &block); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#31 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#37 + def failure_message_when_negated; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#16 + def matches?(actual, &block); end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#99 + def expectation_of(value); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#94 + def failure_message_expecting(value); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#115 + def failure_to_respond_explanation; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#90 + def method_description; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#49 + def predicate_accessible?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#74 + def predicate_matches?(value = T.unsafe(nil)); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#70 + def predicate_method_name; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#66 + def predicate_result; end + + # :nocov: + # + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#61 + def private_predicate?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#82 + def root; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#109 + def validity_message; end +end + +# Provides the implementation for `end_with`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#81 +class RSpec::Matchers::BuiltIn::EndWith < ::RSpec::Matchers::BuiltIn::StartOrEndWith + private + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#88 + def element_matches?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#84 + def subset_matches?; end +end + +# Provides the implementation for `eq`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/eq.rb#7 +class RSpec::Matchers::BuiltIn::Eq < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/eq.rb#26 + def description; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/eq.rb#32 + def diffable?; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/eq.rb#10 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/eq.rb#20 + def failure_message_when_negated; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/eq.rb#38 + def match(expected, actual); end +end + +# Provides the implementation for `eql`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/eql.rb#7 +class RSpec::Matchers::BuiltIn::Eql < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/eql.rb#26 + def diffable?; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/eql.rb#10 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/eql.rb#20 + def failure_message_when_negated; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/eql.rb#32 + def match(expected, actual); end +end + +# Provides the implementation for `equal`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/equal.rb#7 +class RSpec::Matchers::BuiltIn::Equal < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/equal.rb#33 + def diffable?; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/equal.rb#10 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/equal.rb#20 + def failure_message_when_negated; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/equal.rb#49 + def actual_inspected; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/equal.rb#61 + def detailed_failure_message; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/equal.rb#45 + def expected_is_a_literal_singleton?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/equal.rb#75 + def inspect_object(o); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/equal.rb#39 + def match(expected, actual); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/equal.rb#57 + def simple_failure_message; end +end + +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/equal.rb#43 +RSpec::Matchers::BuiltIn::Equal::LITERAL_SINGLETONS = T.let(T.unsafe(nil), Array) + +# Provides the implementation for `exist`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#7 +class RSpec::Matchers::BuiltIn::Exist < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [Exist] a new instance of Exist + # + # source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#8 + def initialize(*expected); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#22 + def does_not_match?(actual); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#30 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#36 + def failure_message_when_negated; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#14 + def matches?(actual); end +end + +# Simple class for memoizing actual/expected for this matcher +# and examining the match +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#43 +class RSpec::Matchers::BuiltIn::Exist::ExistenceTest < ::Struct + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#52 + def actual_exists?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#46 + def valid_test?; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#58 + def validity_message; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#83 + def deprecated(predicate, actual); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#75 + def existence_values; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#79 + def predicates; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#71 + def uniq_truthy_values; end +end + +# Provides the implementation for `has_`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#125 +class RSpec::Matchers::BuiltIn::Has < ::RSpec::Matchers::BuiltIn::DynamicPredicate + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#129 + def predicate; end +end + +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#127 +RSpec::Matchers::BuiltIn::Has::REGEX = T.let(T.unsafe(nil), Regexp) + +# Provides the implementation for `have_attributes`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#7 +class RSpec::Matchers::BuiltIn::HaveAttributes < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [HaveAttributes] a new instance of HaveAttributes + # + # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#11 + def initialize(expected); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#19 + def actual; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#43 + def description; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#50 + def diffable?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#34 + def does_not_match?(actual); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#56 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#64 + def failure_message_when_negated; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#25 + def matches?(actual); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#9 + def respond_to_failed; end + + private + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#85 + def actual_has_attribute?(attribute_key, attribute_value); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#70 + def cache_all_values; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#107 + def formatted_values; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#78 + def perform_match(predicate); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#89 + def respond_to_attributes?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#99 + def respond_to_failure_message_or; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#95 + def respond_to_matcher; end +end + +# Provides the implementation for `include`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#9 +class RSpec::Matchers::BuiltIn::Include < ::RSpec::Matchers::BuiltIn::BaseMatcher + include ::RSpec::Matchers::BuiltIn::CountExpectation + + # @api private + # @return [Include] a new instance of Include + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#15 + def initialize(*expecteds); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#43 + def description; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#61 + def diffable?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#32 + def does_not_match?(actual); end + + # @api private + # @return [Array, Hash] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#67 + def expected; end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#12 + def expecteds; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#49 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#55 + def failure_message_when_negated; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#21 + def matches?(actual); end + + private + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#167 + def actual_collection_includes?(expected_item); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#153 + def actual_hash_has_key?(expected_key); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#141 + def actual_hash_includes?(expected_key, expected_value); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#77 + def check_actual?(actual); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#83 + def check_expected_count?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#149 + def comparing_hash_keys?(expected_item); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#137 + def comparing_hash_to_a_subset?(expected_item); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#207 + def convert_to_hash?(obj); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#181 + def count_enumerable(expected_item); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#186 + def count_inclusions; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#198 + def diff_would_wrongly_highlight_matched_item?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#120 + def excluded_from_actual; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#95 + def format_failure_message(preposition); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#115 + def perform_match(&block); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#106 + def readable_list_of(items); end +end + +# Provides the implementation for `match`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#7 +class RSpec::Matchers::BuiltIn::Match < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [Match] a new instance of Match + # + # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#8 + def initialize(expected); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#15 + def description; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#25 + def diffable?; end + + # Used to specify the captures we match against + # + # @api private + # @return [self] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#31 + def with_captures(*captures); end + + private + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#45 + def can_safely_call_match?(expected, actual); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#38 + def match(expected, actual); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#52 + def match_captures(expected, actual); end +end + +# Handles operator matcher for `should_not`. +# +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#116 +class RSpec::Matchers::BuiltIn::NegativeOperatorMatcher < ::RSpec::Matchers::BuiltIn::OperatorMatcher + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#117 + def __delegate_operator(actual, operator, expected); end +end + +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#128 +module RSpec::Matchers::BuiltIn::NullCapture + class << self + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#133 + def capture(_block); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#129 + def name; end + end +end + +# Provides the implementation for operator matchers. +# Not intended to be instantiated directly. +# Only available for use with `should`. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#10 +class RSpec::Matchers::BuiltIn::OperatorMatcher + # @api private + # @return [OperatorMatcher] a new instance of OperatorMatcher + # + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#41 + def initialize(actual); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#57 + def !=(_expected); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#57 + def !~(_expected); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#47 + def <(expected); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#47 + def <=(expected); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#47 + def ==(expected); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#47 + def ===(expected); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#47 + def =~(expected); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#47 + def >(expected); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#47 + def >=(expected); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#76 + def description; end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#70 + def fail_with_message(message); end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#88 + def eval_match(actual, operator, expected); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#82 + def has_non_generic_implementation_of?(op); end + + class << self + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#29 + def get(klass, operator); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#18 + def register(klass, operator, matcher); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#13 + def registry; end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#24 + def unregister(klass, operator); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#46 + def use_custom_matcher_or_delegate(operator); end + end +end + +# Provides the implementation for `output`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#9 +class RSpec::Matchers::BuiltIn::Output < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [Output] a new instance of Output + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#10 + def initialize(expected); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#76 + def description; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#86 + def diffable?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#24 + def does_not_match?(block); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#64 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#70 + def failure_message_when_negated; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#17 + def matches?(block); end + + # Indicates this matcher matches against a block. + # + # @api private + # @return [True] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#93 + def supports_block_expectations?; end + + # Indicates this matcher matches against a block only. + # + # @api private + # @return [False] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#100 + def supports_value_expectations?; end + + # Tells the matcher to match against stderr. + # Works only when the main Ruby process prints to stderr + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#39 + def to_stderr; end + + # Tells the matcher to match against stderr. + # Works when subprocesses print to stderr as well. + # This is significantly (~30x) slower than `to_stderr` + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#57 + def to_stderr_from_any_process; end + + # Tells the matcher to match against stdout. + # Works only when the main Ruby process prints to stdout + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#31 + def to_stdout; end + + # Tells the matcher to match against stdout. + # Works when subprocesses print to stdout as well. + # This is significantly (~30x) slower than `to_stdout` + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#48 + def to_stdout_from_any_process; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#121 + def actual_output_description; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#106 + def captured?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#116 + def negative_failure_reason; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#110 + def positive_failure_reason; end +end + +# Handles operator matcher for `should`. +# +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#97 +class RSpec::Matchers::BuiltIn::PositiveOperatorMatcher < ::RSpec::Matchers::BuiltIn::OperatorMatcher + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#98 + def __delegate_operator(actual, operator, expected); end +end + +# Provides the implementation for `raise_error`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#9 +class RSpec::Matchers::BuiltIn::RaiseError + include ::RSpec::Matchers::Composable + + # @api private + # @return [RaiseError] a new instance of RaiseError + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#22 + def initialize(expected_error_or_message, expected_message, &block); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#117 + def description; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#83 + def does_not_match?(given_proc); end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#99 + def expects_call_stack_jump?; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#105 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#111 + def failure_message_when_negated; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#52 + def matches?(given_proc, negative_expectation = T.unsafe(nil), &block); end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#89 + def supports_block_expectations?; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#94 + def supports_value_expectations?; end + + # Specifies the expected error message. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#43 + def with_message(expected_message); end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#123 + def actual_error_message; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#137 + def block_matches?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#133 + def error_and_message_match?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#145 + def eval_block; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#129 + def expectation_matched?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#226 + def expected_error; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#257 + def expecting_specific_exception?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#241 + def format_backtrace(backtrace); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#246 + def given_error; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#176 + def handle_warning(message); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#261 + def raise_message_already_set; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#141 + def ready_to_eval_block?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#155 + def verify_message; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#188 + def warn_about_bare_error!; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#180 + def warn_about_bare_error?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#214 + def warn_about_negative_false_positive!(expression); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#201 + def warn_about_nil_error!; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#184 + def warn_about_nil_error?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#160 + def warn_for_negative_false_positives!; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#266 + def warning; end +end + +# Used as a sentinel value to be able to tell when the user did not pass an +# argument. We can't use `nil` for that because we need to warn when `nil` is +# passed in a different way. It's an Object, not a Module, since Module's `===` +# does not evaluate to true when compared to itself. +# +# Note; this _is_ the default value supplied for expected_error_or_message, but +# because there are two method-calls involved, that default is actually supplied +# in the definition of the _matcher_ method, `RSpec::Matchers#raise_error` +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#20 +RSpec::Matchers::BuiltIn::RaiseError::UndefinedValue = T.let(T.unsafe(nil), Object) + +# Used to wrap match data and make it reliable for 1.8.7 +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#72 +class RSpec::Matchers::BuiltIn::ReliableMatchData + # @api private + # @return [ReliableMatchData] a new instance of ReliableMatchData + # + # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#73 + def initialize(match_data); end + + # returns an array of captures from the match data + # + # @api private + # @return Array + # + # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#96 + def captures; end + + # Returns match data names for named captures + # + # @api private + # @return Array + # + # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#88 + def names; end + + protected + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#102 + def match_data; end +end + +# Provides the implementation for `respond_to`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#9 +class RSpec::Matchers::BuiltIn::RespondTo < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [RespondTo] a new instance of RespondTo + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#10 + def initialize(*names); end + + # Specifies that the method accepts any keyword, i.e. the method has + # a splatted keyword parameter of the form **kw_args. + # + # @api public + # @example + # expect(obj).to respond_to(:message).with_any_keywords + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#48 + def and_any_keywords; end + + # Specifies keyword arguments, if any. + # + # @api public + # @example + # expect(obj).to respond_to(:message).with_keywords(:color, :shape) + # @example with an expected number of arguments + # expect(obj).to respond_to(:message).with(3).arguments.and_keywords(:color, :shape) + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#36 + def and_keywords(*keywords); end + + # Specifies that the number of arguments has no upper limit, i.e. the + # method has a splatted parameter of the form *args. + # + # @api public + # @example + # expect(obj).to respond_to(:message).with_unlimited_arguments + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#60 + def and_unlimited_arguments; end + + # No-op. Intended to be used as syntactic sugar when using `with`. + # + # @api public + # @example + # expect(obj).to respond_to(:message).with(3).arguments + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#71 + def argument; end + + # No-op. Intended to be used as syntactic sugar when using `with`. + # + # @api public + # @example + # expect(obj).to respond_to(:message).with(3).arguments + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#71 + def arguments; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#100 + def description; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#82 + def does_not_match?(actual); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#88 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#94 + def failure_message_when_negated; end + + # Used by other matchers to suppress a check + # + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#106 + def ignoring_method_signature_failure!; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#77 + def matches?(actual); end + + # Specifies the number of expected arguments. + # + # @api public + # @example + # expect(obj).to respond_to(:message).with(3).arguments + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#24 + def with(n); end + + # Specifies that the method accepts any keyword, i.e. the method has + # a splatted keyword parameter of the form **kw_args. + # + # @api public + # @example + # expect(obj).to respond_to(:message).with_any_keywords + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#48 + def with_any_keywords; end + + # Specifies keyword arguments, if any. + # + # @api public + # @example + # expect(obj).to respond_to(:message).with_keywords(:color, :shape) + # @example with an expected number of arguments + # expect(obj).to respond_to(:message).with(3).arguments.and_keywords(:color, :shape) + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#36 + def with_keywords(*keywords); end + + # Specifies that the number of arguments has no upper limit, i.e. the + # method has a splatted parameter of the form *args. + # + # @api public + # @example + # expect(obj).to respond_to(:message).with_unlimited_arguments + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#60 + def with_unlimited_arguments; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#112 + def find_failing_method_names(actual, filter_method); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#119 + def matches_arity?(actual, name); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#156 + def pp_names; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#130 + def with_arity; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#139 + def with_arity_string; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#143 + def with_keywords_string; end +end + +# @api private +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#161 +class RSpec::Matchers::BuiltIn::RespondTo::ArityCheck + # @api private + # @return [ArityCheck] a new instance of ArityCheck + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#162 + def initialize(expected_arity, expected_keywords, arbitrary_keywords, unlimited_arguments); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#178 + def matches?(actual, name); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#187 + def method_signature_for(actual, name); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#183 + def verifier_for(actual, name); end +end + +# Provides the implementation for `satisfy`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/satisfy.rb#7 +class RSpec::Matchers::BuiltIn::Satisfy < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [Satisfy] a new instance of Satisfy + # + # source://rspec-expectations//lib/rspec/matchers/built_in/satisfy.rb#8 + def initialize(description = T.unsafe(nil), &block); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/satisfy.rb#21 + def description; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/satisfy.rb#27 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/satisfy.rb#33 + def failure_message_when_negated; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/satisfy.rb#14 + def matches?(actual, &block); end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/satisfy.rb#40 + def block_representation; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/satisfy.rb#48 + def extract_block_snippet; end +end + +# Base class for specifying a change from and/or to specific values. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#181 +class RSpec::Matchers::BuiltIn::SpecificValuesChange < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [SpecificValuesChange] a new instance of SpecificValuesChange + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#185 + def initialize(change_details, from, to); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#197 + def description; end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#202 + def failure_message; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#192 + def matches?(event_proc); end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#210 + def supports_block_expectations?; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#215 + def supports_value_expectations?; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#244 + def after_value_failure; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#238 + def before_value_failure; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#255 + def did_change_failure; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#250 + def did_not_change_failure; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#234 + def matches_after?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#261 + def not_given_a_block_failure; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#221 + def perform_change(event_proc); end +end + +# @api private +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#183 +RSpec::Matchers::BuiltIn::SpecificValuesChange::MATCH_ANYTHING = BasicObject + +# For RSpec 3.1, the base class was named `StartAndEndWith`. For SemVer reasons, +# we still provide this constant until 4.0. +# +# @deprecated Use StartOrEndWith instead. +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#61 +RSpec::Matchers::BuiltIn::StartAndEndWith = RSpec::Matchers::BuiltIn::StartOrEndWith + +# Base class for the `end_with` and `start_with` matchers. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#7 +class RSpec::Matchers::BuiltIn::StartOrEndWith < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [StartOrEndWith] a new instance of StartOrEndWith + # + # source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#8 + def initialize(*expected); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#27 + def description; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#15 + def failure_message; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#36 + def match(_expected, actual); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#48 + def subsets_comparable?; end +end + +# Provides the implementation for `start_with`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#66 +class RSpec::Matchers::BuiltIn::StartWith < ::RSpec::Matchers::BuiltIn::StartOrEndWith + private + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#73 + def element_matches?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#69 + def subset_matches?; end +end + +# Provides the implementation for `throw_symbol`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#7 +class RSpec::Matchers::BuiltIn::ThrowSymbol + include ::RSpec::Matchers::Composable + + # @api private + # @return [ThrowSymbol] a new instance of ThrowSymbol + # + # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#10 + def initialize(expected_symbol = T.unsafe(nil), expected_arg = T.unsafe(nil)); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#86 + def description; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#68 + def does_not_match?(given_proc); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#103 + def expects_call_stack_jump?; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#74 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#80 + def failure_message_when_negated; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#18 + def matches?(given_proc); end + + # Indicates this matcher matches against a block. + # + # @api private + # @return [True] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#93 + def supports_block_expectations?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#98 + def supports_value_expectations?; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#109 + def actual_result; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#118 + def caught; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#114 + def expected(symbol_desc = T.unsafe(nil)); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#122 + def throw_description(symbol, arg); end +end + +# Provides the implementation for `yield_control`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#101 +class RSpec::Matchers::BuiltIn::YieldControl < ::RSpec::Matchers::BuiltIn::BaseMatcher + include ::RSpec::Matchers::BuiltIn::CountExpectation + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#111 + def does_not_match?(block); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#117 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#123 + def failure_message_when_negated; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#104 + def matches?(block); end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#128 + def supports_block_expectations?; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#133 + def supports_value_expectations?; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#139 + def failure_reason; end +end + +# Object that is yielded to `expect` when one of the +# yield matchers is used. Provides information about +# the yield behavior of the object-under-test. +# +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#12 +class RSpec::Matchers::BuiltIn::YieldProbe + # @return [YieldProbe] a new instance of YieldProbe + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#21 + def initialize(block, &callback); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#68 + def assert_used!; end + + # :nocov: + # On 1.8.7, `lambda { }.arity` and `lambda { |*a| }.arity` both return -1, + # so we can't distinguish between accepting no args and an arg splat. + # It's OK to skip, this, though; it just provides a nice error message + # when the user forgets to accept an arg in their block. They'll still get + # the `assert_used!` error message from above, which is sufficient. + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#78 + def assert_valid_expect_block!; end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#29 + def has_block?; end + + # Returns the value of attribute num_yields. + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#19 + def num_yields; end + + # Sets the attribute num_yields + # + # @param value the value to set the attribute num_yields to. + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#19 + def num_yields=(_arg0); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#33 + def probe; end + + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#53 + def single_yield_args; end + + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#40 + def to_proc; end + + # Returns the value of attribute yielded_args. + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#19 + def yielded_args; end + + # Sets the attribute yielded_args + # + # @param value the value to set the attribute yielded_args to. + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#19 + def yielded_args=(_arg0); end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#57 + def yielded_once?(matcher_name); end + + class << self + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#13 + def probe(block, &callback); end + end +end + +# Provides the implementation for `yield_successive_args`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#296 +class RSpec::Matchers::BuiltIn::YieldSuccessiveArgs < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [YieldSuccessiveArgs] a new instance of YieldSuccessiveArgs + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#297 + def initialize(*args); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#337 + def description; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#320 + def does_not_match?(block); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#325 + def failure_message; end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#331 + def failure_message_when_negated; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#302 + def matches?(block); end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#342 + def supports_block_expectations?; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#347 + def supports_value_expectations?; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#353 + def expected_arg_description; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#365 + def negative_failure_reason; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#357 + def positive_failure_reason; end +end + +# Provides the implementation for `yield_with_args`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#199 +class RSpec::Matchers::BuiltIn::YieldWithArgs < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [YieldWithArgs] a new instance of YieldWithArgs + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#200 + def initialize(*args); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#233 + def description; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#218 + def does_not_match?(block); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#223 + def failure_message; end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#228 + def failure_message_when_negated; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#205 + def matches?(block); end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#240 + def supports_block_expectations?; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#245 + def supports_value_expectations?; end + + private + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#288 + def all_args_match?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#273 + def args_currently_match?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#257 + def expected_arg_description; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#261 + def negative_failure_reason; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#251 + def positive_failure_reason; end +end + +# Provides the implementation for `yield_with_no_args`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#149 +class RSpec::Matchers::BuiltIn::YieldWithNoArgs < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#158 + def does_not_match?(block); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#163 + def failure_message; end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#168 + def failure_message_when_negated; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#151 + def matches?(block); end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#173 + def supports_block_expectations?; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#178 + def supports_value_expectations?; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#190 + def negative_failure_reason; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#184 + def positive_failure_reason; end +end + +# Mixin designed to support the composable matcher features +# of RSpec 3+. Mix it into your custom matcher classes to +# allow them to be used in a composable fashion. +# +# @api public +# +# source://rspec-expectations//lib/rspec/matchers/composable.rb#10 +module RSpec::Matchers::Composable + # Creates a compound `and` expectation. The matcher will + # only pass if both sub-matchers pass. + # This can be chained together to form an arbitrarily long + # chain of matchers. + # + # @api public + # @example + # expect(alphabet).to start_with("a").and end_with("z") + # expect(alphabet).to start_with("a") & end_with("z") + # @note The negative form (`expect(...).not_to matcher.and other`) + # is not supported at this time. + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#22 + def &(matcher); end + + # Delegates to `#matches?`. Allows matchers to be used in composable + # fashion and also supports using matchers in case statements. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#45 + def ===(value); end + + # Creates a compound `and` expectation. The matcher will + # only pass if both sub-matchers pass. + # This can be chained together to form an arbitrarily long + # chain of matchers. + # + # @api public + # @example + # expect(alphabet).to start_with("a").and end_with("z") + # expect(alphabet).to start_with("a") & end_with("z") + # @note The negative form (`expect(...).not_to matcher.and other`) + # is not supported at this time. + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#22 + def and(matcher); end + + # Creates a compound `or` expectation. The matcher will + # pass if either sub-matcher passes. + # This can be chained together to form an arbitrarily long + # chain of matchers. + # + # @api public + # @example + # expect(stoplight.color).to eq("red").or eq("green").or eq("yellow") + # expect(stoplight.color).to eq("red") | eq("green") | eq("yellow") + # @note The negative form (`expect(...).not_to matcher.or other`) + # is not supported at this time. + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#38 + def or(matcher); end + + # Creates a compound `or` expectation. The matcher will + # pass if either sub-matcher passes. + # This can be chained together to form an arbitrarily long + # chain of matchers. + # + # @api public + # @example + # expect(stoplight.color).to eq("red").or eq("green").or eq("yellow") + # expect(stoplight.color).to eq("red") | eq("green") | eq("yellow") + # @note The negative form (`expect(...).not_to matcher.or other`) + # is not supported at this time. + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#38 + def |(matcher); end + + private + + # Returns the description of the given object in a way that is + # aware of composed matchers. If the object is a matcher with + # a `description` method, returns the description; otherwise + # returns `object.inspect`. + # + # You are encouraged to use this in your custom matcher's + # `description`, `failure_message` or + # `failure_message_when_negated` implementation if you are + # supporting matcher arguments. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#82 + def description_of(object); end + + # We should enumerate arrays as long as they are not recursive. + # + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#142 + def should_enumerate?(item); end + + # Transforms the given data structure (typically a hash or array) + # into a new data structure that, when `#inspect` is called on it, + # will provide descriptions of any contained matchers rather than + # the normal `#inspect` output. + # + # You are encouraged to use this in your custom matcher's + # `description`, `failure_message` or + # `failure_message_when_negated` implementation if you are + # supporting any arguments which may be a data structure + # containing matchers. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#98 + def surface_descriptions_in(item); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#147 + def unreadable_io?(object); end + + # This provides a generic way to fuzzy-match an expected value against + # an actual value. It understands nested data structures (e.g. hashes + # and arrays) and is able to match against a matcher being used as + # the expected value or within the expected value at any level of + # nesting. + # + # Within a custom matcher you are encouraged to use this whenever your + # matcher needs to match two values, unless it needs more precise semantics. + # For example, the `eq` matcher _does not_ use this as it is meant to + # use `==` (and only `==`) for matching. + # + # @api public + # @param expected [Object] what is expected + # @param actual [Object] the actual value + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#66 + def values_match?(expected, actual); end + + # Historically, a single matcher instance was only checked + # against a single value. Given that the matcher was only + # used once, it's been common to memoize some intermediate + # calculation that is derived from the `actual` value in + # order to reuse that intermediate result in the failure + # message. + # + # This can cause a problem when using such a matcher as an + # argument to another matcher in a composed matcher expression, + # since the matcher instance may be checked against multiple + # values and produce invalid results due to the memoization. + # + # To deal with this, we clone any matchers in `expected` via + # this method when using `values_match?`, so that any memoization + # does not "leak" between checks. + # + # @api public + # @private + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#128 + def with_matchers_cloned(object); end + + class << self + # We should enumerate arrays as long as they are not recursive. + # + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#142 + def should_enumerate?(item); end + + # Transforms the given data structure (typically a hash or array) + # into a new data structure that, when `#inspect` is called on it, + # will provide descriptions of any contained matchers rather than + # the normal `#inspect` output. + # + # You are encouraged to use this in your custom matcher's + # `description`, `failure_message` or + # `failure_message_when_negated` implementation if you are + # supporting any arguments which may be a data structure + # containing matchers. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#98 + def surface_descriptions_in(item); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#147 + def unreadable_io?(object); end + end +end + +# Wraps an item in order to surface its `description` via `inspect`. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/composable.rb#158 +class RSpec::Matchers::Composable::DescribableItem < ::Struct + # Inspectable version of the item description + # + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#160 + def inspect; end + + # Returns the value of attribute item + # + # @return [Object] the current value of item + def item; end + + # Sets the attribute item + # + # @param value [Object] the value to set the attribute item to. + # @return [Object] the newly set value + def item=(_); end + + # A pretty printed version of the item description. + # + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#165 + def pretty_print(pp); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# Defines the custom matcher DSL. +# +# source://rspec-expectations//lib/rspec/matchers/dsl.rb#6 +module RSpec::Matchers::DSL + # Defines a matcher alias. The returned matcher's `description` will be overridden + # to reflect the phrasing of the new name, which will be used in failure messages + # when passed as an argument to another matcher in a composed matcher expression. + # + # @example + # RSpec::Matchers.alias_matcher :a_list_sorted_by, :be_sorted_by do |description| + # description.sub("be sorted by", "a list sorted by") + # end + # + # be_sorted_by(:age).description # => "be sorted by age" + # a_list_sorted_by(:age).description # => "a list sorted by age" + # @example + # RSpec::Matchers.alias_matcher :a_list_that_sums_to, :sum_to + # sum_to(3).description # => "sum to 3" + # a_list_that_sums_to(3).description # => "a list that sums to 3" + # @option options + # @param old_name [Symbol] the original name for the matcher + # @param new_name [Symbol] the new name for the matcher + # @param options [Hash] options for the aliased matcher + # @see RSpec::Matchers + # @yield [String] optional block that, when given, is used to define the overridden + # logic. The yielded arg is the original description or failure message. If no + # block is provided, a default override is used based on the old and new names. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#32 + def alias_matcher(new_name, old_name, options = T.unsafe(nil), &description_override); end + + # Defines a custom matcher. + # + # @param name [Symbol] the name for the matcher + # @see RSpec::Matchers + # @yield [Object] block that is used to define the matcher. + # The block is evaluated in the context of your custom matcher class. + # When args are passed to your matcher, they will be yielded here, + # usually representing the expected value(s). + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#73 + def define(name, &declarations); end + + # Defines a negated matcher. The returned matcher's `description` and `failure_message` + # will be overridden to reflect the phrasing of the new name, and the match logic will + # be based on the original matcher but negated. + # + # @example + # RSpec::Matchers.define_negated_matcher :exclude, :include + # include(1, 2).description # => "include 1 and 2" + # exclude(1, 2).description # => "exclude 1 and 2" + # @param negated_name [Symbol] the name for the negated matcher + # @param base_name [Symbol] the name of the original matcher that will be negated + # @see RSpec::Matchers + # @yield [String] optional block that, when given, is used to define the overridden + # logic. The yielded arg is the original description or failure message. If no + # block is provided, a default override is used based on the old and new names. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#61 + def define_negated_matcher(negated_name, base_name, &description_override); end + + # Defines a custom matcher. + # + # @param name [Symbol] the name for the matcher + # @see RSpec::Matchers + # @yield [Object] block that is used to define the matcher. + # The block is evaluated in the context of your custom matcher class. + # When args are passed to your matcher, they will be yielded here, + # usually representing the expected value(s). + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#73 + def matcher(name, &declarations); end + + private + + # :nocov: + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#84 + def warn_about_block_args(name, declarations); end +end + +# Defines default implementations of the matcher +# protocol methods for custom matchers. You can +# override any of these using the {RSpec::Matchers::DSL::Macros Macros} methods +# from within an `RSpec::Matchers.define` block. +# +# source://rspec-expectations//lib/rspec/matchers/dsl.rb#385 +module RSpec::Matchers::DSL::DefaultImplementations + include ::RSpec::Matchers::BuiltIn::BaseMatcher::DefaultFailureMessages + + # The default description. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#395 + def description; end + + # Used internally by objects returns by `should` and `should_not`. + # + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#390 + def diffable?; end + + # Most matchers do not expect call stack jumps. + # + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#412 + def expects_call_stack_jump?; end + + # Matchers do not support block expectations by default. You + # must opt-in. + # + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#403 + def supports_block_expectations?; end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#407 + def supports_value_expectations?; end + + private + + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#418 + def chained_method_clause_sentences; end +end + +# Contains the methods that are available from within the +# `RSpec::Matchers.define` DSL for creating custom matchers. +# +# source://rspec-expectations//lib/rspec/matchers/dsl.rb#104 +module RSpec::Matchers::DSL::Macros + # Convenience for defining methods on this matcher to create a fluent + # interface. The trick about fluent interfaces is that each method must + # return self in order to chain methods together. `chain` handles that + # for you. If the method is invoked and the + # `include_chain_clauses_in_custom_matcher_descriptions` config option + # hash been enabled, the chained method name and args will be added to the + # default description and failure message. + # + # In the common case where you just want the chained method to store some + # value(s) for later use (e.g. in `match`), you can provide one or more + # attribute names instead of a block; the chained method will store its + # arguments in instance variables with those names, and the values will + # be exposed via getters. + # + # @example + # + # RSpec::Matchers.define :have_errors_on do |key| + # chain :with do |message| + # @message = message + # end + # + # match do |actual| + # actual.errors[key] == @message + # end + # end + # + # expect(minor).to have_errors_on(:age).with("Not old enough to participate") + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#298 + def chain(method_name, *attr_names, &definition); end + + # Customize the description to use for one-liners. Only use this when + # the description generated by default doesn't suit your needs. + # + # @example + # + # RSpec::Matchers.define :qualify_for do |expected| + # match { your_match_logic } + # + # description do + # "qualify for #{expected}" + # end + # end + # @yield [Object] actual the actual object (i.e. the value wrapped by `expect`) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#253 + def description(&definition); end + + # Tells the matcher to diff the actual and expected values in the failure + # message. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#259 + def diffable; end + + # Customizes the failure message to use when this matcher is + # asked to positively match. Only use this when the message + # generated by default doesn't suit your needs. + # + # @example + # + # RSpec::Matchers.define :have_strength do |expected| + # match { your_match_logic } + # + # failure_message do |actual| + # "Expected strength of #{expected}, but had #{actual.strength}" + # end + # end + # @yield [Object] actual the actual object (i.e. the value wrapped by `expect`) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#216 + def failure_message(&definition); end + + # Customize the failure message to use when this matcher is asked + # to negatively match. Only use this when the message generated by + # default doesn't suit your needs. + # + # @example + # + # RSpec::Matchers.define :have_strength do |expected| + # match { your_match_logic } + # + # failure_message_when_negated do |actual| + # "Expected not to have strength of #{expected}, but did" + # end + # end + # @yield [Object] actual the actual object (i.e. the value wrapped by `expect`) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#235 + def failure_message_when_negated(&definition); end + + # Stores the block that is used to determine whether this matcher passes + # or fails. The block should return a boolean value. When the matcher is + # passed to `expect(...).to` and the block returns `true`, then the expectation + # passes. Similarly, when the matcher is passed to `expect(...).not_to` and the + # block returns `false`, then the expectation passes. + # + # By default the match block will swallow expectation errors (e.g. + # caused by using an expectation such as `expect(1).to eq 2`), if you + # wish to allow these to bubble up, pass in the option + # `:notify_expectation_failures => true`. + # + # @example + # + # RSpec::Matchers.define :be_even do + # match do |actual| + # actual.even? + # end + # end + # + # expect(4).to be_even # passes + # expect(3).not_to be_even # passes + # expect(3).to be_even # fails + # expect(4).not_to be_even # fails + # @param options [Hash] for defining the behavior of the match block. + # @yield [Object] actual the actual value (i.e. the value wrapped by `expect`) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#131 + def match(options = T.unsafe(nil), &match_block); end + + # Use this instead of `match` when the block will raise an exception + # rather than returning false to indicate a failure. + # + # @example + # + # RSpec::Matchers.define :accept_as_valid do |candidate_address| + # match_unless_raises ValidationException do |validator| + # validator.validate(candidate_address) + # end + # end + # + # expect(email_validator).to accept_as_valid("person@company.com") + # @yield [Object] actual the actual object (i.e. the value wrapped by `expect`) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#188 + def match_unless_raises(expected_exception = T.unsafe(nil), &match_block); end + + # Use this to define the block for a negative expectation (`expect(...).not_to`) + # when the positive and negative forms require different handling. This + # is rarely necessary, but can be helpful, for example, when specifying + # asynchronous processes that require different timeouts. + # + # By default the match block will swallow expectation errors (e.g. + # caused by using an expectation such as `expect(1).to eq 2`), if you + # wish to allow these to bubble up, pass in the option + # `:notify_expectation_failures => true`. + # + # @param options [Hash] for defining the behavior of the match block. + # @yield [Object] actual the actual value (i.e. the value wrapped by `expect`) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#160 + def match_when_negated(options = T.unsafe(nil), &match_block); end + + # Declares that the matcher can be used in a block expectation. + # Users will not be able to use your matcher in a block + # expectation without declaring this. + # (e.g. `expect { do_something }.to matcher`). + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#267 + def supports_block_expectations; end + + private + + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#312 + def assign_attributes(attr_names); end + + # Does the following: + # + # - Defines the named method using a user-provided block + # in @user_method_defs, which is included as an ancestor + # in the singleton class in which we eval the `define` block. + # - Defines an overridden definition for the same method + # usign the provided `our_def` block. + # - Provides a default `our_def` block for the common case + # of needing to call the user's definition with `@actual` + # as an arg, but only if their block's arity can handle it. + # + # This compiles the user block into an actual method, allowing + # them to use normal method constructs like `return` + # (e.g. for an early guard statement), while allowing us to define + # an override that can provide the wrapped handling + # (e.g. assigning `@actual`, rescueing errors, etc) and + # can `super` to the user's definition. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#346 + def define_user_override(method_name, user_def, &our_def); end +end + +# Defines deprecated macro methods from RSpec 2 for backwards compatibility. +# +# @deprecated Use the methods from {Macros} instead. +# +# source://rspec-expectations//lib/rspec/matchers/dsl.rb#354 +module RSpec::Matchers::DSL::Macros::Deprecated + # @deprecated Use {Macros#failure_message} instead. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#368 + def failure_message_for_should(&definition); end + + # @deprecated Use {Macros#failure_message_when_negated} instead. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#374 + def failure_message_for_should_not(&definition); end + + # @deprecated Use {Macros#match} instead. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#356 + def match_for_should(&definition); end + + # @deprecated Use {Macros#match_when_negated} instead. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#362 + def match_for_should_not(&definition); end +end + +# @private +# +# source://rspec-expectations//lib/rspec/matchers/dsl.rb#146 +RSpec::Matchers::DSL::Macros::RAISE_NOTIFIER = T.let(T.unsafe(nil), Proc) + +# The class used for custom matchers. The block passed to +# `RSpec::Matchers.define` will be evaluated in the context +# of the singleton class of an instance, and will have the +# {RSpec::Matchers::DSL::Macros Macros} methods available. +# +# source://rspec-expectations//lib/rspec/matchers/dsl.rb#433 +class RSpec::Matchers::DSL::Matcher + include ::RSpec::Matchers::BuiltIn::BaseMatcher::DefaultFailureMessages + include ::RSpec::Matchers::DSL::DefaultImplementations + include ::RSpec::Matchers + include ::RSpec::Matchers::Composable + extend ::RSpec::Matchers::DSL::Macros + extend ::RSpec::Matchers::DSL::Macros::Deprecated + + # @api private + # @return [Matcher] a new instance of Matcher + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#462 + def initialize(name, declarations, matcher_execution_context, *expected, &block_arg); end + + # Exposes the value being matched against -- generally the object + # object wrapped by `expect`. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#449 + def actual; end + + # The block parameter used in the expectation + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#456 + def block_arg; end + + # Provides the expected value. This will return an array if + # multiple arguments were passed to the matcher; otherwise it + # will return a single value. + # + # @see #expected_as_array + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#482 + def expected; end + + # Returns the expected value as an an array. This exists primarily + # to aid in upgrading from RSpec 2.x, since in RSpec 2, `expected` + # always returned an array. + # + # @see #expected + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#494 + def expected_as_array; end + + # Adds the name (rather than a cryptic hex number) + # so we can identify an instance of + # the matcher in error messages (e.g. for `NoMethodError`) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#499 + def inspect; end + + # The name of the matcher. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#459 + def name; end + + # Exposes the exception raised during the matching by `match_unless_raises`. + # Could be useful to extract details for a failure message. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#453 + def rescued_exception; end + + private + + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#522 + def actual_arg_for(block); end + + # Takes care of forwarding unhandled messages to the + # `@matcher_execution_context` (typically the current + # running `RSpec::Core::Example`). This is needed by + # rspec-rails so that it can define matchers that wrap + # Rails' test helper methods, but it's also a useful + # feature in its own right. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#532 + def method_missing(method, *args, **_arg2, &block); end + + # Indicates that this matcher responds to messages + # from the `@matcher_execution_context` as well. + # Also, supports getting a method object for such methods. + # + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#507 + def respond_to_missing?(method, include_private = T.unsafe(nil)); end +end + +# source://rspec-expectations//lib/rspec/matchers.rb#959 +RSpec::Matchers::DYNAMIC_MATCHER_REGEX = T.let(T.unsafe(nil), Regexp) + +# Facilitates converting ruby objects to English phrases. +# +# source://rspec-expectations//lib/rspec/matchers/english_phrasing.rb#4 +module RSpec::Matchers::EnglishPhrasing + class << self + # when given an empty list. + # + # Converts an object (often a collection of objects) + # into an English list. + # + # list(['banana', 'kiwi', 'mango']) + # #=> " \"banana\", \"kiwi\", and \"mango\"" + # + # Given an empty collection, returns the empty string. + # + # list([]) #=> "" + # + # @note The returned string has a leading space except + # + # source://rspec-expectations//lib/rspec/matchers/english_phrasing.rb#26 + def list(obj); end + + # Converts a symbol into an English expression. + # + # split_words(:banana_creme_pie) #=> "banana creme pie" + # + # source://rspec-expectations//lib/rspec/matchers/english_phrasing.rb#9 + def split_words(sym); end + end +end + +# source://rspec-expectations//lib/rspec/matchers.rb#958 +RSpec::Matchers::HAS_REGEX = T.let(T.unsafe(nil), Regexp) + +# Provides the necessary plumbing to wrap a matcher with a decorator. +# +# @private +# +# source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#31 +class RSpec::Matchers::MatcherDelegator < ::RSpec::Matchers::BaseDelegator + include ::RSpec::Matchers::Composable + + # @return [MatcherDelegator] a new instance of MatcherDelegator + # + # source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#35 + def initialize(base_matcher); end + + # Returns the value of attribute base_matcher. + # + # source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#33 + def base_matcher; end + + # source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#39 + def method_missing(*args, &block); end + + private + + # source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#55 + def initialize_copy(other); end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#44 + def respond_to_missing?(name, include_all = T.unsafe(nil)); end +end + +# Handles list of expected and actual value pairs when there is a need +# to render multiple diffs. Also can handle one pair. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/multi_matcher_diff.rb#6 +class RSpec::Matchers::MultiMatcherDiff + # @api private + # @return [MultiMatcherDiff] a new instance of MultiMatcherDiff + # + # source://rspec-expectations//lib/rspec/matchers/multi_matcher_diff.rb#16 + def initialize(expected_list); end + + # Returns message with diff(s) appended for provided differ + # factory and actual value if there are any + # + # @api private + # @param message [String] original failure message + # @param differ [Proc] + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/multi_matcher_diff.rb#47 + def message_with_diff(message, differ); end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/multi_matcher_diff.rb#68 + def diffs(differ); end + + class << self + # Wraps provided matcher list in instance of + # MultiMatcherDiff. + # + # @api private + # @param matchers [Array] list of matchers to wrap + # @return [RSpec::Matchers::MultiMatcherDiff] + # + # source://rspec-expectations//lib/rspec/matchers/multi_matcher_diff.rb#37 + def for_many_matchers(matchers); end + + # Wraps provided expected value in instance of + # MultiMatcherDiff. If provided value is already an + # MultiMatcherDiff then it just returns it. + # + # @api private + # @param expected [Any] value to be wrapped + # @param actual [Any] value + # @return [RSpec::Matchers::MultiMatcherDiff] + # + # source://rspec-expectations//lib/rspec/matchers/multi_matcher_diff.rb#27 + def from(expected, actual); end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/multi_matcher_diff.rb#58 + def diff_label_for(matcher); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/multi_matcher_diff.rb#62 + def truncated(description); end + end +end + +# Default diff label when there is only one matcher in diff +# output +# +# @api private +# @private +# +# source://rspec-expectations//lib/rspec/matchers/multi_matcher_diff.rb#10 +RSpec::Matchers::MultiMatcherDiff::DEFAULT_DIFF_LABEL = T.let(T.unsafe(nil), String) + +# Maximum readable matcher description length +# +# @api private +# @private +# +# source://rspec-expectations//lib/rspec/matchers/multi_matcher_diff.rb#14 +RSpec::Matchers::MultiMatcherDiff::DESCRIPTION_MAX_LENGTH = T.let(T.unsafe(nil), Integer) diff --git a/sorbet/rbi/gems/rspec-mocks.rbi b/sorbet/rbi/gems/rspec-mocks.rbi deleted file mode 100644 index 29d7550..0000000 --- a/sorbet/rbi/gems/rspec-mocks.rbi +++ /dev/null @@ -1,1115 +0,0 @@ -# This file is autogenerated. Do not edit it by hand. Regenerate it with: -# srb rbi gems - -# typed: false -# -# If you would like to make changes to this file, great! Please create the gem's shim here: -# -# https://github.com/sorbet/sorbet-typed/new/master?filename=lib/rspec-mocks/all/rspec-mocks.rbi -# -# rspec-mocks-3.13.1 - -module RSpec -end -module RSpec::Mocks - def self.allow_message(subject, message, opts = nil, &block); end - def self.configuration; end - def self.error_generator; end - def self.expect_message(subject, message, opts = nil, &block); end - def self.setup; end - def self.space; end - def self.teardown; end - def self.verify; end - def self.with_temporary_scope; end -end -class RSpec::Mocks::InstanceMethodStasher - def handle_restoration_failures; end - def initialize(object, method); end - def method_defined_directly_on_klass?; end - def method_defined_on_klass?(klass = nil); end - def method_is_stashed?; end - def method_owned_by_klass?; end - def original_method; end - def restore; end - def stash; end -end -class RSpec::Mocks::MethodDouble - def add_default_stub(*args, &implementation); end - def add_expectation(error_generator, expectation_ordering, expected_from, opts, &implementation); end - def add_simple_expectation(method_name, response, error_generator, backtrace_line); end - def add_simple_stub(method_name, response); end - def add_stub(error_generator, expectation_ordering, expected_from, opts = nil, &implementation); end - def build_expectation(error_generator, expectation_ordering); end - def clear; end - def configure_method; end - def define_proxy_method; end - def definition_target; end - def expectations; end - def initialize(object, method_name, proxy); end - def message_expectation_class; end - def method_missing_block; end - def method_name; end - def method_stasher; end - def new_rspec_prepended_module; end - def object; end - def object_singleton_class; end - def original_implementation_callable; end - def original_method; end - def proxy_method_invoked(_obj, *args, **, &block); end - def raise_method_not_stubbed_error; end - def remove_method_from_definition_target; end - def remove_stub; end - def remove_stub_if_present; end - def reset; end - def restore_original_method; end - def restore_original_visibility; end - def save_original_implementation_callable!; end - def setup_simple_method_double(method_name, response, collection, error_generator = nil, backtrace_line = nil); end - def show_frozen_warning; end - def stubs; end - def usable_rspec_prepended_module; end - def verify; end - def visibility; end -end -class RSpec::Mocks::MethodDouble::RSpecPrependedModule < Module -end -module RSpec::Mocks::ArgumentMatchers - def a_kind_of(klass); end - def an_instance_of(klass); end - def any_args; end - def anything; end - def array_excluding(*args); end - def array_including(*args); end - def boolean; end - def duck_type(*args); end - def hash_excluding(*args); end - def hash_including(*args); end - def hash_not_including(*args); end - def instance_of(klass); end - def kind_of(klass); end - def no_args; end - def self.anythingize_lonely_keys(*args); end -end -class RSpec::Mocks::ArgumentMatchers::SingletonMatcher - def self.inherited(subklass); end - def self.new(*, **); end -end -class RSpec::Mocks::ArgumentMatchers::AnyArgsMatcher < RSpec::Mocks::ArgumentMatchers::SingletonMatcher - def description; end -end -class RSpec::Mocks::ArgumentMatchers::AnyArgMatcher < RSpec::Mocks::ArgumentMatchers::SingletonMatcher - def ===(_other); end - def description; end -end -class RSpec::Mocks::ArgumentMatchers::NoArgsMatcher < RSpec::Mocks::ArgumentMatchers::SingletonMatcher - def description; end -end -class RSpec::Mocks::ArgumentMatchers::BooleanMatcher < RSpec::Mocks::ArgumentMatchers::SingletonMatcher - def ===(value); end - def description; end -end -class RSpec::Mocks::ArgumentMatchers::BaseHashMatcher - def ===(predicate, actual); end - def description(name); end - def formatted_expected_hash; end - def initialize(expected); end -end -class RSpec::Mocks::ArgumentMatchers::HashIncludingMatcher < RSpec::Mocks::ArgumentMatchers::BaseHashMatcher - def ===(actual); end - def description; end -end -class RSpec::Mocks::ArgumentMatchers::HashExcludingMatcher < RSpec::Mocks::ArgumentMatchers::BaseHashMatcher - def ===(actual); end - def description; end -end -class RSpec::Mocks::ArgumentMatchers::ArrayIncludingMatcher - def ===(actual); end - def description; end - def formatted_expected_values; end - def initialize(expected); end -end -class RSpec::Mocks::ArgumentMatchers::ArrayExcludingMatcher - def ===(actual); end - def description; end - def formatted_unexpected_values; end - def initialize(unexpected); end -end -class RSpec::Mocks::ArgumentMatchers::DuckTypeMatcher - def ===(value); end - def description; end - def initialize(*methods_to_respond_to); end -end -class RSpec::Mocks::ArgumentMatchers::InstanceOf - def ===(actual); end - def description; end - def initialize(klass); end -end -class RSpec::Mocks::ArgumentMatchers::KindOf - def ===(actual); end - def description; end - def initialize(klass); end -end -class RSpec::Mocks::ObjectReference - def self.anonymous_module?(mod); end - def self.for(object_module_or_name, allow_direct_object_refs = nil); end - def self.name_of(mod); end -end -class RSpec::Mocks::DirectObjectReference - def const_to_replace; end - def defined?; end - def description; end - def initialize(object); end - def target; end - def when_loaded; end -end -class RSpec::Mocks::NamedObjectReference - def const_to_replace; end - def defined?; end - def description; end - def initialize(const_name); end - def object; end - def target; end - def when_loaded; end -end -module RSpec::Mocks::ExampleMethods - def allow(target); end - def allow_any_instance_of(klass); end - def allow_message_expectations_on_nil; end - def class_double(doubled_class, *args); end - def class_spy(*args); end - def double(*args); end - def expect_any_instance_of(klass); end - def have_received(method_name, &block); end - def hide_const(constant_name); end - def instance_double(doubled_class, *args); end - def instance_spy(*args); end - def object_double(object_or_name, *args); end - def object_spy(*args); end - def receive(method_name, &block); end - def receive_message_chain(*messages, &block); end - def receive_messages(message_return_value_hash); end - def self.declare_double(type, *args); end - def self.declare_verifying_double(type, ref, *args); end - def self.extended(object); end - def self.included(klass); end - def spy(*args); end - def stub_const(constant_name, value, options = nil); end - def without_partial_double_verification; end - include RSpec::Mocks::ArgumentMatchers -end -module RSpec::Mocks::ExampleMethods::ExpectHost - def expect(target); end -end -class RSpec::Mocks::Proxy - def add_message_expectation(method_name, opts = nil, &block); end - def add_simple_expectation(method_name, response, location); end - def add_simple_stub(method_name, response); end - def add_stub(method_name, opts = nil, &implementation); end - def as_null_object; end - def build_expectation(method_name); end - def check_for_unexpected_arguments(expectation); end - def ensure_can_be_proxied!(object); end - def ensure_implemented(*_args); end - def find_almost_matching_expectation(method_name, *args, **); end - def find_almost_matching_stub(method_name, *args, **); end - def find_best_matching_expectation_for(method_name); end - def find_matching_expectation(method_name, *args, **); end - def find_matching_method_stub(method_name, *args, **); end - def has_negative_expectation?(message); end - def initialize(object, order_group, options = nil); end - def message_received(message, *args, **, &block); end - def messages_arg_list; end - def method_double_for(message); end - def method_double_if_exists_for_message(message); end - def null_object?; end - def object; end - def original_method_handle_for(_message); end - def prepended_modules_of_singleton_class; end - def raise_missing_default_stub_error(expectation, args_for_multiple_calls); end - def raise_unexpected_message_error(method_name, args); end - def received_message?(method_name, *args, &block); end - def record_message_received(message, *args, **, &block); end - def remove_stub(method_name); end - def remove_stub_if_present(method_name); end - def replay_received_message_on(expectation, &block); end - def reset; end - def self.prepended_modules_of(klass); end - def verify; end - def visibility_for(_method_name); end -end -class RSpec::Mocks::Proxy::SpecificMessage < Struct - def ==(expectation); end - def args; end - def args=(_); end - def message; end - def message=(_); end - def object; end - def object=(_); end - def self.[](*arg0); end - def self.inspect; end - def self.keyword_init?; end - def self.members; end - def self.new(*arg0); end -end -class RSpec::Mocks::TestDoubleProxy < RSpec::Mocks::Proxy - def reset; end -end -class RSpec::Mocks::PartialDoubleProxy < RSpec::Mocks::Proxy - def add_simple_expectation(method_name, response, location); end - def add_simple_stub(method_name, response); end - def any_instance_class_recorder_observing_method?(klass, method_name); end - def message_received(message, *args, **, &block); end - def original_method_handle_for(message); end - def reset; end - def visibility_for(method_name); end -end -module RSpec::Mocks::PartialClassDoubleProxyMethods - def initialize(source_space, *args); end - def method_double_from_ancestor_for(message); end - def original_method_handle_for(message); end - def original_unbound_method_handle_from_ancestor_for(message); end - def superclass_proxy; end -end -class RSpec::Mocks::PartialClassDoubleProxy < RSpec::Mocks::PartialDoubleProxy - include RSpec::Mocks::PartialClassDoubleProxyMethods -end -class RSpec::Mocks::ProxyForNil < RSpec::Mocks::PartialDoubleProxy - def add_message_expectation(method_name, opts = nil, &block); end - def add_stub(method_name, opts = nil, &implementation); end - def disallow_expectations; end - def disallow_expectations=(arg0); end - def initialize(order_group); end - def raise_error(method_name); end - def set_expectation_behavior; end - def warn(method_name); end - def warn_about_expectations; end - def warn_about_expectations=(arg0); end - def warn_or_raise!(method_name); end -end -module RSpec::Mocks::TestDouble - def ==(other); end - def __build_mock_proxy(order_group); end - def __build_mock_proxy_unless_expired(order_group); end - def __disallow_further_usage!; end - def __mock_proxy; end - def __raise_expired_error; end - def as_null_object; end - def assign_stubs(stubs); end - def freeze; end - def initialize(name = nil, stubs = nil); end - def initialize_copy(other); end - def inspect; end - def method_missing(message, *args, &block); end - def null_object?; end - def respond_to?(message, incl_private = nil); end - def to_s; end -end -class RSpec::Mocks::Double - include RSpec::Mocks::TestDouble -end -module RSpec::Mocks::TestDoubleFormatter - def self.format(dbl, unwrap = nil); end - def self.name_desc(dbl); end - def self.type_desc(dbl); end - def self.verified_module_desc(dbl); end -end -class RSpec::Mocks::ArgumentListMatcher - def args_match?(*actual_args, **); end - def ensure_expected_args_valid!; end - def expected_args; end - def initialize(*expected_args, **); end - def replace_any_args_with_splat_of_anything(before_count, actual_args_count); end - def resolve_expected_args_based_on(actual_args); end -end -class RSpec::Mocks::SimpleMessageExpectation - def called_max_times?; end - def initialize(message, response, error_generator, backtrace_line = nil); end - def invoke(*_); end - def matches?(message, *_); end - def unadvise(_); end - def verify_messages_received; end -end -class RSpec::Mocks::MessageExpectation - def and_call_original; end - def and_invoke(first_proc, *procs); end - def and_raise(*args); end - def and_return(first_value, *values); end - def and_throw(*args); end - def and_wrap_original(&block); end - def and_yield(*args, &block); end - def at_least(n, &block); end - def at_most(n, &block); end - def exactly(n, &block); end - def inspect; end - def never; end - def once(&block); end - def ordered(&block); end - def thrice(&block); end - def time(&block); end - def times(&block); end - def to_s; end - def twice(&block); end - def with(*args, **, &block); end - include RSpec::Mocks::MessageExpectation::ImplementationDetails -end -module RSpec::Mocks::MessageExpectation::ImplementationDetails - def actual_received_count_matters?; end - def additional_expected_calls; end - def advise(*args); end - def and_yield_receiver_to_implementation; end - def argument_list_matcher=(arg0); end - def called_max_times?; end - def description_for(verb); end - def ensure_expected_ordering_received!; end - def error_generator; end - def error_generator=(arg0); end - def exception_source_id; end - def expectation_count_type; end - def expected_args; end - def expected_from=(arg0); end - def expected_messages_received?; end - def expected_received_count=(arg0); end - def generate_error; end - def has_been_invoked?; end - def ignoring_args?; end - def implementation; end - def implementation=(arg0); end - def increase_actual_received_count!; end - def initial_implementation_action=(action); end - def initialize(error_generator, expectation_ordering, expected_from, method_double, type = nil, opts = nil, &implementation_block); end - def inner_implementation_action=(action); end - def invoke(parent_stub, *args, **, &block); end - def invoke_incrementing_actual_calls_by(increment, allowed_to_fail, parent_stub, *args, **, &block); end - def invoke_without_incrementing_received_count(parent_stub, *args, **, &block); end - def matches?(message, *args, **); end - def matches_at_least_count?; end - def matches_at_most_count?; end - def matches_exact_count?; end - def matches_name_but_not_args(message, *args); end - def message; end - def negative?; end - def negative_expectation_for?(message); end - def ordered?; end - def orig_object; end - def raise_already_invoked_error_if_necessary(calling_customization); end - def raise_out_of_order_error; end - def raise_unexpected_message_args_error(args_for_multiple_calls); end - def safe_invoke(parent_stub, *args, **, &block); end - def set_expected_received_count(relativity, n); end - def similar_messages; end - def terminal_implementation_action=(action); end - def type; end - def unadvise(args); end - def verify_messages_received; end - def warn_about_stub_override; end - def wrap_original(method_name, &block); end - def yield_receiver_to_implementation_block?; end -end -class RSpec::Mocks::AndYieldImplementation - def call(*_args_to_ignore, &block); end - def initialize(args_to_yield, eval_context, error_generator); end -end -class RSpec::Mocks::AndReturnImplementation - def call(*_args_to_ignore, &_block); end - def initialize(values_to_return); end -end -class RSpec::Mocks::AndInvokeImplementation - def call(*args, &block); end - def initialize(procs_to_invoke); end -end -class RSpec::Mocks::Implementation - def actions; end - def call(*args, **, &block); end - def initial_action; end - def initial_action=(arg0); end - def inner_action; end - def inner_action=(arg0); end - def present?; end - def terminal_action; end - def terminal_action=(arg0); end -end -class RSpec::Mocks::AndWrapOriginalImplementation - def call(*args, **, &block); end - def cannot_modify_further_error; end - def initial_action=(_value); end - def initialize(method, block); end - def inner_action; end - def inner_action=(_value); end - def present?; end - def terminal_action=(_value); end -end -class RSpec::Mocks::AndWrapOriginalImplementation::CannotModifyFurtherError < StandardError -end -class RSpec::Mocks::OrderGroup - def clear; end - def consume; end - def empty?; end - def expectation_for(message); end - def expectations_invoked_in_order?; end - def expected_invocations; end - def handle_order_constraint(expectation); end - def initialize; end - def invoked(message); end - def invoked_expectations; end - def ready_for?(expectation); end - def register(expectation); end - def remaining_expectations; end - def verify_invocation_order(expectation); end -end -class RSpec::Mocks::MockExpectationError < Exception -end -class RSpec::Mocks::ExpiredTestDoubleError < RSpec::Mocks::MockExpectationError -end -class RSpec::Mocks::OutsideOfExampleError < StandardError -end -class RSpec::Mocks::MockExpectationAlreadyInvokedError < Exception -end -class RSpec::Mocks::CannotSupportArgMutationsError < StandardError -end -class RSpec::Mocks::UnsupportedMatcherError < StandardError -end -class RSpec::Mocks::NegationUnsupportedError < StandardError -end -class RSpec::Mocks::VerifyingDoubleNotDefinedError < StandardError -end -class RSpec::Mocks::ErrorGenerator - def __raise(message, backtrace_line = nil, source_id = nil); end - def arg_list(args); end - def count_message(count, expectation_count_type = nil); end - def default_error_message(expectation, expected_args, actual_args); end - def describe_expectation(verb, message, expected_received_count, _actual_received_count, args); end - def diff_message(expected_args, actual_args); end - def differ; end - def error_message(expectation, args_for_multiple_calls); end - def expectation_on_nil_message(method_name); end - def expected_part_of_expectation_error(expected_received_count, expectation_count_type, argument_list_matcher); end - def format_args(args); end - def format_received_args(args_for_multiple_calls); end - def group_count(index, args); end - def grouped_args(args); end - def initialize(target = nil); end - def intro(unwrapped = nil); end - def list_of_exactly_one_string?(args); end - def method_call_args_description(args, generic_prefix = nil, matcher_prefix = nil); end - def notify(*args); end - def opts; end - def opts=(arg0); end - def prepend_to_backtrace(exception, line); end - def raise_already_invoked_error(message, calling_customization); end - def raise_cant_constrain_count_for_negated_have_received_error(count_constraint); end - def raise_double_negation_error(wrapped_expression); end - def raise_expectation_error(message, expected_received_count, argument_list_matcher, actual_received_count, expectation_count_type, args, backtrace_line = nil, source_id = nil); end - def raise_expectation_on_mocked_method(method); end - def raise_expectation_on_nil_error(method_name); end - def raise_expectation_on_unstubbed_method(method); end - def raise_expired_test_double_error; end - def raise_have_received_disallowed(type, reason); end - def raise_invalid_arguments_error(verifier); end - def raise_method_not_stubbed_error(method_name); end - def raise_missing_block_error(args_to_yield); end - def raise_missing_default_stub_error(expectation, args_for_multiple_calls); end - def raise_non_public_error(method_name, visibility); end - def raise_only_valid_on_a_partial_double(method); end - def raise_out_of_order_error(message); end - def raise_similar_message_args_error(expectation, args_for_multiple_calls, backtrace_line = nil); end - def raise_unexpected_message_args_error(expectation, args_for_multiple_calls, source_id = nil); end - def raise_unexpected_message_error(message, args); end - def raise_unimplemented_error(doubled_module, method_name, object); end - def raise_verifying_double_not_defined_error(ref); end - def raise_wrong_arity_error(args_to_yield, signature); end - def received_part_of_expectation_error(actual_received_count, args); end - def times(count); end - def unexpected_arguments_message(expected_args_string, actual_args_string); end - def unpack_string_args(formatted_expected_args, actual_args); end -end -class RSpec::Mocks::RootSpace - def any_instance_proxy_for(*_args); end - def any_instance_recorder_for(*_args); end - def any_instance_recorders_from_ancestry_of(_object); end - def new_scope; end - def proxy_for(*_args); end - def raise_lifecycle_message; end - def register_constant_mutator(_mutator); end - def registered?(_object); end - def reset_all; end - def superclass_proxy_for(*_args); end - def verify_all; end -end -class RSpec::Mocks::Space - def any_instance_mutex; end - def any_instance_proxy_for(klass); end - def any_instance_recorder_for(klass, only_return_existing = nil); end - def any_instance_recorder_not_found_for(id, klass); end - def any_instance_recorders; end - def any_instance_recorders_from_ancestry_of(object); end - def class_proxy_with_callback_verification_strategy(object, strategy); end - def constant_mutator_for(name); end - def ensure_registered(object); end - def id_for(object); end - def initialize; end - def new_mutex; end - def new_scope; end - def proxies; end - def proxies_of(klass); end - def proxy_for(object); end - def proxy_mutex; end - def proxy_not_found_for(id, object); end - def register_constant_mutator(mutator); end - def registered?(object); end - def reset_all; end - def superclass_proxy_for(klass); end - def superclass_proxy_not_found_for(id, object); end - def verify_all; end -end -class RSpec::Mocks::NestedSpace < RSpec::Mocks::Space - def any_instance_recorder_not_found_for(id, klass); end - def constant_mutator_for(name); end - def initialize(parent); end - def proxies_of(klass); end - def proxy_not_found_for(id, object); end - def registered?(object); end -end -class RSpec::Mocks::Constant - def hidden=(arg0); end - def hidden?; end - def initialize(name); end - def inspect; end - def mutated?; end - def name; end - def original_value; end - def original_value=(arg0); end - def previously_defined=(arg0); end - def previously_defined?; end - def self.original(name); end - def self.unmutated(name); end - def stubbed=(arg0); end - def stubbed?; end - def to_s; end - def valid_name=(arg0); end - def valid_name?; end - extend RSpec::Support::RecursiveConstMethods -end -class RSpec::Mocks::ConstantMutator - def self.hide(constant_name); end - def self.mutate(mutator); end - def self.raise_on_invalid_const; end - def self.stub(constant_name, value, options = nil); end - extend RSpec::Support::RecursiveConstMethods -end -class RSpec::Mocks::ConstantMutator::BaseMutator - def full_constant_name; end - def idempotently_reset; end - def initialize(full_constant_name, mutated_value, transfer_nested_constants); end - def original_value; end - def to_constant; end - include RSpec::Support::RecursiveConstMethods -end -class RSpec::Mocks::ConstantMutator::ConstantHider < RSpec::Mocks::ConstantMutator::BaseMutator - def mutate; end - def reset; end - def to_constant; end -end -class RSpec::Mocks::ConstantMutator::DefinedConstantReplacer < RSpec::Mocks::ConstantMutator::BaseMutator - def initialize(*args); end - def mutate; end - def reset; end - def should_transfer_nested_constants?; end - def to_constant; end - def transfer_nested_constants; end - def verify_constants_to_transfer!; end -end -class RSpec::Mocks::ConstantMutator::UndefinedConstantSetter < RSpec::Mocks::ConstantMutator::BaseMutator - def mutate; end - def name_for(parent, name); end - def reset; end - def to_constant; end -end -module RSpec::Mocks::TargetDelegationClassMethods - def delegate_not_to(matcher_method, options = nil); end - def delegate_to(matcher_method); end - def disallow_negation(method_name); end -end -module RSpec::Mocks::TargetDelegationInstanceMethods - def define_matcher(matcher, name, &block); end - def matcher_allowed?(matcher); end - def raise_negation_unsupported(method_name, matcher); end - def raise_unsupported_matcher(method_name, matcher); end - def target; end -end -class RSpec::Mocks::TargetBase - def initialize(target); end - extend RSpec::Mocks::TargetDelegationClassMethods - include RSpec::Mocks::TargetDelegationInstanceMethods -end -module RSpec::Mocks::ExpectationTargetMethods - def expression; end - def not_to(matcher, &block); end - def to(matcher, &block); end - def to_not(matcher, &block); end - extend RSpec::Mocks::TargetDelegationClassMethods - include RSpec::Mocks::TargetDelegationInstanceMethods -end -class RSpec::Mocks::ExpectationTarget < RSpec::Mocks::TargetBase - include RSpec::Mocks::ExpectationTargetMethods -end -class RSpec::Mocks::AllowanceTarget < RSpec::Mocks::TargetBase - def expression; end - def not_to(matcher, *_args); end - def to(matcher, &block); end - def to_not(matcher, *_args); end -end -class RSpec::Mocks::AnyInstanceAllowanceTarget < RSpec::Mocks::TargetBase - def expression; end - def not_to(matcher, *_args); end - def to(matcher, &block); end - def to_not(matcher, *_args); end -end -class RSpec::Mocks::AnyInstanceExpectationTarget < RSpec::Mocks::TargetBase - def expression; end - def not_to(matcher, &block); end - def to(matcher, &block); end - def to_not(matcher, &block); end -end -module RSpec::Mocks::Syntax - def self.default_should_syntax_host; end - def self.disable_expect(syntax_host = nil); end - def self.disable_should(syntax_host = nil); end - def self.enable_expect(syntax_host = nil); end - def self.enable_should(syntax_host = nil); end - def self.expect_enabled?(syntax_host = nil); end - def self.should_enabled?(syntax_host = nil); end - def self.warn_about_should!; end - def self.warn_unless_should_configured(method_name, replacement = nil); end -end -class BasicObject - def as_null_object; end - def null_object?; end - def received_message?(message, *args, &block); end - def should_not_receive(message, &block); end - def should_receive(message, opts = nil, &block); end - def stub(message_or_hash, opts = nil, &block); end - def stub_chain(*chain, &blk); end - def unstub(message); end -end -class Class < Module - def any_instance; end -end -class RSpec::Mocks::Configuration - def add_stub_and_should_receive_to(*modules); end - def allow_message_expectations_on_nil; end - def allow_message_expectations_on_nil=(arg0); end - def before_verifying_doubles(&block); end - def color?; end - def initialize; end - def patch_marshal_to_support_partial_doubles=(val); end - def reset_syntaxes_to_default; end - def syntax; end - def syntax=(*values); end - def temporarily_suppress_partial_double_verification; end - def temporarily_suppress_partial_double_verification=(arg0); end - def transfer_nested_constants=(arg0); end - def transfer_nested_constants?; end - def verify_doubled_constant_names=(arg0); end - def verify_doubled_constant_names?; end - def verify_partial_doubles=(val); end - def verify_partial_doubles?; end - def verifying_double_callbacks; end - def when_declaring_verifying_double(&block); end - def yield_receiver_to_any_instance_implementation_blocks=(arg0); end - def yield_receiver_to_any_instance_implementation_blocks?; end -end -class RSpec::Mocks::VerifyingMessageExpectation < RSpec::Mocks::MessageExpectation - def initialize(*args); end - def method_reference; end - def method_reference=(arg0); end - def validate_expected_arguments!; end - def with(*args, **, &block); end -end -class RSpec::Mocks::MethodReference - def defined?; end - def implemented?; end - def initialize(object_reference, method_name); end - def original_method; end - def self.for(object_reference, method_name); end - def self.instance_method_visibility_for(klass, method_name); end - def self.method_defined_at_any_visibility?(klass, method_name); end - def self.method_visibility_for(object, method_name); end - def unimplemented?; end - def visibility; end - def with_signature; end -end -class RSpec::Mocks::InstanceMethodReference < RSpec::Mocks::MethodReference - def find_method(mod); end - def method_defined?(mod); end - def method_implemented?(mod); end - def visibility_from(mod); end -end -class RSpec::Mocks::ObjectMethodReference < RSpec::Mocks::MethodReference - def find_method(object); end - def method_defined?(object); end - def method_implemented?(object); end - def self.for(object_reference, method_name); end - def visibility_from(object); end -end -class RSpec::Mocks::ClassNewMethodReference < RSpec::Mocks::ObjectMethodReference - def self.applies_to?(method_name); end - def self.uses_class_new?(klass); end - def with_signature; end -end -class RSpec::Mocks::CallbackInvocationStrategy - def call(doubled_module); end -end -class RSpec::Mocks::NoCallbackInvocationStrategy - def call(_doubled_module); end -end -module RSpec::Mocks::VerifyingProxyMethods - def add_message_expectation(method_name, opts = nil, &block); end - def add_simple_stub(method_name, *args); end - def add_stub(method_name, opts = nil, &implementation); end - def ensure_implemented(method_name); end - def ensure_publicly_implemented(method_name, _object); end -end -class RSpec::Mocks::VerifyingProxy < RSpec::Mocks::TestDoubleProxy - def initialize(object, order_group, doubled_module, method_reference_class); end - def method_reference; end - def validate_arguments!(method_name, args); end - def visibility_for(method_name); end - include RSpec::Mocks::VerifyingProxyMethods -end -class RSpec::Mocks::VerifyingPartialDoubleProxy < RSpec::Mocks::PartialDoubleProxy - def ensure_implemented(_method_name); end - def initialize(object, expectation_ordering, optional_callback_invocation_strategy = nil); end - def method_reference; end - include RSpec::Mocks::VerifyingProxyMethods -end -class RSpec::Mocks::VerifyingPartialClassDoubleProxy < RSpec::Mocks::VerifyingPartialDoubleProxy - include RSpec::Mocks::PartialClassDoubleProxyMethods -end -class RSpec::Mocks::VerifyingMethodDouble < RSpec::Mocks::MethodDouble - def add_expectation(*args, &block); end - def add_stub(*args, &block); end - def initialize(object, method_name, proxy, method_reference); end - def message_expectation_class; end - def proxy_method_invoked(obj, *args, **, &block); end - def validate_arguments!(actual_args); end -end -class RSpec::Mocks::VerifyingExistingMethodDouble < RSpec::Mocks::VerifyingMethodDouble - def initialize(object, method_name, proxy); end - def self.for(object, method_name, proxy); end - def unimplemented?; end - def with_signature; end -end -class RSpec::Mocks::VerifyingExistingClassNewMethodDouble < RSpec::Mocks::VerifyingExistingMethodDouble - def with_signature; end -end -module RSpec::Mocks::VerifyingDouble - def __send__(name, *args, **, &block); end - def initialize(doubled_module, *args); end - def method_missing(message, *args, &block); end - def respond_to?(message, include_private = nil); end - def send(name, *args, **, &block); end -end -class RSpec::Mocks::InstanceVerifyingDouble - def __build_mock_proxy(order_group); end - include RSpec::Mocks::TestDouble - include RSpec::Mocks::VerifyingDouble -end -module RSpec::Mocks::ObjectVerifyingDoubleMethods - def __build_mock_proxy(order_group); end - def as_stubbed_const(options = nil); end - include RSpec::Mocks::TestDouble - include RSpec::Mocks::VerifyingDouble -end -class RSpec::Mocks::ObjectVerifyingDouble - include RSpec::Mocks::ObjectVerifyingDoubleMethods -end -class RSpec::Mocks::ClassVerifyingDouble < Module - include RSpec::Mocks::ObjectVerifyingDoubleMethods -end -module RSpec::Mocks::Version -end -module RSpec::Support - def self.require_rspec_mocks(f); end -end -module RSpec::Mocks::Matchers -end -module RSpec::Mocks::Matchers::Matcher -end -module RSpec::Mocks::AnyInstance - def self.error_generator; end -end -class RSpec::Mocks::AnyInstance::Chain - def constrained_to_any_of?(*constraints); end - def expectation_fulfilled!; end - def initialize(recorder, *args, &block); end - def last_message; end - def matches_args?(*args); end - def messages; end - def negated?; end - def never; end - def playback!(instance); end - def record(rspec_method_name, *args, &block); end - def with(*args, &block); end - include RSpec::Mocks::AnyInstance::Chain::Customizations -end -module RSpec::Mocks::AnyInstance::Chain::Customizations - def and_call_original(*args, &block); end - def and_raise(*args, &block); end - def and_return(*args, &block); end - def and_throw(*args, &block); end - def and_wrap_original(*args, &block); end - def and_yield(*args, &block); end - def at_least(*args, &block); end - def at_most(*args, &block); end - def exactly(*args, &block); end - def never(*args, &block); end - def once(*args, &block); end - def self.record(method_name); end - def thrice(*args, &block); end - def time(*args, &block); end - def times(*args, &block); end - def twice(*args, &block); end - def with(*args, &block); end -end -class RSpec::Mocks::AnyInstance::ErrorGenerator < RSpec::Mocks::ErrorGenerator - def raise_does_not_implement_error(klass, method_name); end - def raise_message_already_received_by_other_instance_error(method_name, object_inspect, invoked_instance); end - def raise_not_supported_with_prepend_error(method_name, problem_mod); end - def raise_second_instance_received_message_error(unfulfilled_expectations); end -end -class RSpec::Mocks::AnyInstance::StubChain < RSpec::Mocks::AnyInstance::Chain - def create_message_expectation_on(instance); end - def expectation_fulfilled?; end - def invocation_order; end - def verify_invocation_order(rspec_method_name, *_args, &_block); end -end -class RSpec::Mocks::AnyInstance::StubChainChain < RSpec::Mocks::AnyInstance::StubChain - def create_message_expectation_on(instance); end - def initialize(*args); end - def invocation_order; end -end -class RSpec::Mocks::AnyInstance::ExpectChainChain < RSpec::Mocks::AnyInstance::StubChain - def create_message_expectation_on(instance); end - def expectation_fulfilled?; end - def initialize(*args); end - def invocation_order; end - def playback!(instance); end -end -class RSpec::Mocks::AnyInstance::ExpectationChain < RSpec::Mocks::AnyInstance::Chain - def expectation_fulfilled?; end - def initialize(*args, &block); end - def verify_invocation_order(_rspec_method_name, *_args, &_block); end -end -class RSpec::Mocks::AnyInstance::PositiveExpectationChain < RSpec::Mocks::AnyInstance::ExpectationChain - def create_message_expectation_on(instance); end - def invocation_order; end -end -class RSpec::Mocks::AnyInstance::MessageChains - def [](method_name); end - def add(method_name, chain); end - def all_expectations_fulfilled?; end - def each_unfulfilled_expectation_matching(method_name, *args); end - def has_expectation?(method_name); end - def initialize; end - def playback!(instance, method_name); end - def raise_if_second_instance_to_receive_message(instance); end - def received_expected_message!(method_name); end - def remove_stub_chains_for!(method_name); end - def unfulfilled_expectations; end -end -class RSpec::Mocks::AnyInstance::Recorder - def allow_no_prepended_module_definition_of(method_name); end - def already_observing?(method_name); end - def ancestor_is_an_observer?(ancestor, method_name); end - def backup_method!(method_name); end - def build_alias_method_name(method_name); end - def expect_chain(*method_names_and_optional_return_values, &block); end - def initialize(klass); end - def instance_that_received(method_name); end - def klass; end - def mark_invoked!(method_name); end - def message_chains; end - def normalize_chain(*args); end - def notify_received_message(_object, message, args, _blk); end - def observe!(method_name); end - def playback!(instance, method_name); end - def public_protected_or_private_method_defined?(method_name); end - def received_expected_message!(method_name); end - def remove_dummy_method!(method_name); end - def restore_method!(method_name); end - def restore_original_method!(method_name); end - def should_not_receive(method_name, &block); end - def should_receive(method_name, &block); end - def stop_all_observation!; end - def stop_observing!(method_name); end - def stub(method_name, &block); end - def stub_chain(*method_names_and_optional_return_values, &block); end - def stubs; end - def super_class_observers_for(method_name); end - def super_class_observing?(method_name); end - def unstub(method_name); end - def verify; end -end -class RSpec::Mocks::AnyInstance::Proxy - def expect_chain(*chain, &block); end - def initialize(recorder, target_proxies); end - def klass; end - def perform_proxying(method_name, args, block, &target_proxy_block); end - def should_not_receive(method_name, &block); end - def should_receive(method_name, &block); end - def stub(method_name_or_method_map, &block); end - def stub_chain(*chain, &block); end - def unstub(method_name); end -end -class RSpec::Mocks::AnyInstance::FluentInterfaceProxy < BasicObject - def initialize(targets); end - def method_missing(*args, &block); end - def respond_to_missing?(method_name, include_private = nil); end -end -class RSpec::Mocks::MessageChain - def block; end - def chain; end - def chain_on(object, *chain, &block); end - def find_matching_expectation; end - def find_matching_stub; end - def format_chain(*chain, &blk); end - def initialize(object, *chain, &blk); end - def object; end - def setup_chain; end -end -class RSpec::Mocks::ExpectChain < RSpec::Mocks::MessageChain - def expectation(object, message, &return_block); end - def self.expect_chain_on(object, *chain, &blk); end -end -class RSpec::Mocks::StubChain < RSpec::Mocks::MessageChain - def expectation(object, message, &return_block); end - def self.stub_chain_on(object, *chain, &blk); end -end -class RSpec::Mocks::MarshalExtension - def self.patch!; end - def self.unpatch!; end -end -class RSpec::Mocks::Matchers::HaveReceived - def apply_constraints_to(expectation); end - def at_least(*args); end - def at_most(*args); end - def capture_failure_message; end - def count_constraint; end - def description; end - def disallow(type, reason = nil); end - def does_not_match?(subject); end - def ensure_count_unconstrained; end - def exactly(*args); end - def expect; end - def expected_messages_received_in_order?; end - def failure_message; end - def failure_message_when_negated; end - def initialize(method_name, &block); end - def matcher_name; end - def matches?(subject, &block); end - def mock_proxy; end - def notify_failure_message; end - def once(*args); end - def ordered(*args); end - def setup_allowance(_subject, &_block); end - def setup_any_instance_allowance(_subject, &_block); end - def setup_any_instance_expectation(_subject, &_block); end - def setup_any_instance_negative_expectation(_subject, &_block); end - def setup_expectation(subject, &block); end - def setup_negative_expectation(subject, &block); end - def thrice(*args); end - def time(*args); end - def times(*args); end - def twice(*args); end - def with(*args); end - include RSpec::Mocks::Matchers::Matcher -end -class RSpec::Mocks::Matchers::ExpectationCustomization - def block; end - def block=(arg0); end - def initialize(method_name, args, block); end - def playback_onto(expectation); end -end -class RSpec::Mocks::Matchers::Receive - def and_call_original(*args, **, &block); end - def and_invoke(*args, **, &block); end - def and_raise(*args, **, &block); end - def and_return(*args, **, &block); end - def and_throw(*args, **, &block); end - def and_wrap_original(*args, **, &block); end - def and_yield(*args, **, &block); end - def at_least(*args, **, &block); end - def at_most(*args, **, &block); end - def describable; end - def description; end - def does_not_match?(subject, &block); end - def exactly(*args, **, &block); end - def initialize(message, block); end - def inspect(*args, **, &block); end - def matcher_name; end - def matches?(subject, &block); end - def move_block_to_last_customization(block); end - def never(*args, **, &block); end - def once(*args, **, &block); end - def ordered(*args, **, &block); end - def setup_allowance(subject, &block); end - def setup_any_instance_allowance(subject, &block); end - def setup_any_instance_expectation(subject, &block); end - def setup_any_instance_method_substitute(subject, method, block); end - def setup_any_instance_negative_expectation(subject, &block); end - def setup_expectation(subject, &block); end - def setup_method_substitute(host, method, block, *args); end - def setup_mock_proxy_method_substitute(subject, method, block); end - def setup_negative_expectation(subject, &block); end - def thrice(*args, **, &block); end - def time(*args, **, &block); end - def times(*args, **, &block); end - def to_s(*args, **, &block); end - def twice(*args, **, &block); end - def warn_if_any_instance(expression, subject); end - def with(*args, **, &block); end - include RSpec::Mocks::Matchers::Matcher -end -class RSpec::Mocks::Matchers::Receive::DefaultDescribable - def description_for(verb); end - def initialize(message); end -end -class RSpec::Mocks::Matchers::ReceiveMessageChain - def and_call_original(*args, &block); end - def and_invoke(*args, &block); end - def and_raise(*args, &block); end - def and_return(*args, &block); end - def and_throw(*args, &block); end - def and_yield(*args, &block); end - def description; end - def does_not_match?(*_args); end - def formatted_chain; end - def initialize(chain, &block); end - def matcher_name; end - def matches?(subject, &block); end - def replay_customizations(chain); end - def setup_allowance(subject, &block); end - def setup_any_instance_allowance(subject, &block); end - def setup_any_instance_expectation(subject, &block); end - def setup_expectation(subject, &block); end - def setup_negative_expectation(*_args); end - def with(*args, &block); end - include RSpec::Mocks::Matchers::Matcher -end -class RSpec::Mocks::Matchers::ReceiveMessages - def any_instance_of(subject); end - def description; end - def does_not_match?(_subject); end - def each_message_on(host); end - def initialize(message_return_value_hash); end - def matcher_name; end - def matches?(subject); end - def proxy_on(subject); end - def setup_allowance(subject); end - def setup_any_instance_allowance(subject); end - def setup_any_instance_expectation(subject); end - def setup_expectation(subject); end - def setup_negative_expectation(_subject); end - def warn_about_block; end - include RSpec::Mocks::Matchers::Matcher -end diff --git a/sorbet/rbi/gems/rspec-mocks@3.13.1.rbi b/sorbet/rbi/gems/rspec-mocks@3.13.1.rbi index 5147e7f..af2d69e 100644 --- a/sorbet/rbi/gems/rspec-mocks@3.13.1.rbi +++ b/sorbet/rbi/gems/rspec-mocks@3.13.1.rbi @@ -1,4 +1,4 @@ -# typed: false +# typed: true # DO NOT EDIT MANUALLY # This is an autogenerated file for types exported from the `rspec-mocks` gem. diff --git a/sorbet/rbi/gems/rspec-sorbet@1.9.2.rbi b/sorbet/rbi/gems/rspec-sorbet@1.9.2.rbi index 812fa80..d06c333 100644 --- a/sorbet/rbi/gems/rspec-sorbet@1.9.2.rbi +++ b/sorbet/rbi/gems/rspec-sorbet@1.9.2.rbi @@ -91,7 +91,7 @@ module RSpec::Sorbet::Doubles # @return [void] # - # source://sorbet-runtime/0.5.11609/lib/types/private/methods/_methods.rb#257 + # source://sorbet-runtime/0.5.11670/lib/types/private/methods/_methods.rb#257 def allow_instance_doubles!(*args, **_arg1, &blk); end # source://rspec-sorbet//lib/rspec/sorbet/doubles.rb#36 diff --git a/sorbet/rbi/gems/rspec-support.rbi b/sorbet/rbi/gems/rspec-support.rbi deleted file mode 100644 index fb53c50..0000000 --- a/sorbet/rbi/gems/rspec-support.rbi +++ /dev/null @@ -1,288 +0,0 @@ -# This file is autogenerated. Do not edit it by hand. Regenerate it with: -# srb rbi gems - -# typed: true -# -# If you would like to make changes to this file, great! Please create the gem's shim here: -# -# https://github.com/sorbet/sorbet-typed/new/master?filename=lib/rspec-support/all/rspec-support.rbi -# -# rspec-support-3.13.1 - -module RSpec - extend RSpec::Support::Warnings -end -module RSpec::Support - def self.class_of(object); end - def self.define_optimized_require_for_rspec(lib, &require_relative); end - def self.deregister_matcher_definition(&block); end - def self.failure_notifier; end - def self.failure_notifier=(callable); end - def self.is_a_matcher?(object); end - def self.matcher_definitions; end - def self.method_handle_for(object, method_name); end - def self.notify_failure(failure, options = nil); end - def self.register_matcher_definition(&block); end - def self.require_rspec_support(f); end - def self.rspec_description_for_object(object); end - def self.thread_local_data; end - def self.warning_notifier; end - def self.warning_notifier=(arg0); end - def self.with_failure_notifier(callable); end -end -module RSpec::Support::Version -end -class RSpec::Support::ComparableVersion - def <=>(other); end - def initialize(string); end - def segments; end - def string; end - include Comparable -end -module RSpec::Support::OS - def self.windows?; end - def self.windows_file_path?; end - def windows?; end - def windows_file_path?; end -end -module RSpec::Support::Ruby - def jruby?; end - def jruby_9000?; end - def jruby_version; end - def mri?; end - def non_mri?; end - def rbx?; end - def self.jruby?; end - def self.jruby_9000?; end - def self.jruby_version; end - def self.mri?; end - def self.non_mri?; end - def self.rbx?; end - def self.truffleruby?; end - def truffleruby?; end -end -module RSpec::Support::RubyFeatures - def caller_locations_supported?; end - def distincts_kw_args_from_positional_hash?; end - def fork_supported?; end - def kw_arg_separation?; end - def kw_args_supported?; end - def module_prepends_supported?; end - def module_refinement_supported?; end - def optional_and_splat_args_supported?; end - def required_kw_args_supported?; end - def ripper_supported?; end - def self.caller_locations_supported?; end - def self.distincts_kw_args_from_positional_hash?; end - def self.fork_supported?; end - def self.kw_arg_separation?; end - def self.kw_args_supported?; end - def self.module_prepends_supported?; end - def self.module_refinement_supported?; end - def self.optional_and_splat_args_supported?; end - def self.required_kw_args_supported?; end - def self.ripper_supported?; end - def self.supports_exception_cause?; end - def self.supports_rebinding_module_methods?; end - def self.supports_syntax_suggest?; end - def self.supports_taint?; end - def supports_exception_cause?; end - def supports_rebinding_module_methods?; end - def supports_syntax_suggest?; end - def supports_taint?; end -end -module RSpec::Support::AllExceptionsExceptOnesWeMustNotRescue - def self.===(exception); end -end -class RSpec::CallerFilter - def self.first_non_rspec_line(skip_frames = nil, increment = nil); end -end -module RSpec::Support::Warnings - def deprecate(deprecated, options = nil); end - def warn_deprecation(message, options = nil); end - def warn_with(message, options = nil); end - def warning(text, options = nil); end -end -class RSpec::Support::EncodedString - def <<(string); end - def ==(*args, &block); end - def detect_source_encoding(string); end - def empty?(*args, &block); end - def encoding(*args, &block); end - def eql?(*args, &block); end - def initialize(string, encoding = nil); end - def lines(*args, &block); end - def matching_encoding(string); end - def remove_invalid_bytes(string); end - def self.pick_encoding(source_a, source_b); end - def source_encoding; end - def split(regex_or_string); end - def to_s; end - def to_str; end -end -class RSpec::Support::ReentrantMutex - def enter; end - def exit; end - def initialize; end - def synchronize; end -end -class RSpec::Support::Mutex < Thread::Mutex - def self.new; end -end -class RSpec::Support::DirectoryMaker - def self.directory_exists?(dirname); end - def self.generate_path(stack, part); end - def self.generate_stack(path); end - def self.mkdir_p(path); end -end -class RSpec::Support::MethodSignature - def arbitrary_kw_args?; end - def classify_arity(arity = nil); end - def classify_parameters; end - def could_contain_kw_args?(args); end - def description; end - def has_kw_args_in?(args); end - def initialize(method); end - def invalid_kw_args_from(given_kw_args); end - def max_non_kw_args; end - def min_non_kw_args; end - def missing_kw_args_from(given_kw_args); end - def non_kw_args_arity_description; end - def optional_kw_args; end - def required_kw_args; end - def unlimited_args?; end - def valid_non_kw_args?(positional_arg_count, optional_max_arg_count = nil); end -end -class RSpec::Support::MethodSignatureExpectation - def empty?; end - def expect_arbitrary_keywords; end - def expect_arbitrary_keywords=(arg0); end - def expect_unlimited_arguments; end - def expect_unlimited_arguments=(arg0); end - def initialize; end - def keywords; end - def keywords=(values); end - def max_count; end - def max_count=(number); end - def min_count; end - def min_count=(number); end -end -class RSpec::Support::BlockSignature < RSpec::Support::MethodSignature - def classify_parameters; end -end -class RSpec::Support::MethodSignatureVerifier - def arbitrary_kw_args?; end - def error_message; end - def initialize(signature, args = nil); end - def invalid_kw_args; end - def kw_args; end - def max_non_kw_args; end - def min_non_kw_args; end - def missing_kw_args; end - def non_kw_args; end - def split_args(*args); end - def unlimited_args?; end - def valid?; end - def valid_non_kw_args?; end - def with_expectation(expectation); end -end -class RSpec::Support::LooseSignatureVerifier < RSpec::Support::MethodSignatureVerifier - def split_args(*args); end -end -class RSpec::Support::LooseSignatureVerifier::SignatureWithKeywordArgumentsMatcher - def has_kw_args_in?(args); end - def initialize(signature); end - def invalid_kw_args_from(_kw_args); end - def missing_kw_args_from(_kw_args); end - def non_kw_args_arity_description; end - def valid_non_kw_args?(*args); end -end -module RSpec::Support::WithKeywordsWhenNeeded - def class_exec(klass, *args, **, &block); end - def self.class_exec(klass, *args, **, &block); end -end -module RSpec::Support::RecursiveConstMethods - def const_defined_on?(mod, const_name); end - def constants_defined_on(mod); end - def get_const_defined_on(mod, const_name); end - def normalize_const_name(const_name); end - def recursive_const_defined?(const_name); end - def recursive_const_get(const_name); end -end -class RSpec::Support::ObjectFormatter - def format(object); end - def initialize(max_formatted_output_length = nil); end - def max_formatted_output_length; end - def max_formatted_output_length=(arg0); end - def prepare_array(array); end - def prepare_element(element); end - def prepare_for_inspection(object); end - def prepare_hash(input_hash); end - def recursive_structure?(object); end - def self.default_instance; end - def self.format(object); end - def self.prepare_for_inspection(object); end - def sort_hash_keys(input_hash); end - def truncate_string(str, start_index, end_index); end - def with_entering_structure(structure); end -end -class RSpec::Support::ObjectFormatter::InspectableItem < Struct - def inspect; end - def pretty_print(pp); end - def self.[](*arg0); end - def self.inspect; end - def self.keyword_init?; end - def self.members; end - def self.new(*arg0); end - def text; end - def text=(_); end -end -class RSpec::Support::ObjectFormatter::BaseInspector < Struct - def formatter; end - def formatter=(_); end - def inspect; end - def object; end - def object=(_); end - def pretty_print(pp); end - def self.[](*arg0); end - def self.can_inspect?(_object); end - def self.inspect; end - def self.keyword_init?; end - def self.members; end - def self.new(*arg0); end -end -class RSpec::Support::ObjectFormatter::TimeInspector < RSpec::Support::ObjectFormatter::BaseInspector - def inspect; end - def self.can_inspect?(object); end -end -class RSpec::Support::ObjectFormatter::DateTimeInspector < RSpec::Support::ObjectFormatter::BaseInspector - def inspect; end - def self.can_inspect?(object); end -end -class RSpec::Support::ObjectFormatter::BigDecimalInspector < RSpec::Support::ObjectFormatter::BaseInspector - def inspect; end - def self.can_inspect?(object); end -end -class RSpec::Support::ObjectFormatter::DescribableMatcherInspector < RSpec::Support::ObjectFormatter::BaseInspector - def inspect; end - def self.can_inspect?(object); end -end -class RSpec::Support::ObjectFormatter::UninspectableObjectInspector < RSpec::Support::ObjectFormatter::BaseInspector - def inspect; end - def klass; end - def native_object_id; end - def self.can_inspect?(object); end -end -class RSpec::Support::ObjectFormatter::DelegatorInspector < RSpec::Support::ObjectFormatter::BaseInspector - def inspect; end - def self.can_inspect?(object); end -end -class RSpec::Support::ObjectFormatter::InspectableObjectInspector < RSpec::Support::ObjectFormatter::BaseInspector - def inspect; end - def self.can_inspect?(object); end -end -module RSpec::Support::FuzzyMatcher - def self.arrays_match?(expected_list, actual_list); end - def self.hashes_match?(expected_hash, actual_hash); end - def self.values_match?(expected, actual); end -end diff --git a/sorbet/rbi/gems/rspec-support@3.13.1.rbi b/sorbet/rbi/gems/rspec-support@3.13.1.rbi index f8358bc..52dcf0d 100644 --- a/sorbet/rbi/gems/rspec-support@3.13.1.rbi +++ b/sorbet/rbi/gems/rspec-support@3.13.1.rbi @@ -188,6 +188,12 @@ module RSpec::Support # source://rspec-support//lib/rspec/support.rb#25 def require_rspec_core(f); end + # source://rspec-support//lib/rspec/support.rb#25 + def require_rspec_expectations(f); end + + # source://rspec-support//lib/rspec/support.rb#25 + def require_rspec_matchers(f); end + # source://rspec-support//lib/rspec/support.rb#25 def require_rspec_support(f); end @@ -537,6 +543,35 @@ RSpec::Support::EncodedString::US_ASCII = T.let(T.unsafe(nil), String) # source://rspec-support//lib/rspec/support/encoded_string.rb#8 RSpec::Support::EncodedString::UTF_8 = T.let(T.unsafe(nil), String) +# Provides a means to fuzzy-match between two arbitrary objects. +# Understands array/hash nesting. Uses `===` or `==` to +# perform the matching. +# +# source://rspec-support//lib/rspec/support/fuzzy_matcher.rb#8 +module RSpec::Support::FuzzyMatcher + class << self + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/fuzzy_matcher.rb#10 + def values_match?(expected, actual); end + + private + + # @private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/fuzzy_matcher.rb#29 + def arrays_match?(expected_list, actual_list); end + + # @private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/fuzzy_matcher.rb#38 + def hashes_match?(expected_hash, actual_hash); end + end +end + # @private # # source://rspec-support//lib/rspec/support/hunk_generator.rb#9 diff --git a/sorbet/rbi/gems/rspec.rbi b/sorbet/rbi/gems/rspec.rbi deleted file mode 100644 index f9a6d2c..0000000 --- a/sorbet/rbi/gems/rspec.rbi +++ /dev/null @@ -1,15 +0,0 @@ -# This file is autogenerated. Do not edit it by hand. Regenerate it with: -# srb rbi gems - -# typed: strict -# -# If you would like to make changes to this file, great! Please create the gem's shim here: -# -# https://github.com/sorbet/sorbet-typed/new/master?filename=lib/rspec/all/rspec.rbi -# -# rspec-3.13.0 - -module RSpec -end -module RSpec::Version -end diff --git a/sorbet/rbi/gems/safe_type.rbi b/sorbet/rbi/gems/safe_type.rbi deleted file mode 100644 index c550626..0000000 --- a/sorbet/rbi/gems/safe_type.rbi +++ /dev/null @@ -1,112 +0,0 @@ -# This file is autogenerated. Do not edit it by hand. Regenerate it with: -# srb rbi gems - -# typed: strict -# -# If you would like to make changes to this file, great! Please create the gem's shim here: -# -# https://github.com/sorbet/sorbet-typed/new/master?filename=lib/safe_type/all/safe_type.rbi -# -# safe_type-1.1.1 - -module SafeType - def self.coerce!(input, rule); end - def self.coerce(input, rule, coerce_key = nil); end -end -class SafeType::Converter - def self.to_bool(input); end - def self.to_date(input); end - def self.to_date_time(input); end - def self.to_false(input); end - def self.to_float(input); end - def self.to_int(input); end - def self.to_time(input); end - def self.to_true(input); end - def self.to_type(input, type); end -end -class SafeType::CoercionError < StandardError - def desired_type; end - def initialize(value, desired_type, key = nil); end - def key; end - def value; end -end -class SafeType::ValidationError < StandardError - def desired_type; end - def initialize(value, desired_type, key = nil); end - def key; end - def value; end -end -class SafeType::EmptyValueError < StandardError - def desired_type; end - def initialize(desired_type, key = nil); end - def key; end -end -class SafeType::InvalidRuleError < ArgumentError - def initialize; end -end -class SafeType::Rule - def after(input); end - def before(input); end - def coerce(input, key = nil); end - def initialize(type:, default: nil, required: nil, **args); end - def is_valid?(input); end - def self.coerce(input); end - def self.default; end - def self.strict; end -end -module SafeType::BooleanMixin -end -class TrueClass - include SafeType::BooleanMixin -end -class FalseClass - include SafeType::BooleanMixin -end -class SafeType::Boolean < SafeType::Rule - def initialize(type: nil, **args); end - def self.default(value = nil); end -end -class SafeType::Date < SafeType::Rule - def initialize(type: nil, from: nil, to: nil, **args); end - def is_valid?(input); end - def self.default(value = nil, from: nil, to: nil); end - def self.strict(from: nil, to: nil); end -end -class SafeType::DateTime < SafeType::Rule - def initialize(type: nil, from: nil, to: nil, **args); end - def is_valid?(input); end - def self.default(value = nil, from: nil, to: nil); end - def self.strict(from: nil, to: nil); end -end -class SafeType::Float < SafeType::Rule - def initialize(type: nil, min: nil, max: nil, **args); end - def is_valid?(input); end - def self.default(value = nil, min: nil, max: nil); end - def self.strict(min: nil, max: nil); end -end -class SafeType::Integer < SafeType::Rule - def initialize(type: nil, min: nil, max: nil, **args); end - def is_valid?(input); end - def self.default(value = nil, min: nil, max: nil); end - def self.strict(min: nil, max: nil); end -end -class SafeType::String < SafeType::Rule - def after(input); end - def initialize(type: nil, min_length: nil, max_length: nil, **args); end - def is_valid?(input); end - def self.default(value = nil, min_length: nil, max_length: nil); end - def self.strict(min_length: nil, max_length: nil); end -end -class SafeType::Symbol < SafeType::Rule - def after(input); end - def initialize(type: nil, min_length: nil, max_length: nil, **args); end - def is_valid?(input); end - def self.default(value = nil, min_length: nil, max_length: nil); end - def self.strict(min_length: nil, max_length: nil); end -end -class SafeType::Time < SafeType::Rule - def initialize(type: nil, from: nil, to: nil, **args); end - def is_valid?(input); end - def self.default(value = nil, from: nil, to: nil); end - def self.strict(from: nil, to: nil); end -end diff --git a/sorbet/rbi/gems/securerandom@0.3.1.rbi b/sorbet/rbi/gems/securerandom@0.3.1.rbi deleted file mode 100644 index 6e8b28c..0000000 --- a/sorbet/rbi/gems/securerandom@0.3.1.rbi +++ /dev/null @@ -1,73 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `securerandom` gem. -# Please instead update this file by running `bin/tapioca gem securerandom`. - - -# == Secure random number generator interface. -# -# This library is an interface to secure random number generators which are -# suitable for generating session keys in HTTP cookies, etc. -# -# You can use this library in your application by requiring it: -# -# require 'securerandom' -# -# It supports the following secure random number generators: -# -# * openssl -# * /dev/urandom -# * Win32 -# -# SecureRandom is extended by the Random::Formatter module which -# defines the following methods: -# -# * alphanumeric -# * base64 -# * choose -# * gen_random -# * hex -# * rand -# * random_bytes -# * random_number -# * urlsafe_base64 -# * uuid -# -# These methods are usable as class methods of SecureRandom such as -# +SecureRandom.hex+. -# -# If a secure random number generator is not available, -# +NotImplementedError+ is raised. -module SecureRandom - extend ::Random::Formatter - - class << self - # Returns a random binary string containing +size+ bytes. - # - # See Random.bytes - # - # source://securerandom//securerandom.rb#50 - def bytes(n); end - - # source://securerandom//securerandom.rb#64 - def gen_random(n); end - - private - - # Implementation using OpenSSL - # - # source://securerandom//securerandom.rb#59 - def gen_random_openssl(n); end - - # Implementation using system random device - # - # source://securerandom//securerandom.rb#64 - def gen_random_urandom(n); end - end -end - -# The version -# -# source://securerandom//securerandom.rb#44 -SecureRandom::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/sorbet-coerce.rbi b/sorbet/rbi/gems/sorbet-coerce.rbi deleted file mode 100644 index 18c6385..0000000 --- a/sorbet/rbi/gems/sorbet-coerce.rbi +++ /dev/null @@ -1,37 +0,0 @@ -# This file is autogenerated. Do not edit it by hand. Regenerate it with: -# srb rbi gems - -# typed: false -# -# If you would like to make changes to this file, great! Please create the gem's shim here: -# -# https://github.com/sorbet/sorbet-typed/new/master?filename=lib/sorbet-coerce/all/sorbet-coerce.rbi -# -# sorbet-coerce-0.7.0 - -module TypeCoerce - def self.[](type); end -end -module TypeCoerce::Configuration - def self.raise_coercion_error(*args, **, &blk); end - def self.raise_coercion_error=(arg0); end -end -module Polyfill::Module::MezpIYXNoPT5bIiNzbGljZSJdfQ__ -end -class TypeCoerce::CoercionError < SafeType::CoercionError -end -class TypeCoerce::ShapeError < SafeType::CoercionError -end -class TypeCoerce::Converter - def _build_args(args, type, raise_coercion_error, coerce_empty_to_nil); end - def _convert(value, type, raise_coercion_error, coerce_empty_to_nil); end - def _convert_enum(value, type, raise_coercion_error, coerce_empty_to_nil); end - def _convert_simple(value, type, raise_coercion_error, coerce_empty_to_nil); end - def _convert_to_a(ary, type, raise_coercion_error, coerce_empty_to_nil); end - def _nil_like?(value, type, coerce_empty_to_nil); end - def coerce_nil(value, type, coerce_empty_to_nil); end - def from(args, raise_coercion_error: nil, coerce_empty_to_nil: nil); end - def initialize(type); end - def new; end - def to_s; end -end diff --git a/sorbet/rbi/gems/sorbet-coerce@0.7.0.rbi b/sorbet/rbi/gems/sorbet-coerce@0.7.0.rbi index a4267f7..1c7d5fd 100644 --- a/sorbet/rbi/gems/sorbet-coerce@0.7.0.rbi +++ b/sorbet/rbi/gems/sorbet-coerce@0.7.0.rbi @@ -1,4 +1,4 @@ -# typed: false +# typed: true # DO NOT EDIT MANUALLY # This is an autogenerated file for types exported from the `sorbet-coerce` gem. diff --git a/sorbet/rbi/gems/spoom@1.4.2.rbi b/sorbet/rbi/gems/spoom@1.4.2.rbi index 09f416b..84b7876 100644 --- a/sorbet/rbi/gems/spoom@1.4.2.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.11531/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/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.11531/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/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.11531/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/lib/types/struct.rb#13 def inherited(s); end end end @@ -2368,7 +2368,7 @@ class Spoom::Deadcode::Send < ::T::Struct def each_arg_assoc(&block); end class << self - # source://sorbet-runtime/0.5.11531/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/lib/types/struct.rb#13 def inherited(s); end end end @@ -2388,7 +2388,7 @@ class Spoom::ExecResult < ::T::Struct def to_s; end class << self - # source://sorbet-runtime/0.5.11531/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/lib/types/struct.rb#13 def inherited(s); end end end @@ -2586,7 +2586,7 @@ class Spoom::FileTree::Node < ::T::Struct def path; end class << self - # source://sorbet-runtime/0.5.11531/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/lib/types/struct.rb#13 def inherited(s); end end end @@ -2652,7 +2652,7 @@ class Spoom::Git::Commit < ::T::Struct def timestamp; end class << self - # source://sorbet-runtime/0.5.11531/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/lib/types/struct.rb#13 def inherited(s); end # Parse a line formatted as `%h %at` into a `Commit` @@ -2764,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.11531/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/lib/types/struct.rb#13 def inherited(s); end end end @@ -2797,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.11531/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/lib/types/struct.rb#13 def inherited(s); end end end @@ -2855,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.11531/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/lib/types/struct.rb#13 def inherited(s); end end end @@ -2880,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.11531/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/lib/types/struct.rb#13 def inherited(s); end end end @@ -2943,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.11531/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/lib/types/struct.rb#13 def inherited(s); end end end @@ -2981,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.11531/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/lib/types/struct.rb#13 def inherited(s); end end end @@ -3047,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.11531/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/lib/types/struct.rb#13 def inherited(s); end end end @@ -3473,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.11531/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/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 3c9d288..f7eccaf 100644 --- a/sorbet/rbi/gems/tapioca@0.15.1.rbi +++ b/sorbet/rbi/gems/tapioca@0.15.1.rbi @@ -232,7 +232,7 @@ class RBI::TypedParam < ::T::Struct const :type, ::String class << self - # source://sorbet-runtime/0.5.11531/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/lib/types/struct.rb#13 def inherited(s); end end end @@ -1155,7 +1155,7 @@ class Tapioca::ConfigHelper::ConfigError < ::T::Struct const :message_parts, T::Array[::Tapioca::ConfigHelper::ConfigErrorMessagePart] class << self - # source://sorbet-runtime/0.5.11531/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/lib/types/struct.rb#13 def inherited(s); end end end @@ -1166,7 +1166,7 @@ class Tapioca::ConfigHelper::ConfigErrorMessagePart < ::T::Struct const :colors, T::Array[::Symbol] class << self - # source://sorbet-runtime/0.5.11531/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/lib/types/struct.rb#13 def inherited(s); end end end @@ -2207,7 +2207,7 @@ class Tapioca::GemInfo < ::T::Struct sig { params(spec: ::Bundler::LazySpecification).returns(::Tapioca::GemInfo) } def from_spec(spec); end - # source://sorbet-runtime/0.5.11531/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/lib/types/struct.rb#13 def inherited(s); end end end @@ -2499,7 +2499,7 @@ class Tapioca::Loaders::Loader # @param engine [T.class_of(Rails::Engine)] # @return [Array] # - # source://sorbet-runtime/0.5.11531/lib/types/private/methods/_methods.rb#257 + # source://sorbet-runtime/0.5.11670/lib/types/private/methods/_methods.rb#257 def eager_load_paths(*args, **_arg1, &blk); end # source://tapioca//lib/tapioca/loaders/loader.rb#188 @@ -3407,7 +3407,7 @@ module Tapioca::Static::SymbolLoader # @return [Array] # - # source://sorbet-runtime/0.5.11531/lib/types/private/methods/_methods.rb#257 + # source://sorbet-runtime/0.5.11670/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/tzinfo.rbi b/sorbet/rbi/gems/tzinfo.rbi deleted file mode 100644 index 259329f..0000000 --- a/sorbet/rbi/gems/tzinfo.rbi +++ /dev/null @@ -1,591 +0,0 @@ -# This file is autogenerated. Do not edit it by hand. Regenerate it with: -# srb rbi gems - -# typed: strict -# -# If you would like to make changes to this file, great! Please create the gem's shim here: -# -# https://github.com/sorbet/sorbet-typed/new/master?filename=lib/tzinfo/all/tzinfo.rbi -# -# tzinfo-2.0.6 - -module TZInfo - def self.eager_load!; end -end -module TZInfo::RubyCoreSupport - def self.untaint(o); end -end -class TZInfo::StringDeduper - def create_hash(&block); end - def dedupe(string); end - def initialize; end - def self.global; end -end -class TZInfo::ConcurrentStringDeduper < TZInfo::StringDeduper - def create_hash(&block); end -end -class TZInfo::UnaryMinusGlobalStringDeduper - def dedupe(string); end -end -class TZInfo::Timestamp - def <=>(t); end - def add_and_set_utc_offset(seconds, utc_offset); end - def eql?(arg0); end - def hash; end - def initialize!(value, sub_second = nil, utc_offset = nil); end - def initialize(value, sub_second = nil, utc_offset = nil); end - def inspect; end - def new_datetime(klass = nil); end - def new_time(klass = nil); end - def self.create(year, month = nil, day = nil, hour = nil, minute = nil, second = nil, sub_second = nil, utc_offset = nil); end - def self.for(value, offset = nil); end - def self.for_datetime(datetime, ignore_offset, target_utc_offset); end - def self.for_time(time, ignore_offset, target_utc_offset); end - def self.for_time_like(time_like, ignore_offset, target_utc_offset); end - def self.for_timestamp(timestamp, ignore_offset, target_utc_offset); end - def self.is_time_like?(value); end - def self.new!(value, sub_second = nil, utc_offset = nil); end - def self.utc(value, sub_second = nil); end - def strftime(format); end - def sub_second; end - def sub_second_to_s; end - def to_datetime; end - def to_i; end - def to_s; end - def to_time; end - def utc; end - def utc?; end - def utc_offset; end - def value; end - def value_and_sub_second_to_s(offset = nil); end - include Comparable -end -module TZInfo::WithOffset - def if_timezone_offset(result = nil); end - def strftime(format); end -end -class TZInfo::DateTimeWithOffset < DateTime - def clear_timezone_offset; end - def downto(min); end - def england; end - def gregorian; end - def italy; end - def julian; end - def new_start(start = nil); end - def set_timezone_offset(timezone_offset); end - def step(limit, step = nil); end - def timezone_offset; end - def to_time; end - def upto(max); end - include TZInfo::WithOffset -end -class TZInfo::TimeWithOffset < Time - def clear_timezone_offset; end - def dst?; end - def getlocal(*args); end - def gmtime; end - def isdst; end - def localtime(*args); end - def round(ndigits = nil); end - def set_timezone_offset(timezone_offset); end - def timezone_offset; end - def to_a; end - def to_datetime; end - def utc; end - def zone; end - include TZInfo::WithOffset -end -class TZInfo::TimestampWithOffset < TZInfo::Timestamp - def self.set_timezone_offset(timestamp, timezone_offset); end - def set_timezone_offset(timezone_offset); end - def timezone_offset; end - def to_datetime; end - def to_time; end - include TZInfo::WithOffset -end -class TZInfo::TimezoneOffset - def ==(toi); end - def abbr; end - def abbreviation; end - def base_utc_offset; end - def dst?; end - def eql?(toi); end - def hash; end - def initialize(base_utc_offset, std_offset, abbreviation); end - def inspect; end - def observed_utc_offset; end - def std_offset; end - def utc_offset; end - def utc_total_offset; end -end -class TZInfo::TimezoneTransition - def ==(tti); end - def at; end - def eql?(tti); end - def hash; end - def initialize(offset, previous_offset, timestamp_value); end - def local_end_at; end - def local_start_at; end - def offset; end - def previous_offset; end - def timestamp_value; end -end -class TZInfo::TransitionRule - def ==(r); end - def at(offset, year); end - def eql?(r); end - def hash; end - def hash_args; end - def initialize(transition_at); end - def transition_at; end -end -class TZInfo::DayOfYearTransitionRule < TZInfo::TransitionRule - def ==(r); end - def eql?(r); end - def hash_args; end - def initialize(day, transition_at); end - def seconds; end -end -class TZInfo::AbsoluteDayOfYearTransitionRule < TZInfo::DayOfYearTransitionRule - def ==(r); end - def eql?(r); end - def get_day(offset, year); end - def hash_args; end - def initialize(day, transition_at = nil); end - def is_always_first_day_of_year?; end - def is_always_last_day_of_year?; end -end -class TZInfo::JulianDayOfYearTransitionRule < TZInfo::DayOfYearTransitionRule - def ==(r); end - def eql?(r); end - def get_day(offset, year); end - def hash_args; end - def initialize(day, transition_at = nil); end - def is_always_first_day_of_year?; end - def is_always_last_day_of_year?; end -end -class TZInfo::DayOfWeekTransitionRule < TZInfo::TransitionRule - def ==(r); end - def day_of_week; end - def eql?(r); end - def hash_args; end - def initialize(month, day_of_week, transition_at); end - def is_always_first_day_of_year?; end - def is_always_last_day_of_year?; end - def month; end -end -class TZInfo::DayOfMonthTransitionRule < TZInfo::DayOfWeekTransitionRule - def ==(r); end - def eql?(r); end - def get_day(offset, year); end - def hash_args; end - def initialize(month, week, day_of_week, transition_at = nil); end - def offset_start; end -end -class TZInfo::LastDayOfMonthTransitionRule < TZInfo::DayOfWeekTransitionRule - def ==(r); end - def eql?(r); end - def get_day(offset, year); end - def initialize(month, day_of_week, transition_at = nil); end -end -class TZInfo::AnnualRules - def apply_rule(rule, from_offset, to_offset, year); end - def dst_end_rule; end - def dst_offset; end - def dst_start_rule; end - def initialize(std_offset, dst_offset, dst_start_rule, dst_end_rule); end - def std_offset; end - def transitions(year); end -end -module TZInfo::DataSources -end -class TZInfo::DataSources::TimezoneInfo - def create_timezone; end - def identifier; end - def initialize(identifier); end - def inspect; end - def raise_not_implemented(method_name); end -end -class TZInfo::DataSources::DataTimezoneInfo < TZInfo::DataSources::TimezoneInfo - def create_timezone; end - def period_for(timestamp); end - def periods_for_local(local_timestamp); end - def raise_not_implemented(method_name); end - def transitions_up_to(to_timestamp, from_timestamp = nil); end -end -class TZInfo::DataSources::LinkedTimezoneInfo < TZInfo::DataSources::TimezoneInfo - def create_timezone; end - def initialize(identifier, link_to_identifier); end - def link_to_identifier; end -end -class TZInfo::DataSources::ConstantOffsetDataTimezoneInfo < TZInfo::DataSources::DataTimezoneInfo - def constant_offset; end - def constant_period; end - def initialize(identifier, constant_offset); end - def period_for(timestamp); end - def periods_for_local(local_timestamp); end - def transitions_up_to(to_timestamp, from_timestamp = nil); end -end -class TZInfo::DataSources::TransitionsDataTimezoneInfo < TZInfo::DataSources::DataTimezoneInfo - def find_minimum_transition(&block); end - def initialize(identifier, transitions); end - def period_for(timestamp); end - def periods_for_local(local_timestamp); end - def transition_on_or_after_timestamp?(transition, timestamp); end - def transitions; end - def transitions_up_to(to_timestamp, from_timestamp = nil); end -end -class TZInfo::DataSources::CountryInfo - def code; end - def initialize(code, name, zones); end - def inspect; end - def name; end - def zones; end -end -class TZInfo::DataSources::InvalidPosixTimeZone < StandardError -end -class TZInfo::DataSources::PosixTimeZoneParser - def check_scan(s, pattern); end - def get_offset_from_hms(h, m, s); end - def get_seconds_after_midnight_from_hms(h, m, s); end - def initialize(string_deduper); end - def parse(tz_string); end - def parse_rule(s, type); end -end -class TZInfo::DataSources::InvalidZoneinfoFile < StandardError -end -class TZInfo::DataSources::ZoneinfoReader - def apply_rules_with_transitions(file, transitions, offsets, rules); end - def apply_rules_without_transitions(file, first_offset, rules); end - def check_read(file, bytes); end - def derive_offsets(transitions, offsets); end - def find_existing_offset(offsets, offset); end - def initialize(posix_tz_parser, string_deduper); end - def make_signed_int32(long); end - def make_signed_int64(high, low); end - def offset_matches_rule?(offset, rule_offset); end - def parse(file); end - def read(file_path); end - def replace_with_existing_offsets(offsets, annual_rules); end - def validate_and_fix_last_defined_transition_offset(file, last_defined, first_rule_offset); end -end -class TZInfo::InvalidDataSource < StandardError -end -class TZInfo::DataSourceNotFound < StandardError -end -class TZInfo::DataSource - def build_timezone_identifiers; end - def country_codes; end - def data_timezone_identifiers; end - def eager_load!; end - def find_timezone_identifier(identifier); end - def get_country_info(code); end - def get_timezone_info(identifier); end - def initialize; end - def inspect; end - def linked_timezone_identifiers; end - def load_country_info(code); end - def load_timezone_info(identifier); end - def lookup_country_info(hash, code, encoding = nil); end - def raise_invalid_data_source(method_name); end - def self.create_default_data_source; end - def self.get; end - def self.set(data_source_or_type, *args); end - def timezone_identifier_encoding; end - def timezone_identifiers; end - def to_s; end - def try_with_encoding(string, encoding); end - def validate_timezone_identifier(identifier); end -end -class TZInfo::DataSources::TZInfoDataNotFound < StandardError -end -class TZInfo::DataSources::RubyDataSource < TZInfo::DataSource - def country_codes; end - def data_timezone_identifiers; end - def initialize; end - def inspect; end - def linked_timezone_identifiers; end - def load_country_info(code); end - def load_timezone_info(identifier); end - def require_data(*file); end - def require_definition(identifier); end - def require_index(name); end - def to_s; end - def version_info; end -end -class TZInfo::DataSources::InvalidZoneinfoDirectory < StandardError -end -class TZInfo::DataSources::ZoneinfoDirectoryNotFound < StandardError -end -class TZInfo::DataSources::ZoneinfoDataSource < TZInfo::DataSource - def country_codes; end - def data_timezone_identifiers; end - def dms_to_rational(sign, degrees, minutes, seconds = nil); end - def enum_timezones(dir, exclude = nil, &block); end - def find_zoneinfo_dir; end - def initialize(zoneinfo_dir = nil, alternate_iso3166_tab_path = nil); end - def inspect; end - def linked_timezone_identifiers; end - def load_countries(iso3166_tab_path, zone_tab_path); end - def load_country_info(code); end - def load_timezone_identifiers; end - def load_timezone_info(identifier); end - def resolve_tab_path(zoneinfo_path, standard_names, tab_name); end - def self.alternate_iso3166_tab_search_path; end - def self.alternate_iso3166_tab_search_path=(alternate_iso3166_tab_search_path); end - def self.process_search_path(path, default); end - def self.search_path; end - def self.search_path=(search_path); end - def to_s; end - def validate_zoneinfo_dir(path, iso3166_tab_path = nil); end - def zoneinfo_dir; end -end -class TZInfo::TimezonePeriod - def abbr; end - def abbreviation; end - def base_utc_offset; end - def dst?; end - def end_transition; end - def ends_at; end - def initialize(offset); end - def local_ends_at; end - def local_starts_at; end - def observed_utc_offset; end - def offset; end - def raise_not_implemented(method_name); end - def start_transition; end - def starts_at; end - def std_offset; end - def timestamp(transition); end - def timestamp_with_offset(transition); end - def utc_offset; end - def utc_total_offset; end - def zone_identifier; end -end -class TZInfo::OffsetTimezonePeriod < TZInfo::TimezonePeriod - def ==(p); end - def end_transition; end - def eql?(p); end - def hash; end - def initialize(offset); end - def start_transition; end -end -class TZInfo::TransitionsTimezonePeriod < TZInfo::TimezonePeriod - def ==(p); end - def end_transition; end - def eql?(p); end - def hash; end - def initialize(start_transition, end_transition); end - def inspect; end - def start_transition; end -end -class TZInfo::AmbiguousTime < StandardError -end -class TZInfo::PeriodNotFound < StandardError -end -class TZInfo::InvalidTimezoneIdentifier < StandardError -end -class TZInfo::UnknownTimezone < StandardError -end -class TZInfo::Timezone - def <=>(tz); end - def =~(regexp); end - def _dump(limit); end - def abbr(time = nil); end - def abbreviation(time = nil); end - def base_utc_offset(time = nil); end - def canonical_identifier; end - def canonical_zone; end - def current_period; end - def current_period_and_time; end - def current_time_and_period; end - def dst?(time = nil); end - def eql?(tz); end - def friendly_identifier(skip_first_part = nil); end - def hash; end - def identifier; end - def inspect; end - def local_datetime(year, month = nil, day = nil, hour = nil, minute = nil, second = nil, sub_second = nil, dst = nil, &block); end - def local_time(year, month = nil, day = nil, hour = nil, minute = nil, second = nil, sub_second = nil, dst = nil, &block); end - def local_timestamp(year, month = nil, day = nil, hour = nil, minute = nil, second = nil, sub_second = nil, dst = nil, &block); end - def local_to_utc(local_time, dst = nil); end - def name; end - def now; end - def observed_utc_offset(time = nil); end - def offsets_up_to(to, from = nil); end - def period_for(time); end - def period_for_local(local_time, dst = nil); end - def period_for_utc(utc_time); end - def periods_for_local(local_time); end - def raise_unknown_timezone; end - def self._load(data); end - def self.all; end - def self.all_country_zone_identifiers; end - def self.all_country_zones; end - def self.all_data_zone_identifiers; end - def self.all_data_zones; end - def self.all_identifiers; end - def self.all_linked_zone_identifiers; end - def self.all_linked_zones; end - def self.data_source; end - def self.default_dst; end - def self.default_dst=(value); end - def self.get(identifier); end - def self.get_proxies(identifiers); end - def self.get_proxy(identifier); end - def strftime(format, time = nil); end - def to_local(time); end - def to_s; end - def transitions_up_to(to, from = nil); end - def utc_offset(time = nil); end - def utc_to_local(utc_time); end - include Comparable -end -class TZInfo::InfoTimezone < TZInfo::Timezone - def identifier; end - def info; end - def initialize(info); end -end -class TZInfo::DataTimezone < TZInfo::InfoTimezone - def canonical_zone; end - def period_for(time); end - def periods_for_local(local_time); end - def transitions_up_to(to, from = nil); end -end -class TZInfo::LinkedTimezone < TZInfo::InfoTimezone - def canonical_zone; end - def initialize(info); end - def period_for(time); end - def periods_for_local(local_time); end - def transitions_up_to(to, from = nil); end -end -class TZInfo::TimezoneProxy < TZInfo::Timezone - def _dump(limit); end - def canonical_zone; end - def identifier; end - def initialize(identifier); end - def period_for(time); end - def periods_for_local(local_time); end - def real_timezone; end - def self._load(data); end - def transitions_up_to(to, from = nil); end -end -class TZInfo::InvalidCountryCode < StandardError -end -class TZInfo::Country - def <=>(c); end - def =~(regexp); end - def _dump(limit); end - def code; end - def eql?(c); end - def hash; end - def initialize(info); end - def inspect; end - def name; end - def self._load(data); end - def self.all; end - def self.all_codes; end - def self.data_source; end - def self.get(code); end - def to_s; end - def zone_identifiers; end - def zone_info; end - def zone_names; end - def zones; end - include Comparable -end -class TZInfo::CountryTimezone - def ==(ct); end - def description; end - def description_or_friendly_identifier; end - def eql?(ct); end - def hash; end - def identifier; end - def initialize(identifier, latitude, longitude, description = nil); end - def latitude; end - def longitude; end - def timezone; end -end -module TZInfo::Format2 -end -class TZInfo::Format2::CountryDefiner - def initialize(shared_timezones, identifier_deduper, description_deduper); end - def timezone(identifier_or_reference, latitude_numerator = nil, latitude_denominator = nil, longitude_numerator = nil, longitude_denominator = nil, description = nil); end - def timezones; end -end -class TZInfo::Format2::CountryIndexDefiner - def countries; end - def country(code, name); end - def initialize(identifier_deduper, description_deduper); end - def timezone(reference, identifier, latitude_numerator, latitude_denominator, longitude_numerator, longitude_denominator, description = nil); end -end -module TZInfo::Format2::CountryIndexDefinition - def self.append_features(base); end -end -module TZInfo::Format2::CountryIndexDefinition::ClassMethods - def countries; end - def country_index; end -end -class TZInfo::Format2::TimezoneDefiner - def first_offset; end - def initialize(string_deduper); end - def offset(id, base_utc_offset, std_offset, abbreviation); end - def subsequent_rules(*args); end - def transition(offset_id, timestamp_value); end - def transitions; end -end -module TZInfo::Format2::TimezoneDefinition - def self.append_features(base); end -end -module TZInfo::Format2::TimezoneDefinition::ClassMethods - def get; end - def linked_timezone(identifier, link_to_identifier); end - def timezone(identifier); end - def timezone_definer_class; end -end -class TZInfo::Format2::TimezoneIndexDefiner - def data_timezone(identifier); end - def data_timezones; end - def initialize(string_deduper); end - def linked_timezone(identifier); end - def linked_timezones; end -end -module TZInfo::Format2::TimezoneIndexDefinition - def self.append_features(base); end -end -module TZInfo::Format2::TimezoneIndexDefinition::ClassMethods - def data_timezones; end - def linked_timezones; end - def timezone_index; end -end -module TZInfo::Format1 -end -class TZInfo::Format1::CountryDefiner < TZInfo::Format2::CountryDefiner - def initialize(identifier_deduper, description_deduper); end -end -module TZInfo::Format1::CountryIndexDefinition - def self.append_features(base); end -end -module TZInfo::Format1::CountryIndexDefinition::ClassMethods - def countries; end - def country(code, name); end -end -class TZInfo::Format1::TimezoneDefiner < TZInfo::Format2::TimezoneDefiner - def offset(id, utc_offset, std_offset, abbreviation); end - def transition(year, month, offset_id, timestamp_value, datetime_numerator = nil, datetime_denominator = nil); end -end -module TZInfo::Format1::TimezoneDefinition - def self.append_features(base); end -end -module TZInfo::Format1::TimezoneDefinition::ClassMethods - def timezone_definer_class; end -end -module TZInfo::Format1::TimezoneIndexDefinition - def self.append_features(base); end -end -module TZInfo::Format1::TimezoneIndexDefinition::ClassMethods - def data_timezones; end - def linked_timezone(identifier); end - def linked_timezones; end - def timezone(identifier); end -end diff --git a/sorbet/rbi/gems/tzinfo@2.0.6.rbi b/sorbet/rbi/gems/tzinfo@2.0.6.rbi deleted file mode 100644 index 2d8ea9f..0000000 --- a/sorbet/rbi/gems/tzinfo@2.0.6.rbi +++ /dev/null @@ -1,9 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `tzinfo` gem. -# Please instead update this file by running `bin/tapioca gem tzinfo`. - - -# THIS IS AN EMPTY RBI FILE. -# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi b/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi index f882502..3889d4b 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.11531/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11670/lib/types/struct.rb#13 def inherited(s); end end end diff --git a/sorbet/rbi/gems/yard@0.9.36.rbi b/sorbet/rbi/gems/yard@0.9.36.rbi index c542c39..a5fd1cb 100644 --- a/sorbet/rbi/gems/yard@0.9.36.rbi +++ b/sorbet/rbi/gems/yard@0.9.36.rbi @@ -7407,13 +7407,13 @@ class YARD::I18n::Text # block separated by one or more empty lines. Empty line is a # line that contains only zero or more whitespaces. It may # called many times. + # @yieldparam text [String] the text of extracted paragraph. + # @yieldparam start_line_no [Integer] the start line number of + # extracted paragraph. # @yieldparam name [String] the name of extracted attribute. # @yieldparam value [String] the value of extracted attribute. # @yieldparam line_no [Integer] the defined line number of extracted # attribute. - # @yieldparam text [String] the text of extracted paragraph. - # @yieldparam start_line_no [Integer] the start line number of - # extracted paragraph. # # source://yard//lib/yard/i18n/text.rb#35 def extract_messages; end @@ -11130,6 +11130,10 @@ class YARD::Parser::SourceParser # To register a callback that is called before the entire list of files # is processed, see {before_parse_list}. # + # @example Cancel parsing of any test_*.rb files + # SourceParser.before_parse_file do |parser| + # return false if parser.file =~ /^test_.+\.rb$/ + # end # @example Installing a simple callback # SourceParser.before_parse_file do |parser| # puts "I'm parsing #{parser.file}" @@ -11139,13 +11143,9 @@ class YARD::Parser::SourceParser # "I'm parsing lib/foo.rb" # "I'm parsing lib/foo_bar.rb" # "I'm parsing lib/last_file.rb" - # @example Cancel parsing of any test_*.rb files - # SourceParser.before_parse_file do |parser| - # return false if parser.file =~ /^test_.+\.rb$/ - # end # @return [Proc] the yielded block - # @see after_parse_file # @see before_parse_list + # @see after_parse_file # @since 0.7.0 # @yield [parser] the yielded block is called once before each # file that is parsed. This might happen many times for a single @@ -11169,12 +11169,6 @@ class YARD::Parser::SourceParser # via {parse}. The block passed to this method will be called on # subsequent parse calls. # - # @example Installing a simple callback - # SourceParser.before_parse_list do |files, globals| - # puts "Starting to parse..." - # end - # YARD.parse('lib/**/*.rb') - # # prints "Starting to parse..." # @example Setting global state # SourceParser.before_parse_list do |files, globals| # globals.method_count = 0 @@ -11188,6 +11182,12 @@ class YARD::Parser::SourceParser # end # YARD.parse # # Prints: "Found 37 methods" + # @example Installing a simple callback + # SourceParser.before_parse_list do |files, globals| + # puts "Starting to parse..." + # end + # YARD.parse('lib/**/*.rb') + # # prints "Starting to parse..." # @example Using a global callback to cancel parsing # SourceParser.before_parse_list do |files, globals| # return false if files.include?('foo.rb') @@ -11196,8 +11196,8 @@ class YARD::Parser::SourceParser # YARD.parse(['foo.rb', 'bar.rb']) # callback cancels this method # YARD.parse('bar.rb') # parses normally # @return [Proc] the yielded block - # @see after_parse_list # @see before_parse_file + # @see after_parse_list # @since 0.7.0 # @yield [files, globals] the yielded block is called once before # parsing all files @@ -11589,22 +11589,22 @@ module YARD::Registry # Attempts to find an object by name starting at +namespace+, performing # a lookup similar to Ruby's method of resolving a constant in a namespace. # - # @example Looks for instance method #reverse starting from A::B::C - # Registry.resolve(P("A::B::C"), "#reverse") # @example Looks for a constant in the root namespace # Registry.resolve(nil, 'CONSTANT') # @example Looks for a class method respecting the inheritance tree # Registry.resolve(myclass, 'mymethod', true) + # @example Looks for instance method #reverse starting from A::B::C + # Registry.resolve(P("A::B::C"), "#reverse") # @example Looks for a constant but returns a proxy if not found # Registry.resolve(P('A::B::C'), 'D', false, true) # => # # @example Looks for a complex path from a namespace # Registry.resolve(P('A::B'), 'B::D') # => # + # @param inheritance [Boolean] Follows inheritance chain (mixins, superclass) + # when performing name resolution if set to +true+. # @param namespace [CodeObjects::NamespaceObject, nil] the starting namespace # (module or class). If +nil+ or +:root+, starts from the {root} object. # @param name [String, Symbol] the name (or complex path) to look for from # +namespace+. - # @param inheritance [Boolean] Follows inheritance chain (mixins, superclass) - # when performing name resolution if set to +true+. # @param proxy_fallback [Boolean] If +true+, returns a proxy representing # the unresolved path (namespace + name) if no object is found. # @param type [Symbol, nil] the {CodeObjects::Base#type} that the resolved @@ -11762,12 +11762,12 @@ class YARD::RegistryResolver # object can be returned if the lookup fails for future resolution. The # proxy will be type hinted with the +type+ used in the original lookup. # + # @example A lookup on a method through the inheritance tree + # resolver.lookup_by_math("A::B#foo", inheritance: true) # @example A lookup from root # resolver.lookup_by_path("A::B::C") # @example A lookup from the A::B namespace # resolver.lookup_by_path("C", namespace: P("A::B")) - # @example A lookup on a method through the inheritance tree - # resolver.lookup_by_math("A::B#foo", inheritance: true) # @option opts # @option opts # @option opts diff --git a/sorbet/tapioca/require.rb b/sorbet/tapioca/require.rb index b627d23..1e0caec 100644 --- a/sorbet/tapioca/require.rb +++ b/sorbet/tapioca/require.rb @@ -1,7 +1,6 @@ # typed: true # frozen_string_literal: true -require "active_support/all" require "bigdecimal" require "date" require "pry"